Source:
ReplicaThread(String threadName, Map<DataNodeId, List<RemoteReplicaInfo>> replicasToReplicateGroupedByNode, FindTokenFactory findTokenFactory, ClusterMap clusterMap, AtomicInteger correlationIdGenerator, DataNodeId dataNodeId, ConnectionPool connectionPool, ReplicationConfig replicationConfig, ReplicationMetrics replicationMetrics, NotificationSystem notification, StoreKeyConverter storeKeyConverter, Transformer transformer, MetricRegistry metricRegistry, boolean replicatingOverSsl, String datacenterName, ResponseHandler responseHandler, Time time) { this.threadName = threadName; this.replicasToReplicateGroupedByNode = replicasToReplicateGroupedByNode; this.running = true; this.findTokenFactory = findTokenFactory; this.clusterMap = clusterMap; this.correlationIdGenerator = correlationIdGenerator; this.dataNodeId = dataNodeId; this.connectionPool = connectionPool; this.replicationConfig = replicationConfig; this.replicationMetrics = replicationMetrics; this.notification = notification; this.storeKeyConverter = storeKeyConverter; this.transformer = transformer; this.metricRegistry = metricRegistry; this.responseHandler = responseHandler; this.replicatingFromRemoteColo = !(dataNodeId.getDatacenterName().equals(datacenterName)); this.replicatingOverSsl = replicatingOverSsl; this.datacenterName = datacenterName; this.time = time; Set<PartitionId> partitions = new HashSet<>(); for (Map.Entry<DataNodeId, List<RemoteReplicaInfo>> entry : replicasToReplicateGroupedByNode.entrySet()) { for (RemoteReplicaInfo info : entry.getValue()) { partitions.add(info.getReplicaId().getPartitionId()); } } allReplicatedPartitions = Collections.unmodifiableSet(partitions); threadThrottleDurationMs = replicatingFromRemoteColo ? replicationConfig.replicationInterReplicaThreadThrottleSleepDurationMs : replicationConfig.replicationIntraReplicaThreadThrottleSleepDurationMs; }

Target:
ReplicaThread(String threadName, Map<DataNodeId, List<RemoteReplicaInfo>> replicasToReplicateGroupedByNode, FindTokenFactory findTokenFactory, ClusterMap clusterMap, AtomicInteger correlationIdGenerator, DataNodeId dataNodeId, ConnectionPool connectionPool, ReplicationConfig replicationConfig, ReplicationMetrics replicationMetrics, NotificationSystem notification, StoreKeyConverter storeKeyConverter, Transformer transformer, MetricRegistry metricRegistry, boolean replicatingOverSsl, String datacenterName, ResponseHandler responseHandler, Time time) { this.threadName = threadName; this.replicasToReplicateGroupedByNode = replicasToReplicateGroupedByNode; this.running = true; this.findTokenFactory = findTokenFactory; this.clusterMap = clusterMap; this.correlationIdGenerator = correlationIdGenerator; this.dataNodeId = dataNodeId; this.connectionPool = connectionPool; this.replicationConfig = replicationConfig; this.replicationMetrics = replicationMetrics; this.notification = notification; this.storeKeyConverter = storeKeyConverter; this.transformer = transformer; this.metricRegistry = metricRegistry; this.responseHandler = responseHandler; this.replicatingFromRemoteColo = !(dataNodeId.getDatacenterName().equals(datacenterName)); this.replicatingOverSsl = replicatingOverSsl; this.datacenterName = datacenterName; this.time = time; Set<PartitionId> partitions = new HashSet<>(); for (Map.Entry<DataNodeId, List<RemoteReplicaInfo>> entry : replicasToReplicateGroupedByNode.entrySet()) { for (RemoteReplicaInfo info : entry.getValue()) { partitions.add(info.getReplicaId().getPartitionId()); } } allReplicatedPartitions = Collections.unmodifiableSet(partitions); if (replicatingFromRemoteColo) { threadThrottleDurationMs = replicationConfig.replicationInterReplicaThreadThrottleSleepDurationMs; syncedBackOffCount = replicationMetrics.interColoReplicaSyncedBackoffCount; idleCount = replicationMetrics.interColoReplicaThreadIdleCount; throttleCount = replicationMetrics.interColoReplicaThreadThrottleCount; } else { threadThrottleDurationMs = replicationConfig.replicationIntraReplicaThreadThrottleSleepDurationMs; syncedBackOffCount = replicationMetrics.intraColoReplicaSyncedBackoffCount; idleCount = replicationMetrics.intraColoReplicaThreadIdleCount; throttleCount = replicationMetrics.intraColoReplicaThreadThrottleCount; } }