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

Yiqun Lin commented on HDFS-12118:
----------------------------------

Hi [~vagarychen], thanks for you response.
bq. Why it should be [vol-0, vol-10] though? Seems to me that [vol0, vol2] is 
actually correct because there are indeed the first two volumes being created 
and is consistent with the order, right? 
The info returned should be in a string name order rather than the created 
order. So the option startKey is meaningful and will make sense.
bq. we list, say 5 volumes for test-user-a, we should make sure that:
1. the 5 volumes are among [vol0, vol2, vol4,...vol18], i.e. indeed the volumes 
belonging to test-user-a.
2. the 5 volumes are different, i.e. we don't mistakenly list duplicates.
Can I just understand this as that I should add the additional check for the 
volume's user? The current way in the latest patch can address your point I 
think. Please look the following codes.
{code}
// return volume names should be [test-vol10, test-vol12, ..., test-vol18]
+    for (int i = 0; i < volumes.size(); i++) {
+      assertTrue(volumes.get(i).contains("test-vol" + ((i + 5) * 2)));
+    }
{code}
As HDFS-12083 has been merged and it changes the current behaviour of list 
operations, will attach the new patch.




> Ozone: Ozone shell: Add more testing for volume shell commands
> --------------------------------------------------------------
>
>                 Key: HDFS-12118
>                 URL: https://issues.apache.org/jira/browse/HDFS-12118
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone, tools
>    Affects Versions: HDFS-7240
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>         Attachments: HDFS-12118-HDFS-7240.001.patch, 
> HDFS-12118-HDFS-7240.002.patch, HDFS-12118-HDFS-7240.003.patch
>
>
> Currently there are missing enough testings to cover all the ozone command. 
> Now we have to test this in a manual way to see if commands run okay as 
> expected. There will be lots of test cases we should add for all the volume, 
> bucket and key commands. In order to easy reviewed, I'd like to separate this 
> work to three subtasks. This JIRA is a good start for implementing for volume 
> commands.
> Plan to add the unit test to test following command and its available options:
> * infoVolume
> * updateVolume
> * listVolume
> * createVolume



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to