一、如果配置了HDFS的federation,使用eclipse插件配置完M/R Master的端口(50020)和DFS Master的端口(9000)后,无法连接到HDFS看远程目录结构
解决办法:切换到Advanced parameters标签,修改fs.defaultFS为hdfs://192.168.0.14:9000/tmp
二、使用Maven开发hadoop2 mapreduce时,下载不了hadoop2.6.0的一些相关包的解决办法
在pom.xml中增加如下配置:
<repositories>
<repository>
<id>maven.oschina.net</id>
<url>http://maven.oschina.net/content/groups/public/</url>
</repository>
</repositories>
三、引入hadoop2的mapreduce工程报错Missing artifact jdk.tools:jdk.tools:jar:1.7
在pom.xml文件中增加如下配置:
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<version>1.7</version>
<scope>system</scope>
<systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
</dependency>
四、Container *** is running beyond virtual memory limits. Current usage:498.0MB od 1GB physical memory used;2.7GB of 2.1GB virtual memory used.Killing container.
修改yarn-site.xml中yarn.scheduler.minimum-allocation-mb(默认1024)为2048或更大,根据程序需求调整。
五、Container *** is running beyond physical memory limits. Current usage: 2.5 GB of 2.5 GB physical memory used; 3.1 GB of 12.5 GB virtual memory used. Killing container.
在提交作业的命令中加入hadoop jar <jarName> -Dmapreduce.reduce.memory.mb=4096或hadoop jar <jarName> -Dmapreduce.map.memory.mb=4096
或者修改mapred-site.xml中的mapreduce.map.memory.mb(默认1024)或mapreduce.reduce.memory.mb(默认1024)参数。
六、org.apache.hadoop.mapred.YarnChild: Error running child : java.lang.OutOfMemoryError: Java heap space
修改mapred-site.xml,增加如下配置:
<property>
<name>mapred.child.java.opts</name>
<value>-Xmx1024m</value>
</property>
七、 [ContainerLauncher #4] org.apache.hadoop.ipc.Client: Retrying connect to server: data-17/192.168.0.17:37595. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
[ContainerLauncher #4] org.apache.hadoop.ipc.Client: Retrying connect to server: data-17/192.168.0.17:37595. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)......
可能是防火墙没有关闭,关闭防火墙可以解决。(目前没有找到相应的通信端口,若找到开启端口即可(37595????),不需要关闭防火墙)