Yarn 2.2.0安装

来源:互联网 发布:狗万万博软件 编辑:程序博客网 时间:2024/05/17 17:18

1. 版本库的问题:

   

 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicableStarting namenodes on [Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/hchen/hadoop-2.2.0/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.namenode]sed: -e expression #1, char 6: unknown option to `s' have: ssh: Could not resolve hostname have: Name or service not knownHotSpot(TM): ssh: Could not resolve hostname HotSpot(TM): Name or service not known-c: Unknown cipher type 'cd'Java: ssh: Could not resolve hostname Java: Name or service not knownThe authenticity of host 'namenode (192.168.1.62)' can't be established.RSA key fingerprint is 65:f9:aa:7c:8f:fc:74:e4:c7:a2:f5:7f:d2:cd:55:d4.Are you sure you want to continue connecting (yes/no)? VM: ssh: Could not resolve        hostname VM: Name or service not knownYou: ssh: Could not resolve hostname You: Name or service not knownwarning:: ssh: Could not resolve hostname warning:: Name or service not knownlibrary: ssh: Could not resolve hostname library: Name or service not knownhave: ssh: Could not resolve hostname have: Name or service not known64-Bit: ssh: Could not resolve hostname 64-Bit: Name or service not known
出现原因见该贴: http://m.blog.csdn.net/blog/haidao2009/14897813
http://blog.csdn.net/pelick/article/details/12065147
不过我修改了环境变量没起作用,索性直接在hadoop-config.sh文件中加了:
export HADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_PREFIX}/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_PREFIX/lib"
启动OK.
BTW, 如果要彻底根除这个
 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
参考这贴
1) http://blog.csdn.net/lalaguozhe/article/details/10580727
2) http://blog.csdn.net/huanggang028/article/details/17411791
3) http://blog.csdn.net/jiedushi/article/details/7496327
2. 
  1. <property>  
  2.     <name>yarn.nodemanager.aux-services</name>  
  3.     <value>mapreduce.shuffle</value>  
  4.   </property> 

改为

  1. <property>  
  2.     <name>yarn.nodemanager.aux-services</name>  
  3.     <value>mapreduce_shuffle</value>  
  4.   </property> 
不然会出现这种错误

java.lang.IllegalArgumentException: The ServiceName: mapreduce.shuffle set in yarn.nodemanager.aux-services is invalid.The valid service name should only contain a-zA-Z0-9_

3. 默认是ipv6, 在yarn 中exec后加入后改为:

exec "$JAVA" -Dproc_$COMMAND  -Djava.net.preferIPv4Stack=true  $JAVA_HEAP_MAX $HADOOP_OPTS -classpath "$CLASSPATH" $CLASS "$@"

4. 提交作业进行测试

hadoop jar hadoop-mapreduce-examples-2.2.0.jar pi 200 1000

OK.

0 0
原创粉丝点击