参考博客:https://blog.csdn.net/mp9105/article/details/116984220
1、指定队列运行
../../bin/flink run -t yarn-per-job --detached -Dyarn.application.queue=root.flink -Dyarn.application.name=QueueDemo -Dparallelism.default=1 -Djobmanager.memory.process.size=1024mb -Dtaskmanager.memory.process.size=1024mb -Dtaskmanager.numberOfTaskSlots=2 -Denv.java.opts="-Dfile.encoding=UTF-8" -Drest.flamegraph.enabled=true -c test.SqlJoinMysql2EsCDCTest FlinkSqlTest-1.0-SNAPSHOT.jar
2、pre-job运行
../../bin/flink run -t yarn-per-job --detached -Dyarn.application.name=consumerDemo -Dparallelism.default=1 -Djobmanager.memory.process.size=1024mb -Dtaskmanager.memory.process.size=1024mb -Dtaskmanager.numberOfTaskSlots=2 -Denv.java.opts="-Dfile.encoding=UTF-8" -Drest.flamegraph.enabled=true -c test.SqlJoinMysql2EsCDCTest FlinkSqlTest-1.0-SNAPSHOT.jar
运行命令
/bin/flink run -t yarn-per-job --detached ./examples/streaming/TopSpeedWindowing.jar
1、错误
解决方案:调节yarn的yarn.scheduler.maximum-allocation-mb和yarn.nodemanager.resource.memory-mb