[ 
https://issues.apache.org/jira/browse/HADOOP-18869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17760353#comment-17760353
 ] 

ASF GitHub Bot commented on HADOOP-18869:
-----------------------------------------

anujmodi2021 opened a new pull request, #6003:
URL: https://github.com/apache/hadoop/pull/6003

   ### Description of PR
   Jira Ticket: https://issues.apache.org/jira/browse/HADOOP-18869 
   
   Following changes are included in this PR:
   1. HDFS.create() was failing on root path with Invalid URL. As a fix a check 
is added to avoid network call if root path is passed. Instead, an Exception 
will be thrown with relevant message.
   2. HDFS.createNonRecursive() was failing on root path with 
NullPointerException. As a fix a check is added to avoid network call if root 
path is passed. Instead, an Exception will be thrown with relevant message.
   3. HDFS.getXAttr() was failing for root path with Invalid URL. As a fix 
support for setting File System Properties added if root path is passed.
   4. HDFS.setXAttr() was failing for root path with Invalid URL. As a fix 
support for getting File System Properties added if root path is passed.
   5. Tests for getsetXAttr() were trying to set Unicode characters in 
attribute value encoded in ISO_8859-1 which does not support unicode, hence the 
value set by setXAttr() were going as undefined character. getXAttr() also 
retrieved them as undefined characters only. As a fix, assertions were changed 
to compare the both encoded and decoded values.
   Also, ABFS used DFS endpoint to interact with Azure services. As per the 
official documentation, these operations on DFS endpoint supports only ASCII 
characters. As a ix tests were modified to work only with ASCII characters.
   
   ### How was this patch tested?
   Existing tests were modified and more tests were added.
   Whole test suite was ran to verify the changes. Test results pasted below.
   
   ### For code changes:
   
   - [ ] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   




> ABFS: Fixing Behavior of a File System APIs on root path
> --------------------------------------------------------
>
>                 Key: HADOOP-18869
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18869
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/azure
>    Affects Versions: 3.3.6
>            Reporter: Anuj Modi
>            Assignee: Anuj Modi
>            Priority: Major
>
> Following HDFS Apis are failing when called on a root path.
> {*}{*}{*}{*}{*}{*}
> |FS Call|Status|Error thrown to caller|
> |create()|Failing|Operation failed: "The request URI is invalid.", 400, PUT, 
> https://anujtesthns.dfs.core.windows.net/abfs-testcontainer-02076119-21ed-4ada-bcd0-14afaae54013/?resource=file&timeout=90,
>  InvalidUri, "The request URI is invalid. 
> RequestId:1d23f8c2-d01f-0059-61b6-c60c24000000 
> Time:2023-08-04T09:29:55.4813818Z"|
> |createNonRecursive()|Failing|Runtime Exception: 
> java.lang.IllegalArgumentException: null path (This is occuring because 
> getParentPath is null and getFileStatus is called on null)|
> |setXAttr()|Failing|Operation failed: "The request URI is invalid.", 400, 
> HEAD, 
> https://anujtesthns.dfs.core.windows.net/abfs-testcontainer-491399b3-c3d0-4568-9d4a-a26e0aa8f000/?upn=false&timeout=90|
> |getXAttr()|Failing|Operation failed: "The request URI is invalid.", 400, 
> HEAD, 
> https://anujtesthns.dfs.core.windows.net/abfs-testcontainer-491399b3-c3d0-4568-9d4a-a26e0aa8f000/?upn=false&timeout=91|



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to