[
https://issues.apache.org/jira/browse/HADOOP-12774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15555552#comment-15555552
]
ASF GitHub Bot commented on HADOOP-12774:
-----------------------------------------
GitHub user steveloughran opened a pull request:
https://github.com/apache/hadoop/pull/136
HADOOP-12774 use UGI.currentUser for user and group of s3a objects
This patch grabs the UGI current user shortname in the FS initialize call,
then uses that as the user and group for all filestatus instances generated.
```
$ ./hadoop fs -ls s3a://hwdev-steve-ireland/
Found 1 items
drwxrwxrwx - stevel stevel 0 2016-10-07 17:29
s3a://hwdev-steve-ireland/tests
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/steveloughran/hadoop s3/HADOOP-12774-username
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/hadoop/pull/136.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #136
----
commit a58ed24a4b618fd3349eac40ad5900cfbd83faa3
Author: Steve Loughran <[email protected]>
Date: 2016-10-07T16:30:25Z
HADOOP-12774 use UGI.currentUser for user and group of s3a objects
----
> s3a should use UGI.getCurrentUser.getShortname() for username
> -------------------------------------------------------------
>
> Key: HADOOP-12774
> URL: https://issues.apache.org/jira/browse/HADOOP-12774
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Affects Versions: 2.7.2
> Reporter: Steve Loughran
>
> S3a users {{System.getProperty("user.name")}} to get the username for the
> homedir. This is wrong, as it doesn't work on a YARN app where the identity
> is set by HADOOP_USER_NAME, or in a doAs clause.
> Obviously, {{UGI.getCurrentUser.getShortname()}} provides that name,
> everywhere.
> This is a simple change in the source, though testing is harder ... probably
> best to try in a doAs
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]