You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2019/11/29 11:09:18 UTC

[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #283: HDDS-2651 Make startId parameter non-mandatory while listing containe…

adoroszlai commented on a change in pull request #283: HDDS-2651 Make startId parameter non-mandatory while listing containe…
URL: https://github.com/apache/hadoop-ozone/pull/283#discussion_r352084455
 
 

 ##########
 File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/SCMContainerManager.java
 ##########
 @@ -217,7 +217,7 @@ public ContainerInfo getContainer(final ContainerID containerID)
       Collections.sort(containersIds);
 
       return containersIds.stream()
-          .filter(id -> id.getId() > startId)
+          .filter(id -> id.getId() >= startId)
 
 Review comment:
   The interface doc says `startId` is exclusive:
   
   https://github.com/apache/hadoop-ozone/blob/cd3f8c9f8316ae742ffeb497ab77581a4519173c/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerManager.java#L77-L92
   I don't know how "backward compatible" the interface needs to be at this stage, but I think it would be better to change the default `startId` to 0 in `scmcli` instead.  Otherwise, please update the javadoc, too.
   
   CC @anuengineer

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org