Skip to content

Commit 197889a

Browse files
committed
Revert "change to java collection"
This reverts commit 93c20a2.
1 parent 80fc210 commit 197889a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/scala/kafka/cluster/Partition.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ class Partition(val topicPartition: TopicPartition,
563563

564564
private def clear(): Unit = {
565565
remoteReplicasMap.clear()
566-
assignmentState = new SimpleAssignmentState(util.List.of())
566+
assignmentState = new SimpleAssignmentState(Seq.empty.asJava)
567567
log = None
568568
futureLog = None
569569
partitionState = new CommittedPartitionState(util.Set.of(), LeaderRecoveryState.RECOVERED)
@@ -1799,7 +1799,7 @@ class Partition(val topicPartition: TopicPartition,
17991799
// 2) leaderAndIsr.partitionEpoch == partitionEpoch: No update was performed since proposed and actual state are the same.
18001800
// In both cases, we want to move from Pending to Committed state to ensure new updates are processed.
18011801

1802-
partitionState = new CommittedPartitionState(util.Set.copyOf(leaderAndIsr.isr), leaderAndIsr.leaderRecoveryState)
1802+
partitionState = new CommittedPartitionState(new util.HashSet(leaderAndIsr.isr), leaderAndIsr.leaderRecoveryState)
18031803
partitionEpoch = leaderAndIsr.partitionEpoch
18041804
info(s"ISR updated to ${partitionState.isr.asScala.mkString(",")} ${if (isUnderMinIsr) "(under-min-isr)" else ""} " +
18051805
s"and version updated to $partitionEpoch")

0 commit comments

Comments
 (0)