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

Weiwei Yang edited comment on HDFS-11955 at 6/24/17 3:00 PM:
-------------------------------------------------------------

Patch uploaded. This patch fixed following issues

1. REST call for listBucket uses 0 as the default listing length, changed that 
to use {{Header#OZONE_DEFAULT_LIST_SIZE}}

2. Oz command line listBucket doesn't support arguments that REST call already 
supported, such as listing length, start bucket name and prefix. Added support 
of that, usage

2.1 Specify listing result length via command line
{code}
./bin/hdfs oz -listBucket http://ozone1.fyre.ibm.com:9864/volume-wwei-0 -length 
2
{code}

2.2 Specify a prefix to filter the result
{code}
./bin/hdfs oz -listBucket http://ozone1.fyre.ibm.com:9864/volume-wwei-0 -prefix 
bucket1
{code}

2.3 Specify a start bucket name where to start listing from
{code}
./bin/hdfs oz -listBucket http://ozone1.fyre.ibm.com:9864/volume-wwei-0 -start 
bucket2
{code}

3. Added some tests in {{TestBuckets}} and modified this class to use 
distributed handler instead of local.

4. {{KeySpaceManagerProtocolServerSideTranslatorPB}} swallows exception if it 
is not an expected KSMException in {{exceptionToResponseStatus}}. Added a debug 
message to log the exception in KSM server log, otherwise we have no idea what 
happened.

Thanks




was (Author: cheersyang):
Patch uploaded. This patch fixed following issues

1. REST call for listBucket uses 0 as the default listing length, changed that 
to use {{Header#OZONE_DEFAULT_LIST_SIZE}}

2. Oz command line listBucket doesn't support arguments that REST call already 
supported, such as listing length, start bucket name and prefix. Added support 
of that, usage

*Specify listing result length via command line*
{code}
./bin/hdfs oz -listBucket http://ozone1.fyre.ibm.com:9864/volume-wwei-0 -length 
2
{code}

*Specify a prefix to filter the result*
{code}
./bin/hdfs oz -listBucket http://ozone1.fyre.ibm.com:9864/volume-wwei-0 -prefix 
bucket1
{code}

*Specify a start bucket name where to start listing from*
{code}
./bin/hdfs oz -listBucket http://ozone1.fyre.ibm.com:9864/volume-wwei-0 -start 
bucket2
{code}

3. Added some tests in {{TestBuckets}} and modified this class to use 
distributed handler instead of local.

4. {{KeySpaceManagerProtocolServerSideTranslatorPB}} swallows exception if it 
is not an expected KSMException in {{exceptionToResponseStatus}}. Added a debug 
message to log the exception in KSM server log, otherwise we have no idea what 
happened.

Thanks



> Ozone: Set proper parameter default values for listBuckets http request
> -----------------------------------------------------------------------
>
>                 Key: HDFS-11955
>                 URL: https://issues.apache.org/jira/browse/HDFS-11955
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>            Reporter: Weiwei Yang
>            Assignee: Weiwei Yang
>         Attachments: HDFS-11955-HDFS-7240.001.patch
>
>
> HDFS-11779 implements the listBuckets function in ozone server side, the API 
> supports several parameters, startKey, count and prefix. But both of them are 
> optional for the client side rest API. This jira is to make sure we set 
> proper default values in the http request if they are not explicitly set by 
> users.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to