You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Staffan Friberg (JIRA)" <ji...@apache.org> on 2015/10/09 20:04:06 UTC

[jira] [Created] (HDFS-9221) Reduce allocation during block reports

Staffan Friberg created HDFS-9221:
-------------------------------------

             Summary: Reduce allocation during block reports
                 Key: HDFS-9221
                 URL: https://issues.apache.org/jira/browse/HDFS-9221
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: performance
            Reporter: Staffan Friberg


When the BufferDecoder in BlockListAsLongs converts the stored value to a ReplicaState enum it calls ReplicaState.getState(int) unfortunately this method creates a ReplicaState[] for each call since it calls ReplicaState.values().

This patch creates a cached version of the values and thus avoid all allocation when doing the conversion.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)