[kudu-CR] [WIP] [tools] ksck improvements [6/n]: Refactor printing

2018-04-25 Thread Will Berkeley (Code Review)
Hello Alexey Serbin, Kudu Jenkins,

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

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

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

Change subject: [WIP] [tools] ksck improvements [6/n]: Refactor printing
..

[WIP] [tools] ksck improvements [6/n]: Refactor printing

This patch significantly refactors printing in ksck. It separates where
checks are done from where results are printed. This separation will
make it easier to provide machine-readable output and create tools
based on the results of ksck checks, like auto-repair.

There's also a couple of bonus changes:
- Simplifies running all ksck checks and printing the results, as done
  by the ksck tool and ClusterVerifier.
- Removes the --consensus flag. ksck is far less useful without it and
  it doesn't seem like having it brings any benefit.
- Add the changes in https://gerrit.cloudera.org/#/c/10054/, which were
  about to be committed but would've needed to be redone a bit to fit
  with this refactor.

Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
---
M src/kudu/integration-tests/cluster_verifier.cc
M src/kudu/tools/CMakeLists.txt
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
M src/kudu/tools/ksck.h
M src/kudu/tools/ksck_remote-test.cc
A src/kudu/tools/ksck_results.cc
A src/kudu/tools/ksck_results.h
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/tool_action_cluster.cc
M src/kudu/tools/tool_action_tablet.cc
11 files changed, 1,204 insertions(+), 887 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/51/10151/7
--
To view, visit http://gerrit.cloudera.org:8080/10151
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
Gerrit-Change-Number: 10151
Gerrit-PatchSet: 7
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley 


[kudu-CR] [WIP] [tools] ksck improvements [6/n]: Refactor printing

2018-04-24 Thread Will Berkeley (Code Review)
Will Berkeley has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/10151 )

Change subject: [WIP] [tools] ksck improvements [6/n]: Refactor printing
..


Patch Set 6:

(15 comments)

http://gerrit.cloudera.org:8080/#/c/10151/5//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10151/5//COMMIT_MSG@17
PS5, Line 17: - Removes the --consensus flag. ksck is far less useful without 
it and
:   it doesn't seem like having it brings any benefit.
> Any concerns about that in terms of backward compatibility?
I don't think we make guarantees on backwards compat for tools. Also, I don't 
think anyone besides me ever used that flag. The good info comes from the 
consensus state :)

I see the point about removing it separately but if I make it a patch prior  to 
this one I'm spending time working in the "old way" and have to rejigger the 
patch to match those changes. Seems wasteful. If I make it a patch after this 
one I have to redo pieces of this patch to re-introduce it, just so I can take 
it out.

Ergo, unless you have a big problem with keeping it part of this patch, I'd 
rather leave it in.


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/integration-tests/cluster_verifier.cc
File src/kudu/integration-tests/cluster_verifier.cc:

http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/integration-tests/cluster_verifier.cc@112
PS5, Line 112: RunAndPrintResults
> Would it make sense to separate that in two methods:
Done


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck-test.cc
File src/kudu/tools/ksck-test.cc:

http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck-test.cc@845
PS5, Line 845:
/*underreplicated_tables=*/ 3,
 :
/*consensus_mismatch_tables=*/ 0,
 :
/*unavailable_tables=*/ 0));
 : }
> Here an in other places:
Done. Plus some changes due to how I wrote RunAndPrintResults().


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck-test.cc@858
PS5, Line 858:   // Now engineer a consensus conflict.
 :   const shared_ptr& ts = 
FindOrDie(cluster_->tablet_servers_, "ts-id-1");
 :   auto& cstate
