DL1231 commented on code in PR #15211: URL: https://github.com/apache/kafka/pull/15211#discussion_r1469662425
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/consumer/ConsumerGroup.java: ########## @@ -739,6 +748,19 @@ public Optional<OffsetExpirationCondition> offsetExpirationCondition() { return Optional.of(new OffsetExpirationConditionImpl(offsetAndMetadata -> offsetAndMetadata.commitTimestampMs)); } + /** + * @return The current state as a capitalized String with given committedOffset. + */ + public String stateAsCapitalizedString(long committedOffset) { + return state.get(committedOffset).toCapitalizedString(); + } Review Comment: Done. ########## core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala: ########## @@ -841,6 +842,10 @@ private[group] class GroupMetadata(val groupId: String, initialState: GroupState .format(groupId, targetState.validPreviousStates.mkString(","), targetState, state)) } + def isInStates(states: collection.Set[String]): Boolean = { + states.contains(state.toString) || states.contains(state.toLowerCaseString) Review Comment: Done. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org