smengcl opened a new pull request #528: HDDS-2979. Implement ofs://: Fix getFileStatus for mkdir volume URL: https://github.com/apache/hadoop-ozone/pull/528 ## What changes were proposed in this pull request? Xiaoyu Yao discovered that when running ozone fs -mkdir -p ofs://om/vol1/ (only volume name is given, no bucket name or key path), the command would fail in getFileStatus (before reaching createDirectory()) in Hadoop common code: ``` bash-4.2$ ozone fs -mkdir -p ofs://om/vol1/ -mkdir: Bucket or Volume length is illegal, valid length is 3-63 characters # Same w/o -p bash-4.2$ ozone fs -mkdir ofs://om/vol1/ -mkdir: Bucket or Volume length is illegal, valid length is 3-63 characters And we discovered with debugger attached that the root cause is that getFileStatus() is not behaving as expected. ``` Solution: Patch existing OFS code, throw proper exception in getBucket() code to make Hadoop common happy. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-2979 ## How was this patch tested? Manually ran `ozone fs -mkdir -p ofs://om/vol1/` in `docker-compose` cluster: ``` bash-4.2$ ozone fs -mkdir -p ofs://om/vol1/ 2020-02-04 20:58:25,828 [main] INFO rpc.RpcClient: Creating Volume: vol1, with hadoop as owner. ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
