Class GroupInfoResponse

    • Constructor Summary

      Constructors 
      Constructor Description
      GroupInfoResponse()  
      GroupInfoResponse​(GroupInfoResponse source)
      NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getErrorCode()
      Get 错误码,正常为0
      String getGroup()
      Get Kafka 消费分组
      GroupInfoMember[] getMembers()
      Get 仅当 state 为 Stable 且 protocol_type 为 consumer 时, 该数组才包含信息
      String getProtocol()
      Get 消费者 partition 分配算法常见的有如下几种(Kafka 消费者 SDK 默认的选择项为 range):range、 roundrobin、 sticky
      String getProtocolType()
      Get 消费分组选择的协议类型正常的消费者一般为 consumer 但有些系统采用了自己的协议如 kafka-connect 用的就是 connect。只有标准的 consumer 协议,本接口才知道具体的分配方式的格式,才能解析到具体的 partition 的分配情况
      String getState()
      Get group 状态描述(常见的为 Empty、Stable、Dead 三种状态): Dead:消费分组不存在 Empty:消费分组,当前没有任何消费者订阅 PreparingRebalance:消费分组处于 rebalance 状态 CompletingRebalance:消费分组处于 rebalance 状态 Stable:消费分组中各个消费者已经加入,处于稳定状态
      void setErrorCode​(String ErrorCode)
      Set 错误码,正常为0
      void setGroup​(String Group)
      Set Kafka 消费分组
      void setMembers​(GroupInfoMember[] Members)
      Set 仅当 state 为 Stable 且 protocol_type 为 consumer 时, 该数组才包含信息
      void setProtocol​(String Protocol)
      Set 消费者 partition 分配算法常见的有如下几种(Kafka 消费者 SDK 默认的选择项为 range):range、 roundrobin、 sticky
      void setProtocolType​(String ProtocolType)
      Set 消费分组选择的协议类型正常的消费者一般为 consumer 但有些系统采用了自己的协议如 kafka-connect 用的就是 connect。只有标准的 consumer 协议,本接口才知道具体的分配方式的格式,才能解析到具体的 partition 的分配情况
      void setState​(String State)
      Set group 状态描述(常见的为 Empty、Stable、Dead 三种状态): Dead:消费分组不存在 Empty:消费分组,当前没有任何消费者订阅 PreparingRebalance:消费分组处于 rebalance 状态 CompletingRebalance:消费分组处于 rebalance 状态 Stable:消费分组中各个消费者已经加入,处于稳定状态
      void toMap​(HashMap<String,​String> map, String prefix)
      Internal implementation, normal users should not use it.
    • Constructor Detail

      • GroupInfoResponse

        public GroupInfoResponse()
      • GroupInfoResponse

        public GroupInfoResponse​(GroupInfoResponse source)
        NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
    • Method Detail

      • getErrorCode

        public String getErrorCode()
        Get 错误码,正常为0
        Returns:
        ErrorCode 错误码,正常为0
      • setErrorCode

        public void setErrorCode​(String ErrorCode)
        Set 错误码,正常为0
        Parameters:
        ErrorCode - 错误码,正常为0
      • getState

        public String getState()
        Get group 状态描述(常见的为 Empty、Stable、Dead 三种状态): Dead:消费分组不存在 Empty:消费分组,当前没有任何消费者订阅 PreparingRebalance:消费分组处于 rebalance 状态 CompletingRebalance:消费分组处于 rebalance 状态 Stable:消费分组中各个消费者已经加入,处于稳定状态
        Returns:
        State group 状态描述(常见的为 Empty、Stable、Dead 三种状态): Dead:消费分组不存在 Empty:消费分组,当前没有任何消费者订阅 PreparingRebalance:消费分组处于 rebalance 状态 CompletingRebalance:消费分组处于 rebalance 状态 Stable:消费分组中各个消费者已经加入,处于稳定状态
      • setState

        public void setState​(String State)
        Set group 状态描述(常见的为 Empty、Stable、Dead 三种状态): Dead:消费分组不存在 Empty:消费分组,当前没有任何消费者订阅 PreparingRebalance:消费分组处于 rebalance 状态 CompletingRebalance:消费分组处于 rebalance 状态 Stable:消费分组中各个消费者已经加入,处于稳定状态
        Parameters:
        State - group 状态描述(常见的为 Empty、Stable、Dead 三种状态): Dead:消费分组不存在 Empty:消费分组,当前没有任何消费者订阅 PreparingRebalance:消费分组处于 rebalance 状态 CompletingRebalance:消费分组处于 rebalance 状态 Stable:消费分组中各个消费者已经加入,处于稳定状态
      • getProtocolType

        public String getProtocolType()
        Get 消费分组选择的协议类型正常的消费者一般为 consumer 但有些系统采用了自己的协议如 kafka-connect 用的就是 connect。只有标准的 consumer 协议,本接口才知道具体的分配方式的格式,才能解析到具体的 partition 的分配情况
        Returns:
        ProtocolType 消费分组选择的协议类型正常的消费者一般为 consumer 但有些系统采用了自己的协议如 kafka-connect 用的就是 connect。只有标准的 consumer 协议,本接口才知道具体的分配方式的格式,才能解析到具体的 partition 的分配情况
      • setProtocolType

        public void setProtocolType​(String ProtocolType)
        Set 消费分组选择的协议类型正常的消费者一般为 consumer 但有些系统采用了自己的协议如 kafka-connect 用的就是 connect。只有标准的 consumer 协议,本接口才知道具体的分配方式的格式,才能解析到具体的 partition 的分配情况
        Parameters:
        ProtocolType - 消费分组选择的协议类型正常的消费者一般为 consumer 但有些系统采用了自己的协议如 kafka-connect 用的就是 connect。只有标准的 consumer 协议,本接口才知道具体的分配方式的格式,才能解析到具体的 partition 的分配情况
      • getProtocol

        public String getProtocol()
        Get 消费者 partition 分配算法常见的有如下几种(Kafka 消费者 SDK 默认的选择项为 range):range、 roundrobin、 sticky
        Returns:
        Protocol 消费者 partition 分配算法常见的有如下几种(Kafka 消费者 SDK 默认的选择项为 range):range、 roundrobin、 sticky
      • setProtocol

        public void setProtocol​(String Protocol)
        Set 消费者 partition 分配算法常见的有如下几种(Kafka 消费者 SDK 默认的选择项为 range):range、 roundrobin、 sticky
        Parameters:
        Protocol - 消费者 partition 分配算法常见的有如下几种(Kafka 消费者 SDK 默认的选择项为 range):range、 roundrobin、 sticky
      • getMembers

        public GroupInfoMember[] getMembers()
        Get 仅当 state 为 Stable 且 protocol_type 为 consumer 时, 该数组才包含信息
        Returns:
        Members 仅当 state 为 Stable 且 protocol_type 为 consumer 时, 该数组才包含信息
      • setMembers

        public void setMembers​(GroupInfoMember[] Members)
        Set 仅当 state 为 Stable 且 protocol_type 为 consumer 时, 该数组才包含信息
        Parameters:
        Members - 仅当 state 为 Stable 且 protocol_type 为 consumer 时, 该数组才包含信息
      • getGroup

        public String getGroup()
        Get Kafka 消费分组
        Returns:
        Group Kafka 消费分组
      • setGroup

        public void setGroup​(String Group)
        Set Kafka 消费分组
        Parameters:
        Group - Kafka 消费分组