You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/03/19 18:13:53 UTC

[GitHub] [hadoop] dineshchitlangia commented on a change in pull request #603: HADOOP-16026:Replace incorrect use of system property user.name

dineshchitlangia 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_r267031594
 
 

 ##########
 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:
   @toddlipcon - Good catch. Now that you make this point, I too, am not convinced that it needs to be changed here. Let me request @jojochuang for his thoughts.
   Thanks for reviewing.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org