anujmodi2021 commented on code in PR #7837: URL: https://github.com/apache/hadoop/pull/7837#discussion_r2250353075
########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/TracingContext.java: ########## @@ -193,32 +213,33 @@ public void setListener(Listener listener) { public void constructHeader(AbfsHttpOperation httpOperation, String previousFailure, String retryPolicyAbbreviation) { clientRequestId = UUID.randomUUID().toString(); switch (format) { - case ALL_ID_FORMAT: // Optional IDs (e.g. streamId) may be empty - header = - clientCorrelationID + ":" + clientRequestId + ":" + fileSystemID + ":" - + getPrimaryRequestIdForHeader(retryCount > 0) + ":" + streamID - + ":" + opType + ":" + retryCount; - header = addFailureReasons(header, previousFailure, retryPolicyAbbreviation); - if (!(ingressHandler.equals(EMPTY_STRING))) { - header += ":" + ingressHandler; - } - if (!(position.equals(EMPTY_STRING))) { - header += ":" + position; - } - if (operatedBlobCount != null) { - header += (":" + operatedBlobCount); - } - header += (":" + httpOperation.getTracingContextSuffix()); - metricHeader += !(metricResults.trim().isEmpty()) ? metricResults : ""; + case ALL_ID_FORMAT: + header = TracingHeaderVersion.V1.getVersion() + COLON + + clientCorrelationID + COLON + + clientRequestId + COLON + + fileSystemID + COLON + + getPrimaryRequestIdForHeader(retryCount > 0) + COLON + + streamID + COLON + + opType + COLON + + getRetryHeader(previousFailure, retryPolicyAbbreviation) + COLON + + ingressHandler + COLON Review Comment: With empty checks we cannot have a fixed schema. We need the proper defined schema where each position after split is fixed for all the headers and analysis can be done easily without worrying about the position of info we need to analyse. ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/TracingContext.java: ########## @@ -193,32 +213,33 @@ public void setListener(Listener listener) { public void constructHeader(AbfsHttpOperation httpOperation, String previousFailure, String retryPolicyAbbreviation) { clientRequestId = UUID.randomUUID().toString(); switch (format) { - case ALL_ID_FORMAT: // Optional IDs (e.g. streamId) may be empty - header = - clientCorrelationID + ":" + clientRequestId + ":" + fileSystemID + ":" - + getPrimaryRequestIdForHeader(retryCount > 0) + ":" + streamID - + ":" + opType + ":" + retryCount; - header = addFailureReasons(header, previousFailure, retryPolicyAbbreviation); - if (!(ingressHandler.equals(EMPTY_STRING))) { - header += ":" + ingressHandler; - } - if (!(position.equals(EMPTY_STRING))) { - header += ":" + position; - } - if (operatedBlobCount != null) { - header += (":" + operatedBlobCount); - } - header += (":" + httpOperation.getTracingContextSuffix()); - metricHeader += !(metricResults.trim().isEmpty()) ? metricResults : ""; + case ALL_ID_FORMAT: + header = TracingHeaderVersion.V1.getVersion() + COLON + + clientCorrelationID + COLON + + clientRequestId + COLON + + fileSystemID + COLON + + getPrimaryRequestIdForHeader(retryCount > 0) + COLON + + streamID + COLON + + opType + COLON + + getRetryHeader(previousFailure, retryPolicyAbbreviation) + COLON + + ingressHandler + COLON + + position + COLON + + operatedBlobCount + COLON + + httpOperation.getTracingContextSuffix() + COLON + + getOperationSpecificHeader(opType); + + metricHeader += !(metricResults.trim().isEmpty()) ? metricResults : EMPTY_STRING; break; case TWO_ID_FORMAT: - header = clientCorrelationID + ":" + clientRequestId; - metricHeader += !(metricResults.trim().isEmpty()) ? metricResults : ""; + header = TracingHeaderVersion.V1.getVersion() + COLON Review Comment: Fixed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org