Where are hadoop jar files in hadoop 2? [closed]

2019-01-16 19:51发布

I am trying to implement one sample word count program using Hadoop. I have downloaded and installed Hadoop 2.0.0. I want to do this sample program using Eclipse because i think later in my real project I have to use Eclipse only.

I am not able to find Hadoop related jar files like hadoop-core.jar and other required jar files. I searched in all the folders of 2.0 hadoop but couldn't find those files. Those same files are available in 1.0 version of Hadoop but not in 2.0 version. I would like to know where can I get these files?

I am not able to find much information about 2.0 version.

please help

8条回答
够拽才男人
2楼-- · 2019-01-16 20:03

At below location you can find folder named by distribution which you have installed , inside that there is a jar folder. /opt/cloudera/parcels/[cloudera distribution]/jars/

Example : /opt/cloudera/parcels/CDH-5.4.10/jars

查看更多
孤傲高冷的网名
4楼-- · 2019-01-16 20:09

Including JARs in folders listed below worked for me:

share\hadoop\common       
share\hadoop\common\lib   
share\hadoop\mapreduce    
share\hadoop\mapreduce\lib
share\hadoop\yarn         
share\hadoop\yarn\lib   
查看更多
smile是对你的礼貌
5楼-- · 2019-01-16 20:19

Actually, I faced a similar issue in the beginning. Apparently, there is no hadoop-core.jar for version 2. You'll have to download the Hadoop Common and MapReduce Client Core jars and use them both. I am sure it'll solve your problems. Hope this helps!

Edit: I just updated the links such that people can choose the appropriate version from the repository since we now come way past the initial version 2.

查看更多
萌系小妹纸
6楼-- · 2019-01-16 20:22

hadoop-core-${HADOOP_VERSION}.jar is in

${HADOOP_HOME}/share/hadoop/common 

directory, not ${HADOOP_HOME} directory.

查看更多
Bombasti
7楼-- · 2019-01-16 20:25

On hadoop 2.7.2, I had to set it to the same as HADOOP_COMMON_HOME.

查看更多
登录 后发表回答