Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-7342

support hiveserver2,metastore specific config files

    XMLWordPrintableJSON

Details

    • Hide
      Adds support for server specific config files.

      HiveMetastore server reads hive-site.xml as well as hivemetastore-site.xml configuration files that are available in the $HIVE_CONF_DIR or in the classpath. If metastore is being used in embedded mode (ie hive.metastore.uris is not set or empty) in hive commandline or hiveserver2, the hivemetastore-site.xml gets loaded by the parent process as well.
      The value of hive.metastore.uris is examined to determine this, and the value should be set appropriately in hive-site.xml .
      Certain metastore configuration parameters like hive.metastore.sasl.enabled, hive.metastore.kerberos.principal, hive.metastore.execute.setugi, hive.metastore.thrift.framed.transport.enabled are used by the metastore client as well as server. For such common parameters it is better to set the values in hive-site.xml, that will help in keeping them consistent.

      HiveServer2 reads hive-site.xml as well as hiveserver2-site.xml that are available in the $HIVE_CONF_DIR or in the classpath.
      If hiveserver2 is using metastore in embedded mode, hivemetastore-site.xml also is loaded.

      The order of precedence of the config files is as follows (later one has higher precedence) -
      hive-site.xml -> hivemetastore-site.xml -> hiveserver2-site.xml -> '-hiveconf' commandline parameters

      Show
      Adds support for server specific config files. HiveMetastore server reads hive-site.xml as well as hivemetastore-site.xml configuration files that are available in the $HIVE_CONF_DIR or in the classpath. If metastore is being used in embedded mode (ie hive.metastore.uris is not set or empty) in hive commandline or hiveserver2, the hivemetastore-site.xml gets loaded by the parent process as well. The value of hive.metastore.uris is examined to determine this, and the value should be set appropriately in hive-site.xml . Certain metastore configuration parameters like hive.metastore.sasl.enabled, hive.metastore.kerberos.principal, hive.metastore.execute.setugi, hive.metastore.thrift.framed.transport.enabled are used by the metastore client as well as server. For such common parameters it is better to set the values in hive-site.xml, that will help in keeping them consistent. HiveServer2 reads hive-site.xml as well as hiveserver2-site.xml that are available in the $HIVE_CONF_DIR or in the classpath. If hiveserver2 is using metastore in embedded mode, hivemetastore-site.xml also is loaded. The order of precedence of the config files is as follows (later one has higher precedence) - hive-site.xml -> hivemetastore-site.xml -> hiveserver2-site.xml -> '-hiveconf' commandline parameters

    Description

      There is currently a single configuration file for all components in hive. ie, components such as hive cli, hiveserver2 and metastore all read from the same hive-site.xml.
      It will be useful to have a server specific hive-site.xml, so that you can have some different configuration value set for a server. For example, you might want to enabled authorization checks for hiveserver2, while disabling the checks for hive cli. The workaround today is to add any component specific configuration as a commandline (-hiveconf) argument.

      Using server specific config files (eg hiveserver2-site.xml, hivemetastore-site.xml) that override the entries in hive-site.xml will make the configuration much more easy to manage.

      Attachments

        1. HIVE-7342.1.patch
          16 kB
          Thejas Nair
        2. HIVE-7342.2.patch
          22 kB
          Thejas Nair

        Issue Links

          Activity

            People

              thejas Thejas Nair
              thejas Thejas Nair
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: