1、streaming默认的情况下,mapper和reducer的返回值不是0,被认为异常任务,将被再次执行,默认尝试4次都不是0,整个job都将失败
java.lang.RuntimeException: PipeMapRed.waitOutputThreads(): subprocess failed wi th code 1 at org.apache.Hadoop.streaming.PipeMapRed.waitOutputThreads(PipeMapRed.j ava:311) at org.apache.hadoop.streaming.PipeMapRed.mapRedFinished(PipeMapRed.java :545) at org.apache.hadoop.streaming.PipeReducer.reduce(PipeReducer.java:130) at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:519 ) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:420) at org.apache.hadoop.mapred.Child$4.run(Child.java:255) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInforma tion.java:1093) at org.apache.hadoop.mapred.Child.main(Child.java:249)解决方法:
hadoop jar hadoop-streaming*.jar -D stream.non.zero.exit.is.failure=false
2、在执行streaming任务时,出现:Environment variable CLASSPATH not set!
解决方法:
在执行streaming时,加上选项:
-cmdenv CLASSPATH=$CLASSPATH
3、在调用HDFS的C接口时,出现:Call to JNI_CreateJavaVM failed with error: -1原因:貌似是因为在编译的时候加上了libjvm,然后动态链接库那也加了。解决方法,编译的时候去掉libjvmm的链接就可以了。