hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daryn Sharp (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-10653) Optimize conversion from path string to components
Date Fri, 22 Jul 2016 13:47:20 GMT

    [ https://issues.apache.org/jira/browse/HDFS-10653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15389519#comment-15389519

Daryn Sharp commented on HDFS-10653:

{{Arrays.toString(components\[i\])}} is going to place square brackets, ie. "\[component\]"
around the name.  {{DFSUtil.bytes2String(int,int)}} will let you avoid using a {{StringBuilder}}
entirely - which has been part of the goal of my patches.  +1 after you change it.  Bonus
points for not constructing the path unless required but not that concerned about 2.6.

> Optimize conversion from path string to components
> --------------------------------------------------
>                 Key: HDFS-10653
>                 URL: https://issues.apache.org/jira/browse/HDFS-10653
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs
>    Affects Versions: 2.0.0-alpha
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>             Fix For: 2.8.0, 2.9.0, 2.7.4
>         Attachments: HDFS-10653-branch-2.6.00.patch, HDFS-10653-branch-2.6.01.patch,
HDFS-10653-branch-2.6.02.patch, HDFS-10653.patch
> Converting a path String to a byte[][] currently requires an unnecessary intermediate
conversion from String to String[].  Removing this will reduce excessive object allocation
and byte copying.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message