[ 
https://issues.apache.org/jira/browse/HADOOP-15695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Denis Zhigula updated HADOOP-15695:
-----------------------------------
    Description: 
 NativeAzureFileSystem:2183
{code:java}
PermissionStatus createPermissionStatus(FsPermission permission)
throws IOException {
// Create the permission status for this file based on current user
return new PermissionStatus(
UserGroupInformation.getCurrentUser().getShortUserName(),
getConf().get(AZURE_DEFAULT_GROUP_PROPERTY_NAME,
AZURE_DEFAULT_GROUP_DEFAULT),
permission);
{code}
suggested fix:to set a user group via the core-site.xml only if this key is 
present
{code:java}
PermissionStatus createPermissionStatus(FsPermission permission) throws 
IOException {
// Create the permission status for this file based on current user
return new 
PermissionStatus(UserGroupInformation.getCurrentUser().getShortUserName(),
getConf().get(AZURE_DEFAULT_GROUP_PROPERTY_NAME) == null
? UserGroupInformation.getCurrentUser().getPrimaryGroupName()
: getConf().get(AZURE_DEFAULT_GROUP_PROPERTY_NAME, AZURE_DEFAULT_GROUP_DEFAULT),
permission);
}

{code}
 

  was:
 NativeAzureFileSystem:2183
{code:java}
PermissionStatus createPermissionStatus(FsPermission permission)
throws IOException {
// Create the permission status for this file based on current user
return new PermissionStatus(
UserGroupInformation.getCurrentUser().getShortUserName(),
getConf().get(AZURE_DEFAULT_GROUP_PROPERTY_NAME,
AZURE_DEFAULT_GROUP_DEFAULT),
permission);
{code}
suggested fix:to set a user group via the core-site.xml only if this key is 
present
{code:java}
PermissionStatus createPermissionStatus(FsPermission permission) throws 
IOException {
// Create the permission status for this file based on current user
return new 
PermissionStatus(UserGroupInformation.getCurrentUser().getShortUserName(),
getConf().get(AZURE_DEFAULT_GROUP_PROPERTY_NAME, AZURE_DEFAULT_GROUP_DEFAULT) 
== null
? UserGroupInformation.getCurrentUser().getPrimaryGroupName()
: getConf().get(AZURE_DEFAULT_GROUP_PROPERTY_NAME, AZURE_DEFAULT_GROUP_DEFAULT),
permission);
}

{code}
 


> In wasbFS user group always set via core-site
> ---------------------------------------------
>
>                 Key: HADOOP-15695
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15695
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs/azure
>    Affects Versions: 2.8.4, 3.0.3
>            Reporter: Denis Zhigula
>            Priority: Major
>
>  NativeAzureFileSystem:2183
> {code:java}
> PermissionStatus createPermissionStatus(FsPermission permission)
> throws IOException {
> // Create the permission status for this file based on current user
> return new PermissionStatus(
> UserGroupInformation.getCurrentUser().getShortUserName(),
> getConf().get(AZURE_DEFAULT_GROUP_PROPERTY_NAME,
> AZURE_DEFAULT_GROUP_DEFAULT),
> permission);
> {code}
> suggested fix:to set a user group via the core-site.xml only if this key is 
> present
> {code:java}
> PermissionStatus createPermissionStatus(FsPermission permission) throws 
> IOException {
> // Create the permission status for this file based on current user
> return new 
> PermissionStatus(UserGroupInformation.getCurrentUser().getShortUserName(),
> getConf().get(AZURE_DEFAULT_GROUP_PROPERTY_NAME) == null
> ? UserGroupInformation.getCurrentUser().getPrimaryGroupName()
> : getConf().get(AZURE_DEFAULT_GROUP_PROPERTY_NAME, 
> AZURE_DEFAULT_GROUP_DEFAULT),
> permission);
> }
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to