[ https://issues.apache.org/jira/browse/HDDS-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16654398#comment-16654398 ]
Bharat Viswanadham commented on HDDS-682: ----------------------------------------- Hi [~elek] Thank You for posting the patch. A new file S3BucketMapping.java is added to return path for S3Bucket. Could you also take care of that change in this jira. As this has not been committed, I was not able to use the new API's which are added in this. > Unified o3 address parsing for ozonen sh > ---------------------------------------- > > Key: HDDS-682 > URL: https://issues.apache.org/jira/browse/HDDS-682 > Project: Hadoop Distributed Data Store > Issue Type: Bug > Reporter: Elek, Marton > Assignee: Elek, Marton > Priority: Major > Fix For: 0.3.0 > > Attachments: HDDS-682.001.patch > > > For ozone shell command (ozone sh) we have a common method to parse the o3 > url (org.apache.hadoop.ozone.web.ozShell.Handler.verifyURI) but there is no > common method to parse the volume/bucket/key name from the uri.getPath(). > The error handling/parsing is different in each command handler. For example > HDDS-315 fixed a problem with the info key, but we have exactly the same > problem with many other endpoints (only the first segment of the key is used). > As an example: > {code} > hadoop@476486ada939:~$ ozone sh key list /vol1/bucket > [ ] > hadoop@476486ada939:~$ ozone sh key put /vol1/bucket/dir1/file NOTICE.txt > hadoop@476486ada939:~$ ozone sh key list /vol1/bucket > [ { > "version" : 0, > "md5hash" : null, > "createdOn" : "Wed, 17 Oct 2018 15:02:31 GMT", > "modifiedOn" : "Wed, 17 Oct 2018 15:02:32 GMT", > "size" : 22413, > "keyName" : "dir1" > } ] > {code} > Here the key name should be dir1/file instead of dir but the keyname is > parsed in a wrong way. (same bug which is fixed by HDDS-315 for info key) > I propose to create a common OzoneAddress class which can parse all the > o3://, http:// type of urls, can create the OzoneClient, and provide the > parser volume/bucket/key name. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org