失败日志
2019-11-03 00:29:06,889 FATAL org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Error starting ResourceManager
org.apache.hadoop.yarn.exceptions.YarnRuntimeException: RM uses DefaultResourceCalculator which used only memory as resource-type but invalid resource-types specified
{memory-mb=name: memory-mb, units: Mi, type: COUNTABLE, value: 0, minimum allocation: 1024, maximum allocation: 8192, vcores=name: vcores, units: , type: COUNTABLE, va
lue: 0, minimum allocation: 1, maximum allocation: 4, network=name: network, units: M, type: COUNTABLE, value: 0, minimum allocation: 0, maximum allocation: 9223372036
854775807}. Use DominantResourceCalculator instead to make effective use of these resource-types
at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.initScheduler(CapacityScheduler.java:352)
at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.serviceInit(CapacityScheduler.java:442)
at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
at org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:108)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$RMActiveServices.serviceInit(ResourceManager.java:841)
at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.createAndInitActiveServices(ResourceManager.java:1247)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceInit(ResourceManager.java:321)
at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1529)
产生原因:自定义的etc/hadoop/resource-types.xml文件中resource-type多了一个s(即写错为resource-types)
<configuration>
<property>
<name>yarn.resource-type</name>
<value>network</value>
</property>
<property>
<name>yarn.resource-type.network.units</name>
<value>M</value>
</property>
<property>
<name>yarn.resource-type.network.minimum</name>
<value>1</value>
</property>
<property>
<name>yarn.resource-type.network.maximum</name>
<value>10</value>
</property>
</configuration>
备注:但是不写成resource-types,yarn配置network之后无法生效。。。不知道怎么搞这个