[ 
https://issues.apache.org/jira/browse/HADOOP-14223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15944930#comment-15944930
 ] 

Steve Loughran commented on HADOOP-14223:
-----------------------------------------

looks good

the specification in {{filesystem.md}} could be simplified
{code}
stat.hasAcl = hasACL(FS, p) 
{code}


same can be done for the toString itself; no need for the if/else clauses
{code}
expected.append("hasAcl=").append(fileStatus.hasAcl()).append("; ");
{code}
+ same for isEncrypted.

Not only this terser code, there's no risk of branch misprediction in the CPU, 
hence a more efficient codepath.

I am really impressed you actually wrote tests for the toString value; I 
wouldn't have expected that. Given the tests exist, their assert messages 
should include the toString value, so we can see what the string value is on a 
failing assertion.

> Extend FileStatus#toString() to include details like Erasure Coding and 
> Encryption
> ----------------------------------------------------------------------------------
>
>                 Key: HADOOP-14223
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14223
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 3.0.0-alpha1
>            Reporter: Manoj Govindassamy
>            Assignee: Manoj Govindassamy
>         Attachments: HADOOP-14223.01.patch
>
>
> HDFS-6843 and HADOOP-13715 have enhanced {{FileStatus}} to include details on 
> whether the underlying path is Encrypted and Erasure Coded. The additional 
> details are embedded in the FsPermission high order bits. It would be really 
> helpful for debugging if FileStatus#toString() returns these new bits details 
> along with already existing one. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to