Skip to content

Commit

Permalink
YARN-11161. Fix CheckStyle.
Browse files Browse the repository at this point in the history
  • Loading branch information
slfan1989 committed Jul 25, 2022
1 parent 358c99b commit 1b1719c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1258,16 +1258,16 @@ public void testGetAttributesToNodes() throws Exception {
interceptor.getAttributesToNodes(GetAttributesToNodesRequest.newInstance());

Assert.assertNotNull(response);
Map<NodeAttributeKey, List<NodeToAttributeValue>> attributesToNodes = response.getAttributesToNodes();
Assert.assertNotNull(attributesToNodes);
Assert.assertEquals(4, attributesToNodes.size());
Map<NodeAttributeKey, List<NodeToAttributeValue>> attrs = response.getAttributesToNodes();
Assert.assertNotNull(attrs);
Assert.assertEquals(4, attrs.size());

NodeAttribute gpu = NodeAttribute.newInstance(NodeAttribute.PREFIX_CENTRALIZED, "GPU",
NodeAttributeType.STRING, "nvidia");
NodeToAttributeValue attributeValue1 =
NodeToAttributeValue.newInstance("0-host1", gpu.getAttributeValue());
NodeAttributeKey gpuKey = gpu.getAttributeKey();
Assert.assertTrue(attributesToNodes.get(gpuKey).contains(attributeValue1));
Assert.assertTrue(attrs.get(gpuKey).contains(attributeValue1));
}

@Test
Expand Down Expand Up @@ -1303,7 +1303,8 @@ public void testNodesToAttributes() throws Exception {
LOG.info("Test FederationClientInterceptor : Get NodesToAttributes request.");

// null request
LambdaTestUtils.intercept(YarnException.class, "Missing getNodesToAttributes request or hostNames.",
LambdaTestUtils.intercept(YarnException.class,
"Missing getNodesToAttributes request or hostNames.",
() -> interceptor.getNodesToAttributes(null));

// normal request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected ApplicationClientProtocol getClientRMProxyForSubCluster(
}
mockRMs.put(subClusterId, mockRM);
}
initNodeAttributes(subClusterId,mockRM);
initNodeAttributes(subClusterId, mockRM);
return mockRM.getClientRMService();
}
}
Expand Down

0 comments on commit 1b1719c

Please sign in to comment.