Once you have created your application and a database using Cloudera Operational Database, you have to compile your application for your database.
- Set your Cloudera workload password. For more information, see the Setting
the workload password documentation in the related information
section.
- Grant the ODUser role to the machine user using the page for their Cloudera environment. By setting the ODUser role you can grant
a number of rights in the system that allows you to access the Cloudera Operational Database using the machine user's workload password.
- Add synchronized users from User Management Service in the Cloudera Control Plane
into the environment in which your Cloudera Operational Database database is running.
-
Get the Maven repository location to fetch JAR files.
There are two ways to get the necessary information:
- In command line: Using the
cdp opdb
describe-client-connectivity --database-name
<your_database> --environment-name
<your_environment>
command.
- In the Cloudera Operational Database user interface: Clicking the
Connect bar and selecting the applicable
client.
You have to use the version
and the
mavenURL
attributes in your Maven project and
configuration.
The following is an example about how to fetch the required HBase information to build your
application:
$ cdp opdb describe-client-connectivity --database-name <your_database> --environment-name <your_environment> | jq '.connectors[] | select(.name == "hbase")'
{
"name": "hbase",
"version": "2.2.3.7.2.0.0-219",
"kind": "LIBRARY",
"dependencies": {
"mavenUrl": "https://repository.cloudera.com/artifactory/cloudera-repos"
},
"configuration": {
"clientConfigurationUrl": "http://client_Configuration_URL/.../services/hbase/clientConfig"
},
"requiresKerberos": true
The following example fetch the required Phoenix information to build your
application:
cdp opdb describe-client-connectivity --database-name <your_database> --environment-name <your_environment> | jq ".connectors[] | select(.name == \"phoenix-thick-jdbc\") | .dependencies.mavenUrl"
cdp opdb describe-client-connectivity --database-name <your_database> --environment-name <your_environment> | jq ".connectors[] | select(.name == \"phoenix-thin-jdbc\") | .version"
Phoenix-thick
"https://repository.cloudera.com/artifactory/cloudera-repos"
"5.0.0.7.2.0.0-128"
Phoenix-thin
"https://repository.cloudera.com/artifactory/cloudera-repos"
"5.0.0.7.2.0.0-128"
-
Modify your application's settings.
Ensure your application's
settings.xml
file uses the correct
URL and version for your
Cloudera Operational Database database.
An example when using NoSQL client:
<project>
<dependencies>
<!-- NoSQL client for Cloudera Operational Database -->
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-shaded-client</artifactId>
<version>2.2.3.7.2.0.0-219</version>
</dependency>
</dependencies>
...
<repositories>
<!-- Define our Cloudera Operational Database repository; this would be given to us by Cloudera Operational Database itself -->
<repository>
<id>nosql-odx</id>
<url>https://maven_URL/cdp-proxy/hbase/jars</url>
<name>Cloudera NoSQL Cloudera Operational Database Repository</name>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>
An
example when using SQL
client:
<project>
<dependencies>
<!-- SQL client for ODX -->
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-client</artifactId>
<version>5.0.0.7.2.0.0-128</version>
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-queryserver-client</artifactId>
<version>5.0.0.7.2.0.0-128</version>
</dependency>
</dependencies>
...
<repositories>
<!-- Define our Cloudera Operational Database repository -->
<repository>
<id>sql-cod</id>
<url>https://maven_URL/cdp-proxy-api/avatica/maven</url>
<name>Cloudera SQL Cloudera Operational Database Repository</name>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>
-
Build your application.
-
Run your application for the applicable client.