[
https://issues.apache.org/jira/browse/HADOOP-19232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17911425#comment-17911425
]
ASF GitHub Bot commented on HADOOP-19232:
-----------------------------------------
anmolanmol1234 commented on code in PR #7272:
URL: https://github.com/apache/hadoop/pull/7272#discussion_r1908545022
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsRestOperationException.java:
##########
@@ -91,46 +104,85 @@ public void testAbfsRestOperationExceptionFormat() throws
IOException {
try {
fs.listFiles(nonExistedFilePath2, false);
} catch (Exception ex) {
- // verify its format
String errorMessage = ex.getLocalizedMessage();
String[] errorFields = errorMessage.split(",");
- // Expected Fields are: Message, StatusCode, Method, URL,
ActivityId(rId), StorageErrorCode, StorageErrorMessage.
- Assertions.assertThat(errorFields)
- .describedAs("Number of Fields in exception message are not as
expected")
- .hasSize(7);
- // Check status message, status code, HTTP Request Type and URL.
- Assertions.assertThat(errorFields[0].trim())
- .describedAs("Error Message Field in exception message is wrong")
- .isEqualTo("Operation failed: \"The specified path does not
exist.\"");
- Assertions.assertThat(errorFields[1].trim())
- .describedAs("Status Code Field in exception message"
- + " should be \"404\"")
- .isEqualTo("404");
- Assertions.assertThat(errorFields[2].trim())
- .describedAs("Http Rest Method Field in exception message"
- + " should be \"GET\"")
- .isEqualTo("GET");
- Assertions.assertThat(errorFields[3].trim())
- .describedAs("Url Field in exception message"
- + " should start with \"http\"")
- .startsWith("http");
- Assertions.assertThat(errorFields[4].trim())
- .describedAs("ActivityId Field in exception message"
- + " should start with \"rId:\"")
- .startsWith("rId:");
- // Check storage error code and storage error message.
- Assertions.assertThat(errorFields[5].trim())
- .describedAs("StorageErrorCode Field in exception message"
- + " should be \"PathNotFound\"")
- .isEqualTo("PathNotFound");
- Assertions.assertThat(errorFields[6].trim())
- .describedAs("StorageErrorMessage Field in exception message"
- + " should contain \"RequestId\"")
- .contains("RequestId");
- Assertions.assertThat(errorFields[6].trim())
- .describedAs("StorageErrorMessage Field in exception message"
- + " should contain \"Time\"")
- .contains("Time");
+ if (client instanceof AbfsDfsClient) {
+ // verify its format
+ // Expected Fields are: Message, StatusCode, Method, URL,
ActivityId(rId), StorageErrorCode, StorageErrorMessage.
+ Assertions.assertThat(errorFields)
+ .describedAs(
+ "Number of Fields in exception message are not as expected")
+ .hasSize(7);
+ Assertions.assertThat(errorFields[0].trim())
+ .describedAs("Error Message Field in exception message is wrong")
+ .isEqualTo(
+ "Operation failed: \"The specified path does not exist.\"");
+ Assertions.assertThat(errorFields[1].trim())
+ .describedAs("Status Code Field in exception message"
+ + " should be \"404\"")
+ .isEqualTo("404");
+ Assertions.assertThat(errorFields[2].trim())
+ .describedAs("Http Rest Method Field in exception message"
+ + " should be \"GET\"")
+ .isEqualTo("GET");
+ Assertions.assertThat(errorFields[3].trim())
+ .describedAs("Url Field in exception message"
+ + " should start with \"http\"")
+ .startsWith("http");
+ Assertions.assertThat(errorFields[4].trim())
+ .describedAs("ActivityId Field in exception message"
+ + " should start with \"rId:\"")
+ .startsWith("rId:");
+ // Check storage error code and storage error message.
+ Assertions.assertThat(errorFields[5].trim())
+ .describedAs("StorageErrorCode Field in exception message"
+ + " should be \"PathNotFound\"")
+ .isEqualTo("PathNotFound");
+ Assertions.assertThat(errorFields[6].trim())
+ .describedAs("StorageErrorMessage Field in exception message"
+ + " should contain \"RequestId\"")
+ .contains("RequestId");
+ Assertions.assertThat(errorFields[6].trim())
+ .describedAs("StorageErrorMessage Field in exception message"
+ + " should contain \"Time\"")
+ .contains("Time");
+ } else {
Review Comment:
Yes on checking it's observed that the exception message thrown by List API
on Blob and DFS endpoint is different
> ABFS: [FnsOverBlob] Implementing Ingress Support with various Fallback
> Handling
> -------------------------------------------------------------------------------
>
> Key: HADOOP-19232
> URL: https://issues.apache.org/jira/browse/HADOOP-19232
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/azure
> Affects Versions: 3.4.0
> Reporter: Descifrado
> Assignee: Anmol Asrani
> Priority: Major
> Labels: pull-request-available
>
> Scope of this task is to refactor the AbfsOutputStream class to handle the
> ingress for DFS and Blob endpoint effectively.
> More details will be added soon.
> Perquisites for this Patch:
> 1. [HADOOP-19187] ABFS: [FnsOverBlob]Making AbfsClient Abstract for
> supporting both DFS and Blob Endpoint - ASF JIRA (apache.org)
> 2. [HADOOP-19226] ABFS: [FnsOverBlob]Implementing Azure Rest APIs on Blob
> Endpoint for AbfsBlobClient - ASF JIRA (apache.org)
> 3. [HADOOP-19207] ABFS: [FnsOverBlob]Response Handling of Blob Endpoint APIs
> and Metadata APIs - ASF JIRA (apache.org)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]