You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by لسٹ शिराज़ <sh...@googlemail.com> on 2011/04/06 15:18:26 UTC

error in running the WordCount

Hi,
I am a newbie to the mapreduce (in fact hadoop as a whole) framework. I am
trying to run a simple WordCount client class programatically inside the
eclipse, hence for that, I have provided the configuration files for hdfs,
mapreduce and core using the JobConf.addResource method respectively. Here
is the error I see in the eclipse console:

11/04/06 15:12:37 INFO security.Groups: Group mapping
impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping;
cacheTimeout=300000
11/04/06 15:12:37 WARN conf.Configuration: mapred.task.id is deprecated.
Instead, use mapreduce.task.attempt.id
11/04/06 15:12:37 WARN mapreduce.JobSubmitter: Use GenericOptionsParser for
parsing the arguments. Applications should implement Tool for the same.
11/04/06 15:12:37 WARN mapreduce.JobSubmitter: No job jar file set.  User
classes may not be found. See Job or Job#setJar(String).
11/04/06 15:12:37 INFO mapreduce.JobSubmitter: Cleaning up the staging area
hdfs://localhost:9000/tmp/hadoop-shiraz/mapred/staging/a.memon/.staging/job_201104061332_0016
Exception in thread "main" org.apache.hadoop.mapred.InvalidJobConfException:
Output directory not set in JobConf.
at
org.apache.hadoop.mapred.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:112)
at
org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:375)
at
org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:334)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:960)
at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:534)
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:779)
at org.simple.mapreduce.WordCount.main(WordCount.java:100)

Note: The server is running separately on the same machine with default
configurations as provided by the bundle.

Could you please let me know if I miss something while setting up the
client?

However, the wordcount is outdated under the quickstart wiki page, and is
not compatible with the latest 0.21 version libs, e.g. while setting paths
one has to provide the Job ref. instead of the JobConf reference. here is
the link:

http://hadoop.apache.org/common/docs/r0.20.2/mapred_tutorial.html#Inputs+and+Outputs

<http://hadoop.apache.org/common/docs/r0.20.2/mapred_tutorial.html#Inputs+and+Outputs>
Thanks,
-- 
Shiraz

Re: error in running the WordCount

Posted by Harsh J <ha...@cloudera.com>.
Hello,

2011/4/6 لسٹ शिराज़ <sh...@googlemail.com>:
> at org.simple.mapreduce.WordCount.main(WordCount.java:100)
> Note: The server is running separately on the same machine with default
> configurations as provided by the bundle.
> Could you please let me know if I miss something while setting up the
> client?

Do you have a "FileOutputFormat.setOutputPath(JobConf, Path)" call in
your driver/client code? An output path is required if your program's
output needs to be files on the FS, as is the case with Word-Counting.

-- 
Harsh J