hive-issues mailing list archives

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


Reuben Kuhnert commented on HIVE-9365:

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

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

but that leaves the old cli configuration:

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

    public HiveMetastoreCli() {
      super("hivemetastore", true);

      // -p port
          .withDescription("Hive Metastore port number, default:"


    public void parse(String[] args) {

      // support the old syntax "hivemetastore [port]" but complain
      args = commandLine.getArgs();
      if (args.length > 0) {
        // complain about the deprecated syntax -- but still run
            "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);

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.


> The Metastore should take port configuration from hive-site.xml
> ---------------------------------------------------------------
>                 Key: HIVE-9365
>                 URL:
>             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

View raw message