You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Dan Burkert (Code Review)" <ge...@cloudera.org> on 2017/04/14 20:40:41 UTC

[kudu-CR](branch-1.3.x) KUDU-1708. Document Kudu command-line tools

Dan Burkert has uploaded a new change for review.

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

Change subject: KUDU-1708. Document Kudu command-line tools
......................................................................

KUDU-1708. Document Kudu command-line tools

- Adds helpxml flag support to the kudu binary
- Adds doc script and xslt to convert xml to asciidoc

Change-Id: I9f484f772cbaeb385687d83a2665ae4d7292aaf5
Reviewed-on: http://gerrit.cloudera.org:8080/6525
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Adar Dembo <ad...@cloudera.com>
(cherry picked from commit 2407c2cb1e413c705ceb2b9479fe74d9cc432883)
---
A docs/command_line_tools_reference.adoc
M docs/support/jekyll-templates/document.html.erb
M docs/support/scripts/make_docs.sh
A docs/support/xsl/tool_to_asciidoc.xsl
M src/kudu/tools/CMakeLists.txt
M src/kudu/tools/kudu-tool-test.cc
A src/kudu/tools/tool_action-test.cc
M src/kudu/tools/tool_action.cc
M src/kudu/tools/tool_action.h
M src/kudu/tools/tool_main.cc
10 files changed, 496 insertions(+), 24 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f484f772cbaeb385687d83a2665ae4d7292aaf5
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: branch-1.3.x
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@gmail.com>

[kudu-CR](branch-1.3.x) KUDU-1708. Document Kudu command-line tools

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

Change subject: KUDU-1708. Document Kudu command-line tools
......................................................................


Patch Set 2:

(1 comment)

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

PS2, Line 174: string Mode::BuildHelpXML(const vector<Mode*>& chain) const {
             :   string xml;
             :   xml += "<mode>";
             :   xml += Substitute("<name>$0</name>", name());
             :   xml += Substitute("<description>$0</description>",
             :                     EscapeForHtmlToString(description()));
             :   for (const auto& a : actions()) {
             :     xml += a->BuildHelpXML(chain);
             :   }
             : 
             :   for (const auto& m : modes()) {
             :     vector<Mode*> m_chain(chain);
             :     m_chain.push_back(m.get());
             :     xml += m->BuildHelpXML(m_chain);
             :   }
             :   xml += "</mode>";
             :   return xml;
> This is just a backport, so if we were to do that it would need to be in a 
Ah, I see.  I missed it's for 1.3.x only.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f484f772cbaeb385687d83a2665ae4d7292aaf5
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: branch-1.3.x
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR](branch-1.3.x) KUDU-1708. Document Kudu command-line tools

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

Change subject: KUDU-1708. Document Kudu command-line tools
......................................................................


Patch Set 1: Code-Review-1

hm, since this has some code changes, I'm going to defer +2ing it until after the 1.3.1 release.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f484f772cbaeb385687d83a2665ae4d7292aaf5
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: branch-1.3.x
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR](branch-1.3.x) KUDU-1708. Document Kudu command-line tools

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

Change subject: KUDU-1708. Document Kudu command-line tools
......................................................................


Patch Set 2:

(1 comment)

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

Line 190:   return xml;
> It's possible, but I followed the pattern used by existing helpxml flags. I
I see.

I just thought if it were possible to produce output (not only help) using libxo, it might be useful in troubleshooting and, maybe, even creating some automated scripts (the JSON output might be the preferred one in those scenarios).

If it's just for documenting the help output which is going to be processed by the Kudu documentation suite, then HTML or JSON output is not needed as is.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f484f772cbaeb385687d83a2665ae4d7292aaf5
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: branch-1.3.x
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR](branch-1.3.x) KUDU-1708. Document Kudu command-line tools

Posted by "Jean-Daniel Cryans (Code Review)" <ge...@cloudera.org>.
Jean-Daniel Cryans has submitted this change and it was merged.

Change subject: KUDU-1708. Document Kudu command-line tools
......................................................................


KUDU-1708. Document Kudu command-line tools

- Adds helpxml flag support to the kudu binary
- Adds doc script and xslt to convert xml to asciidoc

