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

Xiao Chen commented on HDFS-13601:
----------------------------------

Thanks Andrew for the work here.

Looks pretty good to me overall. Some minors:
 - {{DatanodeID}} constructor: it seems a {{DatanodeID(String datanodeUuid, 
DatanodeID from)}} overload can still be used so no changes to 
TestComputeInvalidateWork / DatanodeRegistration necessary
 - Can we make the var name {{fixedBytestringCache}} {{bytestringCache}} to be 
camel case (ByteString instead of Bytestring)? At one point I saw that as 'by 
test ring' and get myself confused for a nanosecond. :)
 - Do you think it's helpful to add some comments in DatanodeId to explain the 
perf motivation of saving the ByteString's?

For the extra memory increase, since this only applies to a few fields which 
should have a small set of values, it should be ok. (linux user/group names 
have max length of 32 chars, bpid/kind/service are smaller).

> Optimize ByteString conversions in PBHelper
> -------------------------------------------
>
>                 Key: HDFS-13601
>                 URL: https://issues.apache.org/jira/browse/HDFS-13601
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 3.1.0, 2.9.1
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>            Priority: Major
>         Attachments: HDFS-13601.001.patch, HDFS-13601.002.patch
>
>
> While doing some profiling of the NN with JMC, I saw a lot of time being 
> spent on String->ByteString conversions. These are often the same strings 
> being converted over and over again, meaning there's room for optimization.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to