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 "Lokesh Jain (JIRA)" <ji...@apache.org> on 2018/11/30 10:12:00 UTC

[jira] [Created] (HDDS-886) Unnecessary buffer copy in HddsDispatcher#dispatch

Lokesh Jain created HDDS-886:
--------------------------------

             Summary: Unnecessary buffer copy in HddsDispatcher#dispatch
                 Key: HDDS-886
                 URL: https://issues.apache.org/jira/browse/HDDS-886
             Project: Hadoop Distributed Data Store
          Issue Type: Bug
          Components: Ozone Datanode
            Reporter: Lokesh Jain
            Assignee: Lokesh Jain
             Fix For: 0.4.0


In HddsDispatcher#dispatch precondition not null checkĀ converts container command to a string object. This is done even for a write chunk command which means we copy the chunk data to a string.
{code:java}
// code placeholderpublic ContainerCommandResponseProto dispatch(
    ContainerCommandRequestProto msg) {
  LOG.trace("Command {}, trace ID: {} ", msg.getCmdType().toString(),
      msg.getTraceID());
  Preconditions.checkNotNull(msg.toString());

{code}
The precondition needs to check only the msg.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org