duongkame commented on code in PR #3771:
URL: https://github.com/apache/ozone/pull/3771#discussion_r984139661
##########
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:
A key is designed to have multiple blocks and thus multiple containers.
Indeed, we always use this interface and don't really need
`getContainerLocation`. Removed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]