-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HADOOP-18874: [ABFS] Adding Server returned request id in Exception Message thrown to caller. #6004
HADOOP-18874: [ABFS] Adding Server returned request id in Exception Message thrown to caller. #6004
Conversation
💔 -1 overall
This message was automatically generated. |
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.
production code good.
for the tests, i want all new assertions to use assertJ with detailed assertions (.contains(), .startsWith(), .equals() etc). This is to have meaningful errors, rather than just "assert failed line 87" which is useless if it starts failing on jenkins runs. (*)
this would be best be matched by upgrading the existing ones to use it too, to avoid a mix
(*) it is predictable I will ask for this; save time and do it from the outset.
// Check status message, status code, HTTP Request Type and URL. | ||
Assert.assertEquals("Operation failed: \"The specified path does not exist.\"", errorFields[0].trim()); | ||
Assert.assertEquals("404", errorFields[1].trim()); | ||
Assert.assertEquals("HEAD", errorFields[2].trim()); | ||
Assert.assertTrue(errorFields[3].trim().startsWith("http")); | ||
Assert.assertTrue(errorFields[4].trim().startsWith("rId:")); |
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.
use assertj with a .startsWith() assertion.
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.
Taken
// Check status message, status code, HTTP Request Type and URL. | ||
Assert.assertEquals("Operation failed: \"The specified path does not exist.\"", errorFields[0].trim()); | ||
Assert.assertEquals("404", errorFields[1].trim()); | ||
Assert.assertEquals("GET", errorFields[2].trim()); | ||
Assert.assertTrue(errorFields[3].trim().startsWith("http")); | ||
Assert.assertTrue(errorFields[4].trim().startsWith("rId:")); |
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.
use assertj with a .startsWith() assertion.
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.
Taken
Assert.assertTrue(errorFields[5].contains("RequestId") | ||
&& errorFields[5].contains("Time")); | ||
Assert.assertEquals("PathNotFound", errorFields[5].trim()); | ||
Assert.assertTrue(errorFields[6].contains("RequestId") |
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.
use assertj with a .contains() assertion.
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.
Taken
77e2bb8
to
e586bf9
Compare
🎊 +1 overall
This message was automatically generated. |
Thanks for the review @steveloughran |
e586bf9
to
6bb403d
Compare
Recent Test Run :::: AGGREGATED TEST RESULT :::: HNS-OAuth[INFO] Results: HNS-SharedKey[INFO] Results: NonHNS-SharedKey[INFO] Results: AppendBlob-HNS-OAuth[INFO] Results: Time taken: 27 mins 20 secs. |
🎊 +1 overall
This message was automatically generated. |
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.
+1
…wn to the caller. (apache#6004) Contributed by Anuj Modi
…wn to the caller. (apache#6004) Contributed by Anuj Modi
Jira Ticket: https://issues.apache.org/jira/browse/HADOOP-18874
Description of PR
Each request made to Azure server has its unique ActivityId (rid) which is returned in response of the request whether is succeed or fails.
When a HDFS call fails due to an error from Azure service, An ABFSRestOperationException is throws to the caller. This task is to add a server returned activity id (rid) in the exception message which can be used to investigate the failure on service side.
How was this patch tested?
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?