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

)

27 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 really an awesome article. Thank you for sharing this.It is worth reading for everyone.
    Visit us:
    Web Designers London
    Website Design London

    ReplyDelete
  6. Uniqe informative article and of course True words, thanks for sharing. Today I see myself proud to be a hadoop professional with strong dedication and will power by blasting the obstacles. Thanks to hadoop course in Tambaram

    ReplyDelete
  7. very nice !!! i have to learning a lot of information for this sites...Sharing for wonderful information. Mysql Training in chennai | Mysql Training chennai | Mysql course in chennai | Mysql course chennai

    ReplyDelete
  8. Nice blog, here I had an opportunity to learn something new in my interested domain. I have an expectation about your future post so please keep updates.
    JAVA Training in Chennai | JAVA Training Institutes in Chennai

    ReplyDelete
    Replies
    1. I have read your blog and i got a very useful and knowledgeable information from your blog.its really a very nice article.You have done a great job . If anyone want to get Sharepoint training in Chennai, Please visit Greens Technologies Sharepoint training located at Chennai Adyar which offer Best Sharepoint training in Chennai

      Delete
  9. Thank you for sharing valuable information. Nice post. I enjoyed reading this post.
    Signature:
    download free descargar whatsapp and download baixar whatsapp online and descargar whatsapp gratis , baixar whatsapp gratis

    ReplyDelete
  10. This is a great article. It gave me a lot of useful information. thank you very much.
    Jugar juegos de frozen en línea gratis, los nuevos de princesa de Disney juegos frozen - la princesa encantadora y linda. Divertirse frozen!

    ReplyDelete
  11. Thank you for that information you article
    Signature:
    download descargar facebook gratis para Android celular and download free descargar facebook apk en español, descargar facebook plus , descarga facebook

    ReplyDelete
  12. Fortunately, Apache Hadoop is a tailor-made solution that delivers on both counts, by turning big data insights into actionable business enhancements for long-term success. To know more, visit Hadoop Training Bangalore

    ReplyDelete
  13. very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing. PHP Training in chennai | PHP Training chennai | PHP course in chennai | PHP course chennai

    ReplyDelete
  14. Thank you so much for sharing this worthwhile to spent time on. You are running a really awesome blog. Keep up this good work

    Hadoop training in adyar
    Hadoop training institute in adyar
    Hadoop course in adyar

    ReplyDelete
  15. This is also a very good post which I really enjoyed reading. It is not everyday that I have the possibility to see something
    Signature:
    facebook entrar iniciar sesion gratis - Sitio Oficial iniciado sesión en Facebook lengua española. facebook entrar rápido, facebook iniciar sesion en tu cuenta de entrar facebook

    ReplyDelete
  16. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.
    Regards,
    Informatica training in chennai|Informatica training center in Chennai

    ReplyDelete
  17. Great info. I love all the posts, I really enjoyed, I would like more information about this, because it is very nice., Thanks for sharing.
    Signature:
    download facebook movel, baixar Facebook movel, baixar facebook. Facebook chat, baixar whatsapp, fazer o download whatsapp baixar para Android, iPhone. Últimas Facebook

    ReplyDelete

  18. The information you have given here is truly helpful to me. CCNA- It’s a certification program based on routing & switching for starting level network engineers that helps improve your investment in knowledge of networking & increase the value of employer’s network,
    Regards,
    ccna course in Chennai|ccna training in Chennai

    ReplyDelete
  19. This was so useful and informative. The article helped me to learn something new. By digital marketing institute

    ReplyDelete
    Replies
    1. Uniqe informative article and of course True words, thanks for sharing. Today I see myself proud to be a hadoop professional with strong dedication and will power by blasting the obstacles. Thanks to Selenium Training in Chennai


      QTP Training in Chennai

      Hadoop Training in Chennai

      Delete
  20. very nice article.You have done a great job . If anyone want to get Best Oracle training institutes in Chennai, Please visit Greens Technologies located at Chennai Adyar which offer Best Oracle Training in Chennai.

    ReplyDelete
  21. I have read your blog and i got a very useful and knowledgeable information from your blog.its really a very nice article.You have done a great job . If anyone want to get Best Informatica training institutes in Chennai,Please visit Greens Technologies Informatica Training in Chennai located at Chennai Adyar which offer Best Informatica Training in Chennai.

    ReplyDelete
  22. Excellent knowlege sharing abour hadoop. Thanks for sharing such a great information..Its really nice and informative. If anyone want to get oracle apps finance functional training in Chennai, Please visit Greens Technologies oracle apps finance functional training located at Chennai Adyar which offer Best oracle apps finance functional training in Chennai,Best oracle apps finance functional training in Chennai

    ReplyDelete
  23. I have read your blog and i got a very useful and knowledgeable information from your blog.its really a very nice article.You have done a great job . If anyone want to get Best software testing training institutes in Chennai, Please visit Greens Technologies
    Software testing Training in Chennai located at Chennai Adyar which offer Best software testing Training in Chennai.

    ReplyDelete