Adar Dembo has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/12617 )

Change subject: tools: fix output on 'kudu table scan' to add proper locking
......................................................................

tools: fix output on 'kudu table scan' to add proper locking

The 'kudu table scan' tool is multi-threaded, but no lock was protecting
output. This would cause output to occasionally interleave like:

  (int64 l_orderkey=380530182)
  (int64 l_orderkey=352994055)(int64 l_orderkey=380680647)
  (int64 l_orderkey=353120262)

  (int64 l_orderkey=353314147)

(i.e. two rows would print on the same line, and an extra newline would
be inserted later).

This adds a mutex to protect the output.

Change-Id: I9d7f936d9beaf7eedba46477bf7da2ebdb800eb1
Reviewed-on: http://gerrit.cloudera.org:8080/12617
Reviewed-by: Yingchun Lai <[email protected]>
Reviewed-by: Grant Henke <[email protected]>
Tested-by: Kudu Jenkins
---
M src/kudu/tools/table_scanner.cc
M src/kudu/tools/table_scanner.h
2 files changed, 10 insertions(+), 3 deletions(-)

Approvals:
  Yingchun Lai: Looks good to me, but someone else must approve
  Grant Henke: Looks good to me, approved
  Kudu Jenkins: Verified

--
To view, visit http://gerrit.cloudera.org:8080/12617
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9d7f936d9beaf7eedba46477bf7da2ebdb800eb1
Gerrit-Change-Number: 12617
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <[email protected]>

Reply via email to