[
https://issues.apache.org/jira/browse/HADOOP-14049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15868605#comment-15868605
]
Mingliang Liu commented on HADOOP-14049:
----------------------------------------
Thanks for working on this. The patch LGTM overall.
# As to the code
{code}
596 boolean aclBit = entry.aclBit;
597 // If ADL_SUPPORT_ACL_BIT_IN_FSPERMISSION is false, do not set
aclBit from ADLS backend response
598 if (!aclBitStatus)
599 {
600 aclBit = aclBitStatus;
601 }
{code}
For clearer coding style how about the following:
{code}
// set aclBit from ADLS backend response if ADL_SUPPORT_ACL_BIT_IN_FSPERMISSION
is true
final boolean aclBit = (aclBitStatus ? entry.aclBit : false);
{code}
# I know {{getListFileStatusJSONResponse(boolean aclBit)}} is following
{{getListFileStatusJSONResponse(int dirSize)}} coding convention, but can we
simplify the string generation? We can simple return as example:
{code}
public static String getListFileStatusJSONResponse(boolean aclBit) {
return "{\"FileStatuses\":{\"FileStatus\":[{\"length\":0,\"pathSuffix\":\""
+ java.util.UUID.randomUUID()
+ "\",\"type\":\"DIRECTORY\",\"blockSize\":0,"
+ "\"accessTime\":1481184513488,"
+ "\"modificationTime\":1481184513488,\"replication\":0,"
+ "\"permission\":\"770\","
+ "\"owner\":\"4b27fe1a-d9ab-4a04-ad7a-4bba72cd9e6c\","
+ "\"group\":\"4b27fe1a-d9ab-4a04-ad7a-4bba72cd9e6c\",\"aclBit\":\""
+ aclBit + "\"}]}}";
}
{code}
> Honour AclBit flag associated to file/folder permission for Azure datalake
> account
> ----------------------------------------------------------------------------------
>
> Key: HADOOP-14049
> URL: https://issues.apache.org/jira/browse/HADOOP-14049
> Project: Hadoop Common
> Issue Type: New Feature
> Components: fs/adl
> Affects Versions: 3.0.0-alpha3
> Reporter: Vishwajeet Dusane
> Assignee: Vishwajeet Dusane
> Attachments: HADOOP-14049-01.patch
>
>
> ADLS persist AclBit information on a file/folder. Since Java SDK 2.1.4 -
> AclBit value can be retrieved using {{DirectoryEntry.aclBit}}.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]