> nit: why not just
Done


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck-test.cc@878
PS5, Line 878:   ASSERT_STR_CONTAINS(err_stream_.str(),
 :   ExpectedKsckTableSummary("test",
 :
> ASSERT_OK(RunKsck()) ?
Done


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.h
File src/kudu/tools/ksck_results.h:

http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.h@31
PS5, Line 31: "kudu/util/status.h"
> why angle brackets instead of quotes?
Oops.


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.h@126
PS5, Line 126: const char* const ServerHealthToString(KsckServerHealth sh);
 :
> It would be nice to mention what higher score value means, i.e. if server A
Done


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.h@133
PS5, Line 133: f a ser
> What if server has multiple RPC endpoints?
AFAIK we routinely don't handle this situation in our code. I don't think we 
support it overall even though some places are set up for it. What would end up 
here is what the master reports as the RPC endpoint.


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.h@257
PS5, Line 257: ch table and tablet.
> nit: why not constant reference?
Oops.


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc
File src/kudu/tools/ksck_results.cc:

http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc@88
PS5, Line 88:   CHECK(uuid_label_mapping);
> static?  It seems this function can be entered multiple times during kudu C
First point: It's in an anonymous namespace, so it's functionally equivalent to 
a static function.

Second: Done.


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc@124
PS5, Line 124:   switch (cr) {
> nit: maybe, return 'const char* const' instead?
Done. Also done for function above.


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc@177
PS5, Line 177:   // First, report on the masters and master tablet.
> nit: add a stop
Done


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc@268
PS5, Line 268: }
> nit: two extra spaces
Done


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc@269
PS5, Line 269: uid : server_uuids) {
 : const string label(1, FindOrDie(replica_labels, uuid));
> consider adding replication factor, as it's done in https://gerrit.cloudera
Done


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc@273
PS5, Line 273:  

[kudu-CR] [WIP] [tools] ksck improvements [6/n]: Refactor printing

2018-04-24 Thread Will Berkeley (Code Review)
Hello Alexey Serbin, Kudu Jenkins,

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

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

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

Change subject: [WIP] [tools] ksck improvements [6/n]: Refactor printing
..

[WIP] [tools] ksck improvements [6/n]: Refactor printing

This patch significantly refactors printing in ksck. It separates where
checks are done from where results are printed. This separation will
make it easier to provide machine-readable output and create tools
based on the results of ksck checks, like auto-repair.

There's also a couple of bonus changes:
- Simplifies running all ksck checks and printing the results, as done
  by the ksck tool and ClusterVerifier.
- Removes the --consensus flag. ksck is far less useful without it and
  it doesn't seem like having it brings any benefit.
- Add the changes in https://gerrit.cloudera.org/#/c/10054/, which were
  about to be committed but would've needed to be redone a bit to fit
  with this refactor.

Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
---
M src/kudu/integration-tests/cluster_verifier.cc
M src/kudu/tools/CMakeLists.txt
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
M src/kudu/tools/ksck.h
M src/kudu/tools/ksck_remote-test.cc
A src/kudu/tools/ksck_results.cc
A src/kudu/tools/ksck_results.h
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/tool_action_cluster.cc
M src/kudu/tools/tool_action_tablet.cc
11 files changed, 1,206 insertions(+), 887 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/51/10151/6
--
To view, visit http://gerrit.cloudera.org:8080/10151
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
Gerrit-Change-Number: 10151
Gerrit-PatchSet: 6
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley 


[kudu-CR] [WIP] [tools] ksck improvements [6/n]: Refactor printing

2018-04-24 Thread Alexey Serbin (Code Review)
Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/10151 )

Change subject: [WIP] [tools] ksck improvements [6/n]: Refactor printing
..


Patch Set 5:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc
File src/kudu/tools/ksck_results.cc:

http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc@88
PS5, Line 88:   const string labels = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
static?  It seems this function can be entered multiple times during kudu CLI 
lifecycle.

Also, maybe change this to 'static const char* const' and use (sizeof(xxx)-1) 
instead of size().


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc@124
PS5, Line 124: string ServerHealthToString(KsckServerHealth sh) {
nit: maybe, return 'const char* const' instead?


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc@177
PS5, Line 177:   // Then, summarize the tablets by table
nit: add a stop


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc@268
PS5, Line 268:
nit: two extra spaces


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc@269
PS5, Line 269: "Name", "Status", "Total Tablets",
 : "Healthy", "Recovering", "Under-replicated", 
"Unavailable"
consider adding replication factor, as it's done in 
https://gerrit.cloudera.org/#/c/10054/


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.cc@273
PS5, Line 273: switch (ts.TableStatus()) {
 :   case KsckCheckResult::HEALTHY:
 : status = "HEALTHY";
 : break;
 :   case KsckCheckResult::RECOVERING:
 : status = "RECOVERING";
 : break;
 :   case KsckCheckResult::UNDER_REPLICATED:
 : status = "UNDER-REPLICATED";
 : break;
 :   default:
 : status = "UNAVAILABLE";
 : break;
 : }
maybe, separate this into a function?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
Gerrit-Change-Number: 10151
Gerrit-PatchSet: 5
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley 
Gerrit-Comment-Date: Tue, 24 Apr 2018 23:52:34 +
Gerrit-HasComments: Yes


[kudu-CR] [WIP] [tools] ksck improvements [6/n]: Refactor printing

2018-04-24 Thread Alexey Serbin (Code Review)
Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/10151 )

Change subject: [WIP] [tools] ksck improvements [6/n]: Refactor printing
..


Patch Set 5:

(9 comments)

http://gerrit.cloudera.org:8080/#/c/10151/5//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10151/5//COMMIT_MSG@17
PS5, Line 17: - Removes the --consensus flag. ksck is far less useful without 
it and
:   it doesn't seem like having it brings any benefit.
Any concerns about that in terms of backward compatibility?

Also, maybe it's separating that change in a stand-alone changelist?


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/integration-tests/cluster_verifier.cc
File src/kudu/integration-tests/cluster_verifier.cc:

http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/integration-tests/cluster_verifier.cc@112
PS5, Line 112: RunAndPrintResults
Would it make sense to separate that in two methods:

1. Run()
2. PrintResults()

?


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck-test.cc
File src/kudu/tools/ksck-test.cc:

http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck-test.cc@845
PS5, Line 845:   Status s = RunKsck();
 :
 :   // Every table we checked was healthy ;).
 :   ASSERT_OK(s);
Here an in other places:

ASSERT_OK(RunKsck())


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck-test.cc@858
PS5, Line 858:   Status s = RunKsck();
 :
 :   ASSERT_OK(s);
nit: why not just

ASSERT_OK(RunKsck()) ?


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck-test.cc@878
PS5, Line 878:   Status s = RunKsck();
 :
 :   ASSERT_OK(s);
ASSERT_OK(RunKsck()) ?


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.h
File src/kudu/tools/ksck_results.h:

http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.h@31
PS5, Line 31: 
why angle brackets instead of quotes?


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.h@126
PS5, Line 126: // Returns an int signifying the "unhealthiness level" of 'sh'.
 : // Useful for sorting or comparing.
It would be nice to mention what higher score value means, i.e. if server A has 
score 10 and server B has score 20, which server is 'healthier'?


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.h@133
PS5, Line 133: address
What if server has multiple RPC endpoints?


http://gerrit.cloudera.org:8080/#/c/10151/5/src/kudu/tools/ksck_results.h@257
PS5, Line 257: const std::vector
nit: why not constant reference?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
Gerrit-Change-Number: 10151
Gerrit-PatchSet: 5
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley 
Gerrit-Comment-Date: Tue, 24 Apr 2018 22:39:27 +
Gerrit-HasComments: Yes


[kudu-CR] [WIP] [tools] ksck improvements [6/n]: Refactor printing

2018-04-24 Thread Will Berkeley (Code Review)
Will Berkeley has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/10151 )

