You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Fengling Wang (Code Review)" <ge...@cloudera.org> on 2018/05/29 22:14:14 UTC

[kudu-CR] Fix ksck checksum scan printing

Fengling Wang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/10535


Change subject: Fix ksck checksum_scan printing
......................................................................

Fix ksck checksum_scan printing

I removed the checksum summary line so that the checksum_scan output
is completely JSON-parsable.

Example command:
kudu cluster ksck --checksum_scan --checksum_snapshot=false --ksck_format=
json_compact localhost:7052,localhost:7051,localhost:7053

Before:
Checksum finished in 0s: 0/8 replicas remaining (0B from disk, 2.00k rows
summed)
{"master_summaries"..}

After:
{"master_summaries"..}

Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
---
M src/kudu/tools/ksck.cc
1 file changed, 0 insertions(+), 7 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 1
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>

[kudu-CR] Fix ksck checksum scan printing

Posted by "Fengling Wang (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/10535

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

Change subject: Fix ksck checksum_scan printing
......................................................................

Fix ksck checksum_scan printing

I removed the checksum progress summary line when the ksck_format is
json_pretty or json_compact so that the checksum_scan output is
completely JSON-parsable.

Example command:
kudu cluster ksck --checksum_scan --checksum_snapshot=false
--ksck_format=json_compact localhost:7052,localhost:7051,
localhost:7053

Before:
Checksum finished in 0s: 0/8 replicas remaining (0B from disk, 2.00k
rows summed)
{"master_summaries"..}

After:
{"master_summaries"..}

Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
---
M src/kudu/tools/ksck.cc
1 file changed, 9 insertions(+), 7 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 3
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] Fix ksck checksum scan printing

Posted by "Fengling Wang (Code Review)" <ge...@cloudera.org>.
Fengling Wang has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 4:

(2 comments)

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

http://gerrit.cloudera.org:8080/#/c/10535/4/src/kudu/tools/ksck-test.cc@1338
PS4, Line 1338: FLAGS_
> You need to DECLARE it when in a different compilation unit. See the declar
Done


http://gerrit.cloudera.org:8080/#/c/10535/4/src/kudu/tools/ksck-test.cc@1340
PS4, Line 1340: KsckResultsToJsonString
> Not quite. If you look at KsckResultsToJsonString(), it prints the json out
I see. Thanks!



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 4
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Wed, 30 May 2018 17:17:54 +0000
Gerrit-HasComments: Yes

[kudu-CR] Fix ksck checksum scan printing

Posted by "Fengling Wang (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/10535

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

Change subject: Fix ksck checksum_scan printing
......................................................................

Fix ksck checksum_scan printing

I removed the checksum progress summary line when the ksck_format is
json_pretty or json_compact so that the checksum_scan output is
completely JSON-parsable.

Example command:
kudu cluster ksck --checksum_scan --checksum_snapshot=false
--ksck_format=json_compact localhost:7052,localhost:7051,
localhost:7053

Before:
Checksum finished in 0s: 0/8 replicas remaining (0B from disk, 2.00k
rows summed)
{"master_summaries"..}

After:
{"master_summaries"..}

Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
---
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
2 files changed, 16 insertions(+), 7 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 4
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] Fix ksck checksum scan printing

Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 4:

(2 comments)

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

http://gerrit.cloudera.org:8080/#/c/10535/4/src/kudu/tools/ksck-test.cc@1338
PS4, Line 1338: FLAGS_
> FLAGS_ksck_format is not visible here and I'm not sure why?
You need to DECLARE it when in a different compilation unit. See the declaration of --checksum_scan on L52.


