Source:
private void validateBlobOnAllReplicas(BlobId blobId, ClusterMap clusterMap, boolean expiredBlobs) throws InterruptedException { Map<ServerErrorCode, ArrayList<ReplicaId>> responseMap = new HashMap<ServerErrorCode, ArrayList<ReplicaId>>(); Map<ReplicaId, ServerResponse> replicaIdBlobContentMap = new HashMap<>(); for (ReplicaId replicaId : blobId.getPartition().getReplicaIds()) { ServerErrorCode serverErrorCode; try { serverErrorCode = validateBlobOnReplica(blobId, clusterMap, replicaId, expiredBlobs, replicaIdBlobContentMap); } catch (MessageFormatException e) { serverErrorCode = ServerErrorCode.Data_Corrupt; } catch (IOException e) { serverErrorCode = ServerErrorCode.IO_Error; } catch (Exception e) { serverErrorCode = ServerErrorCode.Unknown_Error; } if (responseMap.containsKey(serverErrorCode)) { responseMap.get(serverErrorCode).add(replicaId); } else { ArrayList<ReplicaId> replicaList = new ArrayList<ReplicaId>(); replicaList.add(replicaId); responseMap.put(serverErrorCode, replicaList); } } compareListOfBlobContent(blobId.getID(), replicaIdBlobContentMap); boolean errorLoggingRequired = false; if (responseMap.keySet().size() != 1 || !replicaIdBlobContentMap.keySet().contains(ServerErrorCode.No_Error)) { errorLoggingRequired = true; } if (errorLoggingRequired) { logger.error("Summary of responses for " + blobId); } else { logger.debug("Summary of responses for " + blobId); } for (ServerErrorCode serverErrorCode : responseMap.keySet()) { if (errorLoggingRequired) { logger.error(serverErrorCode + ": " + responseMap.get(serverErrorCode)); } else { logger.debug(serverErrorCode + ": " + responseMap.get(serverErrorCode)); } } }

Target:
private void validateBlobOnAllReplicas(BlobId blobId, ClusterMap clusterMap, boolean expiredBlobs) throws InterruptedException { Map<ServerErrorCode, ArrayList<ReplicaId>> responseMap = new HashMap<ServerErrorCode, ArrayList<ReplicaId>>(); Map<ReplicaId, ServerResponse> replicaIdBlobContentMap = new HashMap<>(); for (ReplicaId replicaId : blobId.getPartition().getReplicaIds()) { ServerErrorCode serverErrorCode; try { serverErrorCode = validateBlobOnReplica(blobId, clusterMap, replicaId, expiredBlobs, replicaIdBlobContentMap); } catch (MessageFormatException e) { serverErrorCode = ServerErrorCode.Data_Corrupt; } catch (IOException e) { serverErrorCode = ServerErrorCode.IO_Error; } catch (Exception e) { serverErrorCode = ServerErrorCode.Unknown_Error; } if (responseMap.containsKey(serverErrorCode)) { responseMap.get(serverErrorCode).add(replicaId); } else { ArrayList<ReplicaId> replicaList = new ArrayList<ReplicaId>(); replicaList.add(replicaId); responseMap.put(serverErrorCode, replicaList); } } compareListOfBlobContent(blobId.getID(), replicaIdBlobContentMap); boolean errorLoggingRequired = false; if (responseMap.keySet().size() != 1 || !replicaIdBlobContentMap.keySet().contains(ServerErrorCode.No_Error)) { errorLoggingRequired = true; } if (errorLoggingRequired) { logger.error("Summary of responses for {}", blobId); } else { logger.debug("Summary of responses for {}", blobId); } for (ServerErrorCode serverErrorCode : responseMap.keySet()) { if (errorLoggingRequired) { logger.error("{} : {}", serverErrorCode, responseMap.get(serverErrorCode)); } else { logger.debug("{} : {}", serverErrorCode, responseMap.get(serverErrorCode)); } } }