我在vmware的ubuntu 12.04的單節點環境中運行hadoop wordcount示例。 i上運行的示例是這樣的: -無法運行hadoop wordcount示例?
[email protected]:~/hadoop$ hadoop jar hadoop-examples-1.0.4.jar wordcount
/home/hadoop/gutenberg/ /home/hadoop/gutenberg-output
我有輸入文件在低於位置:
/home/hadoop/gutenberg
和位置輸出文件是:
/home/hadoop/gutenberg-output
當我運行單詞計數程序我得到以下錯誤: -
13/04/18 06:02:10 INFO mapred.JobClient: Cleaning up the staging area
hdfs://localhost:54310/home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201304180554_0001
13/04/18 06:02:10 ERROR security.UserGroupInformation: PriviledgedActionException
as:hadoop cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory
/home/hadoop/gutenberg-output already exists
org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory
/home/hadoop/gutenberg-output already exists at
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.j
ava:137) at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:887) at
org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850) at
java.security.AccessController.doPrivileged(Native Method) at
javax.security.auth.Subject.doAs(Subject.java:416) at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121) at
org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850) at
org.apache.hadoop.mapreduce.Job.submit(Job.java:500) at
org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530) at
org.apache.hadoop.examples.WordCount.main(WordCount.java:67) 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.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:616) at
org.apache.hadoop.util.RunJar.main(RunJar.java:156) [email protected]:~/hadoop$ bin/stop-
all.sh Warning: $HADOOP_HOME is deprecated. stopping jobtracker localhost: stopping
tasktracker stopping namenode localhost: stopping datanode localhost: stopping
secondarynamenode [email protected]:~/hadoop$
yes輸出文件已經存在現在我運行成功與不同的文件,但輸出文件不在我給出的位置 –
@Sandeepvashisth你在看怎麼樣的文件?也就是說,有什麼精確的命令? –
我可以通過以下命令看到目錄: - bin/hadoop dfs -ls/home/hadoop但無法使用資源管理器查看。 –