1.3. Configure HiveServer2 Settings

HiveServer2 is used for remote concurrent access to Hive. HiveServer2 settings can be accessed from Ambari >Tez > Configs > Advanced or in hive-site.xml

You must restart HiveServer2 in order for updated settings to take effect.

  • Hive Execution Engine -- Set this to "tez" to execute Hive queries using Tez:

    hive.execution.engine=tez
  • Enable Default Sessions -- Uses a default session for jobs using HiveServer2 even if they don’t use Tez. Set this to “true”.

    hive.server2.tez.initialize.default.sessions=true
  • Specify the HiveServer2 Queues -- A comma-separated list of queues. For example, to specify queues “hive1” and “hive2”:

    hive.server2.tez.default.queues=hive1,hive2
  • Set the Number of Sessions in each Queue -- Sets the number of sessions for each queue named in hive.server2.tez.default.queues.

    hive.server2.tez.sessions.per.default.queue=1
  • Set enable.doAs to False -- Set enable.doAs to be false to use the Hive user identity rather than the individual user identities for YARN. This enhances security and reuse.

    hive.server2.enable.doAs=false

For more information on these and other HiveServer2-on-Tez configuration settings, see the "Configure Hive and HiveServer2 for Tez" subsection in the Installing HDP Manually guide.