From f9029c4070e8eb046b403f5cb6d0a132c5d58448 Mon Sep 17 00:00:00 2001 From: Ayush Saxena Date: Thu, 22 Aug 2019 02:40:39 +0530 Subject: [PATCH] HDFS-14744. RBF: Non secured routers should not log in error mode when UGI is default. Contributed by CR Hota. --- .../server/federation/router/RouterClientProtocol.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java index e9cb54741d..4d8527f906 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java @@ -1937,7 +1937,12 @@ private HdfsFileStatus getMountPointStatus( owner = ugi.getUserName(); group = ugi.getPrimaryGroupName(); } catch (IOException e) { - LOG.error("Cannot get remote user: {}", e.getMessage()); + String msg = "Cannot get remote user: " + e.getMessage(); + if (UserGroupInformation.isSecurityEnabled()) { + LOG.error(msg); + } else { + LOG.debug(msg); + } } } long inodeId = 0;