Hadoop:java.io.IOException: Tmp directory
今天在机器上搭建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
再次运行测试,成功了。
相关推荐
changjiang 2020-11-16
minerd 2020-10-28
WeiHHH 2020-09-23
Aleks 2020-08-19
WeiHHH 2020-08-17
飞鸿踏雪0 2020-07-26
tomli 2020-07-26
deyu 2020-07-21
strongyoung 2020-07-19
eternityzzy 2020-07-19
Elmo 2020-07-19
飞鸿踏雪0 2020-07-09
飞鸿踏雪0 2020-07-04
xieting 2020-07-04
WeiHHH 2020-06-28
genshengxiao 2020-06-26
Hhanwen 2020-06-25