This topic describes how to modify Maven dependencies to upgrade an Apache HBase client to the latest version of an ApsaraDB for HBase client.

Scenarios

This upgrade method is applicable to scenarios in which an Apache HBase client is used as a dependency and the client cannot be upgraded to the latest stable version of an ApsaraDB for HBase client.

Your application directly uses an Apache HBase client as a dependency

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

Replace the preceding code block with the following code block:

    <dependency>
        <groupId>com.alibaba.hbase</groupId>
        <artifactId>alihbase-client</artifactId>
        <version>x.x.x</version>
    </dependency>
    <!--Replace ${connector-version} with the version of alihbase-connector that corresponds to the version of hbase-client. For more information, see the version mappings in the following table.-->
    <dependency>
        <groupId>com.alibaba.hbase</groupId>
        <artifactId>alihbase-connector</artifactId>
        <version>${connector-version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.hbase</groupId>
                <artifactId>hbase-client</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

Your application indirectly uses an Apache HBase client as a dependency

This method is applicable to scenarios in which your application uses a third-party package as a dependency and the third-party package uses an Apache HBase client as a dependency.

    <!--The third-party package dependency-->
    <dependency>
          <groupId>xxx.xxx.xxx</groupId>
          <artifactId>yyy</artifactId>
          <version>z.z.z</version>
    </dependency>

Replace the preceding code block with the following code block:



    <!--Remove the hbase-client dependency from the third-party dependency.-->
    <dependency>
        <groupId>xxx.xxx.xxx</groupId>
        <artifactId>yyy</artifactId>
        <version>z.z.z</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.hbase</groupId>
                <artifactId>hbase-client</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <!--Add the alihbase-client dependency.-->
    <dependency>
        <groupId>com.alibaba.hbase</groupId>
        <artifactId>alihbase-client</artifactId>
        <version>x.x.x</version>
    </dependency>
    <!--Replace ${connector-version} with the version of alihbase-connector that corresponds to the version of hbase-client. For more information, see the version mappings in the following table.-->
    <dependency>
        <groupId>com.alibaba.hbase</groupId>
        <artifactId>alihbase-connector</artifactId>
        <version>${connector-version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.hbase</groupId>
                <artifactId>hbase-client</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

Version mappings between hbase-client and alihbase-connector

hbase-client version alihbase-connector version
1.0.0 1.1.2.1
1.0.1 1.1.2.1
1.0.1.1 1.1.2.1
1.0.2 1.1.2.1
1.0.3 1.1.2.1
1.1.0 1.1.2.1
1.1.0.1 1.1.2.1
1.1.1 1.1.2.1
1.1.2 1.1.2.1
1.1.3 1.1.2.1
1.1.4 1.1.2.1
1.1.5 1.1.3
1.1.6 1.1.3
1.1.7 1.1.3
1.1.8 1.1.3
1.1.9 1.1.3
1.1.10 1.1.3
1.1.11 1.1.3
1.1.12 1.1.3
1.1.13 1.1.3
1.2.0 1.1.2.1
1.2.1 1.1.3
1.2.2 1.1.3
1.2.3 1.1.3
1.2.4 1.1.3
1.2.5 1.1.3
1.2.6 1.1.3
1.2.6.1 1.1.3
1.2.7 1.1.3
1.2.8 1.1.3
1.2.9 1.1.3
1.2.10 1.1.3
1.2.11 1.1.3
1.2.12 1.1.3
1.3.0 1.1.3
1.3.1 1.1.3
1.3.2 1.1.3
1.3.2.1 1.1.3
1.3.3 1.1.3
1.3.4 1.1.3
1.3.5 1.1.3
1.3.6 1.1.3
1.4.0 1.1.3
1.4.1 1.1.3
1.4.2 1.1.3
1.4.3 1.1.3
1.4.4 1.1.3
1.4.5 1.1.3
1.4.6 1.1.3
1.4.7 1.1.3
1.4.8 1.1.3
1.4.9 1.1.3
1.4.10 1.1.3
1.4.11 1.1.3
1.4.12 1.1.3
1.4.13 1.1.3
1.5.0 1.1.3
1.6.0 1.1.3
2.0.0 2.1.2
2.0.1 2.1.2
2.0.2 2.1.3.1
2.0.3 2.1.3.1
2.0.4 2.1.3.1
2.0.5 2.1.3.1
2.0.6 2.1.3.1
2.1.0 2.1.2
2.1.1 2.1.3.1
2.1.2 2.1.3.1
2.1.3 2.1.3.1
2.1.4 2.1.3.1
2.1.5 2.1.3.1
2.1.6 2.1.3.1
2.1.7 2.1.3.1
2.1.8 2.1.3.1
2.1.9 2.1.3.1
2.2.0 2.1.2.2
2.2.1 2.1.2.2
2.2.2 2.1.2.2
2.2.3 2.1.2.2
2.5.1 2.1.2.2