[
https://issues.apache.org/jira/browse/HDDS-2405?focusedWorklogId=344766&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-344766
]
ASF GitHub Bot logged work on HDDS-2405:
----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Nov/19 03:28
Start Date: 16/Nov/19 03:28
Worklog Time Spent: 10m
Work Description: bharatviswa504 commented on pull request #197:
HDDS-2405. int2ByteString unnecessary byte array allocation
URL: https://github.com/apache/hadoop-ozone/pull/197
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 344766)
Time Spent: 20m (was: 10m)
> 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
> Priority: Minor
> Labels: pull-request-available
> Fix For: 0.5.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {{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
> # {{ByteString.Output}} also creates 10-element array for {{flushedBuffers}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]