`

Hadoop:java.io.IOException: Tmp directory

    博客分类:
  • J2EE
阅读更多
今天在机器上搭建Hadoop测试,第一次运行:
bin/hadoop jar hadoop-examples-1.0.3.jar pi 10 100

的时候,是没有问题的,然后我stop-all.sh,修改了一些配置文件,
运行start-all.sh,然后再次运行上面的命令的时候,就出现了这样的情况,
错误信息如下:
shuumatoMacBook:hadoop-1.0.3 Vito$ bin/hadoop jar hadoop-examples-1.0.3.jar pi 10 100
Number of Maps  = 10
Samples per Map = 100
2012-08-30 11:07:54.740 java[4131:1703] Unable to load realm info from SCDynamicStore
java.io.IOException: Tmp directory hdfs://localhost:8020/user/Vito/PiEstimator_TMP_3_141592654 already exists.  Please remove it first.
	at org.apache.hadoop.examples.PiEstimator.estimate(PiEstimator.java:270)
	at org.apache.hadoop.examples.PiEstimator.run(PiEstimator.java:342)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
	at org.apache.hadoop.examples.PiEstimator.main(PiEstimator.java:351)
	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:601)
	at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
	at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
	at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:64)
	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:601)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:156)


字面意思上就明白了,tmp已经创建,现在你需要删除它,那我们就删除它吧:
bin/hadoop fs -rmr hdfs://localhost:8020/user/Vito/PiEstimator_TMP_3_141592654

再次运行测试,成功了。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics