eclipse hadoop 2 中的 hadoop jar 文件在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15188042/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where are hadoop jar files in hadoop 2?
提问by Shekhar
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.
我正在尝试使用 Hadoop 实现一个示例字数统计程序。我已经下载并安装了Hadoop 2.0.0
。我想使用 Eclipse 来做这个示例程序,因为我认为在我的实际项目中我必须只使用 Eclipse。
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?
我无法找到与 Hadoop 相关的 jar 文件hadoop-core.jar
和其他所需的 jar 文件。我搜索了 2.0 hadoop 的所有文件夹,但找不到这些文件。这些相同的文件在 Hadoop 1.0 版本中可用,但在 2.0 版本中不可用。我想知道在哪里可以得到这些文件?
I am not able to find much information about 2.0 version.
我找不到关于 2.0 版本的很多信息。
please help
请帮忙
回答by aa8y
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 Commonand MapReduce Client Corejars and use them both. I am sure it'll solve your problems. Hope this helps!
实际上,我一开始也面临类似的问题。显然,hadoop-core.jar
版本 2没有。您必须下载 Hadoop Common和MapReduce Client Corejar 并同时使用它们。我相信它会解决你的问题。希望这可以帮助!
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.
编辑:我刚刚更新了链接,以便人们可以从存储库中选择适当的版本,因为我们现在已经超过了初始版本 2。
回答by Anonymous
Including JARs in folders listed below worked for me:
在下面列出的文件夹中包含 JAR 对我有用:
share\hadoop\common
share\hadoop\common\lib
share\hadoop\mapreduce
share\hadoop\mapreduce\lib
share\hadoop\yarn
share\hadoop\yarn\lib
回答by Chong Tang
hadoop-core-${HADOOP_VERSION}.jar is in
hadoop-core-${HADOOP_VERSION}.jar 在
${HADOOP_HOME}/share/hadoop/common
directory, not ${HADOOP_HOME} directory.
目录,而不是 ${HADOOP_HOME} 目录。
回答by Yimihua
This works for me on Mac on Hadoop 2.6.0:
这对我在 Hadoop 2.6.0 上的 Mac 上有效:
hadoop/2.6.0/libexec/share/hadoop/common/hadoop-common-2.6.0.jar
or just search ".jar" in the hadoop directory, you can see all the .jar files.
或者直接在hadoop目录下搜索“.jar”,就可以看到所有的.jar文件。
回答by Venkatt Guhesan
hadoop-core-{version}.jar
became hadoop-common-{version}.jar
starting with Hadoop 2+
hadoop-core-{version}.jar
成为hadoop-common-{version}.jar
开始用Hadoop 2+
回答by Satyajit Mishra
We can get the jar files from https://mvnrepository.comwebsite.
我们可以从https://mvnrepository.com网站获取 jar 文件。
Example - https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-core/1.2.1
示例 - https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-core/1.2.1
回答by Henry
On hadoop 2.7.2, I had to set it to the same as HADOOP_COMMON_HOME.
在 hadoop 2.7.2 上,我必须将其设置为与 HADOOP_COMMON_HOME 相同。
回答by Ankush
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/
在下面的位置,您可以找到以您安装的发行版命名的文件夹,里面有一个 jar 文件夹。/opt/cloudera/parcels/[cloudera 发行版]/jars/
Example : /opt/cloudera/parcels/CDH-5.4.10/jars
示例:/opt/cloudera/parcels/CDH-5.4.10/jars