swagle commented on a change in pull request #1055: HDDS-1705. Recon: Add 
estimatedTotalCount to the response of ...
URL: https://github.com/apache/hadoop/pull/1055#discussion_r300187343
 
 

 ##########
 File path: 
hadoop-ozone/ozone-recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/ContainerDBServiceProviderImpl.java
 ##########
 @@ -112,16 +134,55 @@ public void storeContainerKeyMapping(ContainerKeyPrefix 
containerKeyPrefix,
     containerKeyTable.put(containerKeyPrefix, count);
   }
 
+  /**
+   * Store the containerID -> no. of keys count into the container DB store.
+   *
+   * @param containerID the containerID.
+   * @param count count of the keys within the given containerID.
+   * @throws IOException
+   */
+  @Override
+  public void storeContainerKeyCount(Long containerID, Long count)
+      throws IOException {
+    containerKeyCountTable.put(containerID, count);
+  }
+
+  /**
+   * Get the total count of keys within the given containerID.
+   *
+   * @param containerID the given containerID.
+   * @return count of keys within the given containerID.
+   * @throws IOException
+   */
+  @Override
+  public long getKeyCountForContainer(Long containerID) throws IOException {
+    Long keyCount = containerKeyCountTable.get(containerID);
+    return keyCount == null ? 0L : keyCount;
+  }
+
+  /**
+   * Get if a containerID exists or not.
+   *
+   * @param containerID the given containerID.
+   * @return if the given ContainerID exists or not.
+   * @throws IOException
+   */
+  @Override
+  public boolean isContainerExists(Long containerID) throws IOException {
 
 Review comment:
   doesContainerExists sounds better IMO.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to