Using the Java OJAI Thin Client

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.

Java OJAI Thin Client Benefits

The client provides you with the following benefits:

  • Easy installation and use
  • Access to HPE Ezmeral Data Fabric Database JSON through the OJAI interface
  • An OJAI interface that is tailored to Java developers
  • Support for L3/L4 (transport level) and L7 (application level) proxy load balancing

Comparing the Java OJAI Client and the Java OJAI Thin Client

Note these considerations when deciding whether to use the Java OJAI Client or the Java OJAI Thin Client:
  • Both the Java OJAI client and Java OJAI Thin Client use the same API (Java OJAI Client API).
  • The Java OJAI client is more scalable, more performant, and more fault tolerant, but also more complicated to deploy. See Using the Java OJAI Client.
  • The Java OJAI Thin Client requires you to specify the service (MapR Data Access Gateway) to which you will connect.
  • The Java OJAI Thin Client is a pure Java client, while the Java OJAI client requires a JNI library.

Installing the MapR Data Access Gateway

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.

Java OJAI Thin Client Security

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:

  • X.509 certificates to authenticate with the Data Access Gateway
  • TLS v1.2 to encrypt communication between the client and the Data Access Gateway

Java OJAI Thin Client Connection String

The string you use to connect your OJAI client to a MapR cluster must have the following format:

Name of the MapR Data Access Gateway host
Port number (see Ports Used by HPE Ezmeral Data Fabric Software) that gRPC clients use to connect to the MapR Data Access Gateway

Default: 5678


The authentication scheme for the current connection; currently, only basic


The user name for basic authentication


The password for basic authentication


Whether 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:


Maven Coordinates

The Maven coordinates are:

Additional Resources

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: