public interface Admin
extends java.lang.AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Override
AutoCloseable.close() to avoid declaring a checked
exception. |
void |
close(long duration,
java.util.concurrent.TimeUnit unit) |
void |
compactTopicNow(java.lang.String streamPath,
java.lang.String topicName) |
int |
countTopics(java.lang.String streamPath)
Count the number of topics in a stream.
|
void |
createStream(java.lang.String streamPath,
StreamDescriptor desc)
Create a stream.
|
void |
createTopic(java.lang.String streamPath,
java.lang.String topicName)
Create a topic with the default number of partitions.
|
void |
createTopic(java.lang.String streamPath,
java.lang.String topicName,
int npartitions)
Create a topic with the specified number of partitions.
|
void |
createTopic(java.lang.String streamPath,
java.lang.String topicName,
TopicDescriptor desc)
Create a topic with the default number of partitions.
|
void |
deleteStream(java.lang.String streamPath)
Delete a stream.
|
void |
deleteTopic(java.lang.String streamPath,
java.lang.String topicName)
Delete a topic.
|
void |
editStream(java.lang.String streamPath,
StreamDescriptor desc)
Modify the attributes of a stream.
|
void |
editTopic(java.lang.String streamPath,
java.lang.String topicName,
int npartitions)
Modify the number of partitions for a topic.
|
void |
editTopic(java.lang.String streamPath,
java.lang.String topicName,
TopicDescriptor desc)
Create a topic with the default number of partitions.
|
StreamDescriptor |
getStreamDescriptor(java.lang.String streamPath)
Get the StreamDescriptor for a stream.
|
TopicDescriptor |
getTopicDescriptor(java.lang.String streamPath,
java.lang.String topicName) |
java.util.List<java.lang.String> |
listTopics(java.lang.String streamPath)
List all the topics within a stream.
|
boolean |
streamExists(java.lang.String streamPath) |
void createStream(java.lang.String streamPath, StreamDescriptor desc) throws java.io.IOException, java.lang.IllegalArgumentException
streamPath
- absolute path of the stream in MapR-FSdesc
- descriptor for stream attributesjava.io.IOException
java.lang.IllegalArgumentException
void editStream(java.lang.String streamPath, StreamDescriptor desc) throws java.io.IOException, java.lang.IllegalArgumentException
streamPath
- absolute path of the stream in MapR-FSdesc
- descriptor for stream attributesjava.io.IOException
java.lang.IllegalArgumentException
StreamDescriptor getStreamDescriptor(java.lang.String streamPath) throws java.io.IOException, java.lang.IllegalArgumentException
streamPath
- absolute path of the stream in MapR-FSjava.io.IOException
java.lang.IllegalArgumentException
void deleteStream(java.lang.String streamPath) throws java.io.IOException, java.lang.IllegalArgumentException
streamPath
- absolute path of the stream in MapR-FSjava.io.IOException
java.lang.IllegalArgumentException
int countTopics(java.lang.String streamPath) throws java.io.IOException, java.lang.IllegalArgumentException
streamPath
- absolute path of the stream in MapR-FSjava.io.IOException
java.lang.IllegalArgumentException
void createTopic(java.lang.String streamPath, java.lang.String topicName) throws java.io.IOException
streamPath
- absolute path of the stream in MapR-FStopicName
- name of the topicjava.io.IOException
void createTopic(java.lang.String streamPath, java.lang.String topicName, int npartitions) throws java.io.IOException
streamPath
- absolute path of the stream in MapR-FStopicName
- name of the topicjava.io.IOException
void createTopic(java.lang.String streamPath, java.lang.String topicName, TopicDescriptor desc) throws java.io.IOException
streamPath
- absolute path of the stream in MapR-FStopicName
- name of the topicdesc
- descriptor for topic attributesjava.io.IOException
void editTopic(java.lang.String streamPath, java.lang.String topicName, int npartitions) throws java.io.IOException
streamPath
- absolute path of the stream in MapR-FStopicName
- name of the topicjava.io.IOException
void editTopic(java.lang.String streamPath, java.lang.String topicName, TopicDescriptor desc) throws java.io.IOException
streamPath
- absolute path of the stream in MapR-FStopicName
- name of the topicdesc
- descriptor for topic attributesjava.io.IOException
void deleteTopic(java.lang.String streamPath, java.lang.String topicName) throws java.io.IOException
streamPath
- absolute path of the stream in MapR-FStopicName
- name of the topicjava.io.IOException
void compactTopicNow(java.lang.String streamPath, java.lang.String topicName) throws java.io.IOException
java.io.IOException
TopicDescriptor getTopicDescriptor(java.lang.String streamPath, java.lang.String topicName) throws java.io.IOException
streamPath
- topicName
- java.io.IOException
java.util.List<java.lang.String> listTopics(java.lang.String streamPath) throws java.io.IOException, java.lang.IllegalArgumentException
streamPath
- java.io.IOException
java.lang.IllegalArgumentException
boolean streamExists(java.lang.String streamPath) throws java.io.IOException
streamPath
- true
if the specified path exists and is a streamjava.io.IOException
void close()
AutoCloseable.close()
to avoid declaring a checked
exception.close
in interface java.lang.AutoCloseable
void close(long duration, java.util.concurrent.TimeUnit unit)
duration
- unit
-