Interface Admin

  • All Superinterfaces:
    java.lang.AutoCloseable
    All Known Implementing Classes:
    MarlinAdminImpl

    public interface Admin
    extends java.lang.AutoCloseable
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Map<org.apache.kafka.common.TopicPartition,​org.apache.kafka.common.protocol.Errors> alterConsumerGroupOffsets​(java.lang.String streamPath, 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.
      void close()
      Override AutoCloseable.close() to avoid declaring a checked exception.
      void close​(long duration, java.util.concurrent.TimeUnit unit)  
      void close​(java.time.Duration duration)  
      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.Map<org.apache.kafka.common.TopicPartition,​org.apache.kafka.clients.consumer.OffsetAndMetadata> listConsumerGroupOffsets​(java.lang.String streamPath, 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 streamPath)
      List all the consumer groups within a stream.
      java.util.List<java.lang.String> listTopics​(java.lang.String streamPath)
      List all the topics within a stream.
      java.util.Map<java.lang.String,​java.util.List<TopicFeedInfo>> listTopicsForStream​(java.lang.String streamPath)
      List all the topics within a stream.
      boolean streamExists​(java.lang.String streamPath)  
    • Method Detail

      • createStream

        void createStream​(java.lang.String streamPath,
                          StreamDescriptor desc)
                   throws java.io.IOException,
                          java.lang.IllegalArgumentException
        Create a stream.
        Parameters:
        streamPath - absolute path of the stream in MapR-FS
        desc - descriptor for stream attributes
        Throws:
        java.io.IOException
        java.lang.IllegalArgumentException
      • editStream

        void editStream​(java.lang.String streamPath,
                        StreamDescriptor desc)
                 throws java.io.IOException,
                        java.lang.IllegalArgumentException
        Modify the attributes of a stream.
        Parameters:
        streamPath - absolute path of the stream in MapR-FS
        desc - descriptor for stream attributes
        Throws:
        java.io.IOException
        java.lang.IllegalArgumentException
      • getStreamDescriptor

        StreamDescriptor getStreamDescriptor​(java.lang.String streamPath)
                                      throws java.io.IOException,
                                             java.lang.IllegalArgumentException
        Get the StreamDescriptor for a stream.
        Parameters:
        streamPath - absolute path of the stream in MapR-FS
        Returns:
        descriptor for stream attributes
        Throws:
        java.io.IOException
        java.lang.IllegalArgumentException
      • deleteStream

        void deleteStream​(java.lang.String streamPath)
                   throws java.io.IOException,
                          java.lang.IllegalArgumentException
        Delete a stream.
        Parameters:
        streamPath - absolute path of the stream in MapR-FS
        Throws:
        java.io.IOException
        java.lang.IllegalArgumentException
      • countTopics

        int countTopics​(java.lang.String streamPath)
                 throws java.io.IOException,
                        java.lang.IllegalArgumentException
        Count the number of topics in a stream.
        Parameters:
        streamPath - absolute path of the stream in MapR-FS
        Returns:
        number of topics in the stream.
        Throws:
        java.io.IOException
        java.lang.IllegalArgumentException
      • createTopic

        void createTopic​(java.lang.String streamPath,
                         java.lang.String topicName)
                  throws java.io.IOException
        Create a topic with the default number of partitions.
        Parameters:
        streamPath - absolute path of the stream in MapR-FS
        topicName - name of the topic
        Throws:
        java.io.IOException
      • createTopic

        void createTopic​(java.lang.String streamPath,
                         java.lang.String topicName,
                         int npartitions)
                  throws java.io.IOException
        Create a topic with the specified number of partitions.
        Parameters:
        streamPath - absolute path of the stream in MapR-FS
        topicName - name of the topic
        Throws:
        java.io.IOException
      • createTopic

        void createTopic​(java.lang.String streamPath,
                         java.lang.String topicName,
                         TopicDescriptor desc)
                  throws java.io.IOException
        Create a topic with the default number of partitions.
        Parameters:
        streamPath - absolute path of the stream in MapR-FS
        topicName - name of the topic
        desc - descriptor for topic attributes
        Throws:
        java.io.IOException
      • editTopic

        void editTopic​(java.lang.String streamPath,
                       java.lang.String topicName,
                       int npartitions)
                throws java.io.IOException
        Modify the number of partitions for a topic.
        Parameters:
        streamPath - absolute path of the stream in MapR-FS
        topicName - name of the topic
        Throws:
        java.io.IOException
      • editTopic

        void editTopic​(java.lang.String streamPath,
                       java.lang.String topicName,
                       TopicDescriptor desc)
                throws java.io.IOException
        Create a topic with the default number of partitions.
        Parameters:
        streamPath - absolute path of the stream in MapR-FS
        topicName - name of the topic
        desc - descriptor for topic attributes
        Throws:
        java.io.IOException
      • deleteTopic

        void deleteTopic​(java.lang.String streamPath,
                         java.lang.String topicName)
                  throws java.io.IOException
        Delete a topic.
        Parameters:
        streamPath - absolute path of the stream in MapR-FS
        topicName - name of the topic
        Throws:
        java.io.IOException
      • compactTopicNow

        void compactTopicNow​(java.lang.String streamPath,
                             java.lang.String topicName)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • getTopicDescriptor

        TopicDescriptor getTopicDescriptor​(java.lang.String streamPath,
                                           java.lang.String topicName)
                                    throws java.io.IOException
        Parameters:
        streamPath -
        topicName -
        Returns:
        descriptor for topic attributes
        Throws:
        java.io.IOException
      • listTopics

        java.util.List<java.lang.String> listTopics​(java.lang.String streamPath)
                                             throws java.io.IOException,
                                                    java.lang.IllegalArgumentException
        List all the topics within a stream.
        Parameters:
        streamPath -
        Returns:
        list of topic names for the topics in the stream.
        Throws:
        java.io.IOException
        java.lang.IllegalArgumentException
      • listTopicsForStream

        java.util.Map<java.lang.String,​java.util.List<TopicFeedInfo>> listTopicsForStream​(java.lang.String streamPath)
                                                                                         throws java.io.IOException,
                                                                                                java.lang.IllegalArgumentException
        List all the topics within a stream.
        Parameters:
        streamPath -
        Returns:
        list of topic names for the topics in the stream.
        Throws:
        java.io.IOException
        java.lang.IllegalArgumentException
      • listConsumerGroups

        java.util.Collection<java.lang.Object> listConsumerGroups​(java.lang.String streamPath)
                                                           throws java.io.IOException,
                                                                  java.lang.IllegalArgumentException
        List all the consumer groups within a stream.
        Parameters:
        streamPath -
        Returns:
        list of consumer groups for the stream.
        Throws:
        java.io.IOException
        java.lang.IllegalArgumentException
      • streamExists

        boolean streamExists​(java.lang.String streamPath)
                      throws java.io.IOException
        Parameters:
        streamPath -
        Returns:
        true if the specified path exists and is a stream
        Throws:
        java.io.IOException
      • listConsumerGroupOffsets

        java.util.Map<org.apache.kafka.common.TopicPartition,​org.apache.kafka.clients.consumer.OffsetAndMetadata> listConsumerGroupOffsets​(java.lang.String streamPath,
                                                                                                                                                 java.lang.String groupId)
                                                                                                                                          throws java.io.IOException,
                                                                                                                                                 java.lang.IllegalArgumentException
        List all the consumer group offsets within a stream and group id.
        Parameters:
        streamPath -
        Returns:
        list of consumer groups for the stream.
        Throws:
        java.io.IOException
        java.lang.IllegalArgumentException
      • alterConsumerGroupOffsets

        java.util.Map<org.apache.kafka.common.TopicPartition,​org.apache.kafka.common.protocol.Errors> alterConsumerGroupOffsets​(java.lang.String streamPath,
                                                                                                                                      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.IllegalArgumentException
        Alter the consumer group offsets for group with group id.
        Parameters:
        groupId -
        Returns:
        list of consumer groups for the stream.
        Throws:
        java.io.IOException
        java.lang.IllegalArgumentException
      • close

        void close()
        Override AutoCloseable.close() to avoid declaring a checked exception.
        Specified by:
        close in interface java.lang.AutoCloseable
      • close

        void close​(long duration,
                   java.util.concurrent.TimeUnit unit)
        Parameters:
        duration -
        unit -
      • close

        void close​(java.time.Duration duration)
        Parameters:
        duration -