Class MarlinAdminImpl
- java.lang.Object
-
- com.mapr.fs.jni.MarlinJniClient
-
- com.mapr.fs.jni.MarlinJniAdmin
-
- com.mapr.kafka.eventstreams.impl.admin.MarlinAdminImpl
-
-
Constructor Summary
Constructors Constructor Description MarlinAdminImpl(org.apache.hadoop.conf.Configuration conf)MarlinAdminImpl(org.apache.hadoop.conf.Configuration conf, java.lang.String clusterName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.common.protocol.Errors>alterConsumerGroupOffsets(java.lang.String stream, java.lang.String groupId, java.util.Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets)Alter the consumer group offsets for group with group id.java.util.List<CursorInfo>alterCursors(java.lang.String streamName, java.lang.String listenerGID, java.lang.String topicName, int feedId, long offset)voidclose()OverrideAutoCloseable.close()to avoid declaring a checked exception.voidclose(long duration, java.util.concurrent.TimeUnit unit)Deprecated.voidclose(java.time.Duration timeout)voidcompactTopicNow(java.lang.String streamPath, java.lang.String topicName)intcountTopics(java.lang.String streamName)Count the number of topics in a stream.voidcreateStream(java.lang.String streamName, StreamDescriptor gdesc)Create a stream.static voidcreateStreamForCopy(java.lang.String replicaStreamName, java.lang.String srcStreamName)voidcreateTopic(java.lang.String streamPath, java.lang.String topicName)Create a topic with the default number of partitions.voidcreateTopic(java.lang.String streamPath, java.lang.String topicName, int nfeeds)Create a topic with the specified number of partitions.voidcreateTopic(java.lang.String streamPath, java.lang.String topicName, TopicDescriptor desc)Create a topic with the default number of partitions.voiddeleteCursors(java.lang.String streamName, java.lang.String listenerGID, java.lang.String topicName, int feedId)voiddeleteStream(java.lang.String streamName)Delete a stream.voiddeleteTopic(java.lang.String streamPath, java.lang.String topicName)Delete a topic.voideditStream(java.lang.String streamName, StreamDescriptor gdesc)Modify the attributes of a stream.voideditTopic(java.lang.String streamPath, java.lang.String topicName, int nfeeds)Modify the number of partitions for a topic.voideditTopic(java.lang.String streamPath, java.lang.String topicName, TopicDescriptor topicDesc)Create a topic with the default number of partitions.booleanFilterResult(org.ojai.Document rec, java.lang.String streamName, java.lang.String listenerGID, java.lang.String topic, AssignInfo ai, java.util.Map<java.lang.String,com.mapr.fs.proto.Marlinserver.MarlinTopicMetaEntry> topicMetaMap)StreamDescriptorgetStreamDescriptor(java.lang.String streamName)Get the StreamDescriptor for a stream.TopicDescriptorgetTopicDescriptor(java.lang.String streamPath, java.lang.String topicName)com.mapr.fs.proto.Marlinserver.MarlinTopicMetaEntrygetTopicMetaEntry(java.lang.String topicFullName)java.util.List<TopicFeedInfo>infoTopic(java.lang.String topicFullName)java.util.List<TopicFeedInfo>infoTopicCommon(java.lang.String topicFullName, boolean headOnly)java.util.List<CursorInfo>listAllCursors(java.lang.String streamName)java.util.List<AssignInfo>listAssigns(java.lang.String streamName, java.lang.String listenerGID, java.lang.String topicName)java.util.Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata>listConsumerGroupOffsets(java.lang.String streamName, java.lang.String groupId)List all the consumer group offsets within a stream and group id.java.util.Collection<java.lang.Object>listConsumerGroups(java.lang.String streamName)List all the consumer groups within a stream.java.util.List<CursorInfo>listCursors(java.lang.String streamName, java.lang.String listenerGID, java.lang.String topicName, int feedId)java.util.List<CursorInfo>listCursorsForTopic(java.lang.String topicFullName)java.util.List<java.lang.String>listTopics(java.lang.String streamName)List all the topics within a stream.java.util.Map<java.lang.String,java.util.List<TopicFeedInfo>>listTopicsForStream(java.lang.String streamName)List all the topics within a stream.booleanstreamExists(java.lang.String streamPath)
-
-
-
Constructor Detail
-
MarlinAdminImpl
public MarlinAdminImpl(org.apache.hadoop.conf.Configuration conf) throws java.io.IOException- Throws:
java.io.IOException
-
MarlinAdminImpl
public MarlinAdminImpl(org.apache.hadoop.conf.Configuration conf, java.lang.String clusterName) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
createStream
public void createStream(java.lang.String streamName, StreamDescriptor gdesc) throws java.io.IOException, java.lang.IllegalArgumentExceptionDescription copied from interface:AdminCreate a stream.- Specified by:
createStreamin interfaceAdmin- Parameters:
streamName- absolute path of the stream in MapR-FSgdesc- descriptor for stream attributes- Throws:
java.io.IOExceptionjava.lang.IllegalArgumentException
-
editStream
public void editStream(java.lang.String streamName, StreamDescriptor gdesc) throws java.io.IOException, java.lang.IllegalArgumentException, java.security.AccessControlExceptionDescription copied from interface:AdminModify the attributes of a stream.- Specified by:
editStreamin interfaceAdmin- Parameters:
streamName- absolute path of the stream in MapR-FSgdesc- descriptor for stream attributes- Throws:
java.io.IOExceptionjava.lang.IllegalArgumentExceptionjava.security.AccessControlException
-
getStreamDescriptor
public StreamDescriptor getStreamDescriptor(java.lang.String streamName) throws java.io.IOException, java.lang.IllegalArgumentException
Description copied from interface:AdminGet the StreamDescriptor for a stream.- Specified by:
getStreamDescriptorin interfaceAdmin- Parameters:
streamName- absolute path of the stream in MapR-FS- Returns:
- descriptor for stream attributes
- Throws:
java.io.IOExceptionjava.lang.IllegalArgumentException
-
createStreamForCopy
public static void createStreamForCopy(java.lang.String replicaStreamName, java.lang.String srcStreamName) throws java.io.IOException, java.lang.IllegalArgumentException- Throws:
java.io.IOExceptionjava.lang.IllegalArgumentException
-
deleteStream
public void deleteStream(java.lang.String streamName) throws java.io.IOException, java.lang.IllegalArgumentExceptionDescription copied from interface:AdminDelete a stream.- Specified by:
deleteStreamin interfaceAdmin- Parameters:
streamName- absolute path of the stream in MapR-FS- Throws:
java.io.IOExceptionjava.lang.IllegalArgumentException
-
countTopics
public int countTopics(java.lang.String streamName) throws java.io.IOException, java.lang.IllegalArgumentExceptionDescription copied from interface:AdminCount the number of topics in a stream.- Specified by:
countTopicsin interfaceAdmin- Parameters:
streamName- absolute path of the stream in MapR-FS- Returns:
- number of topics in the stream.
- Throws:
java.io.IOExceptionjava.lang.IllegalArgumentException
-
streamExists
public boolean streamExists(java.lang.String streamPath) throws java.io.IOException- Specified by:
streamExistsin interfaceAdmin- Returns:
trueif the specified path exists and is a stream- Throws:
java.io.IOException
-
createTopic
public void createTopic(java.lang.String streamPath, java.lang.String topicName) throws java.io.IOExceptionDescription copied from interface:AdminCreate a topic with the default number of partitions.- Specified by:
createTopicin interfaceAdmin- Parameters:
streamPath- absolute path of the stream in MapR-FStopicName- name of the topic- Throws:
java.io.IOException
-
createTopic
public void createTopic(java.lang.String streamPath, java.lang.String topicName, int nfeeds) throws java.io.IOExceptionDescription copied from interface:AdminCreate a topic with the specified number of partitions.- Specified by:
createTopicin interfaceAdmin- Parameters:
streamPath- absolute path of the stream in MapR-FStopicName- name of the topic- Throws:
java.io.IOException
-
createTopic
public void createTopic(java.lang.String streamPath, java.lang.String topicName, TopicDescriptor desc) throws java.io.IOExceptionDescription copied from interface:AdminCreate a topic with the default number of partitions.- Specified by:
createTopicin interfaceAdmin- Parameters:
streamPath- absolute path of the stream in MapR-FStopicName- name of the topicdesc- descriptor for topic attributes- Throws:
java.io.IOException
-
compactTopicNow
public void compactTopicNow(java.lang.String streamPath, java.lang.String topicName) throws java.io.IOException- Specified by:
compactTopicNowin interfaceAdmin- Throws:
java.io.IOException
-
editTopic
public void editTopic(java.lang.String streamPath, java.lang.String topicName, int nfeeds) throws java.io.IOExceptionDescription copied from interface:AdminModify the number of partitions for a topic.
-
editTopic
public void editTopic(java.lang.String streamPath, java.lang.String topicName, TopicDescriptor topicDesc) throws java.io.IOExceptionDescription copied from interface:AdminCreate a topic with the default number of partitions.
-
deleteTopic
public void deleteTopic(java.lang.String streamPath, java.lang.String topicName) throws java.io.IOExceptionDescription copied from interface:AdminDelete a topic.- Specified by:
deleteTopicin interfaceAdmin- Parameters:
streamPath- absolute path of the stream in MapR-FStopicName- name of the topic- Throws:
java.io.IOException
-
getTopicDescriptor
public TopicDescriptor getTopicDescriptor(java.lang.String streamPath, java.lang.String topicName) throws java.io.IOException
- Specified by:
getTopicDescriptorin interfaceAdmin- Returns:
- descriptor for topic attributes
- Throws:
java.io.IOException
-
getTopicMetaEntry
public com.mapr.fs.proto.Marlinserver.MarlinTopicMetaEntry getTopicMetaEntry(java.lang.String topicFullName) throws java.io.IOException- Throws:
java.io.IOException
-
infoTopicCommon
public java.util.List<TopicFeedInfo> infoTopicCommon(java.lang.String topicFullName, boolean headOnly) throws java.io.IOException
- Throws:
java.io.IOException
-
infoTopic
public java.util.List<TopicFeedInfo> infoTopic(java.lang.String topicFullName) throws java.io.IOException
- Throws:
java.io.IOException
-
listTopics
public java.util.List<java.lang.String> listTopics(java.lang.String streamName) throws java.io.IOException, java.lang.IllegalArgumentExceptionDescription copied from interface:AdminList all the topics within a stream.- Specified by:
listTopicsin interfaceAdmin- Returns:
- list of topic names for the topics in the stream.
- Throws:
java.io.IOExceptionjava.lang.IllegalArgumentException
-
listTopicsForStream
public java.util.Map<java.lang.String,java.util.List<TopicFeedInfo>> listTopicsForStream(java.lang.String streamName) throws java.io.IOException, java.lang.IllegalArgumentException
Description copied from interface:AdminList all the topics within a stream.- Specified by:
listTopicsForStreamin interfaceAdmin- Returns:
- list of topic names for the topics in the stream.
- Throws:
java.io.IOExceptionjava.lang.IllegalArgumentException
-
listConsumerGroups
public java.util.Collection<java.lang.Object> listConsumerGroups(java.lang.String streamName) throws java.io.IOException, java.lang.IllegalArgumentExceptionDescription copied from interface:AdminList all the consumer groups within a stream.- Specified by:
listConsumerGroupsin interfaceAdmin- Returns:
- list of consumer groups for the stream.
- Throws:
java.io.IOExceptionjava.lang.IllegalArgumentException
-
listConsumerGroupOffsets
public java.util.Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> listConsumerGroupOffsets(java.lang.String streamName, java.lang.String groupId) throws java.io.IOException, java.lang.IllegalArgumentExceptionDescription copied from interface:AdminList all the consumer group offsets within a stream and group id.- Specified by:
listConsumerGroupOffsetsin interfaceAdmin- Returns:
- list of consumer groups for the stream.
- Throws:
java.io.IOExceptionjava.lang.IllegalArgumentException
-
alterConsumerGroupOffsets
public java.util.Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.common.protocol.Errors> alterConsumerGroupOffsets(java.lang.String stream, java.lang.String groupId, java.util.Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets) throws java.io.IOException, java.lang.IllegalArgumentExceptionDescription copied from interface:AdminAlter the consumer group offsets for group with group id.- Specified by:
alterConsumerGroupOffsetsin interfaceAdmin- Returns:
- list of consumer groups for the stream.
- Throws:
java.io.IOExceptionjava.lang.IllegalArgumentException
-
alterCursors
public java.util.List<CursorInfo> alterCursors(java.lang.String streamName, java.lang.String listenerGID, java.lang.String topicName, int feedId, long offset) throws java.io.IOException
- Throws:
java.io.IOException
-
listCursors
public java.util.List<CursorInfo> listCursors(java.lang.String streamName, java.lang.String listenerGID, java.lang.String topicName, int feedId) throws java.io.IOException
- Throws:
java.io.IOException
-
listAllCursors
public java.util.List<CursorInfo> listAllCursors(java.lang.String streamName) throws java.io.IOException
- Throws:
java.io.IOException
-
listCursorsForTopic
public java.util.List<CursorInfo> listCursorsForTopic(java.lang.String topicFullName) throws java.io.IOException
- Throws:
java.io.IOException
-
deleteCursors
public void deleteCursors(java.lang.String streamName, java.lang.String listenerGID, java.lang.String topicName, int feedId) throws java.io.IOException- Throws:
java.io.IOException
-
FilterResult
public boolean FilterResult(org.ojai.Document rec, java.lang.String streamName, java.lang.String listenerGID, java.lang.String topic, AssignInfo ai, java.util.Map<java.lang.String,com.mapr.fs.proto.Marlinserver.MarlinTopicMetaEntry> topicMetaMap) throws java.io.IOException- Throws:
java.io.IOException
-
listAssigns
public java.util.List<AssignInfo> listAssigns(java.lang.String streamName, java.lang.String listenerGID, java.lang.String topicName) throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close()
Description copied from interface:AdminOverrideAutoCloseable.close()to avoid declaring a checked exception.
-
close
@Deprecated public void close(long duration, java.util.concurrent.TimeUnit unit)Deprecated.
-
-