http://gerrit.cloudera.org:8080/#/c/10535/4/src/kudu/tools/ksck-test.cc@1340
PS4, Line 1340: KsckResultsToJsonString
> I'm prob wrong.
Not quite. If you look at KsckResultsToJsonString(), it prints the json output to an ostringstream, so the only output is the json output. We want *all* the output from ksck, to check that can be json-parsed. See Ksck::RunAndPrintResults e.g. on L364; calling that gathers all output into the err_stream_ member of the test class (since the Ksck instance is constructed to be outputting to err_stream_ (see L178).



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 4
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Wed, 30 May 2018 00:16:56 +0000
Gerrit-HasComments: Yes

[kudu-CR] Fix ksck checksum scan printing

Posted by "Fengling Wang (Code Review)" <ge...@cloudera.org>.
Fengling Wang has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 7:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/10535/6//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10535/6//COMMIT_MSG@15
PS6, Line 15: kudu cluster ksck --checksum_scan --checksum_snapshot=false
            : --ksck_format=json_compact localhost:7052,localhost:7051,
            : localhost:7053
> nit: Use \ to indicate the line breaks, so the command remains vaild and he
Done


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

http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck-test.cc@56
PS6, Line 56: DECLARE_uint32(truncate_serv
> nit: Order alphabetically by flag name.
Done


http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck-test.cc@1503
PS6, Line 1503: ASSERT_OK(r.Init());
> Can you double-check this failed without this patch? I think JsonReader par
Yes this failed w/o this patch.


http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck.h
File src/kudu/tools/ksck.h:

http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck.h@568
PS6, Line 568: friend class KsckTest;
> Can you make this a helper function in an anonymous namespace in ksck.cc ra
Done


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

http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck.cc@1063
PS6, Line 1063: summary.result = result;
> We are usually case-insensitive about categorical flag values like this. Ca
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 7
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Tue, 12 Jun 2018 23:35:20 +0000
Gerrit-HasComments: Yes

[kudu-CR] Fix ksck checksum scan printing

Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 1:

We still want the progress reported for the plain text output.


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 1
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Tue, 29 May 2018 22:15:59 +0000
Gerrit-HasComments: No

[kudu-CR] Fix ksck checksum scan printing

Posted by "Fengling Wang (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/10535

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

Change subject: Fix ksck checksum_scan printing
......................................................................

Fix ksck checksum_scan printing

I removed the checksum progress summary line when the ksck_format is
json_pretty or json_compact so that the checksum_scan output is
completely JSON-parsable. I also added a method and refactored the
code to do the checking of non-JSON format.

Example command:
kudu cluster ksck --checksum_scan --checksum_snapshot=false
--ksck_format=json_compact localhost:7052,localhost:7051,
localhost:7053

Before:
Checksum finished in 0s: 0/8 replicas remaining (0B from disk, 2.00k
rows summed)
{"master_summaries"..}

After:
{"master_summaries"..}

Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
---
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
M src/kudu/tools/ksck.h
3 files changed, 26 insertions(+), 7 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 6
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] Fix ksck checksum scan printing

Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................

Fix ksck checksum_scan printing

I removed the checksum progress summary line when the ksck_format is
json_pretty or json_compact so that the checksum_scan output is
completely JSON-parsable. I also added a method and refactored the
code to do the checking of non-JSON format.

Example command:
kudu cluster ksck --checksum_scan --checksum_snapshot=false
--ksck_format=json_compact localhost:7052,localhost:7051,
localhost:7053

Before:
Checksum finished in 0s: 0/8 replicas remaining (0B from disk, 2.00k
rows summed)
{"master_summaries"..}

After:
{"master_summaries"..}

Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Reviewed-on: http://gerrit.cloudera.org:8080/10535
Tested-by: Kudu Jenkins
Reviewed-by: Will Berkeley <wd...@gmail.com>
---
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
2 files changed, 25 insertions(+), 6 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Will Berkeley: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 8
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] Fix ksck checksum scan printing

Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 7: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/10535/7//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10535/7//COMMIT_MSG@15
PS7, Line 15: kudu cluster ksck --checksum_scan --checksum_snapshot=false
Looks like the \ for the line breaks didn't make it in.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 7
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Thu, 14 Jun 2018 17:29:29 +0000
Gerrit-HasComments: Yes

[kudu-CR] Fix ksck checksum scan printing

Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 6:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/10535/6//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10535/6//COMMIT_MSG@15
PS6, Line 15: kudu cluster ksck --checksum_scan --checksum_snapshot=false
            : --ksck_format=json_compact localhost:7052,localhost:7051,
            : localhost:7053
