Saturday, November 2, 2013

Hadoop 2.x : jar file location for wordcount example

The Jar files  for Hadoop 2.x have moved location from Hadoop 1.x.  I found the following command

javac -classpath $HADOOP_HOME/share/hadoop/common/hadoop-common-2.2.0.jar:$HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.2.0.jar:$HADOOP_HOME/share/hadoop/common/lib/commons-cli-1.2.jar -d wordcount_classes myWordCount.java

will allow you to compile the standard wordcount example code.  You can see that the common files are in /share/hadoop/common/ and the mapreduce files are in /share/hadoop/mapreduce/.  Finally the common lib file are in /share/hadoop/common/lib

This post is in answer to this stackoverflow question:

http://stackoverflow.com/questions/19488894/compile-hadoop-2-2-0-job

(or set your classpath lke this

 export CLASSPATH=$HADOOP_HOME/share/hadoop/common/hadoop-common-2.2.0.jar:$HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.2.0.jar:$HADOOP_HOME/share/hadoop/common/lib/commons-cli-1.2.jar

and compile like this:

javac -classpath $CLASSPATH -d myWordCountClasses myWordCount.java

)

23 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. its helps me a lot. thanks for sharing...

    ReplyDelete
  4. I recently came across your blog on hadoop and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
    Hadoop Training in hyderabad

    ReplyDelete
  5. This is a good post. This post give truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. thank you so much. Keep up the good works.

    java training in chennai | java training in bangalore

    java training in tambaram | java training in velachery

    java training in omr

    ReplyDelete
  6. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.is article.
    python training in pune
    python training institute in chennai
    python training in Bangalore

    ReplyDelete
  7. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.

    Devops Training in pune
    DevOps online Training

    ReplyDelete
  8. Nice tutorial. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated tutorials…
    Selenium Training in Bangalore | Selenium Training in Bangalore | Selenium Training in Pune | Selenium online Training

    ReplyDelete
  9. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

    rpa interview questions and answers
    automation anywhere interview questions and answers
    blueprism interview questions and answers
    uipath interview questions and answers
    rpa training in chennai

    ReplyDelete
  10. Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
    apple service center | apple iphone service center | apple ipad service center | apple mac service center

    ReplyDelete
  11. I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.
    ERP in India
    Cloud ERP Companies in India
    Web development company in chennai

    ReplyDelete
  12. This is really impressive post, I am inspired with your post, do post more blogs like this, I am waiting for your blogs.
    Regards,
    Devops Training in Chennai | Devops Certification in Chennai

    ReplyDelete