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 2017/06/22 16:23:07 UTC

[kudu-CR] tools: refactor table-printing code a bit

Hello Adar Dembo, Will Berkeley,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/7259

to review the following change.

Change subject: tools: refactor table-printing code a bit
......................................................................

tools: refactor table-printing code a bit

This changes the table-printing code to use a class and add some extra
safety checks that the added columns have matching numbers of rows.

Change-Id: I7e9556a14b6745f6bd07d1aee111bfa5cd9297fe
---
M src/kudu/tools/ksck.cc
M src/kudu/tools/tool_action_common.cc
M src/kudu/tools/tool_action_common.h
M src/kudu/tools/tool_action_master.cc
M src/kudu/tools/tool_action_tserver.cc
5 files changed, 76 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/59/7259/1
-- 
To view, visit http://gerrit.cloudera.org:8080/7259
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e9556a14b6745f6bd07d1aee111bfa5cd9297fe
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] tools: refactor table-printing code a bit

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.

Change subject: tools: refactor table-printing code a bit
......................................................................


Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9556a14b6745f6bd07d1aee111bfa5cd9297fe
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-HasComments: No

[kudu-CR] tools: refactor table-printing code a bit

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has submitted this change and it was merged.

Change subject: tools: refactor table-printing code a bit
......................................................................


tools: refactor table-printing code a bit

This changes the table-printing code to use a class and add some extra
safety checks that the added columns have matching numbers of rows.

Change-Id: I7e9556a14b6745f6bd07d1aee111bfa5cd9297fe
Reviewed-on: http://gerrit.cloudera.org:8080/7259
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins
---
M src/kudu/tools/ksck.cc
M src/kudu/tools/tool_action_common.cc
M src/kudu/tools/tool_action_common.h
M src/kudu/tools/tool_action_master.cc
M src/kudu/tools/tool_action_tserver.cc
5 files changed, 75 insertions(+), 29 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e9556a14b6745f6bd07d1aee111bfa5cd9297fe
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] tools: refactor table-printing code a bit

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.

Change subject: tools: refactor table-printing code a bit
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/7259/1/src/kudu/tools/ksck.cc
File src/kudu/tools/ksck.cc:

Line 863:     vector<vector<string>> columns{ sources, voters, terms, indexes, committed };
Not necessary anymore?


http://gerrit.cloudera.org:8080/#/c/7259/1/src/kudu/tools/tool_action_common.cc
File src/kudu/tools/tool_action_common.cc:

Line 490:   DCHECK_EQ(row.size(), columns_.size());
CHECK_EQ, for consistency with AddColumn?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9556a14b6745f6bd07d1aee111bfa5cd9297fe
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-HasComments: Yes

[kudu-CR] tools: refactor table-printing code a bit

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Will Berkeley, Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7259

to look at the new patch set (#2).

Change subject: tools: refactor table-printing code a bit
......................................................................

tools: refactor table-printing code a bit

This changes the table-printing code to use a class and add some extra
safety checks that the added columns have matching numbers of rows.

Change-Id: I7e9556a14b6745f6bd07d1aee111bfa5cd9297fe
---
M src/kudu/tools/ksck.cc
M src/kudu/tools/tool_action_common.cc
M src/kudu/tools/tool_action_common.h
M src/kudu/tools/tool_action_master.cc
M src/kudu/tools/tool_action_tserver.cc
5 files changed, 75 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/59/7259/2
-- 
To view, visit http://gerrit.cloudera.org:8080/7259
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7e9556a14b6745f6bd07d1aee111bfa5cd9297fe
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] tools: refactor table-printing code a bit

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.

Change subject: tools: refactor table-printing code a bit
......................................................................


Patch Set 1:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/7259/1/src/kudu/tools/ksck.cc
File src/kudu/tools/ksck.cc:

Line 863:     vector<vector<string>> columns{ sources, voters, terms, indexes, committed };
> Not necessary anymore?
Done


http://gerrit.cloudera.org:8080/#/c/7259/1/src/kudu/tools/tool_action_common.cc
File src/kudu/tools/tool_action_common.cc:

Line 485:     : column_names_(std::move(col_names)),
> warning: std::move of the variable 'col_names' of the trivially-copyable ty
switched it to just use a vector instead of this fancy thing


Line 490:   DCHECK_EQ(row.size(), columns_.size());
> CHECK_EQ, for consistency with AddColumn?
Done


Line 493:     columns_[i++].emplace_back(std::move(v));
> warning: std::move of the const variable 'v' has no effect; remove std::mov
Done


http://gerrit.cloudera.org:8080/#/c/7259/1/src/kudu/tools/tool_action_common.h
File src/kudu/tools/tool_action_common.h:

Line 124:   explicit DataTable(std::initializer_list<std::string> col_names);
> warning: initializer-list constructor should not be declared explicit [goog
changed to vector


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9556a14b6745f6bd07d1aee111bfa5cd9297fe
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-HasComments: Yes

[kudu-CR] tools: refactor table-printing code a bit

Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change.

Change subject: tools: refactor table-printing code a bit
......................................................................


Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9556a14b6745f6bd07d1aee111bfa5cd9297fe
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-HasComments: No