我有一个由hadoop big data europe和flink 1.10和1.4组成的docker,我试着从单独的容器开始。我使用这个参考Yarn设置,其中有一个例子
示例:发出以下命令以分配10个任务管理器,每个任务管理器有8 gb内存和32个处理插槽:
./bin/yarn-session.sh -n 10 -tm 8192 -s 32
当我使用flink 1.10版本时,flink cluster with yarn session starting是可以的,但是当版本为1.4时,我得到一个例外:
java.lang.RuntimeException: Couldn't deploy Yarn session cluster
flinkmanger | at org.apache.flink.yarn.AbstractYarnClusterDescriptor.deploySessionCluster(AbstractYarnClusterDescriptor.java:372)
flinkmanger | at org.apache.flink.yarn.cli.FlinkYarnSessionCli.run(FlinkYarnSessionCli.java:679)
flinkmanger | at org.apache.flink.yarn.cli.FlinkYarnSessionCli$1.call(FlinkYarnSessionCli.java:514)
flinkmanger | at org.apache.flink.yarn.cli.FlinkYarnSessionCli$1.call(FlinkYarnSessionCli.java:511)
flinkmanger | at java.security.AccessController.doPrivileged(Native Method)
flinkmanger | at javax.security.auth.Subject.doAs(Subject.java:422)
flinkmanger | at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1807)
flinkmanger | at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
flinkmanger | at org.apache.flink.yarn.cli.FlinkYarnSessionCli.main(FlinkYarnSessionCli.java:511)
flinkmanger | Caused by: org.apache.flink.configuration.IllegalConfigurationException: The number of virtual cores per node were configured with 32 but Yarn only has 8 virtual cores available. Please note that the number of virtual cores is set to the number of task slots by default unless configured in the Flink config with 'yarn.containers.vcores.'
flinkmanger | at org.apache.flink.yarn.AbstractYarnClusterDescriptor.isReadyForDeployment(AbstractYarnClusterDescriptor.java:265)
flinkmanger | at org.apache.flink.yarn.AbstractYarnClusterDescriptor.deployInternal(AbstractYarnClusterDescriptor.java:415)
flinkmanger | at org.apache.flink.yarn.AbstractYarnClusterDescriptor.deploySessionCluster(AbstractYarnClusterDescriptor.java:367)
flinkmanger | ... 8 more
如何解释这一点,我认为每个slot=thread(-s),每个taskmanager=thread容器,并且只有容器可以在单独的处理器上工作?
1条答案
按热度按时间rqcrx0a61#
如Yarn展开模式配置参数文件所述,
yarn.containers.vcores
指定每个Yarn容器的虚拟芯(vCore)数。默认情况下,vCore数设置为每个taskmanager的插槽数(如果已设置),否则设置为1。为了使用此参数,您的集群必须启用cpu调度。在您的示例中,指定
-s 32
taskmanager.numberOfTaskSlots
参数而不重写yarn.containers.vcores
因此,应用程序将获得包含32个vCore的容器。为了能够运行32插槽每tm和只有8个核心,请设置yarn.containers.vcores
至8
在flink/conf/flink-conf.yaml
.关于资源,是的,每个任务管理器都等于获得的容器,但是容器有许多vcore,由
yarn.containers.vcores
(或每个容器的插槽数)。关于slot,它更像是一个资源组,每个slot可以有多个任务,每个任务在一个单独的线程中运行。所以,插槽本身并不局限于一个线程。请在“任务槽和资源文档”页中查找更多信息。