Change subject: [WIP] [tools] ksck improvements [6/n]: Refactor printing
..


Patch Set 5:

> Build Failed

Unrelated flakes.


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
Gerrit-Change-Number: 10151
Gerrit-PatchSet: 5
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley 
Gerrit-Comment-Date: Tue, 24 Apr 2018 20:43:10 +
Gerrit-HasComments: No


[kudu-CR] [WIP] [tools] ksck improvements [6/n]: Refactor printing

2018-04-24 Thread Will Berkeley (Code Review)
Hello Kudu Jenkins,

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

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

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

Change subject: [WIP] [tools] ksck improvements [6/n]: Refactor printing
..

[WIP] [tools] ksck improvements [6/n]: Refactor printing

This patch significantly refactors printing in ksck. It separates where
checks are done from where results are printed. This separation will
make it easier to provide machine-readable output and create tools
based on the results of ksck checks, like auto-repair tools.

There's also a couple of bonus changes:
- Simplifies running all ksck checks and printing the results, as done
  by the ksck tool and ClusterVerifier.
- Removes the --consensus flag. ksck is far less useful without it and
  it doesn't seem like having it brings any benefit.

Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
---
M src/kudu/integration-tests/cluster_verifier.cc
M src/kudu/tools/CMakeLists.txt
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
M src/kudu/tools/ksck.h
M src/kudu/tools/ksck_remote-test.cc
A src/kudu/tools/ksck_results.cc
A src/kudu/tools/ksck_results.h
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/tool_action_cluster.cc
M src/kudu/tools/tool_action_tablet.cc
11 files changed, 966 insertions(+), 781 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/51/10151/5
--
To view, visit http://gerrit.cloudera.org:8080/10151
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
Gerrit-Change-Number: 10151
Gerrit-PatchSet: 5
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley 


