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

)

60 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. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. I learned World's Trending Technology from certified experts for free of cost.i Got job in decent Top MNC Company with handsome 14 LPA salary, i have learned the World's Trending Technology from Python training in pune experts who know advanced concepts which can helps to solve any type of Real time issues in the field of Python. Really worth trying instant approval blog commenting sites

    ReplyDelete
  10. Thanks for sharing
    "Sanjary Academy provides excellent training for Piping design course. Best Piping Design Training Institute in Hyderabad,
    Telangana. We have offer professional Engineering Course like Piping Design Course,QA / QC Course,document Controller
    course,pressure Vessel Design Course, Welding Inspector Course, Quality Management Course, #Safety officer course."
    Piping Design Course in India­
    Piping Design Course in Hyderabad
    Piping Design Course in Hyderabad
    QA / QC Course
    QA / QC Course in india
    QA / QC Course in Hyderabad
    Document Controller course
    Pressure Vessel Design Course
    Welding Inspector Course
    Quality Management Course
    Quality Management Course in india
    Safety officer course

    ReplyDelete
  11. Hi,
    Best article, very useful and well explanation. Your post is extremely incredible.Good job & thank you very much for the new information, i learned something new. Very well written. It was sooo good to read and usefull to improve knowledge. Who want to learn this information most helpful. One who wanted to learn this technology IT employees will always suggest you take python training in btm.

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

    ReplyDelete
  13. OnePlus Service Center in Chennai

    OnePlus Service Center in Chennai No. 1 Smart Service On Time, Every Time
    OnePlus Service Center in Chennai
    OnePlus Service Center in Chennai
    OnePlus Service Center in Chennai

    ReplyDelete
  14. Moto service center in Chennai
    Leading Motorola Service Center In Chennai. Fast & Reliable Services On-time, Every time!
    Moto service center in Chennai
    Motorola Service Center In Chennai
    Motorola Service Center In Chennai

    ReplyDelete
  15. LG Mobile Service Center In Chennai

    LG Mobile Service Center In Chennai. Providing Fast, Honest, Reliable & Cost Effective Service Solutions To The LG Mobile Users.
    LG Mobile Service Center In Chennai

    ReplyDelete
  16. Nokia Mobile Service Center In Chennai
    Nokia Mobile Service Center In Chennai. Providing Fast, Honest, Reliable & Cost Effective Service Solutions to The Nokia Mobile Users.
    NOkia Mobile Service Center In Chennai

    ReplyDelete
  17. Honor service center in Chennai

    Honor Service Center in Chennai for the Best & Right Place to service your Honor mobile phone.
    Honor Service Center in Chennai

    ReplyDelete
  18. OPPO Service Center In Chennai
    OPPO Service Center Chennai is an end-to-end OPPO service and repair solutions Center.
    OPPO Service Center In Chennai

    ReplyDelete
  19. Ipad service center in Chennai

    Ipad service Center in Chennai offers you best quality of Services On-time, Every time!
    Ipad Service Center in Chennai

    ReplyDelete

  20. Apple Imacbook Service Center in Chennai

    Apple Laptop Service Center in Chennai offers you best quality of Services On-time, Every time!
    Apple Laptop Service Center in Chennai

    ReplyDelete
  21. Acer Service Center in Chennai

    Acer Service Center in Chennai Best service for all model acer laptop and desktop Services On-time, Every time!
    Acer Laptop Service Center in Chennai
    Acer Service Center in Chennai
    Acer Service Center in Chennai

    ReplyDelete
  22. Lenovo Service Center in Chennai

    Lenovo Service Center Chennai
    Lenovo Service Center Chennai
    Lenovo service center near me in Chennai
    Lenovo service center near me in Chennai

    ReplyDelete
  23. Awesome Post!!!

    Redmi Service Center in Chennai

    Redmi Service Center in Chennai No. 1 Leaders Awesome Services On-time, Every time!
    Redmi Service center in chennai
    Mi Service Center in Chennai
    Mi Service Center in Chennai

    ReplyDelete
  24. WOW Great Post!!!

    Apple iPhone Service Center in Chennai

    Chennai No-1 Apple iPhone Service Center in Chennai
    Apple iPhone Service Center in Chennai
    Iphone Service Center in Chennai
    Iphone Service Center in Chennai
    Apple Service Center In Chennai
    Apple Service Center In Chennai

    ReplyDelete
  25. Oneplus Service Center in Bangalore

    Oneplus Repair Service Center in Bangalore. For the finest service and fastest delivery for your Oneplus mobile, visit us! Go home a happy customer! Connect with us!!

    Oneplus Mobile Service Center in Bangalore

    ReplyDelete
  26. Oneplus Service Center in Bangalore

    Oneplus Repair Service Center in Bangalore. For the finest service and fastest delivery for your Oneplus mobile, visit us! Go home a happy customer! Connect with us!!

    Oneplus Mobile Service Center in Bangalore

    ReplyDelete
  27. Oppo Service Center in Bangalore

    OPPO Service Center in Bangalore is the best OPPO Service Center in Bangalore. We can fix all OPPO devices at low cost with best quality.
    Oppo Repair Center in Bangalore- All our OPPO care technicians has 10+ years experience in the mobile care fix industry

    Oppo repair center in bangalore

    ReplyDelete


  28. I just wanted to let you know that the piece you shared with us is pretty unique and authentic. I am going to keep browsing this blog.



    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery


    ReplyDelete
  29. Really useful information. Thank you so much for sharing.It will help everyone.Keep Post.

    AWS Training in Hyderabad

    ReplyDelete

  30. Actually I read it yesterday but I had some thoughts about it and today I wanted to read it again because it is very well written.
    artificial intelligence course in bangalore

    ReplyDelete
  31. Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share.
    machine learning courses in bangalore

    ReplyDelete
  32. Pull- up your socks and knot your tie. Gonna have a good salary package job after completing Big-data Hadoop training in Chennai at Infycle. Infylce is completely for Software training and placement by friendly trainees, good atmosphere, 200% practical classes, and more.

    ReplyDelete
  33. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained!
    data analytics course in hyderabad

    ReplyDelete
  34. JSON Formatter tool This is a great resource for converting JSON data. I found the tool at JSON Formatter tool to be very user-friendly and efficient. It definitely comes in handy for anyone working with JSON data. Thank you for sharing this valuable resource!

    ReplyDelete