Skip to content

Commit 17e8cb4

Browse files
committed
YARN-11536. Fix CheckStyle.
1 parent 3aa76e0 commit 17e8cb4

File tree

2 files changed

+6
-8
lines changed
  • hadoop-yarn-project/hadoop-yarn
    • hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli
    • hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router

2 files changed

+6
-8
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/RouterCLI.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,8 @@ private int handlePolicy(String[] args)
370370
policy = cliParser.getOptionValue(OPTION_SAVE);
371371
}
372372
return handleSavePolicy(policy);
373-
}
374-
// Save Queue Policies in Batches
375-
else if (cliParser.hasOption(OPTION_BATCH_S) || cliParser.hasOption(OPTION_BATCH_SAVE)) {
376-
373+
} else if (cliParser.hasOption(OPTION_BATCH_S) || cliParser.hasOption(OPTION_BATCH_SAVE)) {
374+
// Save Queue Policies in Batches
377375
// Determine whether the file format is accurate, XML or JSON format.
378376
// If it is not XML or JSON, we will directly prompt the user with an error message.
379377
String format = null;
@@ -398,9 +396,8 @@ else if (cliParser.hasOption(OPTION_BATCH_S) || cliParser.hasOption(OPTION_BATCH
398396

399397
// Batch SavePolicies.
400398
return handBatchSavePolicies(format, filePath);
401-
}
402-
// printUsage
403-
else {
399+
} else {
400+
// printUsage
404401
printUsage(args[0]);
405402
}
406403

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2257,7 +2257,8 @@ public void testSaveFederationQueuePolicyRetrieved() {
22572257
public void testGetBatchSaveFederationQueuePoliciesFailedRetrieved() {
22582258
long totalBadBefore = metrics.getBatchSaveFederationQueuePoliciesFailedRetrieved();
22592259
badSubCluster.getBatchSaveFederationQueuePoliciesFailedRetrieved();
2260-
Assert.assertEquals(totalBadBefore + 1, metrics.getBatchSaveFederationQueuePoliciesFailedRetrieved());
2260+
Assert.assertEquals(totalBadBefore + 1,
2261+
metrics.getBatchSaveFederationQueuePoliciesFailedRetrieved());
22612262
}
22622263

22632264
@Test

0 commit comments

Comments
 (0)