[kudu-CR] [WIP] [tools] ksck improvements [6/n]: Refactor printing

2018-04-24 Thread Will Berkeley (Code Review)
Will Berkeley has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/10151 )

Change subject: [WIP] [tools] ksck improvements [6/n]: Refactor printing
..


Patch Set 4:

> Uploaded patch set 4.

Junk rev with some logging to identify the cause of a test failure I can't 
reproduce.


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
Gerrit-Change-Number: 10151
Gerrit-PatchSet: 4
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley 
Gerrit-Comment-Date: Tue, 24 Apr 2018 17:59:26 +
Gerrit-HasComments: No


[kudu-CR] [WIP] [tools] ksck improvements [6/n]: Refactor printing

2018-04-24 Thread Will Berkeley (Code Review)
Hello Kudu Jenkins,

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

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

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

Change subject: [WIP] [tools] ksck improvements [6/n]: Refactor printing
..

[WIP] [tools] ksck improvements [6/n]: Refactor printing

This patch significantly refactors printing in ksck. It separates where
checks are done from where results are printed. This separation will
make it easier to provide machine-readable output and create tools
based on the results of ksck checks, like auto-repair tools.

There's also a couple of bonus changes:
- Simplifies running all ksck checks and printing the results, as done
  by the ksck tool and ClusterVerifier.
- Removes the --consensus flag. ksck is far less useful without it and
  it doesn't seem like having it brings any benefit.

Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
---
M src/kudu/integration-tests/cluster_verifier.cc
M src/kudu/tools/CMakeLists.txt
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
M src/kudu/tools/ksck.h
M src/kudu/tools/ksck_remote-test.cc
A src/kudu/tools/ksck_results.cc
A src/kudu/tools/ksck_results.h
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/tool_action_cluster.cc
M src/kudu/tools/tool_action_tablet.cc
11 files changed, 968 insertions(+), 781 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/51/10151/4
--
To view, visit http://gerrit.cloudera.org:8080/10151
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
Gerrit-Change-Number: 10151
Gerrit-PatchSet: 4
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Kudu Jenkins


[kudu-CR] [WIP] [tools] ksck improvements [6/n]: Refactor printing

2018-04-23 Thread Will Berkeley (Code Review)
Hello Kudu Jenkins,

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

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

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

