1
0
Quellcode durchsuchen

HDFS-14744. RBF: Non secured routers should not log in error mode when UGI is default. Contributed by CR Hota.

Ayush Saxena vor 5 Jahren
Ursprung
Commit
f9029c4070

+ 6 - 1
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java

@@ -1937,7 +1937,12 @@ public class RouterClientProtocol implements ClientProtocol {
         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;