Skip to content

Commit 2a76b3a

Browse files
author
slfan1989
committed
YARN-11161. Fix CheckStyle.
1 parent d1cde4f commit 2a76b3a

File tree

1 file changed

+18
-9
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm

1 file changed

+18
-9
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestRouterYarnClientUtils.java

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,8 @@ public void testMergeAttributesToNodesResponse() {
626626
NodeAttributeType.STRING, "nvidia");
627627
Map<NodeAttributeKey, List<NodeToAttributeValue>> map1 = new HashMap<>();
628628
List<NodeToAttributeValue> lists1 = new ArrayList<>();
629-
NodeToAttributeValue attributeValue1 = NodeToAttributeValue.newInstance("node1", gpu.getAttributeValue());
629+
NodeToAttributeValue attributeValue1 =
630+
NodeToAttributeValue.newInstance("node1", gpu.getAttributeValue());
630631
lists1.add(attributeValue1);
631632
map1.put(gpu.getAttributeKey(), lists1);
632633
GetAttributesToNodesResponse response1 = GetAttributesToNodesResponse.newInstance(map1);
@@ -636,13 +637,15 @@ public void testMergeAttributesToNodesResponse() {
636637
NodeAttributeType.STRING, "docker0");
637638
Map<NodeAttributeKey, List<NodeToAttributeValue>> map2 = new HashMap<>();
638639
List<NodeToAttributeValue> lists2 = new ArrayList<>();
639-
NodeToAttributeValue attributeValue2 = NodeToAttributeValue.newInstance("node2", docker.getAttributeValue());
640+
NodeToAttributeValue attributeValue2 =
641+
NodeToAttributeValue.newInstance("node2", docker.getAttributeValue());
640642
lists2.add(attributeValue2);
641643
map2.put(docker.getAttributeKey(), lists2);
642644
GetAttributesToNodesResponse response2 = GetAttributesToNodesResponse.newInstance(map2);
643645

644646
// empty response3
645-
GetAttributesToNodesResponse response3 = GetAttributesToNodesResponse.newInstance(new HashMap<>());
647+
GetAttributesToNodesResponse response3 =
648+
GetAttributesToNodesResponse.newInstance(new HashMap<>());
646649

647650
// null response4
648651
GetAttributesToNodesResponse response4 = null;
@@ -672,20 +675,25 @@ public void testMergeAttributesToNodesResponse() {
672675
public void testMergeClusterNodeAttributesResponse() {
673676
// normal response1
674677
NodeAttributeInfo nodeAttributeInfo1 =
675-
NodeAttributeInfo.newInstance(NodeAttributeKey.newInstance("GPU"), NodeAttributeType.STRING);
678+
NodeAttributeInfo.newInstance(NodeAttributeKey.newInstance("GPU"),
679+
NodeAttributeType.STRING);
676680
Set<NodeAttributeInfo> attributes1 = new HashSet<>();
677681
attributes1.add(nodeAttributeInfo1);
678-
GetClusterNodeAttributesResponse response1 = GetClusterNodeAttributesResponse.newInstance(attributes1);
682+
GetClusterNodeAttributesResponse response1 =
683+
GetClusterNodeAttributesResponse.newInstance(attributes1);
679684

680685
// normal response2
681686
NodeAttributeInfo nodeAttributeInfo2 =
682-
NodeAttributeInfo.newInstance(NodeAttributeKey.newInstance("CPU"), NodeAttributeType.STRING);
687+
NodeAttributeInfo.newInstance(NodeAttributeKey.newInstance("CPU"),
688+
NodeAttributeType.STRING);
683689
Set<NodeAttributeInfo> attributes2 = new HashSet<>();
684690
attributes2.add(nodeAttributeInfo2);
685-
GetClusterNodeAttributesResponse response2 = GetClusterNodeAttributesResponse.newInstance(attributes2);
691+
GetClusterNodeAttributesResponse response2 =
692+
GetClusterNodeAttributesResponse.newInstance(attributes2);
686693

687694
// empty response3
688-
GetClusterNodeAttributesResponse response3 = GetClusterNodeAttributesResponse.newInstance(new HashSet<>());
695+
GetClusterNodeAttributesResponse response3 =
696+
GetClusterNodeAttributesResponse.newInstance(new HashSet<>());
689697

690698
// null response4
691699
GetClusterNodeAttributesResponse response4 = null;
@@ -728,7 +736,8 @@ public void testMergeNodesToAttributesResponse() {
728736
GetNodesToAttributesResponse response2 = GetNodesToAttributesResponse.newInstance(node2Map);
729737

730738
// empty response3
731-
GetNodesToAttributesResponse response3 = GetNodesToAttributesResponse.newInstance(new HashMap<>());
739+
GetNodesToAttributesResponse response3 =
740+
GetNodesToAttributesResponse.newInstance(new HashMap<>());
732741

733742
// null response4
734743
GetNodesToAttributesResponse response4 = null;

0 commit comments

Comments
 (0)