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/26 23:30:47 UTC

[kudu-CR] tool: print usage information when arguments fail to parse

Todd Lipcon has uploaded a new change for review.

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

Change subject: tool: print usage information when arguments fail to parse
......................................................................

tool: print usage information when arguments fail to parse

This changes the output when the user forgets to pass a required
argument such that the usage string is now returned.

Example:

  todd@va1022:~/kudu$ build/latest/bin/kudu fs dump block
  Invalid argument: must provide positional argument block_id

  Usage: build/latest/bin/kudu fs dump block <block_id>
  [-fs_wal_dir=<dir>] [-fs_data_dirs=<dirs>]

Change-Id: I4695aca5cb3f848f525784476403a9f577fdba13
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action.cc
M src/kudu/tools/tool_action.h
M src/kudu/tools/tool_main.cc
4 files changed, 35 insertions(+), 10 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4695aca5cb3f848f525784476403a9f577fdba13
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>

[kudu-CR] tool: print usage information when arguments fail to parse

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

Change subject: tool: print usage information when arguments fail to parse
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7301/2/src/kudu/tools/tool_main.cc
File src/kudu/tools/tool_main.cc:

Line 128:   if (!args_ok && s.IsInvalidArgument()) {
> This seems a little bit redundant; the only way for MarshalArgs to fail is 
k, restructued a bit to make it less convoluted (at the expense of one extra duplicated line)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4695aca5cb3f848f525784476403a9f577fdba13
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-HasComments: Yes

[kudu-CR] tool: print usage information when arguments fail to parse

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has uploaded a new patch set (#2).

Change subject: tool: print usage information when arguments fail to parse
......................................................................

tool: print usage information when arguments fail to parse

This changes the output when the user forgets to pass a required
argument such that the usage string is now returned.

Example:

  todd@va1022:~/kudu$ build/latest/bin/kudu fs dump block
  Invalid argument: must provide positional argument block_id

  Usage: build/latest/bin/kudu fs dump block <block_id>
  [-fs_wal_dir=<dir>] [-fs_data_dirs=<dirs>]

Change-Id: I4695aca5cb3f848f525784476403a9f577fdba13
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action.cc
M src/kudu/tools/tool_action.h
M src/kudu/tools/tool_main.cc
4 files changed, 37 insertions(+), 13 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4695aca5cb3f848f525784476403a9f577fdba13
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot

[kudu-CR] tool: print usage information when arguments fail to parse

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

Change subject: tool: print usage information when arguments fail to parse
......................................................................


Patch Set 3: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4695aca5cb3f848f525784476403a9f577fdba13
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-HasComments: No

[kudu-CR] tool: print usage information when arguments fail to parse

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

Change subject: tool: print usage information when arguments fail to parse
......................................................................


Patch Set 2: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7301/2/src/kudu/tools/tool_main.cc
File src/kudu/tools/tool_main.cc:

Line 128:   if (!args_ok && s.IsInvalidArgument()) {
This seems a little bit redundant; the only way for MarshalArgs to fail is with InvalidArgument, so I think checking !args_ok is sufficient.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4695aca5cb3f848f525784476403a9f577fdba13
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-HasComments: Yes

[kudu-CR] tool: print usage information when arguments fail to parse

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

Change subject: tool: print usage information when arguments fail to parse
......................................................................


tool: print usage information when arguments fail to parse

This changes the output when the user forgets to pass a required
argument such that the usage string is now returned.

Example:

  todd@va1022:~/kudu$ build/latest/bin/kudu fs dump block
  Invalid argument: must provide positional argument block_id

  Usage: build/latest/bin/kudu fs dump block <block_id>
  [-fs_wal_dir=<dir>] [-fs_data_dirs=<dirs>]

Change-Id: I4695aca5cb3f848f525784476403a9f577fdba13
Reviewed-on: http://gerrit.cloudera.org:8080/7301
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action.cc
M src/kudu/tools/tool_action.h
M src/kudu/tools/tool_main.cc
4 files changed, 39 insertions(+), 16 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4695aca5cb3f848f525784476403a9f577fdba13
Gerrit-PatchSet: 4
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>

[kudu-CR] tool: print usage information when arguments fail to parse

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

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

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

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

Change subject: tool: print usage information when arguments fail to parse
......................................................................

tool: print usage information when arguments fail to parse

This changes the output when the user forgets to pass a required
argument such that the usage string is now returned.

Example:

  todd@va1022:~/kudu$ build/latest/bin/kudu fs dump block
  Invalid argument: must provide positional argument block_id

  Usage: build/latest/bin/kudu fs dump block <block_id>
  [-fs_wal_dir=<dir>] [-fs_data_dirs=<dirs>]

Change-Id: I4695aca5cb3f848f525784476403a9f577fdba13
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action.cc
M src/kudu/tools/tool_action.h
M src/kudu/tools/tool_main.cc
4 files changed, 39 insertions(+), 16 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4695aca5cb3f848f525784476403a9f577fdba13
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>