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
1 changed files with 6 additions and 1 deletions

View File

@ -1937,7 +1937,12 @@ public class RouterClientProtocol implements ClientProtocol {
owner = ugi.getUserName(); owner = ugi.getUserName();
group = ugi.getPrimaryGroupName(); group = ugi.getPrimaryGroupName();
} catch (IOException e) { } 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; long inodeId = 0;