- 
                Notifications
    You must be signed in to change notification settings 
- Fork 9.1k
Hadoop-19735. ABFS: Adding request priority for prefetches #8050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
| 💔 -1 overall 
 
 This message was automatically generated. | 
|  | ||
| if (getAbfsConfiguration().isEnablePrefetchRequestPriority() | ||
| && ReadType.PREFETCH_READ.equals(tracingContext.getReadType())) { | ||
| requestHeaders.add(new AbfsHttpHeader("x-ms-request-priority", "7")); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both values should come from constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the priority value 7 can be changed tomorrow, so we should keep it configurable.
|  | ||
| if (getAbfsConfiguration().isEnablePrefetchRequestPriority() | ||
| && ReadType.PREFETCH_READ.equals(tracingContext.getReadType())) { | ||
| requestHeaders.add(new AbfsHttpHeader("x-ms-request-priority", "7")); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
| 💔 -1 overall 
 
 This message was automatically generated. | 
| * 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"; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename the variable to FS_AZURE_ENABLE_PREFETCH_REQUEST_PRIORITY.
|  | ||
| public static final boolean DEFAULT_FS_AZURE_ENABLE_CREATE_BLOB_IDEMPOTENCY = true; | ||
|  | ||
| public static final boolean DEFAULT_FS_AZURE_ENABLE_PREFETCH_REQUEST_PRIORITY = false; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we not enabling this feature by default?
|  | ||
| if (getAbfsConfiguration().isEnablePrefetchRequestPriority() | ||
| && ReadType.PREFETCH_READ.equals(tracingContext.getReadType())) { | ||
| requestHeaders.add(new AbfsHttpHeader("x-ms-request-priority", "7")); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the priority value 7 can be changed tomorrow, so we should keep it configurable.
|  | ||
| final AbfsUriQueryBuilder abfsUriQueryBuilder = createDefaultUriQueryBuilder(); | ||
|  | ||
| if (getAbfsConfiguration().isEnablePrefetchRequestPriority() | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| op = client.read(path, position, b, offset, length, | ||
| tolerateOobAppends ? "*" : eTag, cachedSasToken.get(), | ||
| contextEncryptionAdapter, tracingContext); | ||
| contextEncryptionAdapter, new TracingContext(tracingContext)); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change is needed?
Description of PR
JIRA: https://issues.apache.org/jira/browse/HADOOP-19735
Adding low traffic request priority (behind a config flag) for prefetches to reduce load on server during throttling
How was this patch tested?
Test suite will be run