Attila Doroszlai created HDDS-2405: -------------------------------------- Summary: int2ByteString unnecessary byte array allocation Key: HDDS-2405 URL: https://issues.apache.org/jira/browse/HDDS-2405 Project: Hadoop Distributed Data Store Issue Type: Bug Affects Versions: 0.5.0 Reporter: Attila Doroszlai Assignee: Attila Doroszlai
{{int2ByteString}} implementations (currently duplicated in [RatisHelper|https://github.com/apache/hadoop-ozone/blob/6b2cda125b3647870ef5b01cf64e3b3e4cdc55db/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/RatisHelper.java#L280-L289] and [Checksum|https://github.com/apache/hadoop-ozone/blob/6b2cda125b3647870ef5b01cf64e3b3e4cdc55db/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/Checksum.java#L64-L73], but the first one is being removed in HDDS-2375) result in unnecessary byte array allocations: # {{ByteString.Output}} creates 128-byte buffer by default, which is too large for writing a single int # {{DataOutputStream}} allocates an [extra 8-byte array|https://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/java/io/DataOutputStream.java#l204], used only for writing longs -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org