[ 
https://issues.apache.org/jira/browse/HIVE-6709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13942810#comment-13942810
 ] 

Y. SREENIVASULU REDDY commented on HIVE-6709:
---------------------------------------------

[~szehon]
{code}
 public boolean process(String[] argv) {
    try {
      commandLine = new GnuParser().parse(options, argv);
      if (commandLine.hasOption('H')) {
        printUsage();
        return false;
      }
{code}
In the above code passing argument is handled by GnuParser class, there parse 
exception we are getting, in catch block any error we are getting, showing 
usage again.
{code}
catch (ParseException e) {
      System.err.println(e.getMessage());
      printUsage();
      return false;
    }
    return true;
  }
{code}
Better will throw parse Exception only.
Instead of printing usage again.
Based on Exception end user will come to know.

> HiveServer2 help command is not recognizing properly.
> -----------------------------------------------------
>
>                 Key: HIVE-6709
>                 URL: https://issues.apache.org/jira/browse/HIVE-6709
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>    Affects Versions: 0.11.0, 0.12.0
>            Reporter: Y. SREENIVASULU REDDY
>            Assignee: Y. SREENIVASULU REDDY
>            Priority: Minor
>             Fix For: 0.14.0
>
>         Attachments: HIVE-6709.patch
>
>
> Install the HiveServer,
> Then Execute the following command for help in Hive_home
> ./hive --service hiveserver2 --help
> {code}
> Starting HiveServer2
> Unrecognized option: -h
> usage: hiveserver2
>  -H,--help                        Print help information
>     --hiveconf <property=value>   Use value for given property
> {code}
> need to provide in -H instead of -h in hiverserver2.sh file
> {code}
> hiveserver2_help() {
>   hiveserver2 -H
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to