Change subject: [WIP] [tools] ksck improvements [6/n]: Refactor printing
..

[WIP] [tools] ksck improvements [6/n]: Refactor printing

This patch significantly refactors printing in ksck. It separates where
checks are done from where results are printed. This separation will
make it easier to provide machine-readable output and create tools
based on the results of ksck checks, like auto-repair tools.

There's also a couple of bonus changes:
- Simplifies running all ksck checks and printing the results, as done
  by the ksck tool and ClusterVerifier.
- Removes the --consensus flag. ksck is far less useful without it and
  it doesn't seem like having it brings any benefit.

Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
---
M src/kudu/integration-tests/cluster_verifier.cc
M src/kudu/tools/CMakeLists.txt
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
M src/kudu/tools/ksck.h
M src/kudu/tools/ksck_remote-test.cc
A src/kudu/tools/ksck_results.cc
A src/kudu/tools/ksck_results.h
M src/kudu/tools/tool_action_cluster.cc
9 files changed, 958 insertions(+), 779 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/51/10151/3
--
To view, visit http://gerrit.cloudera.org:8080/10151
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
Gerrit-Change-Number: 10151
Gerrit-PatchSet: 3
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Kudu Jenkins


[kudu-CR] [WIP] [tools] ksck improvements [6/n]: Refactor printing

2018-04-22 Thread Will Berkeley (Code Review)
Hello Kudu Jenkins,

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

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

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

Change subject: [WIP] [tools] ksck improvements [6/n]: Refactor printing
..

[WIP] [tools] ksck improvements [6/n]: Refactor printing

This patch significantly refactors printing in ksck. It separates where
checks are done from where results are printed. This separation will
make it easier to provide machine-readable output and create tools
based on the results of ksck checks, like auto-repair tools.

There's also a couple of bonus changes:
- Simplifies running all ksck checks and printing the results, as done
  by the ksck tool and ClusterVerifier.
- Removes the --consensus flag. ksck is far less useful without it and
  it doesn't seem like having it brings any benefit.

Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
---
M src/kudu/integration-tests/cluster_verifier.cc
M src/kudu/tools/CMakeLists.txt
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
M src/kudu/tools/ksck.h
M src/kudu/tools/ksck_remote-test.cc
A src/kudu/tools/ksck_results.cc
A src/kudu/tools/ksck_results.h
M src/kudu/tools/tool_action_cluster.cc
9 files changed, 943 insertions(+), 770 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
Gerrit-Change-Number: 10151
Gerrit-PatchSet: 2
Gerrit-Owner: Will Berkeley 
Gerrit-Reviewer: Kudu Jenkins


[kudu-CR] [WIP] [tools] ksck improvements [6/n]: Refactor printing

2018-04-22 Thread Will Berkeley (Code Review)
Will Berkeley has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/10151


Change subject: [WIP] [tools] ksck improvements [6/n]: Refactor printing
..

[WIP] [tools] ksck improvements [6/n]: Refactor printing

This patch significantly refactors printing in ksck. It separates where
checks are done from where results are printed. This separation will
make it easier to provide machine-readable output and create tools
based on the results of ksck checks, like auto-repair tools.

There's also a couple of bonus changes:
- Simplifies running all ksck checks and printing the results, as done
  by the ksck tool and ClusterVerifier.
- Removes the --consensus flag. ksck is far less useful without it and
  it doesn't seem like having it brings any benefit.

Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
---
M src/kudu/integration-tests/cluster_verifier.cc
M src/kudu/tools/CMakeLists.txt
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
M src/kudu/tools/ksck.h
M src/kudu/tools/ksck_remote-test.cc
M src/kudu/tools/tool_action_cluster.cc
7 files changed, 281 insertions(+), 770 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8de619996b6cd753e6a9c01b1b60810a873e609
Gerrit-Change-Number: 10151
Gerrit-PatchSet: 1
Gerrit-Owner: Will Berkeley