This is an automated email from the ASF dual-hosted git repository.
fokko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-mr.git
The following commit(s) were added to refs/heads/master by this push:
new 616e35f PARQUET-1593: Improve parquet-cli's example usage (#646)
616e35f is described below
commit 616e35f9e164a24104da148f713b2e8258a4f54f
Author: Kengo Seki <[email protected]>
AuthorDate: Fri Jan 10 21:52:50 2020 +0900
PARQUET-1593: Improve parquet-cli's example usage (#646)
The following description is a bit weird since there's no command
called "create" actually. This PR replaces the subcommand with an
actually existent one.
```
Examples:
# print information for create
parquet help create
```
---
parquet-cli/src/main/java/org/apache/parquet/cli/Help.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/parquet-cli/src/main/java/org/apache/parquet/cli/Help.java
b/parquet-cli/src/main/java/org/apache/parquet/cli/Help.java
index 791d169..c41c881 100644
--- a/parquet-cli/src/main/java/org/apache/parquet/cli/Help.java
+++ b/parquet-cli/src/main/java/org/apache/parquet/cli/Help.java
@@ -111,11 +111,14 @@ public class Help implements Command {
console.info(" {}\n\t{}",
command, jc.getCommandDescription(command));
}
- console.info("\n Examples:");
- console.info("\n # print information for create\n {} help create",
- programName);
- console.info("\n See '{} help <command>' for more information on a " +
+
+ jc.getCommands().keySet().stream().filter(s ->
!s.equals("help")).findFirst().ifPresent(command -> {
+ console.info("\n Examples:");
+ console.info("\n # print information for {}\n {} help {}",
+ command, programName, command);
+ console.info("\n See '{} help <command>' for more information on a " +
"specific command.", programName);
+ });
}
private boolean printOption(Logger console, ParameterDescription param) {