Where are the hadoop-examples* and hadoop-test* jars in Cloudera CDH?

22,623

Solution 1

I found them under /usr/local/lib as follows (replace 4.2.1 with specific cloudera version you are using):

mrv1: /usr/local/lib/hadoop_mr1/hadoop-examples-2.0.0-mr1-cdh4.0.1.jar mrv2: /usr/local/lib/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.0.0-cdh4.2.1.jar

So we can run it as: hadoop jar /usr/local/lib/hadoop_mr1/hadoop-examples-2.0.0-mr1-cdh4.0.1.jar pi 500 40

Solution 2

find / -name hadoop-mapreduce-examples*.jar

/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples-2.0.0-cdh4.7.0.jar

/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar

Solution 3

On my single-node Hadoop 2.3.0-cdh5.0.2 setup on CentOS release 6.5 (Final) I found the mapred examples at /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples-2.3.0-cdh5.0.3.jar (symlinked from /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar). Via http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH5/latest/CDH5-Installation-Guide/cdh5ig_tips_guidelines.html .

Solution 4

As other person mentioned, depending on the Operating System and installer, the install location can be configured. For CDH4 on RHEL, using the cloudera manager as Installer, the examples and test jars can be found in the following locations.

/opt/cloudera/parcels/CDH-4.2.0-1.cdh4.2.0.p0.10/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar

'/opt/cloudera/parcels/CDH-4.2.0-1.cdh4.2.0.p0.10/lib/hadoop/hadoop-common-2.0.0-cdh4.2.0-tests.jar'
Share:
22,623

Related videos on Youtube

WestCoastProjects
Author by

WestCoastProjects

R/python/javascript recently and before that Scala/Spark. Machine learning and data pipelines apps.

Updated on July 29, 2022

Comments

  • WestCoastProjects
    WestCoastProjects almost 2 years

    I am looking for the jar files to be able to run the hadoop jobs associated with the examples and test jars. In the past they were under /usr/lib/hadoop, but apparently no longer. Pointers appreciated.

    Note: this question was originally for CDH4.2. But some answers include info for later versions

  • WestCoastProjects
    WestCoastProjects about 11 years
    pls provide the fully qualified path instead of relative. thx!
  • greedybuddha
    greedybuddha about 11 years
    Sorry, Im not sure I really can. I updated my answer to include where I start from, but I download the cloudera packages and place the jars where I want. I don't use any sort of installer.
  • DatamineR
    DatamineR about 9 years
    In hadoop-2.6.0 they are in /usr/local//hadoop/share/hadoop/mapreduce/hadoop-mapreduce-e‌​xamples-2.6.0.jar, just without lib.