[
https://issues.apache.org/jira/browse/HADOOP-6467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836821#action_12836821
]
Tsz Wo (Nicholas), SZE commented on HADOOP-6467:
------------------------------------------------
- Should we have a try-finally on aIn/aLin to close the file? Otherwise, the
file will remain open in case of an IOException.
- The codes below are expensive since only parsed[0] is needed. We could avoid
regular expression by lineFeed.indexOf(" ") in finding parsed[0].
{code}
+ String[] parsed = lineFeed.split(" ");
+ Path thisPath = new Path(parsed[0]);
+ if ((parsed[0].startsWith(parentString)) && (thisPath.depth() ==
harPath.depth() + 1)) {
{code}
- BTW, what if there is a " " in a path? Would har work?? If not, we should
fix it or document it.
> Performance improvement for liststatus on directories in hadoop archives.
> -------------------------------------------------------------------------
>
> Key: HADOOP-6467
> URL: https://issues.apache.org/jira/browse/HADOOP-6467
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: Mahadev konar
> Assignee: Mahadev konar
> Fix For: 0.22.0
>
> Attachments: Archives_performance.docx, Archives_performance.docx,
> HADOOP-6467-y0.20-branch.patch, HADOOP-6467.patch, HADOOP-6467.patch,
> HADOOP-6467.patch
>
>
> A liststatus call on a directory in hadoop archives leads to ( 2* number of
> files in directory) open calls to the namenode. This is very sub optimal and
> needs to be fixed to make it performant enough to be used on a daily basis.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.