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 "Rushabh S Shah (JIRA)" <ji...@apache.org> on 2017/07/17 15:30:00 UTC
[jira] [Comment Edited] (HDFS-12143) Improve performance of getting
and removing inode features
[ https://issues.apache.org/jira/browse/HDFS-12143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16089962#comment-16089962 ]
Rushabh S Shah edited comment on HDFS-12143 at 7/17/17 3:29 PM:
----------------------------------------------------------------
[~daryn]: Overall the patch looks good.
The following comment has nothing to do with your patch.
It was this way before the patch also.
{code:title= INodeWithAdditionalFields.java|borderStyle=solid}
protected void removeFeature(Feature f)
{
...
if (overflow || j != size - 1) {
throwFeatureNotFoundException(f);
}
...
}
{code}
j is not equal to {{size-1}}, only if we found multiple features since we break out when j == size-1.
We can create different jira to fix this or if you can incorporate in this jira, it would be great.
was (Author: shahrs87):
{code:title= INodeWithAdditionalFields.java|borderStyle=solid}
protected void removeFeature(Feature f)
{
...
if (overflow || j != size - 1) {
throwFeatureNotFoundException(f);
}
...
}
{code}
j is not equal to {{size-1}}, only if we found multiple features since we break out when j == size-1.
> Improve performance of getting and removing inode features
> ----------------------------------------------------------
>
> Key: HDFS-12143
> URL: https://issues.apache.org/jira/browse/HDFS-12143
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: namenode
> Affects Versions: 2.8.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Attachments: HDFS-12143.patch
>
>
> Getting a feature uses an iterator which is less performant than an indexed for loop. Feature lookups are becoming more prolific so cycles count.
> Removing a feature requires building a string for up to 3 precondition checks. The worst case of 3 is the penalty for a successful removal.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org