bhattmanish98 commented on code in PR #8050:
URL: https://github.com/apache/hadoop/pull/8050#discussion_r2477127991
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/ConfigurationKeys.java:
##########
@@ -276,6 +276,12 @@ public final class ConfigurationKeys {
*/
public static final String FS_AZURE_ENABLE_READAHEAD_V2 =
"fs.azure.enable.readahead.v2";
+ /**
+ * Enable or disable request priority for prefetch requests
+ * Value: {@value}.
+ */
+ public static final String FS_AZURE_ENABLE_REQUEST_PRIORITY_FOR_PREFETCH =
"fs.azure.enable.prefetch.request.priority";
Review Comment:
Rename the variable to FS_AZURE_ENABLE_PREFETCH_REQUEST_PRIORITY.
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStream.java:
##########
@@ -590,7 +590,7 @@ int readRemote(long position, byte[] b, int offset, int
length, TracingContext t
tracingContext.setPosition(String.valueOf(position));
op = client.read(path, position, b, offset, length,
tolerateOobAppends ? "*" : eTag, cachedSasToken.get(),
- contextEncryptionAdapter, tracingContext);
+ contextEncryptionAdapter, new TracingContext(tracingContext));
Review Comment:
Why this change is needed?
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsDfsClient.java:
##########
@@ -1050,6 +1051,12 @@ public AbfsRestOperation read(final String path,
}
final AbfsUriQueryBuilder abfsUriQueryBuilder =
createDefaultUriQueryBuilder();
+
+ if (getAbfsConfiguration().isEnablePrefetchRequestPriority()
Review Comment:
This part of code is common for both DFS and Blob client, we should put this
logic in a method and put it in AbfsClient class.
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java:
##########
@@ -1335,6 +1336,11 @@ public AbfsRestOperation read(final String path,
requestHeaders.add(rangeHeader);
requestHeaders.add(new AbfsHttpHeader(IF_MATCH, eTag));
+ if (getAbfsConfiguration().isEnablePrefetchRequestPriority()
+ && ReadType.PREFETCH_READ.equals(tracingContext.getReadType())) {
+ requestHeaders.add(new AbfsHttpHeader("x-ms-request-priority", "7"));
Review Comment:
Also, the priority value 7 can be changed tomorrow, so we should keep it
configurable.
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/FileSystemConfigurations.java:
##########
@@ -266,5 +266,7 @@ public final class FileSystemConfigurations {
public static final boolean DEFAULT_FS_AZURE_ENABLE_CREATE_BLOB_IDEMPOTENCY
= true;
+ public static final boolean
DEFAULT_FS_AZURE_ENABLE_PREFETCH_REQUEST_PRIORITY = false;
Review Comment:
Are we not enabling this feature by default?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]