Adding the Hive Connector - Presto on Teradata Appliance for Hadoop

Presto on Teradata Appliance for Hadoop 6 Installation, Configuration, and Upgrade Guide

Product
Presto on Teradata Appliance for Hadoop
Release Number
157t
Published
February 2017
Language
English (United States)
Last Update
2018-04-17
dita:mapPath
jpl1484678832656.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
jpl1484678832656
Product Category
Open Source
Replace the FQDNs in the examples with the FQDNs for your Hadoop nodes.
  1. On the prestoadmin node, log in as prestoadmin.
  2. Create and open the hive.properties file.
    1. cd /home/prestoadmin/.prestoadmin/catalog
    2. vi hive.properties
  3. Set up the hive.properties file as shown in the example, with the following entries.
    Entry Value
    connector.name= hive-hadoop2
    hive.metastore.uri= <FQDN and port number of the Hive metastore Thrift service used by default>,<FQDN and port number of the Hive metastore Thrift service used as a backup in a high availability system>
    hive.config.resources= /etc/hadoop/conf/core-site.xml,/etc/hadoop/conf/hdfs-site.xml
    hive.allow-drop-table= true
    This entry is used later for testing whether Presto is working for non-root users.
    The example shows a completed hive.properties file for a high availability system with two Hive metastores.
    connector.name=hive-hadoop2
    hive.metastore.uri=thrift://xyz721m1.customer.com:9083,thrift://xyz721m2.customer.com:9083
    hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop/conf/hdfs-site.xml
    hive.allow-drop-table=true
  4. Save the hive.properties file. ESC:wq
  5. Change the permissions on the hive.properties file.
    1. chown prestoadmin:prestoadmin hive.properties
    2. chmod 660 hive.properties
    3. [Optional] View the permissions of the hive.properties file. ls -l Something similar to the following displays.
      total 8
      -rw-rw---- 1 prestoadmin prestoadmin 162 Aug 30 13:34 hive.properties
      -rw-rw---- 1 prestoadmin prestoadmin 19 Aug 30 08:18 tpch.properties
  6. Add the hive connector. /opt/prestoadmin/presto-admin catalog add hive

    Something similar to the following displays.

    Deploying hive.properties connector configurations on: xyz721d5.customer.com
    ...
    Deploying hive.properties connector configurations on: xyz721m1.customer.com
    
  7. Restart Presto. Always restart Presto when a connector is added or removed. /opt/prestoadmin/presto-admin server restart

    Something similar to the following displays.

    [xyz721m1.customer.com] out: Stopping presto
    [xyz721d5.customer.com] out: Stopping presto
    ...
    [xyz721d2.customer.com] out: Stopping presto
    [xyz721m1.customer.com] out:
    [xyz721d5.customer.com] out: Stopped 40000
    [xyz721d4.customer.com] out: Stopped 37298
    ...
    [xyz721d3.customer.com] out: Stopped 26326
    [xyz721d5d5.customer.com] out:
    ...
    [xyz721m1.customer.com] out: Starting presto
    [xyz721m1.customer.com] out: Started as 27958
    [xyz721m1.customer.com] out:
    Waiting to make sure we can connect to the Presto server on 
    xyz721m1.customer.com, please wait. This check will time out after 
    2 minutes if the server does not respond.
    [xyz721d5.customer.com] out: Starting presto
    [xyz721d3.customer.com] out: Starting presto
    ...
    Server started successfully on: xyz721m1.customer.com
    ...
    Server started successfully on: xyz721d2.customer.com
  8. Verify that the Hive connector is available. /opt/prestoadmin/presto-admin server status

    Something similar to the following displays. Note that the hive connector shows up in the catalog field.

    Server Status:
       xyz721m1.customer.com(IP: 39.0.8.15, Roles: coordinator): Running 
       Node URI(http): http://39.0.8.15:8285
       Presto Version: 0.148-t.1.2 
       Node status: active
       Catalogs: hive, system, tpch 
    Server Status: 
       xyz721d2.customer.com(IP: 39.0.8.17, Roles: worker): Running 
       Node URI(http): http://39.0.8.17:8285
       Presto Version: 0.148-t.1.2 
       Node status: active
       Catalogs: hive, system, tpch
    ...
    Server Status: 
       xyz721d5.customer.com(IP: 39.0.8.21, Roles: worker): Running 
       Node URI(http): http://39.0.8.21:8285
       Presto Version: 0.148-t.1.2 
       Node status: active
       Catalogs: hive, system, tpch