HiveServer2 migrates to Router

Last updated: 2020-08-20 15:11:05

    How do I migrate HiveServer2 to a router node?

    1. Log in to the EMR Console, select the target cluster in Cluster List, and click its ID/Name to enter the cluster details page. Select Cluster Resources > Resource Management to enter the resource management page, and then click Scale Out to enter the cluster scale-out page.

      On the cluster scale-out page, select Router as the Node Type and Hive-2.3.3 as the Services, and configure other options as needed.
    2. Log in to the router node and modify the configuration file hive-site.xml.
    3. Disable the Hive service on the master node.
      In Cluster Services, select Operation > Role Management of the Hive component, pause all Hive processes on the master node, and restart the Hive processes on the router node.
    4. Conduct a test.
      On the router node, check whether HiveServer2 can be properly connected to and existing tables can be queried; and if so, the migration is successful.
    5. Modify the Hue configuration file to route requests to the Hive component on the router node.
      vim /usr/local/service/knox/conf/topologies/emr.xml   Modify `HIVE` and `HIVEUI`.
      <service>
       <role>HIVE</role>
       <url>http://Router-ip:7003</url>
       <param>
           <name>replayBufferSize</name>
           <value>8</value>
       </param>
      </service>
      <service>
       <role>HIVEUI</role>
       <url>http://Router-ip:7003</url>
      </service>
      Run the following command to restart Knox.
      su hadoop 
      /usr/local/service/knox/bin/gateway.sh stop ; /usr/local/service/knox/bin/gateway.sh start

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help