public enum GroupState extends Enum<GroupState>
| 枚举常量和说明 |
|---|
AWAITINGSYNC
Group is awaiting state assignment from the leader
action: respond to heartbeats with REBALANCE_IN_PROGRESS
respond to offset commits with REBALANCE_IN_PROGRESS
park sync group requests from followers until transition to Stable
allow offset fetch requests
transition: sync group with state assignment received from leader => Stable
join group from new member or existing member with updated metadata => PreparingRebalance
leave group from existing member => PreparingRebalance
member failure detected => PreparingRebalance
|
DEAD
Group has no more members
action: respond to join group with UNKNOWN_MEMBER_ID
respond to sync group with UNKNOWN_MEMBER_ID
respond to heartbeat with UNKNOWN_MEMBER_ID
respond to leave group with UNKNOWN_MEMBER_ID
respond to offset commit with UNKNOWN_MEMBER_ID
allow offset fetch requests
transition: Dead is a final state before group metadata is cleaned up, so there are no transitions
|
EMPTY
Group has no more members, but lingers until all offsets have expired.
|
PREPARINGREBALANCE
Group is preparing to rebalance
action: respond to heartbeats with REBALANCE_IN_PROGRESS
respond to sync group with REBALANCE_IN_PROGRESS
remove member on leave group request
park join group requests from new or existing members until all expected members have joined
allow offset commits from previous generation
allow offset fetch requests
transition: some members have joined by the timeout => AwaitingSync
all members have left the group => Dead
|
STABLE
Group is stable
action: respond to member heartbeats normally
respond to sync group from any member with current assignment
respond to join group from followers with matching metadata with current group metadata
allow offset commits from member of current generation
allow offset fetch requests
transition: member failure detected via heartbeat => PreparingRebalance
leave group from existing member => PreparingRebalance
leader join-group received => PreparingRebalance
follower join-group with new metadata => PreparingRebalance
|
public static final GroupState EMPTY
public static final GroupState PREPARINGREBALANCE
public static final GroupState AWAITINGSYNC
public static final GroupState STABLE
public static final GroupState DEAD
public static GroupState[] values()
for (GroupState c : GroupState.values()) System.out.println(c);
public static GroupState valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public byte getState()
Copyright © 2020 Joyqueue Community. All rights reserved.