nit: Use \ to indicate the line breaks, so the command remains vaild and hence copy-paste-able to a shell. E.g.

    kudu cluster ksck --checksum_scan --checksum_snapshot=false \
    --ksck_format=json_compact localhost:7052,localhost:7051,localhost:7053


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

http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck-test.cc@56
PS6, Line 56: DECLARE_string(ksck_format);
nit: Order alphabetically by flag name.


http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck-test.cc@1503
PS6, Line 1503: ASSERT_OK(r.Init());
Can you double-check this failed without this patch? I think JsonReader parses the whole json on Init() but want to be sure.


http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck.h
File src/kudu/tools/ksck.h:

http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck.h@567
PS6, Line 567: (non-JSON)
nit: Remove. Also, JSON is machine-readable.


http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck.h@567
PS6, Line 567: Check if
nit: Return whether


http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck.h@567
PS6, Line 567: are
is


http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck.h@568
PS6, Line 568: static bool IsMachineReadableFormat
Can you make this a helper function in an anonymous namespace in ksck.cc rather that a static member function of Ksck?


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

http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck.cc@1063
PS6, Line 1063: FLAGS_ksck_format == "plain_full" || FLAGS_ksck_format == "plain_concise"
We are usually case-insensitive about categorical flag values like this. Can you use boost::iequals to do the comparisons instead?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 6
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Mon, 11 Jun 2018 22:24:11 +0000
Gerrit-HasComments: Yes

[kudu-CR] Fix ksck checksum scan printing

Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 5:

(1 comment)

Just a little nit.

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

http://gerrit.cloudera.org:8080/#/c/10535/5/src/kudu/tools/ksck.cc@592
PS5, Line 592: if (FLAGS_ksck_format == "plain_full" || FLAGS_ksck_format == "plain_concise")
nit: Can we do a tiny refactor and make a method like Ksck::IsMachineReadableFormat() that just returns the result of this test (for now).



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 5
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Tue, 05 Jun 2018 19:40:57 +0000
Gerrit-HasComments: Yes

[kudu-CR] Fix ksck checksum scan printing

Posted by "Fengling Wang (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, 

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

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

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

Change subject: Fix ksck checksum_scan printing
......................................................................

Fix ksck checksum_scan printing

I removed the checksum summary line so that the checksum_scan output
is completely JSON-parsable.

Example command:
kudu cluster ksck --checksum_scan --checksum_snapshot=false
--ksck_format=json_compact localhost:7052,localhost:7051,
localhost:7053

Before:
Checksum finished in 0s: 0/8 replicas remaining (0B from disk, 2.00k
rows summed)
{"master_summaries"..}

After:
{"master_summaries"..}

Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
---
M src/kudu/tools/ksck.cc
1 file changed, 0 insertions(+), 7 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 2
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins

[kudu-CR] Fix ksck checksum scan printing

Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 3:

Can you add a quick test that slurps the stdout of ksck with compact json mode on into a stringstream and then parses it with a JsonReader?


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 3
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Tue, 29 May 2018 23:07:06 +0000
Gerrit-HasComments: No

[kudu-CR] Fix ksck checksum scan printing

Posted by "Fengling Wang (Code Review)" <ge...@cloudera.org>.
Fengling Wang has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 4:

(2 comments)

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

http://gerrit.cloudera.org:8080/#/c/10535/4/src/kudu/tools/ksck-test.cc@1338
PS4, Line 1338: FLAGS_
FLAGS_ksck_format is not visible here and I'm not sure why?


http://gerrit.cloudera.org:8080/#/c/10535/4/src/kudu/tools/ksck-test.cc@1340
PS4, Line 1340: KsckResultsToJsonString
I'm prob wrong.
Isn't this function does what you mean by "test that slurps the stdout of ksck with compact json mode on into a stringstream and then parses it with a JsonReader"?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 4
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Wed, 30 May 2018 00:05:34 +0000
Gerrit-HasComments: Yes

