[ https://issues.apache.org/jira/browse/HDDS-2270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Attila Doroszlai updated HDDS-2270: ----------------------------------- Status: Patch Available (was: In Progress) > Avoid buffer copying in ContainerStateMachine.loadSnapshot/persistContainerSet > ------------------------------------------------------------------------------ > > Key: HDDS-2270 > URL: https://issues.apache.org/jira/browse/HDDS-2270 > Project: Hadoop Distributed Data Store > Issue Type: Improvement > Components: Ozone Datanode > Reporter: Tsz-wo Sze > Assignee: Attila Doroszlai > Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > ContainerStateMachine: > - In loadSnapshot(..), it first reads the snapshotFile to a byte[] and then > parses it to ContainerProtos.Container2BCSIDMapProto. The buffer copying can > be avoided. > {code} > try (FileInputStream fin = new FileInputStream(snapshotFile)) { > byte[] container2BCSIDData = IOUtils.toByteArray(fin); > ContainerProtos.Container2BCSIDMapProto proto = > ContainerProtos.Container2BCSIDMapProto > .parseFrom(container2BCSIDData); > ... > } > {code} > - persistContainerSet(..) has similar problem. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org