Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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:
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" } ]
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.
Attachments
Attachments
Issue Links
- duplicates
-
HDDS-724 Delimiters (/) should not allowed in bucket name when execute bucket update/delete command.
- Resolved