[kudu-CR] Fix ksck checksum scan printing

Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 3:

* compact json mode and checksum scan mode on


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 3
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Tue, 29 May 2018 23:07:34 +0000
Gerrit-HasComments: No

[kudu-CR] Fix ksck checksum scan printing

Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 5:

(3 comments)

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

http://gerrit.cloudera.org:8080/#/c/10535/5/src/kudu/tools/ksck.cc@592
PS5, Line 592: if (FLAGS_ksck_format == "plain_full" || FLAGS_ksck_format == "plain_concise")
> Why is it machine-readable btw?
My bad. By "this test" I meant the opposite of this test :). Machine-readable means JSON format. So the test should compare for equality against JSON_PRETTY and JSON_COMPACT.


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

http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck.cc@613
PS6, Line 613: 
I think you mean if it's not printing in a machine-readable format.


http://gerrit.cloudera.org:8080/#/c/10535/6/src/kudu/tools/ksck.cc@1063
PS6, Line 1063: 
Also, these are the non-machine-readable format flags.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 5
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Mon, 11 Jun 2018 22:27:48 +0000
Gerrit-HasComments: Yes

[kudu-CR] Fix ksck checksum scan printing

Posted by "Fengling Wang (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/10535

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

Change subject: Fix ksck checksum_scan printing
......................................................................

Fix ksck checksum_scan printing

I removed the checksum progress summary line when the ksck_format is
json_pretty or json_compact so that the checksum_scan output is
completely JSON-parsable.

Example command:
kudu cluster ksck --checksum_scan --checksum_snapshot=false
--ksck_format=json_compact localhost:7052,localhost:7051,
localhost:7053

Before:
Checksum finished in 0s: 0/8 replicas remaining (0B from disk, 2.00k
rows summed)
{"master_summaries"..}

After:
{"master_summaries"..}

Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
---
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
2 files changed, 19 insertions(+), 7 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 5
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] Fix ksck checksum scan printing

Posted by "Fengling Wang (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/10535

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

Change subject: Fix ksck checksum_scan printing
......................................................................

Fix ksck checksum_scan printing

I removed the checksum progress summary line when the ksck_format is
json_pretty or json_compact so that the checksum_scan output is
completely JSON-parsable. I also added a method and refactored the
code to do the checking of non-JSON format.

Example command:
kudu cluster ksck --checksum_scan --checksum_snapshot=false
--ksck_format=json_compact localhost:7052,localhost:7051,
localhost:7053

Before:
Checksum finished in 0s: 0/8 replicas remaining (0B from disk, 2.00k
rows summed)
{"master_summaries"..}

After:
{"master_summaries"..}

Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
---
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
2 files changed, 25 insertions(+), 6 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 7
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] Fix ksck checksum scan printing

Posted by "Fengling Wang (Code Review)" <ge...@cloudera.org>.
Fengling Wang has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 1:

oh i see. i forgot it.


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 1
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Tue, 29 May 2018 22:16:46 +0000
Gerrit-HasComments: No

[kudu-CR] Fix ksck checksum scan printing

Posted by "Fengling Wang (Code Review)" <ge...@cloudera.org>.
Fengling Wang has posted comments on this change. ( http://gerrit.cloudera.org:8080/10535 )

Change subject: Fix ksck checksum_scan printing
......................................................................


Patch Set 5:

(1 comment)

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

http://gerrit.cloudera.org:8080/#/c/10535/5/src/kudu/tools/ksck.cc@592
PS5, Line 592: if (FLAGS_ksck_format == "plain_full" || FLAGS_ksck_format == "plain_concise")
> nit: Can we do a tiny refactor and make a method like Ksck::IsMachineReadab
Why is it machine-readable btw?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I25fe6d0f14d1713b848d0a79f4d92b056924a5a5
Gerrit-Change-Number: 10535
Gerrit-PatchSet: 5
Gerrit-Owner: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Wed, 06 Jun 2018 16:18:01 +0000
Gerrit-HasComments: Yes