You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@hadoop.apache.org by Ren Zuocheng <aw...@gmail.com> on 2010/11/20 15:41:21 UTC

The documentation for startup is out of date.

Dear all,
(I've sent this email, but I forgot to subscribe to the maillist and did not receive any reply... So I resent the message. Sorry about this.)
I'm new to hadoop and following the documentation for startup users to set up my first WordCounter in hadoop. However, I find out that there are some flaws in the documentation
An example is the hadoop-core-${HADOOP_VERSION}.jar has been renamed to hadoop-common-${HADOOP_VERSION}.jar. There are much more minor errors like this, which may cause a novice to feel confused or misled.
And I really want to write an update for that. Can I? If I can, how can I do that?

ClassNotFoundException

Posted by Peter Haidinyak <ph...@local.com>.
Hi,
  I just installed hadoop .21 (linux) and am trying to use the new API so I copied the example code from the Job.java source...


    final Job job = new Job(new Configuration(true));
    job.setJarByClass(SearchLogSorter.class);

    job.setJobName("Search Log Sort");

when I compile and jar this and run it I get a 

[hadoop@cala3stgiss01 hadoop]$ hadoop -jar jars/SearchLogSorter.jar a s
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/Job
        at com.local.ctr.importer.SearchLogSorter.main(SearchLogSorter.java:96)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.mapreduce.Job
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 1 more

I executed 'hadoop classpath' and the 'hadoop-mapred-0.21.0.jar' is in the path.

Any ideas?

Also, will the jar be renamed to 'hadoop-mapreduce.*.jar in the future?

Thanks

-Pete

Re: The documentation for startup is out of date.

Posted by Eli Collins <el...@cloudera.com>.
Hey Ren,

Assume you're referring to pages like
http://hadoop.apache.org/mapreduce/docs/current/mapred_tutorial.html

The current release is 21, so to update those docs checkout the
branch-0.21 branch from the common, mapreduce, and hdfs repository.
The docs live in src/docs (eg this page is
src/docs/src/documentation/content/xdocs/mapred_tutorial.xml in the
mapreduce repo).

First check if the change has already been made on trunk, if not make
it there and we can backport it to the branch-0.21 branches.  Please
file a jira (one for each project) for the docs bugs you find. No need
to put every individual bug in it's own jira.

Thanks for contributing!

Eli

On Sat, Nov 20, 2010 at 6:41 AM, Ren Zuocheng <aw...@gmail.com> wrote:
> Dear all,
> I'm new to hadoop and following the documentation for startup users to set up my first WordCounter in hadoop. However, I find out that there are some flaws in the documentation
> An example is the hadoop-core-${HADOOP_VERSION}.jar has been renamed to hadoop-common-${HADOOP_VERSION}.jar. There are much more minor errors like this, which may cause a novice to feel confused or misled.
> And I really want to write an update for that. Can I? If I can, how can I do that?