[ https://issues.apache.org/jira/browse/HDFS-12652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17802460#comment-17802460 ]
Shilun Fan edited comment on HDFS-12652 at 1/4/24 7:58 AM: ----------------------------------------------------------- Bulk update: moved all 3.4.0 non-blocker issues, please move back if it is a blocker. Retarget 3.5.0. was (Author: slfan1989): Bulk update: moved all 3.4.0 non-blocker issues, please move back if it is a blocker. > INodeAttributesProvider#getAttributes(): Avoid multiple conversions of path > components byte[][] to String[] when requesting INode attributes > -------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HDFS-12652 > URL: https://issues.apache.org/jira/browse/HDFS-12652 > Project: Hadoop HDFS > Issue Type: Improvement > Components: hdfs > Affects Versions: 3.0.0-beta1 > Reporter: Manoj Govindassamy > Assignee: Manoj Govindassamy > Priority: Major > > {{INodeAttributesProvider#getAttributes}} needs the path components passed in > to be an array of Strings. Where as the INode and related layers maintain > path components as an array of byte[]. So, these layers are required to > convert each byte[] component of the path back into a string and for multiple > times when requesting for INode attributes from the Provider. > That is, the path "/a/b/c" requires calling the attribute provider with: (1) > "", (2) "", "a", (3) "", "a","b", (4) "", "a","b", "c". Every single one of > those strings were freshly (re)converted from a byte[]. Say, a file listing > is done on a huge directory containing 100s of millions of files, then these > multiple time redundant conversions of byte[][] to String[] create lots of > tiny object garbages, occupying memory and affecting performance. Better if > we could avoid creating redundant copies of path component strings. > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org