-
Notifications
You must be signed in to change notification settings - Fork 0
100continuesupport #54
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
Conversation
|
Very huge changes! Thanks. |
| files="org[\\/]apache[\\/]hadoop[\\/]fs[\\/]azurebfs[\\/]utils[\\/]Base64.java"/> | ||
| <suppress checks="ParameterNumber|VisibilityModifier" | ||
| files="org[\\/]apache[\\/]hadoop[\\/]fs[\\/]azurebfs[\\/]ITestSmallWriteOptimization.java"/> | ||
| <<<<<<< HEAD |
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.
git conflict
|
Pull requests merged in trunk added as part of this PR :- apache#5516 |
| } | ||
|
|
||
| public boolean accountThrottlingEnabled() { | ||
| return accountThrottlingEnabled; |
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.
[nit] In case we can either do return this. or just return for all the methods, it would be helpful in terms of readability.
| wasbUri, | ||
| rawConfig, | ||
| new AzureFileSystemInstrumentation(rawConfig)); | ||
| wasbUri, |
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.
[nit] some spacing changes have creeped in.
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.
Fixed.
| import org.apache.hadoop.fs.azurebfs.services.AbfsRestOperation; | ||
| import org.apache.hadoop.fs.azurebfs.services.AbfsHttpOperation; | ||
| import org.apache.hadoop.fs.azurebfs.services.TestAbfsClient; | ||
|
|
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.
[nit] extra line
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.
Fixed
| */ | ||
|
|
||
| package org.apache.hadoop.fs.azurebfs.services; | ||
|
|
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.
Would it affect any backward dependencies of other parts of code depending on TestAbfsClient? (Esp if any within the current set of PRs being raised)
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.
No this branch has been backmerged to dev, should not cause any issues.
|
throttling part looks good. |
|
since it has been made up by cherry-picking the prs of throttling and 100continue, can you please attach the test-results in the pr please @anmolanmol1234 |
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.
code match
| private boolean checkUserErrorBlob(int responseStatusCode) { | ||
| return (responseStatusCode >= HttpURLConnection.HTTP_BAD_REQUEST | ||
| && responseStatusCode < HttpURLConnection.HTTP_INTERNAL_ERROR | ||
| && responseStatusCode != HttpURLConnection.HTTP_CONFLICT); | ||
| } | ||
|
|
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.
Please give reasoning for excluding 409.
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.
Added
| if (contentLength > 0) { | ||
| singleton.writeThrottler.addBytesTransferred(contentLength, | ||
| isFailedOperation); | ||
| writeThrottler.addBytesTransferred(contentLength, |
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.
lets add this part as well:
/**
* Updates the metrics for the case when response code signifies throttling
* but there are some expected bytes to be sent.
* @param isThrottledOperation returns true if status code is HTTP_UNAVAILABLE
* @param abfsHttpOperation Used for status code and data transferred.
* @return true if the operation is throttled and has some bytes to transfer.
*/
private boolean updateBytesTransferred(boolean isThrottledOperation,
AbfsHttpOperation abfsHttpOperation) {
return isThrottledOperation && abfsHttpOperation.getExpectedBytesToBeSent() > 0;
}
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.
if (contentLength == 0) {
/*
Signifies the case where we could not update the bytesSent due to
throttling but there were some expectedBytesToBeSent.
*/
if (updateBytesTransferred(isThrottledOperation, abfsHttpOperation)) {
LOG.debug("Updating metrics due to throttling for path {}", abfsHttpOperation.getConnUrl().getPath());
contentLength = abfsHttpOperation.getExpectedBytesToBeSent();
}
}
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.
if (contentLength > 0) {
writeThrottler.addBytesTransferred(contentLength,
isFailedOperation);
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.
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.
Sorry this code piece got missed, added it. Thanks
| tracingContext.constructHeader(httpOperation); | ||
|
|
||
| signRequest(httpOperation, hasRequestBody ? bufferLength : 0); | ||
| switch(client.getAuthType()) { |
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 are we pulling back code of signRequest to the executeHttpOperation
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.
Refactored
saxenapranav
left a comment
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.
LGTM! Please add test results before merging. Thanks.
|
:::: AGGREGATED TEST RESULT :::: HNS-OAuth[INFO] Results: HNS-SharedKey[INFO] Results: NonHNS-SharedKey[INFO] Results: NonHNS-OAuth[INFO] Results: AppendBlob-HNS-OAuth[INFO] Results: |
Added support for expect header and account level throttling.
Added a sepcial handling in case of PutBlockList to not retry without append header if request fails with 409, as that is handled for fallback.