This section contains information on developing client applications with Java including information about the HPE Ezmeral Data Fabric Event Store and Apache Kafka Java APIs, configuration parameters, and compiling and running producers and consumers.
| MapR version | Apache Kafka API |
|---|---|
| As of 6.2 | 2.1 |
| As of 6.1 | 1.1 |
| As of 6.0.1 | 1.0 |
| 6.0.0 and earlier | 0.9.0 |
As of MapR 6.1, log compaction is supported. Log compaction can be enabled for streams created with MapR core 6.1 and later. In addition, clients older than MapR 6.1 are prevented from consuming from streams that have had log compaction enabled on them at least once in their lifetime.
In the context of a scan by a client that is not upgraded, the (upgraded) server inspects the row header to check if it is serving a compacted row. If it is serving a compacted row, then the server fails the consumer request. This behavior applies both to a stream that is explicitly configured for compaction and a replica that has received a compacted row.
-force
option can be used. The -force option should only be used when ALL clients
have been upgraded to MapR 6.1.As of MapR 6.1, the idempotent producer (exactly once) feature is supported. You can implement the idempotent producer with MapR core 6.1 and later.
props.put(ProducerConfig.ENABLE_IDEMPOTENCE_CONFIG, true)The idempotent producer feature is supported by MEP MapR 6.0 clients and MapR 6.1.0 servers.
Exception in thread "main" java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownTopicOrPartitionException: Operation not permitted (1) null
at com.mapr.streams.impl.producer.MarlinFuture.valueOrError(MarlinFuture.java:46)
at com.mapr.streams.impl.producer.MarlinFuture.get(MarlinFuture.java:41)
at com.mapr.streams.impl.producer.MarlinFuture.get(MarlinFuture.java:17)
at com.mapr.qa.marlin.common.StandaloneProducer.main(StandaloneProducer.java:75)
Caused by: org.apache.kafka.common.errors.UnknownTopicOrPartitionException: Operation not permitted (1) nullThe following discussion describes the Access Control Expression (ACE) permissions that you need when using the timestamp type parameter. See Stream Security for general information about HPE Ezmeral Data Fabric Event Store streams security.
A HPE Ezmeral Data Fabric Event Store 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.
adminperm permissions.
The stream-level timestamp type parameter is defaulttimestamptype. See
stream create and stream edit for more
information on setting this parameter using the maprcli command. 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 using the maprcli command. As of MapR 6.0, user impersonation is supported for HPE Ezmeral Data Fabric Event Store.
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 generate an impersonation ticket. See the Generating and Printing Service with Impersonation Ticket section in the maprlogin Command Examples topic.
mapruser1 has read permissions on the ticket.$MAPR_TICKETFILE_LOCATION environment variable with the appropriate path.As of MapR 6.0.1, along with the support of Apache Kafka, the
java.util.Collection interface is being used. This impacts applications
using certain APIs. See HPE Ezmeral Data Fabric Event Store Java API Library for detailed information.