Change-Id: I9f484f772cbaeb385687d83a2665ae4d7292aaf5
Reviewed-on: http://gerrit.cloudera.org:8080/6525
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Adar Dembo <ad...@cloudera.com>
(cherry picked from commit 2407c2cb1e413c705ceb2b9479fe74d9cc432883)
Reviewed-on: http://gerrit.cloudera.org:8080/6645
Tested-by: Kudu Jenkins
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>
---
A docs/command_line_tools_reference.adoc
M docs/support/jekyll-templates/document.html.erb
M docs/support/scripts/make_docs.sh
A docs/support/xsl/tool_to_asciidoc.xsl
M src/kudu/tools/CMakeLists.txt
M src/kudu/tools/kudu-tool-test.cc
A src/kudu/tools/tool_action-test.cc
M src/kudu/tools/tool_action.cc
M src/kudu/tools/tool_action.h
M src/kudu/tools/tool_main.cc
10 files changed, 496 insertions(+), 24 deletions(-)

Approvals:
  Jean-Daniel Cryans: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f484f772cbaeb385687d83a2665ae4d7292aaf5
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: branch-1.3.x
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR](branch-1.3.x) KUDU-1708. Document Kudu command-line tools

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

Change subject: KUDU-1708. Document Kudu command-line tools
......................................................................


Patch Set 2:

(1 comment)

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

Line 190:   return xml;
> Is it possible to use libxo library https://github.com/Juniper/libxo for th
It's possible, but I followed the pattern used by existing helpxml flags. I think a single patch to change all of them would be a good idea. 

When would we use json or html output?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f484f772cbaeb385687d83a2665ae4d7292aaf5
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: branch-1.3.x
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR](branch-1.3.x) KUDU-1708. Document Kudu command-line tools

Posted by "Jean-Daniel Cryans (Code Review)" <ge...@cloudera.org>.
Jean-Daniel Cryans has posted comments on this change.

Change subject: KUDU-1708. Document Kudu command-line tools
......................................................................


Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f484f772cbaeb385687d83a2665ae4d7292aaf5
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: branch-1.3.x
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR](branch-1.3.x) KUDU-1708. Document Kudu command-line tools

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

Change subject: KUDU-1708. Document Kudu command-line tools
......................................................................


Patch Set 2:

(1 comment)

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

PS2, Line 174: string Mode::BuildHelpXML(const vector<Mode*>& chain) const {
             :   string xml;
             :   xml += "<mode>";
             :   xml += Substitute("<name>$0</name>", name());
             :   xml += Substitute("<description>$0</description>",
             :                     EscapeForHtmlToString(description()));
             :   for (const auto& a : actions()) {
             :     xml += a->BuildHelpXML(chain);
             :   }
             : 
             :   for (const auto& m : modes()) {
             :     vector<Mode*> m_chain(chain);
             :     m_chain.push_back(m.get());
             :     xml += m->BuildHelpXML(m_chain);
             :   }
             :   xml += "</mode>";
             :   return xml;
Is it possible to use libxo library https://github.com/Juniper/libxo for that instead of building that manually?

Doing so would automatically add support for JSON and HTML output.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f484f772cbaeb385687d83a2665ae4d7292aaf5
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: branch-1.3.x
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR](branch-1.3.x) KUDU-1708. Document Kudu command-line tools

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

Change subject: KUDU-1708. Document Kudu command-line tools
......................................................................


Patch Set 2:

(1 comment)

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

PS2, Line 174: string Mode::BuildHelpXML(const vector<Mode*>& chain) const {
             :   string xml;
             :   xml += "<mode>";
             :   xml += Substitute("<name>$0</name>", name());
             :   xml += Substitute("<description>$0</description>",
             :                     EscapeForHtmlToString(description()));
             :   for (const auto& a : actions()) {
             :     xml += a->BuildHelpXML(chain);
             :   }
             : 
             :   for (const auto& m : modes()) {
             :     vector<Mode*> m_chain(chain);
             :     m_chain.push_back(m.get());
             :     xml += m->BuildHelpXML(m_chain);
             :   }
             :   xml += "</mode>";
             :   return xml;
> Is it possible to use libxo library https://github.com/Juniper/libxo for th
This is just a backport, so if we were to do that it would need to be in a new commit.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f484f772cbaeb385687d83a2665ae4d7292aaf5
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: branch-1.3.x
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes