在没有 class org.apache.hadoop.hbase.mapreduce.HFileOutputFormat2 的情况下通过 Maven 使用 HBase2.1.0 java api

Use HBase2.1.0 java api through Maven without class org.apache.hadoop.hbase.mapreduce.HFileOutputFormat2

当我使用maven来使用HBase时java api我无法导入class org.apache.hadoop.hbase.mapreduce.HFileOutputFormat2.

但是在 HBase2.1.0 的 java 文档中有 HFileOutputFormat2: HBase2.1.0 javadoc.

然后我尝试直接将 HBase2.1.0 库添加到我的项目中。没问题。

这是 Maven 错误还是我使用 Maven 的方式不对?

这是我的 maven 文件中的 HBase 块:

       <dependency>
            <groupId>org.apache.hbase</groupId>
            <artifactId>hbase-client</artifactId>
            <version>2.1.0</version>
        </dependency>

        <dependency>
            <groupId>org.apache.hbase</groupId>
            <artifactId>hbase-server</artifactId>
            <version>2.1.0</version>
        </dependency>

添加此依赖项:

<!-- https://mvnrepository.com/artifact/org.apache.hbase/hbase-mapreduce -->
<dependency>
    <groupId>org.apache.hbase</groupId>
    <artifactId>hbase-mapreduce</artifactId>
    <version>2.1.0</version> 
</dependency>

发件人:https://mvnrepository.com/artifact/org.apache.hbase/hbase-mapreduce/2.1.0