Use the HPE Ezmeral Data Fabric Event Store Admin Java API library as an
alternative to maprcli commands and the REST APIs for performing
administrative tasks on streams and topics. This library can also be used for analysis of
the contents of streams.
| MapR version | Apache Kafka API |
|---|---|
| As of 6.2 | 2.1.1 |
| As of 6.1 | 1.1 |
| As of 6.0.1 | 1.0 |
| 6.0.0 and earlier | 0.90 |
The following HPE Ezmeral Data Fabric Event Store Java APIs are available as of MapR 6.1 and HPE Ezmeral Data Fabric 6.2:
| Interface | Method | Description |
|---|---|---|
StreamDescriptor |
void setCompact(boolean compact) |
Sets log compaction on a stream. |
StreamDescriptor |
boolean getCompact() |
Gets the log compaction on a stream. Returns true if the stream has log compaction on the stream. |
StreamDescriptor |
void setMinCompactionLagMS(long ts) |
Sets the time in (milliseconds) that a message should remain uncompacted in the topic-partition. Applies only if log compaction is enabled on the stream. |
StreamDescriptor |
long getMinCompactionLagMS() |
Returns the minimum time (in milliseconds) a message will remain uncompacted in the topic-partition. Applies only if log compaction is enabled on the stream. |
StreamDescriptor |
void setDeleteRetentionMS(long ts) |
Sets the time (in milliseconds) for which deleted records are retained. Applies only if log compaction is enabled on the stream. |
StreamDescriptor |
long getDeleteRetentionMS() |
Returns the time (in milliseconds) for which deleted records are retained. Applies only if log compaction is enabled on the stream. |
Producer |
ProducerConfig class |
The idempotence producer option is set by setting the
enable.idempotence value of true passed through the ProducerConfig class. |
The following table lists the new Interfaces and APIs for MapR 6.0.1. They are the delta between MapR 6.0.1 and 6.0.0, meaning, they are applicable to MapR 6.0.1 but not MapR 6.0.0.
| Interface and Methods | Description |
|---|---|
| Admin.close | Long duration for TimeUnit. |
| Admin.createTopic | TopicDescriptor array for topic attributes. |
| Admin.editTopic | TopicDescriptor array for topic attributes. |
| Admin.getTopicDescriptor | Method for retrieving topic attributes. |
| Admin.listTopic | Method for listing all the topics in a stream. |
| Admin.streamExists | Method for determining whether a stream exists. |
| StreamDescriptor.getDefaultTimestampType | Method for retrieving the timestamp type. |
| StreamDescriptor.setDefaultTimestampType | Method for setting the timestamp type. |
| TopicDescriptor | New MapR interface. |
| TopicDescriptor.getPartitions | Method associated with the new interface. |
| TopicDescriptor.setPartitions | Method associated with the new interface. |
| TopicDescriptor.getTimestampType | Method associated with the new interface. |
| TopicDescriptor.setTimestampType | Method associated with the new interface. |
| Enum TimestampType | New Enum class and associated methods. |
pause,
resume, seekToBeginning, and
seekToEnd APIs support the Collection Interface. The deprecated
APIs will continue to run unchanged, however, they may be removed in a future
release.
| Replacement Collection APIs | Deprecated APIs |
|---|---|
| void pause(Collection<TopicPartition> partitions); | void pause(TopicPartition... partitions); |
| void resume(Collection<TopicPartition>partitions); | void resume(TopicPartition... partitions); |
| void seekToBeginning(Collection<TopicPartition>); | void seekToBeginning(TopicPartition... partitions); |
| void seekToEnd(Collection<TopicPartition>); | void seekToEnd(TopicPartition... partitions); |
subscribe and assign APIs support the
Collection Interface (which is more generalized) as well as the List Interface.
Support for the List Interface has been retained for backward binary
compatibility.
| Replacement Collection APIs | Retained APIs |
|---|---|
| void subscribe(Collection<String> topics); | void subscribe(java.util.List<java.lang.String> topics); |
| void subscribe(Collection<String> topics, ConsumerRebalanceListener); | void subscribe(java.util.List<java.lang.String> topics, ConsumerRebalanceListener listener); |
| void assign(Collection<TopicPartition> partitions); | void assign(java.util.List<TopicPartition> partitions); |