You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Lianhui Wang (JIRA)" <ji...@apache.org> on 2011/01/19 16:50:44 UTC
[jira] Commented: (HDFS-1558) Optimize
FSNamesystem.startFileInternal
[ https://issues.apache.org/jira/browse/HDFS-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983763#action_12983763 ]
Lianhui Wang commented on HDFS-1558:
------------------------------------
that is happen in many methods.for example;
getListing()
getFileInfo()
....
in the getListing() it has dir.isDir(src), checkPathAccess(), checkTraverse(),dir.getListing().
all of them call the normalizePath(src), and in the end they call :byte[][] getPathComponents(String path).
i think after NN receive the string in the rpc method, it can change the byte[][].
> Optimize FSNamesystem.startFileInternal
> ---------------------------------------
>
> Key: HDFS-1558
> URL: https://issues.apache.org/jira/browse/HDFS-1558
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Dmytro Molkov
> Assignee: Dmytro Molkov
> Priority: Minor
> Fix For: 0.23.0
>
>
> Currently on file creation inside of FSNamesystem.startFileInternal there are three calls to FSDirectory that are essentially the same:
> dir.exists(src)
> dir.isDir(src)
> dir.getFileInode(src)
> All of them have to fetch the inode and then do some processing on it.
> If instead we were to fetch the inode once and then do all of the processing on this INode object it would save us two trips through the namespace + 2 calls to normalizePath all of which are relatively expensive.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.