Example: Run application for the 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 HBase client. The application must be run for this client from a computer which:
- Has internal network access to the VPC in which the database is deployed
- Can resolve the internal hostnames of the database
- Can obtain a Kerberos ticket from the database's KDC
One of the methods to run traditional HBase client applications is to launch a "bastion host" in your cloud provider which meets the above requirements.
Ensure that you download the directory containing HBase client configuration files from
clientConfigurationUrl provided in
describe-client-connectivity response. This is a protected endpoint, and you
have to use your CDP workload credentials.
describe-client-connectivityresponse to obtain the necessary configuration clients to talk to HBase:
$ cdp opdb describe-client-connectivity --database-name <your_database> --environment-name <your_environment> | 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/clientConfigOne method is to build your local machine and copy the JAR files to the remote node:
$ 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: *********** $ java -cp target/nosql-libs/*:target/nosql-exemplar-0.0.1-SNAPSHOT.jar:hbase-conf com.cloudera.odx.nosql.Client
- Run your application for the HBase client.