[ https://issues.apache.org/jira/browse/HDFS-10925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15536537#comment-15536537 ]
Daryn Sharp commented on HDFS-10925: ------------------------------------ Thanks! I'm a bit conflicted to retain both to avoid inode memory bloat, but then again symlinks are rare compared to all other inodes. The byte[] is needed by a file status, the String is needed for unresolved paths. The latter is the dominate use case so I'd lean towards retain the string and extract the byte[] as necessary. > 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 (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org