From 589314f040df76277fa235484f798edd322ca0f3 Mon Sep 17 00:00:00 2001 From: Nishtha Shah Date: Fri, 9 Jun 2023 14:25:48 +0530 Subject: [PATCH] Fixing check-style and removing unused assignment --- .../hadoop/hdfs/server/federation/metrics/RBFMetrics.java | 3 +-- .../federation/security/TestRouterSecurityManager.java | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/RBFMetrics.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/RBFMetrics.java index 499dd3c9376..41b58c4a16b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/RBFMetrics.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/RBFMetrics.java @@ -721,8 +721,7 @@ public class RBFMetrics implements RouterMBean, FederationMBean { List topOwners = mgr.getSecretManager() .getTopTokenRealOwners(this.topTokenRealOwners); topTokenRealOwnersString = JsonUtil.toJsonString(topOwners); - } - catch (Exception e) { + } catch (Exception e) { LOG.error("Unable to fetch the top token real owners as string {}", e.getMessage()); } } diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/security/TestRouterSecurityManager.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/security/TestRouterSecurityManager.java index b0f3485e920..9b2b5a06588 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/security/TestRouterSecurityManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/security/TestRouterSecurityManager.java @@ -286,8 +286,9 @@ public class TestRouterSecurityManager { Router router = initializeAndStartRouter(conf); // Create credentials - UserGroupInformation ugi = UserGroupInformation.createUserForTesting("router", getUserGroupForTesting()); - Credentials creds = RouterSecurityManager.createCredentials(router, ugi, "some_renewer"); + UserGroupInformation ugi = + UserGroupInformation.createUserForTesting("router", getUserGroupForTesting()); + RouterSecurityManager.createCredentials(router, ugi, "some_renewer"); String host = Path.WINDOWS ? "127.0.0.1" : "localhost"; String expectedOwner = "router/" + host + "@EXAMPLE.COM";