Java and maven cloud Bigtable HBase Client Configuration __apache

Source: Internet
Author: User

Original address: Https://cloud.google.com/bigtable/docs/using-maven

This article uses Google translation.

Cloud BigTable for Java hbase clients are available in the Maven repository, making it easy to use Cloud BigTable in the Apache Maven project.

maven Artifacts Overview


Cloud Bigtable Java client includes three Maven artifacts that you can use in your project:

bigtable-hbase-1.0: Client based on HBase 1.0.x.
bigtable-hbase-1.1: Client based on HBase 1.1.x.
bigtable-hbase-1.2: Client based on HBase 1.2.x.
Bigtable-hbase-mapreduce: The MapReduce job used to import data into cloud bigtable.
Each artifact tracks different versions of the HBase API. The remainder of these instructions assumes that you are using bigtable-hbase-1.2.

Note: The MAVEN repository includes other artifacts of the cloud bigtable. Do not use these additional artifacts in your application.
You must also add the appropriate artifacts to support the encryption of the data. For more information, see "Setting up encryption."

Add a cloud bigtable artifact to a project


To add a cloud bigtable artifact to the MAVEN project, you simply add the artifact to the <dependencies> part of the Pom.xml file and to the artifacts of the HBase client.

To add the required artifacts:

<dependencies>
  <groupId> com.google.cloud.bigtable </groupid>
  <artifactId> bigtable-hbase-1.2 </artifactid>
  <version> 0.9.4 </
version> </dependency> <dependencies>
  <groupId> org.apache.hbase </groupid>
  <artifactId> hbase-client </artifactid>
  <version> 1.2.1 </version> </dependency>
Set Encryption


To encrypt the data, the Netty-tcnative library is used by Cloud Bigtable hbase clients. To simplify installation, you should use a static link to a network artifact of Boringssl (a branch of OpenSSL). This workpiece is called netty-tcnative-boringssl-static.

To use netty-tcnative-boringssl-static, your system must meet the following requirements:

Netty-tcnative-boringssl-static 1.1.33.fork19 must be on the Java class path. (Other versions are incompatible with the cloud Bigtable hbase client.) The following example shows how to add this dependency to the Pom.xml file. You must use Linux,os x or Windows on the x86 64-bit processor.

To add the required artifacts to the Pom.xml file:

<dependencies>
  <groupId> io.netty </groupid>
  <artifactId> Netty-tcnative-boringssl-static </artifactid>
  <version> 1.1.33.fork19 </version>
</ Dependency>


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.