瀏覽代碼

YARN-10957. Using invokeConcurrent Overload with Collection in getClusterMetrics (#3439)

Akshat Bordia 3 年之前
父節點
當前提交
51bd528bd3

+ 1 - 2
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java

@@ -664,11 +664,10 @@ public class FederationClientInterceptor
         federationFacade.getSubClusters(true);
     ClientMethod remoteMethod = new ClientMethod("getClusterMetrics",
         new Class[] {GetClusterMetricsRequest.class}, new Object[] {request});
-    ArrayList<SubClusterId> clusterList = new ArrayList<>(subclusters.keySet());
     Map<SubClusterId, GetClusterMetricsResponse> clusterMetrics;
 
     try {
-      clusterMetrics = invokeConcurrent(clusterList, remoteMethod,
+      clusterMetrics = invokeConcurrent(subclusters.keySet(), remoteMethod,
           GetClusterMetricsResponse.class);
 
     } catch (Exception ex) {