Example: Run an application for the Apache HBase client
Checking the example of how to run a Maven application for the HBase client gives you better understanding about how to run your own application for the HBase client.
requiredKerberosoption is set to
truefor the Apache HBase client. The application must be run for this client from a computer which:
- Has internal network access to the public cloud in which the database is deployed
- Can resolve the internal hostnames of the database
- Can obtain a Kerberos ticket from the database's Kerberos Key Distribution Center (KDC)
One way to run the Apache HBase client applications is to launch an edge node in your cloud provider which meets the above requirements.
Ensure that you download the directory containing the Apache HBase client configuration files
clientConfigurationUrl provided in
describe-client-connectivity response. This is a protected endpoint, and you
have to use your CDP workload credentials to access this endpoint. You can also get the Apache
HBase client configuration as a client tarball from the COD database web user interface
describe-client-connectivityresponse to obtain the necessary configuration details to communicate with Apache HBase:
$ cdp opdb describe-client-connectivity --database-name [***YOUR DATABASE NAME***] --environment-name [***YOUR ENVIRONMENT NAME***] | jq '.connectors | select(.name == "hbase") | .configuration.clientConfigurationUrl' "https://client_Configuration_URL/.../services/hbase/clientConfig" $ curl -k -o clientConfig.zip -u '[***USERNAME***]:[***CDP WORKLOAD PASSWORD***]' https://client_Configuration_URL/.../services/hbase/clientConfigYou can build the application in your local machine and copy the JAR files to the remote node using the following commands:
$ scp -r target email@example.com: $ scp clientConfig.zip firstname.lastname@example.org: $ ssh email@example.com "sudo yum install -y java-1.8.0-openjdk" $ ssh firstname.lastname@example.org "unzip clientConfig.zip"
Ensure that you have a Kerberos ticket:
$ kinit [***USERNAME***] Password: [***PASSWORD***] $ java -cp target/nosql-libs/*:target/nosql-exemplar-0.0.1-SNAPSHOT.jar:hbase-conf com.cloudera.odx.nosql.Client
- Run your application.