hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yiqun Lin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-10925) Cache symlinkString in INodeSymlink
Date Tue, 04 Oct 2016 05:08:21 GMT

    [ https://issues.apache.org/jira/browse/HDFS-10925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15544367#comment-15544367

Yiqun Lin commented on HDFS-10925:

Thanks [~daryn] for the comments. I also think the {{symlinkString}} will be more used than
the symlink byte. When resolving the path in {{InodesInPath#resolve}}, it will call many times
of the method {{getSymlinkString}} if the current inode is a symlink.

I see that the similar issue HDFS-10619 has been commited,but I think there is someting missing
for that. We could replace {{DFSUtil.byteArray2PathString(path)}} with the {{pathname}} in
{{toString(boolean)}}. I make this change in my latest patch. 

Finally attach the new patch, let me know if the latest patch can satisfy with you, [~daryn],

> Cache symlinkString in INodeSymlink
> -----------------------------------
>                 Key: HDFS-10925
>                 URL: https://issues.apache.org/jira/browse/HDFS-10925
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>            Priority: Minor
>         Attachments: HDFS-10925.001.patch
> In {{INodeSymlink}}'s construct method, it will transfer the input symlink string to
a byte array. If we want to invoke {{INodeSymlink#getSymlinkString}}, it will transfer the
byte array to the string again. Since we don't cache symlinkString  here, it will do the {{DFSUtil.bytes2String}}
method every time. It seems not efficient.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message