hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reuben Kuhnert (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-9365) The Metastore should take port configuration from hive-site.xml
Date Fri, 24 Apr 2015 17:57:38 GMT

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

Reuben Kuhnert commented on HIVE-9365:
--------------------------------------

I've added a configuration property {{hive.metastore.port}}:

{code}
    METASTORE_SERVER_PORT("hive.metastore.port", 9083, "Hive Metastore listener port"),
{code}

but that leaves the old cli configuration:

{code}
  static public class HiveMetastoreCli extends CommonCliOptions {
    int port = DEFAULT_HIVE_METASTORE_PORT; // defaults to 9083

    @SuppressWarnings("static-access")
    public HiveMetastoreCli() {
      super("hivemetastore", true);

      // -p port
      OPTIONS.addOption(OptionBuilder
          .hasArg()
          .withArgName("port")
          .withDescription("Hive Metastore port number, default:"
              + DEFAULT_HIVE_METASTORE_PORT)
          .create('p'));

    }

    @Override
    public void parse(String[] args) {
      super.parse(args);

      // support the old syntax "hivemetastore [port]" but complain
      args = commandLine.getArgs();
      if (args.length > 0) {
        // complain about the deprecated syntax -- but still run
        System.err.println(
            "This usage has been deprecated, consider using the new command "
                + "line syntax (run with -h to see usage information)");

        port = new Integer(args[0]);
      }

      // notice that command line options take precedence over the
      // deprecated (old style) naked args...
      if (commandLine.hasOption('p')) {
        port = Integer.parseInt(commandLine.getOptionValue('p'));
      } else {
        // legacy handling
        String metastorePort = System.getenv("METASTORE_PORT");
        if (metastorePort != null) {
          port = Integer.parseInt(metastorePort);
        }
      }
    }
  }
{code}

Should we continue to allow the user to configure the port through the CLI (but override the
{{hive.metastore.port}} configuration?), or should we complain? completely disallow? Let me
know what the correct solution on this is and I'll go ahead and get a patch ready.

Thanks

> The Metastore should take port configuration from hive-site.xml
> ---------------------------------------------------------------
>
>                 Key: HIVE-9365
>                 URL: https://issues.apache.org/jira/browse/HIVE-9365
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Nicolas ThiƩbaud
>            Assignee: Reuben Kuhnert
>            Priority: Minor
>              Labels: metastore
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> As opposed to the cli. Having this configuration in the launcher script create fragmentation
and does is not consistent with the way the hive stack is configured.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message