Presto compile and install and test the connection Hive

1. Download

Source:

 git clone https://github.com/prestodb/presto.git
 mvn clean install -DskipTests  

In the Windows environment compiler error unresolved

In the Linux environment to compile success

2. Install

It is not used here to install their own translation, but the official website of the installation document manipulation, and download the installation package.

Note: You need jdk version of java 8 u92 +, otherwise it will error

2.1 Download the installation package

Download: https://repo1.maven.org/maven2/com/facebook/presto/presto-server/0.184/presto-server-0.184.tar.gz

CLI Download: https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.184/presto-cli-0.184-executable.jar

2.2 unzip

Server

tar xvf presto-server-0.184.tar.gz

CLI

mv presto-cli-0.184-executable.jar presto
chmod +x presto

2.3 configuration files

In presto-server root directory, create a folder etc

mkdir etc

 New node Configuration etc / node.properties, add the following

node.environment=production
node.id=ffffffff-ffff-ffff-ffff-ffffffffffff
node.data-dir=/var/presto/data

 New jvm configuration etc / jvm.config, add the following

-server
-Xmx16G
-XX:+UseConcMarkSweepGC
-XX:+ExplicitGCInvokesConcurrent
-XX:+CMSClassUnloadingEnabled
-XX:+AggressiveOpts
-XX:+HeapDumpOnOutOfMemoryError
-XX:OnOutOfMemoryError=kill -9 %p
-XX:ReservedCodeCacheSize=150M

 New profile etc / config.properties, as follows

coordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=8080
task.max-memory=1GB
discovery-server.enabled=true
discovery.uri=http://jiumei:8080

New files etc / log.properties, reads as follows

 com.facebook.presto=INFO

3. Start and stop

start up

bin/launcher start

stop

bin/launcher stop

4. Test connector hive

 New hive profile etc / catalog / hive.properties, as follows

connector.name=hive-hadoop2
hive.metastore.uri=thrift://master:9083

 test

./presto --server localhost:8080 --catalog hive --schema default

 5. presto disposed in the Metabase

Metabase database does not support the hive, but in many large data analysis scenarios, data is stored in the hive. Metabase is found to support the Presto, Presto and support Hive, so here is connected via Hive Presto, Presto and then Metabase access, you can operate the Hive data.

Configure the connection information, see the hive in the table.

 

Guess you like

Origin blog.csdn.net/zwahut/article/details/90638086