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 2022/09/29 07:45:59 UTC

[GitHub] [ozone] kerneltime commented on a diff in pull request #3771: HDDS-7229. Introduce container location cache in ScmClient

kerneltime commented on code in PR #3771:
URL: https://github.com/apache/ozone/pull/3771#discussion_r983178750


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ScmClient.java:
##########
@@ -52,4 +107,40 @@ public void setUpdateServiceGrpcClient(
   public SCMUpdateServiceGrpcClient getUpdateServiceGrpcClient() {
     return updateServiceGrpcClient;
   }
+
+  public Pipeline getContainerLocation(long containerId, boolean forceRefresh)
+      throws IOException {
+    if (forceRefresh) {
+      containerLocationCache.invalidate(containerId);
+    }
+    try {
+      return containerLocationCache.get(containerId);
+    } catch (ExecutionException e) {
+      return handleCacheExecutionException(e);
+    }
+  }
+
+  public Map<Long, Pipeline> getContainerLocations(Iterable<Long> containerIds,

Review Comment:
   Is this for objects with multiple containers? Why have `getContainerLocation`?



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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