版本信息: hadoop 2.3.0 hive 0.11.0
1. Application Master 无法访问
点击application mater 链接,出现 http 500 错误,java.lang.Connect.exception:
问题是由于设定web ui时,50030 端口对应的ip地址为0.0.0.0,导致application master 链接无法定位。
解决办法:
yarn-site.xml 文件
<property>
<description>The address of the RM web application.</description>
<name>yarn.resourcemanager.webapp.address</name>
<value>
xxxxxxxxxx:50030</value>
</property>
这是2.3.0 的里面的一个bug 1811 ,2.4.0已经修复
2. History UI 无法访问 和 container 打不开
点击 Tracking URL:History无法访问
问题是 history service 没有启动
解决办法:
<property>
<name>yarn.log-aggregation-enable</name>
<value>true</value>
</property>
<property>
<name>mapreduce.jobhistory.address</name>
<value>
xxxxxxxxxx::10020</value>
</property>
<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>
xxxxxxxxxx:19888</value>
</property>
sbin/mr-jobhistory-daemon.sh
start historyserver
3 yarn 平台的优化
设置 虚拟cpu的个数
<property>
<name>yarn.nodemanager.resource.cpu-vcores</name>
<value>23</value>
</property>
设置使用的内存
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>61440</value>
<description>the amount of memory on the NodeManager in GB</description>
</property>
设置每个任务最大使用的内存
<property>
<name>yarn.scheduler.maximum-allocation-mb</name>
<value>49152</value>
<source>yarn-default.xml</source>
</property>
4 运行任务 提示:
Found interface org.apache.hadoop.mapreduce.Counter, but class was expected
修改pom,重新install
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.mrunit</groupId>
<artifactId>mrunit</artifactId>
<version>1.0.0</version>
<classifier>
hadoop2<
/classifier>
<scope>test</scope>
</dependency>
jdk 换成1.7