1-844-696-6465 (US)        +91 77600 44484        help@dezyre.com

Where do I get the hadoop.mapred.* packages?



0
Where do I get the hadoop.mapred.* packages?
I've downloaded and unzipped hadoop-1.2.1
I was told to do the following, however, I do not see the file structure or any of the jar files named.

In Eclipse you have to add the all the jars that are from hadoop.mapred.* packages. Please right click on the project -> properties ->Java Build path -> Libraries Tab -> Add external jars and add the following

/usr/lib/hadoop - add hadoop-annotations.jar,hadoop-auth.jar,hadoop-common.jar
/usr/lib/hadoop/client - Add all jars
/usr/lib/hadoop/lib - Add all jars.

Thank you.

2 Answer(s)


0

hi Raymond,

Once you add the jars from the following paths to the eclipse, all the relevant Mapreduce packages are available. All the mapreduce are available in various jars within these paths below. The package structure is org.apache.hadoop.mapred.*.

Here is the api documentation for all the Hadoop packages http://hadoop.apache.org/docs/r1.2.1/api/.

/usr/lib/hadoop - add hadoop-annotations.jar,hadoop-auth.jar,hadoop-common.jar
/usr/lib/hadoop/client - Add all jars
/usr/lib/hadoop/lib - Add all jars.

Thanks

0

Raymond,
Just wanted to make sure that this is no longer an issue?

I had mentioned in another post, hadoop has a easy way to refer to all the dependencies need by hadoop programs.

$ hadoop classpath

gives the list of all the packages with the locations.

So instead of manually adding the libraries yourself, you can use this command.

For example on the command line when i am compiling my files I use

$ javac -classpath `hadoop classpath` *.java

The `hadoop classpath` inside forward quotes (Not single quotes) is a way in unix shell to execute a command and insert the output of that command into the current command.

thanks,
Sarath.

Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)

Email
Password