Source:
public AmbryRequests(StorageManager storageManager, RequestResponseChannel requestResponseChannel, ClusterMap clusterMap, DataNodeId nodeId, MetricRegistry registry, FindTokenFactory findTokenFactory, NotificationSystem operationNotification, ReplicationManager replicationManager, StoreKeyFactory storeKeyFactory, boolean enableDataPrefetch, StoreKeyConverterFactory storeKeyConverterFactory) { this.storageManager = storageManager; this.requestResponseChannel = requestResponseChannel; this.clusterMap = clusterMap; this.currentNode = nodeId; this.metrics = new ServerMetrics(registry); this.messageFormatMetrics = new MessageFormatMetrics(registry); this.findTokenFactory = findTokenFactory; this.notification = operationNotification; this.replicationManager = replicationManager; this.storeKeyFactory = storeKeyFactory; this.enableDataPrefetch = enableDataPrefetch; this.storeKeyConverterFactory = storeKeyConverterFactory; requestsDisableInfo.put(RequestOrResponseType.PutRequest, Collections.newSetFromMap(new ConcurrentHashMap<>())); requestsDisableInfo.put(RequestOrResponseType.GetRequest, Collections.newSetFromMap(new ConcurrentHashMap<>())); requestsDisableInfo.put(RequestOrResponseType.DeleteRequest, Collections.newSetFromMap(new ConcurrentHashMap<>())); requestsDisableInfo.put(RequestOrResponseType.ReplicaMetadataRequest, Collections.newSetFromMap(new ConcurrentHashMap<>())); requestsDisableInfo.put(RequestOrResponseType.TtlUpdateRequest, Collections.newSetFromMap(new ConcurrentHashMap<>())); Set<PartitionId> partitionIds = new HashSet<>(); for (ReplicaId replicaId : clusterMap.getReplicaIds(currentNode)) { partitionIds.add(replicaId.getPartitionId()); } partitionsInCurrentNode = Collections.unmodifiableSet(partitionIds); }

Target:
public AmbryRequests(StorageManager storageManager, RequestResponseChannel requestResponseChannel, ClusterMap clusterMap, DataNodeId nodeId, MetricRegistry registry, FindTokenFactory findTokenFactory, NotificationSystem operationNotification, ReplicationManager replicationManager, StoreKeyFactory storeKeyFactory, boolean enableDataPrefetch, StoreKeyConverterFactory storeKeyConverterFactory) { this.storageManager = storageManager; this.requestResponseChannel = requestResponseChannel; this.clusterMap = clusterMap; this.currentNode = nodeId; this.metrics = new ServerMetrics(registry); this.messageFormatMetrics = new MessageFormatMetrics(registry); this.findTokenFactory = findTokenFactory; this.notification = operationNotification; this.replicationManager = replicationManager; this.storeKeyFactory = storeKeyFactory; this.enableDataPrefetch = enableDataPrefetch; this.storeKeyConverterFactory = storeKeyConverterFactory; for (RequestOrResponseType requestType : EnumSet.of(RequestOrResponseType.PutRequest, RequestOrResponseType.GetRequest, RequestOrResponseType.DeleteRequest, RequestOrResponseType.ReplicaMetadataRequest, RequestOrResponseType.TtlUpdateRequest)) { requestsDisableInfo.put(requestType, Collections.newSetFromMap(new ConcurrentHashMap<>())); } Set<PartitionId> partitionIds = new HashSet<>(); for (ReplicaId replicaId : clusterMap.getReplicaIds(currentNode)) { partitionIds.add(replicaId.getPartitionId()); } partitionsInCurrentNode = Collections.unmodifiableSet(partitionIds); }