toddlipcon commented on a change in pull request #603: HADOOP-16026:Replace
incorrect use of system property user.name
URL: https://github.com/apache/hadoop/pull/603#discussion_r266691134
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/SshFenceByTcpPort.java
##########
@@ -236,7 +237,13 @@ private int getSshConnectTimeout() {
public Args(String arg)
throws BadFencingConfigurationException {
- user = System.getProperty("user.name");
+ try {
+ user = UserGroupInformation.getCurrentUser().getShortUserName();
Review comment:
Not so sure about this part of the change. The ssh fencer is logging in to a
unix user, so probably the unix username is more important than the kerberos
username for the daemon.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]