0

错误:

hadoop_admin@ubuntu:~/hadoop$ bin/hadoop jar /home/hadoop_admin/hadoop/contrib/streaming/hadoop-0.20.0-streaming.jar -input data -output DOUT -mapper /home/balachanderp/libsvm-hadoop-master/scripts/mapperLibsvm.py -reducer /home/balachanderp/libsvm-hadoop-master/scripts/reducerLibsvm.py -file /home/balachanderp/libsvm-hadoop-master/scripts/mapperLibsvm.py  -file /home/balachanderp/libsvm-hadoop-master/scripts/reducerLibsvm.py 
packageJobJar: [/home/balachanderp/libsvm-hadoop-master/scripts/mapperLibsvm.py, /home/balachanderp/libsvm-hadoop-master/scripts/reducerLibsvm.py, /home/hadoop_admin/hadoop/hadoop-tmp/hadoop-unjar7855728852423515318/] [] /tmp/streamjob5538341312778875750.jar tmpDir=null
13/04/03 19:48:15 INFO mapred.FileInputFormat: Total input paths to process : 1
13/04/03 19:48:16 ERROR streaming.StreamJob: Error Launching job : java.io.IOException:     No valid local directories in property: mapred.local.dir
at org.apache.hadoop.conf.Configuration.getLocalPath(Configuration.java:890)
at org.apache.hadoop.mapred.JobConf.getLocalPath(JobConf.java:345)
at org.apache.hadoop.mapred.JobInProgress.<init>(JobInProgress.java:242)
at org.apache.hadoop.mapred.JobInProgress.<init>(JobInProgress.java:226)
at org.apache.hadoop.mapred.JobTracker.submitJob(JobTracker.java:2918)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:508)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:959)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:955)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:416)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:953)

Streaming Job Failed!

我试图通过命令行运行 map-reduce python 脚本。我的命令行输入是

bin/hadoop jar /home/hadoop_admin/hadoop/contrib/streaming/hadoop-0.20.0-streaming.jar     -input data -output DOUT -mapper /home/balachanderp/libsvm-hadoop-master/scripts/mapperLibsvm.py

我什至绑了..

bin/hadoop jar /home/hadoop_admin/hadoop/contrib/streaming/hadoop-0.20.0-streaming.jar     -input data -output DOUT -mapper /home/balachanderp/libsvm-hadoop-master/scripts/mapperLibsvm.py -reducer /home/balachanderp/libsvm-hadoop-master/scripts/reducerLibsvm.py -file /home/balachanderp/libsvm-hadoop-master/scripts/mapperLibsvm.py  -file /home/balachanderp/libsvm-hadoop-master/scripts/reducerLibsvm.py

有人可以帮我解决这个问题。

4

1 回答 1

0

13/04/03 19:48:16 ERROR streaming.StreamJob:错误启动作业:java.io.IOException:属性中没有有效的本地目录:mapred.local.dir

确保 TaskTracker、JobTracker、DataNode 和 NameNode 都正常运行。您可以使用jps,输出应如下所示

$ jps
6755 TaskTracker
7297 Jps
6149 DataNode
6393 SecondaryNameNode
5907 NameNode
6488 JobTracker

mapred.local.dir可以留空。默认位置是< hadoop.tmp.dir >/mapred

hadoop.tmp.dir定义core-site.xml如下

<property>
  <name>hadoop.tmp.dir</name>
  <value>/home/hduser/data/tmp</value>
  <description>A base for other temporary directories.</description>
</property>
于 2013-05-02T17:56:47.807 回答