You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2019/02/27 00:40:32 UTC
[kudu-CR] tools: fix output on 'kudu table scan' to add proper locking
Hello Yingchun Lai,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/12617
to review the following change.
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
---
M src/kudu/tools/table_scanner.cc
M src/kudu/tools/table_scanner.h
2 files changed, 10 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/17/12617/1
--
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: newchange
Gerrit-Change-Id: I9d7f936d9beaf7eedba46477bf7da2ebdb800eb1
Gerrit-Change-Number: 12617
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
[kudu-CR] tools: fix output on 'kudu table scan' to add proper locking
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/12617 )
Change subject: tools: fix output on 'kudu table scan' to add proper locking
......................................................................
Patch Set 1: Code-Review+2
--
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: comment
Gerrit-Change-Id: I9d7f936d9beaf7eedba46477bf7da2ebdb800eb1
Gerrit-Change-Number: 12617
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Wed, 27 Feb 2019 19:09:08 +0000
Gerrit-HasComments: No
[kudu-CR] tools: fix output on 'kudu table scan' to add proper locking
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/12617 )
Change subject: tools: fix output on 'kudu table scan' to add proper locking
......................................................................
Patch Set 1: Code-Review+1
--
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: comment
Gerrit-Change-Id: I9d7f936d9beaf7eedba46477bf7da2ebdb800eb1
Gerrit-Change-Number: 12617
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Wed, 27 Feb 2019 16:01:27 +0000
Gerrit-HasComments: No
[kudu-CR] tools: fix output on 'kudu table scan' to add proper locking
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
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 <40...@qq.com>
Reviewed-by: Grant Henke <gr...@apache.org>
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 <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>