Configuring the Tomcat Server

This topic describes how to configure and manage the Tomcat server for the Hive-on-Tez user interface.

Extracting the Tomcat Server

You can only extract the Tomcat server after you manually install Tez. Tez has a built-in Tomcat Server archive with the latest version. You can find the archive at:
$TEZ_HOME/tomcat/tomcat.tar.gz
To extract the Tomcat server, use these commands in the command line:
cd $TEZ_HOME/tomcat/
sudo tar -zxvf tomcat.tar.gz -C $TEZ_HOME/tomcat
Change the permissions for the /tomcat directory to the user who will be running the Tomcat server:
sudo chown -R <$USER>:<$USER_GROUP> $TEZ_HOME/tomcat

Configuring the Timeline Server Base URL and Resource Manager WEB URL

To set the timelineBaseUrl and RMWebUrl, update the Tez configuration file.

The file location is:
$TEZ_HOME/tomcat/apache-tomcat-<version>/webapps/tez-ui/config/configs.js
To configure the Timeline Server Base URL and Resource Manager WEB URL:
  1. Replace TIME_LINE_BASE_URL with the real URL. For example:
    • For a non-secure configuration:
      'http://localhost:8188'
    • For a secure configuration:
      'https://localhost:8190'
  2. Replace RM_WEB_URL with the real URL. For example:
    • For a non-secure configuration:
      'http://localhost:8088'
    • For a secure configuration:
      'https://localhost:8090'
    • For a proxy server, specify the user-defined URL in the yarn-site.xml file, as shown:
      <property>
         <name>yarn.web-proxy.address</name>
         <value><hostname>:<port></value>
      </property>
      

      Replace RM_WEB_URL with the value specified as the yarn.web-proxy.address property.

Configuring SSL for the Tomcat Server on a Secure Cluster

To start the Tomcat server with the exposed SSL port, edit the following properties in the $TEZ_HOME/tomcat/apache-tomcat-<version>/conf/server.xml file, replacing <ssl-keystore-password> with the real SSL keystore password.

  1. Find the default configuration of the exposed port:
    <Connector port="9383" 
      protocol="HTTP/1.1"
      connectionTimeout="20000"
      redirectPort="8443" />
  2. Change the configuration for SSL:
    <Connector port="9393" 
    SSLEnabled="true"
    maxThreads="150" 
    scheme="https" 
    secure="true" 
    clientAuth="false" 
    sslProtocol="TLS"
    keystoreFile="/opt/mapr/conf/ssl_keystore"
    keystorePass="<ssl-keystore-password>"/>
NOTE
If you used Installer version 1.15.0.0 to install the cluster, see Hive-on-Tez User Interface Known Issues.

Starting and Stopping the Tomcat Server

To start the Tomcat server, run this script:
$TEZ_HOME/tomcat/apache-tomcat-<version>/bin/startup.sh
To stop the Tomcat server, run this script:
$TEZ_HOME/tomcat/apache-tomcat-<version>/bin/shutdown.sh
NOTE
The timelineBaseUrl maps to the YARN Timeline Server, and the RMWebUrl maps to the YARN Resource Manager. For default port information, see Ports Used by HPE Ezmeral Data Fabric Software.