关于hadoop:在eclipse上找不到hbase jar

Couldn't find hbase jar on eclipse

我想通过eclipse在hbase上运行一个简单的程序,然后执行以下步骤:

https://www.guru99.com/handling-tables-hbase.html

但是当我在自己上添加外部jar时,hbase-version.jar和hadoop-version-core.jar不在我的/ hbase / lib中
这两个罐子重要吗?

我在哪里可以买到这两个罐子?


您可以获取hadoop核心jar maven存储库和hbase jar maven存储库

[或]

请将您的项目转换为maven。

在pom.xml中添加以下依赖项

Hadoop核心jar

1
2
3
4
5
6
<!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-core -->
<dependency>
    <groupId>org.apache.hadoop</groupId>
    hadoop-core</artifactId>
    <version>1.2.1</version>
</dependency>

HBase罐

1
2
3
4
5
6
<!-- https://mvnrepository.com/artifact/org.apache.hbase/hbase -->
<dependency>
    <groupId>org.apache.hbase</groupId>
    hbase</artifactId>
    <version>0.92.1</version>
</dependency>

是的,两个罐子都很重要。 Hadoop核心jar包含诸如TaskTracker,JobTracker,InputSplit等核心API。

HBase jar包含核心API,例如zookeeper,rest,thrift,mapreduce等。