Skip to content

Commit c7742c6

Browse files
author
slfan1989
committed
YARN-11358. Fix CheckStyle.
1 parent 193fe06 commit c7742c6

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,6 @@ public GetDelegationTokenResponse getDelegationToken(
14871487
}
14881488

14891489
try {
1490-
14911490
// Verify that the connection is kerberos authenticated
14921491
if (!RouterServerUtil.isAllowedDelegationTokenOp()) {
14931492
routerMetrics.incrGetDelegationTokenFailedRetrieved();
@@ -2088,5 +2087,4 @@ protected int getNumMaxThreads(Configuration conf) {
20882087
public void setNumSubmitRetries(int numSubmitRetries) {
20892088
this.numSubmitRetries = numSubmitRetries;
20902089
}
2091-
20922090
}

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public class TestFederationClientInterceptor extends BaseRouterClientRMTest {
184184
private final static long DEFAULT_DURATION = 10 * 60 * 1000;
185185

186186
@Override
187-
public void setUp() {
187+
public void setUp() throws IOException {
188188
super.setUpConfig();
189189
interceptor = new TestableFederationClientInterceptor();
190190

@@ -197,13 +197,9 @@ public void setUp() {
197197
interceptor.init(user);
198198
RouterDelegationTokenSecretManager tokenSecretManager =
199199
interceptor.createRouterRMDelegationTokenSecretManager(this.getConf());
200-
try {
201-
tokenSecretManager.startThreads();
202-
interceptor.setTokenSecretManager(tokenSecretManager);
203-
} catch (Exception e) {
204-
LOG.error(e.getMessage());
205-
Assert.fail();
206-
}
200+
201+
tokenSecretManager.startThreads();
202+
interceptor.setTokenSecretManager(tokenSecretManager);
207203

208204
subClusters = new ArrayList<>();
209205

@@ -1616,7 +1612,7 @@ public void testGetDelegationToken() throws IOException, YarnException {
16161612
long tokenMaxLifetime = this.getConf().getLong(
16171613
YarnConfiguration.RM_DELEGATION_TOKEN_MAX_LIFETIME_KEY,
16181614
YarnConfiguration.RM_DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT);
1619-
Assert.assertEquals((issueDate + tokenMaxLifetime), maxDate);
1615+
Assert.assertEquals(issueDate + tokenMaxLifetime, maxDate);
16201616

16211617
RouterRMDTSecretManagerState managerState = stateStore.getRouterRMSecretManagerState();
16221618
Assert.assertNotNull(managerState);
@@ -1629,7 +1625,7 @@ public void testGetDelegationToken() throws IOException, YarnException {
16291625
YarnConfiguration.RM_DELEGATION_TOKEN_RENEW_INTERVAL_KEY,
16301626
YarnConfiguration.RM_DELEGATION_TOKEN_RENEW_INTERVAL_DEFAULT);
16311627
long renewDate = delegationTokenState.get(rMDelegationTokenIdentifier);
1632-
Assert.assertEquals((issueDate + tokenRenewInterval), renewDate);
1628+
Assert.assertEquals(issueDate + tokenRenewInterval, renewDate);
16331629
}
16341630

16351631
@Test

0 commit comments

Comments
 (0)