Source:
private void processGetBlobResponse(GetRequestInfo getRequestInfo, GetResponse getResponse) throws IOException, MessageFormatException { ServerErrorCode getError = getResponse.getError(); if (getError == ServerErrorCode.No_Error) { int partitionsInResponse = getResponse.getPartitionResponseInfoList().size(); if (partitionsInResponse != 1) { chunkException = new RouterException( "Unexpected number of partition responses, expected: 1, " + "received: " + partitionsInResponse, RouterErrorCode.UnexpectedInternalError); } else { getError = getResponse.getPartitionResponseInfoList().get(0).getErrorCode(); if (getError == ServerErrorCode.No_Error) { PartitionResponseInfo partitionResponseInfo = getResponse.getPartitionResponseInfoList().get(0); int objectsInPartitionResponse = partitionResponseInfo.getMessageInfoList().size(); if (objectsInPartitionResponse != 1) { chunkException = new RouterException( "Unexpected number of messages in a partition response, expected: 1, " + "received: " + objectsInPartitionResponse, RouterErrorCode.UnexpectedInternalError); } MessageMetadata messageMetadata = partitionResponseInfo.getMessageMetadataList().get(0); handleBody(getResponse.getInputStream(), messageMetadata); chunkOperationTracker.onResponse(getRequestInfo.replicaId, true); if (RouterUtils.isRemoteReplica(routerConfig, getRequestInfo.replicaId)) { logger.trace("Cross colo request successful for remote replica in ", getRequestInfo.replicaId.getDataNodeId().getDatacenterName()); routerMetrics.crossColoSuccessCount.inc(); } } else { processServerError(getError); if (getError == ServerErrorCode.Blob_Deleted || getError == ServerErrorCode.Blob_Expired) { chunkCompleted = true; } else { onErrorResponse(getRequestInfo.replicaId); } } } } else { logger.trace("Replica returned an error for a GetBlobRequest with response correlationId : ", getRequestInfo.replicaId.getDataNodeId(), getError, getResponse.getCorrelationId()); onErrorResponse(getRequestInfo.replicaId); } }

Target:
private void processGetBlobResponse(GetRequestInfo getRequestInfo, GetResponse getResponse) throws IOException, MessageFormatException { ServerErrorCode getError = getResponse.getError(); if (getError == ServerErrorCode.No_Error) { int partitionsInResponse = getResponse.getPartitionResponseInfoList().size(); if (partitionsInResponse != 1) { chunkException = new RouterException( "Unexpected number of partition responses, expected: 1, " + "received: " + partitionsInResponse, RouterErrorCode.UnexpectedInternalError); } else { getError = getResponse.getPartitionResponseInfoList().get(0).getErrorCode(); if (getError == ServerErrorCode.No_Error) { PartitionResponseInfo partitionResponseInfo = getResponse.getPartitionResponseInfoList().get(0); int objectsInPartitionResponse = partitionResponseInfo.getMessageInfoList().size(); if (objectsInPartitionResponse != 1) { chunkException = new RouterException( "Unexpected number of messages in a partition response, expected: 1, " + "received: " + objectsInPartitionResponse, RouterErrorCode.UnexpectedInternalError); } else { MessageMetadata messageMetadata = partitionResponseInfo.getMessageMetadataList().get(0); handleBody(getResponse.getInputStream(), messageMetadata); chunkOperationTracker.onResponse(getRequestInfo.replicaId, true); if (RouterUtils.isRemoteReplica(routerConfig, getRequestInfo.replicaId)) { logger.trace("Cross colo request successful for remote replica in ", getRequestInfo.replicaId.getDataNodeId().getDatacenterName()); routerMetrics.crossColoSuccessCount.inc(); } } } else { processServerError(getError); if (getError == ServerErrorCode.Blob_Deleted || getError == ServerErrorCode.Blob_Expired) { chunkCompleted = true; } else { onErrorResponse(getRequestInfo.replicaId); } } } } else { logger.trace("Replica returned an error for a GetBlobRequest with response correlationId : ", getRequestInfo.replicaId.getDataNodeId(), getError, getResponse.getCorrelationId()); onErrorResponse(getRequestInfo.replicaId); } }