@@ -18,7 +18,6 @@ package kafka.server
18
18
19
19
import com .yammer .metrics .core .Meter
20
20
import kafka .cluster .{Partition , PartitionListener }
21
- import kafka .controller .StateChangeLogger
22
21
import kafka .log .LogManager
23
22
import kafka .server .HostedPartition .Online
24
23
import kafka .server .QuotaFactory .QuotaManagers
@@ -48,6 +47,7 @@ import org.apache.kafka.common.requests._
48
47
import org .apache .kafka .common .utils .{Exit , Time , Utils }
49
48
import org .apache .kafka .coordinator .transaction .{AddPartitionsToTxnConfig , TransactionLogConfig }
50
49
import org .apache .kafka .image .{LocalReplicaChanges , MetadataImage , TopicsDelta }
50
+ import org .apache .kafka .logger .StateChangeLogger
51
51
import org .apache .kafka .metadata .LeaderConstants .NO_LEADER
52
52
import org .apache .kafka .metadata .MetadataCache
53
53
import org .apache .kafka .server .common .{DirectoryEventHandler , RequestLocal , StopPartition }
@@ -272,7 +272,7 @@ class ReplicaManager(val config: KafkaConfig,
272
272
@ volatile private var isInControlledShutdown = false
273
273
274
274
this .logIdent = s " [ReplicaManager broker= $localBrokerId] "
275
- protected val stateChangeLogger = new StateChangeLogger (localBrokerId, inControllerContext = false , None )
275
+ protected val stateChangeLogger = new StateChangeLogger (localBrokerId)
276
276
277
277
private var logDirFailureHandler : LogDirFailureHandler = _
278
278
@@ -789,9 +789,9 @@ class ReplicaManager(val config: KafkaConfig,
789
789
hasCustomErrorMessage = customException.isDefined
790
790
)
791
791
}
792
- // In non-transaction paths, errorResults is typically empty, so we can
792
+ // In non-transaction paths, errorResults is typically empty, so we can
793
793
// directly use entriesPerPartition instead of creating a new filtered collection
794
- val entriesWithoutErrorsPerPartition =
794
+ val entriesWithoutErrorsPerPartition =
795
795
if (errorResults.nonEmpty) entriesPerPartition.filter { case (key, _) => ! errorResults.contains(key) }
796
796
else entriesPerPartition
797
797
@@ -1637,13 +1637,13 @@ class ReplicaManager(val config: KafkaConfig,
1637
1637
remoteFetchPartitionStatus : Seq [(TopicIdPartition , FetchPartitionStatus )]): Unit = {
1638
1638
val remoteFetchTasks = new util.HashMap [TopicIdPartition , Future [Void ]]
1639
1639
val remoteFetchResults = new util.HashMap [TopicIdPartition , CompletableFuture [RemoteLogReadResult ]]
1640
-
1640
+
1641
1641
remoteFetchInfos.forEach { (topicIdPartition, remoteFetchInfo) =>
1642
1642
val (task, result) = processRemoteFetch(remoteFetchInfo)
1643
1643
remoteFetchTasks.put(topicIdPartition, task)
1644
1644
remoteFetchResults.put(topicIdPartition, result)
1645
1645
}
1646
-
1646
+
1647
1647
val remoteFetchMaxWaitMs = config.remoteLogManagerConfig.remoteFetchMaxWaitMs().toLong
1648
1648
val remoteFetch = new DelayedRemoteFetch (remoteFetchTasks, remoteFetchResults, remoteFetchInfos, remoteFetchMaxWaitMs,
1649
1649
remoteFetchPartitionStatus, params, logReadResults, this , responseCallback)
0 commit comments