Repository: kafka Updated Branches: refs/heads/trunk c9ffab162 -> 98d4a4833
MINOR: Remove unused GroupState.state field This field doesn't seem to be used and the value for `AwaitingSync` seems to be wrong (it seems like it should have been `2` instead of `5`). Author: Ismael Juma <ism...@juma.me.uk> Reviewers: Jason Gustafson <ja...@confluent.io>, Guozhang Wang <wangg...@gmail.com> Closes #3572 from ijuma/remove-unused-group-state-field Project: http://git-wip-us.apache.org/repos/asf/kafka/repo Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/98d4a483 Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/98d4a483 Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/98d4a483 Branch: refs/heads/trunk Commit: 98d4a483382dacad280e0cd25f10bccca51328a5 Parents: c9ffab1 Author: Ismael Juma <ism...@juma.me.uk> Authored: Tue Aug 8 23:15:57 2017 +0100 Committer: Ismael Juma <ism...@juma.me.uk> Committed: Tue Aug 8 23:15:57 2017 +0100 ---------------------------------------------------------------------- .../scala/kafka/coordinator/group/GroupMetadata.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kafka/blob/98d4a483/core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala b/core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala index 35a1fc7..18096bb 100644 --- a/core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala +++ b/core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala @@ -24,7 +24,7 @@ import org.apache.kafka.common.TopicPartition import scala.collection.{Seq, immutable, mutable} -private[group] sealed trait GroupState { def state: Byte } +private[group] sealed trait GroupState /** * Group is preparing to rebalance @@ -39,7 +39,7 @@ private[group] sealed trait GroupState { def state: Byte } * all members have left the group => Empty * group is removed by partition emigration => Dead */ -private[group] case object PreparingRebalance extends GroupState { val state: Byte = 1 } +private[group] case object PreparingRebalance extends GroupState /** * Group is awaiting state assignment from the leader @@ -54,7 +54,7 @@ private[group] case object PreparingRebalance extends GroupState { val state: By * member failure detected => PreparingRebalance * group is removed by partition emigration => Dead */ -private[group] case object AwaitingSync extends GroupState { val state: Byte = 5} +private[group] case object AwaitingSync extends GroupState /** * Group is stable @@ -70,7 +70,7 @@ private[group] case object AwaitingSync extends GroupState { val state: Byte = 5 * follower join-group with new metadata => PreparingRebalance * group is removed by partition emigration => Dead */ -private[group] case object Stable extends GroupState { val state: Byte = 3 } +private[group] case object Stable extends GroupState /** * Group has no more members and its metadata is being removed @@ -83,7 +83,7 @@ private[group] case object Stable extends GroupState { val state: Byte = 3 } * allow offset fetch requests * transition: Dead is a final state before group metadata is cleaned up, so there are no transitions */ -private[group] case object Dead extends GroupState { val state: Byte = 4 } +private[group] case object Dead extends GroupState /** * Group has no more members, but lingers until all offsets have expired. This state @@ -100,7 +100,7 @@ private[group] case object Dead extends GroupState { val state: Byte = 4 } * group is removed by partition emigration => Dead * group is removed by expiration => Dead */ -private[group] case object Empty extends GroupState { val state: Byte = 5 } +private[group] case object Empty extends GroupState private object GroupMetadata {