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/04/05 18:58:02 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_r272707598
 
 

 ##########
 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 , @jojochuang thanks for your inputs and review. Review comments have been addressed. Changes are ready for final review/commit. Thanks!

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