Starting with MEP 6.3.0, you can use the Java OJAI Thin Client to write HPE Ezmeral Data Fabric Database JSON applications. The Java OJAI Thin Client provides a lightweight library that supports the OJAI API. You can connect to HPE Ezmeral Data Fabric Database JSON, and add, update, and query documents in a HPE Ezmeral Data Fabric Database JSON table.
The client provides you with the following benefits:
To use the Java OJAI Thin Client, you must install the MapR Data Access Gateway on your MapR cluster. The gateway serves as a proxy for translating requests between the Java OJAI Thin Client and the MapR cluster. To administer the gateway and configure load balancing, see Administering the Data Access Gateway.
The client supports username/password authentication. The initial connection (and token renewal) use these credentials. Subsequent communication uses JWT.
When connecting to a secure cluster, the client uses:
The string you use to connect your OJAI client to a MapR cluster must have the following format:
"ojai:mapr:thin:@<hostname>[:<port>][?<option_name>=<option_value>;...]"
<hostname><port>Default: 5678
auth=<scheme_name>The authentication scheme for the current connection; currently, only
basic
user=<username>The user name for basic authentication
password=<password>The password for basic authentication
ssl=true|falseWhether to establish a secure connection using SSL/TLS
An error is returned if there is a mismatch between your client and cluster security
settings. The default for this option is true, which is the required
setting if connecting to a secure MapR cluster. If connecting to a nonsecure MapR
cluster, set it to false.
If set to false, the other SSL parameters are ignored.
sslCA=<path to PEM file containing CA certificate>Path to a local file containing Certificate Authority (CA) signed certificates in PEM format.
Must be set if the ssl option is true.
Here is an example of a connection string:
"ojai:mapr:thin:@localhost:5678?auth=basic;user=fred;password=george;sslCA=/opt/app/conf/rootca.pem"
<dependency>
<groupId>com.mapr.ojai</groupId>
<artifactId>mapr-ojai-driver-thin</artifactId>
<version>1.0.0-mapr</version>
</dependency> The Java OJAI Client examples at the following location also apply to the Java OJAI Thin Client. Only the connection string and the Maven artifact name will be different for the thin client: https://github.com/mapr-demos/ojai-examples/tree/master/java/src/main/java/com/mapr/ojai/examples