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

This commit is contained in:
Ayush Saxena 2019-08-22 02:40:39 +05:30
parent 0f598aed13
commit f9029c4070

View File

@ -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;