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 2020/12/14 12:08:56 UTC

[GitHub] [ozone] nandakumar131 commented on a change in pull request #1378: HDDS-4133. Use new ContainerManager in SCM.

nandakumar131 commented on a change in pull request #1378:
URL: https://github.com/apache/ozone/pull/1378#discussion_r542335141



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerManagerImpl.java
##########
@@ -111,14 +135,18 @@ public ContainerInfo getContainer(final ContainerID id)
   }
 
   @Override
-  public List<ContainerInfo> listContainers(final ContainerID startID,
-                                            final int count) {
+  public List<ContainerInfo> getContainers(final ContainerID startID,
+                                           final int count) {
     lock.readLock().lock();
+    scmContainerManagerMetrics.incNumListContainersOps();
     try {
+      // TODO: Remove the null check, startID should not be null. Fix the unit
+      //  test before removing the check.
       final long start = startID == null ? 0 : startID.getId();
       final List<ContainerID> containersIds =
           new ArrayList<>(containerStateManager.getContainerIDs());
       Collections.sort(containersIds);
+      scmContainerManagerMetrics.incNumListContainersOps();

Review comment:
       My bad, thanks for catching it.




----------------------------------------------------------------
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



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