[jira] [Assigned] (KAFKA-9277) move all group state transition rules into their states

2019-12-25 Thread huxihx (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-9277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

huxihx reassigned KAFKA-9277:
-

Assignee: dengziming  (was: huxihx)

> move all group state transition rules into their states
> ---
>
> Key: KAFKA-9277
> URL: https://issues.apache.org/jira/browse/KAFKA-9277
> Project: Kafka
>  Issue Type: Improvement
>Reporter: dengziming
>Assignee: dengziming
>Priority: Minor
> Fix For: 2.5.0
>
>
> Today the `GroupMetadata` maintain a validPreviousStates map of all 
> GroupState:
> ```
> private val validPreviousStates: Map[GroupState, Set[GroupState]] =
>  Map(Dead -> Set(Stable, PreparingRebalance, CompletingRebalance, Empty, 
> Dead),
>  CompletingRebalance -> Set(PreparingRebalance),
>  Stable -> Set(CompletingRebalance),
>  PreparingRebalance -> Set(Stable, CompletingRebalance, Empty),
>  Empty -> Set(PreparingRebalance))
> ```
> It would be cleaner to move all state transition rules into their states :
> ```
> private[group] sealed trait GroupState {
>  val validPreviousStates: Set[GroupState]
> }
> ```



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (KAFKA-9277) move all group state transition rules into their states

2019-12-25 Thread huxihx (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-9277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

huxihx reassigned KAFKA-9277:
-

Assignee: huxihx  (was: dengziming)

> move all group state transition rules into their states
> ---
>
> Key: KAFKA-9277
> URL: https://issues.apache.org/jira/browse/KAFKA-9277
> Project: Kafka
>  Issue Type: Improvement
>Reporter: dengziming
>Assignee: huxihx
>Priority: Minor
> Fix For: 2.5.0
>
>
> Today the `GroupMetadata` maintain a validPreviousStates map of all 
> GroupState:
> ```
> private val validPreviousStates: Map[GroupState, Set[GroupState]] =
>  Map(Dead -> Set(Stable, PreparingRebalance, CompletingRebalance, Empty, 
> Dead),
>  CompletingRebalance -> Set(PreparingRebalance),
>  Stable -> Set(CompletingRebalance),
>  PreparingRebalance -> Set(Stable, CompletingRebalance, Empty),
>  Empty -> Set(PreparingRebalance))
> ```
> It would be cleaner to move all state transition rules into their states :
> ```
> private[group] sealed trait GroupState {
>  val validPreviousStates: Set[GroupState]
> }
> ```



--
This message was sent by Atlassian Jira
(v8.3.4#803005)