MapR-ES Java Applications

This section contains information on developing client applications with Java including information about the MapR-ES and Apache Kafka Java APIs, configuration parameters, and compiling and running producers and consumers.

Apache Kafka Support

The following Apache Kafka Java API versions are supported:
Table 1. Supported Apache Kafka APIs
MapR version Apache Kafka API
As of 6.0.1 1.0
6.0.0 and earlier 0.9.0

TimestampType Permissions

The following describes the ACE permissions are needed when using the timestamp type parameter. See Stream Security for general information about MapR-ES streams security.

Note: The TimestampType parameter is new as of 6.0.1.

A MapR-ES stream topic inherits the default timestamp type value from its stream. To override the stream's default value, set the timestamp type for the topic to a different value.

  • Setting the value at the stream-level requires adminperm permissions. The stream-level timestamp type parameter is defaulttimestamptype. See stream create and stream edit for more information on setting this parameter through the maprcli.
  • Setting the timestamptype at the topic-level requires topicperm permissions. The topic-level timestamp type parameter is timestamptype. See stream topic create and stream topic edit for more information on setting this parameter through the maprcli.

User Impersonation

Note: As of MapR 6.0, user impersonation is supported for MapR-ES.

You can set up user impersonation programmatically. To do so, use the UserGroupInformation.doAs() method in the Hadoop documentation. See Class UserGroupInformation for more information.

If you are setting up user impersonation in a secure cluster, you need to generation an impersonation ticket. See the Generating and Printing Service with Impersonation Ticket section in the maprlogin Command Examples topic.

After generating the ticket:
  1. Ensure that mapruser1 has read permissions on the ticket.
  2. If you moved the ticket file to a different location, set the $MAPR_TICKETFILE_LOCATION environment variable.

Backward Compatibility

As of MapR 6.0.1, along with support of Apache Kafka the java.util.Collection interface is being used. This impacts applications using certain APIs. See MapR-ES Java API Library for detailed information.