You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Elek, Marton (JIRA)" <ji...@apache.org> on 2018/10/17 15:05:00 UTC

[jira] [Created] (HDDS-682) Unified o3 address parsing for ozonen sh

Elek, Marton created HDDS-682:
---------------------------------

             Summary: 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
             Fix For: 0.3.0


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-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org