bhattmanish98 commented on code in PR #7837: URL: https://github.com/apache/hadoop/pull/7837#discussion_r2245456486
########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/AbfsHttpConstants.java: ########## @@ -128,6 +128,7 @@ public final class AbfsHttpConstants { public static final String STAR = "*"; public static final String COMMA = ","; public static final String COLON = ":"; + public static final String HYPHEN = "-"; Review Comment: We already have CHAR_HYPHEN defined for this. ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/TracingHeaderVersion.java: ########## @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.fs.azurebfs.utils; + +public enum TracingHeaderVersion { + + V0("", 8), + V1("v1", 13); + + private final String version; + private final int fieldCount; + + TracingHeaderVersion(String version, int fieldCount) { + this.version = version; + this.fieldCount = fieldCount; + } + + @Override + public String toString() { + return version; + } + + public static TracingHeaderVersion getCurrentVersion() { + return V1; + } + + public int getFieldCount() { + return V1.fieldCount; + } + + public String getVersion() { + return V1.version; Review Comment: Same as above, it should be `return this.version`? ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/TracingContext.java: ########## @@ -265,6 +286,34 @@ private String addFailureReasons(final String header, return String.format("%s_%s", header, previousFailure); } + private String getRetryHeader(final String previousFailure, String retryPolicyAbbreviation) { Review Comment: Please add javadoc to all newly added methods ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/TracingHeaderVersion.java: ########## @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.fs.azurebfs.utils; + +public enum TracingHeaderVersion { + + V0("", 8), + V1("v1", 13); + + private final String version; + private final int fieldCount; + + TracingHeaderVersion(String version, int fieldCount) { + this.version = version; + this.fieldCount = fieldCount; + } + + @Override + public String toString() { + return version; + } + + public static TracingHeaderVersion getCurrentVersion() { + return V1; + } + + public int getFieldCount() { + return V1.fieldCount; Review Comment: Shouldn't it be just `return this.fieldCount`? ########## hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestAbfsInputStream.java: ########## @@ -781,6 +794,132 @@ public void testDefaultReadaheadQueueDepth() throws Exception { in.close(); } + @Test + public void testReadTypeInTracingContextHeader() throws Exception { Review Comment: Java Doc missing -- 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