sea*_*der 3 hadoop hadoop-yarn
我正在为一个项目评估YARN。我试图使简单的分布式外壳程序示例工作。我已将应用程序提交到“提交”阶段,但从未启动。这是此行报告的信息:
ApplicationReport report = yarnClient.getApplicationReport(appId);
Run Code Online (Sandbox Code Playgroud)
Application is added to the scheduler and is not yet activated. Skipping AM assignment as cluster resource is empty. Details : AM Partition = DEFAULT_PARTITION; AM Resource Request = memory:1024, vCores:1; Queue Resource Limit for AM = memory:0, vCores:0; User AM Resource Limit of the queue = memory:0, vCores:0; Queue AM Resource Usage = memory:128, vCores:1;
对于其他开发人员来说,解决方案似乎必须yarn.scheduler.capacity.maximum-am-resource-percent从默认值.1开始增加yarn-site.xml文件。我尝试过.2和.5的值,但似乎无济于事。
好像您没有以适当的方式配置分配给Yarn的RAM。如果您尝试根据自己的安装从教程中进行推断/修改,则这可能是一个问题。(加上,文档被解析)。我会强烈建议您使用的工具,如这一个:
wget http://public-repo-1.hortonworks.com/HDP/tools/2.6.0.3/hdp_manual_install_rpm_helper_files-2.6.0.3.8.tar.gz
tar zxvf hdp_manual_install_rpm_helper_files-2.6.0.3.8.tar.gz
rm hdp_manual_install_rpm_helper_files-2.6.0.3.8.tar.gz
mv hdp_manual_install_rpm_helper_files-2.6.0.3.8/ hdp_conf_files
python hdp_conf_files/scripts/yarn-utils.py -c 4 -m 8 -d 1 false
Run Code Online (Sandbox Code Playgroud)
-c 每个节点的核心数-m 每个节点的内存量(千兆)-d 每个节点的磁盘数量-bool如果安装了HBase,则为“ True”;如果不是,则为“ False”这应该给你类似的东西:
Using cores=4 memory=8GB disks=1 hbase=True
Profile: cores=4 memory=5120MB reserved=3GB usableMem=5GB disks=1
Num Container=3
Container Ram=1536MB
Used Ram=4GB
Unused Ram=3GB
yarn.scheduler.minimum-allocation-mb=1536
yarn.scheduler.maximum-allocation-mb=4608
yarn.nodemanager.resource.memory-mb=4608
mapreduce.map.memory.mb=1536
mapreduce.map.java.opts=-Xmx1228m
mapreduce.reduce.memory.mb=3072
mapreduce.reduce.java.opts=-Xmx2457m
yarn.app.mapreduce.am.resource.mb=3072
yarn.app.mapreduce.am.command-opts=-Xmx2457m
mapreduce.task.io.sort.mb=614
Run Code Online (Sandbox Code Playgroud)
编辑您的,yarn-site.xml 并进行 mapred-site.xml相应的编辑。
nano ~/hadoop/etc/hadoop/yarn-site.xml
nano ~/hadoop/etc/hadoop/mapred-site.xml
Run Code Online (Sandbox Code Playgroud)
而且,你应该在你的 yarn-site.xml
Using cores=4 memory=8GB disks=1 hbase=True
Profile: cores=4 memory=5120MB reserved=3GB usableMem=5GB disks=1
Num Container=3
Container Ram=1536MB
Used Ram=4GB
Unused Ram=3GB
yarn.scheduler.minimum-allocation-mb=1536
yarn.scheduler.maximum-allocation-mb=4608
yarn.nodemanager.resource.memory-mb=4608
mapreduce.map.memory.mb=1536
mapreduce.map.java.opts=-Xmx1228m
mapreduce.reduce.memory.mb=3072
mapreduce.reduce.java.opts=-Xmx2457m
yarn.app.mapreduce.am.resource.mb=3072
yarn.app.mapreduce.am.command-opts=-Xmx2457m
mapreduce.task.io.sort.mb=614
Run Code Online (Sandbox Code Playgroud)
这在你的mapred-site.xml:
nano ~/hadoop/etc/hadoop/yarn-site.xml
nano ~/hadoop/etc/hadoop/mapred-site.xml
Run Code Online (Sandbox Code Playgroud)
然后,使用以下命令将conf文件上传到每个节点scp(如果您将ssh密钥上传到每个节点)
<property>
<name>yarn.acl.enable</name>
<value>0</value>
</property>
<property>
<name>yarn.resourcemanager.hostname</name>
<value>name_of_your_master_node</value>
</property>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
Run Code Online (Sandbox Code Playgroud)
然后,重新启动纱线
stop-yarn.sh
start-yarn.sh
Run Code Online (Sandbox Code Playgroud)
并检查您是否可以看到您的节点:
hadoop@master-node:~$ yarn node -list
18/06/01 12:51:33 INFO client.RMProxy: Connecting to ResourceManager at master-node/192.168.0.37:8032
Total Nodes:3
Node-Id Node-State Node-Http-Address Number-of-Running-Containers
node3:34683 RUNNING node3:8042 0
node2:36467 RUNNING node2:8042 0
node1:38317 RUNNING node1:8042 0
Run Code Online (Sandbox Code Playgroud)
这可能会解决问题(祝您好运)(其他信息)
| 归档时间: |
|
| 查看次数: |
5202 次 |
| 最近记录: |