Michal Ostrowski has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/11425


Change subject: IMPALA-2063 Eliminate redundant newline characters in query 
status.
......................................................................

IMPALA-2063 Eliminate redundant newline characters in query status.

Prior to this change RuntimeProfile::AddInfoStringInternal had "value"
passed by reference.  Subsequently, we needed to conditionally make
a copy of it so as to redact it.  Trimming the trailing newline won't work
on a "const std::string &".  We need a local copy.

Instead of incurring another copy cost, we can instead recover a hidden
existing copy that currently exists in this function - the storage of
the input parameter into the has table.  If instead of using a copy at that
point an std::move operation is used, then we can move the required string
copy to occur at the time "value" is passed into the function.

Hence the "value" parameter can be passed by value, leaving us with a
mutable local copy of the string which we can redact and trim.  Subsequently
the local value is moved to permanent storage.

Change-Id: I2bbd7d7fe2c6d0f3799d0e6b336710bccfef0ab1
---
M be/src/util/runtime-profile.cc
M be/src/util/runtime-profile.h
2 files changed, 19 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/25/11425/1
--
To view, visit http://gerrit.cloudera.org:8080/11425
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bbd7d7fe2c6d0f3799d0e6b336710bccfef0ab1
Gerrit-Change-Number: 11425
Gerrit-PatchSet: 1
Gerrit-Owner: Michal Ostrowski <mostr...@cloudera.com>

Reply via email to