版本:
presto-server-0.227.tar.gz
presto-cli-0.227-executable.jar
节点:
192.168.129.8 nfcls8 master
192.168.129.7 nfcls7 slave
192.168.129.6 nfcls6 slave
192.168.129.5 nfcls5 slave
192.168.129.4 nfcls4 slave
192.168.129.3 nfcls3 slave
192.168.129.2 nfcls2 slave
192.168.129.8 nfcls8 master配置信息:
新建etc文件夹:
[root@nfcls8 presto-server-0.227]# pwd
/work/presto-server-0.227
[root@nfcls8 presto-server-0.227]# ll
total 208
drwxr-xr-x. 3 root root 84 Oct 17 2019 bin
drwxr-xr-x. 3 root root 109 Jul 15 15:31 etc
drwxr-xr-x. 2 root root 8192 Jul 15 15:28 lib
-rw-r--r--. 1 root root 191539 Oct 17 2019 NOTICE
drwxr-xr-x. 30 root root 4096 Jul 15 15:28 plugin
-rw-r--r--. 1 root root 126 Oct 17 2019 README.txt
etc下配置文件信息:
[root@nfcls8 presto-server-0.227]# cd etc/
[root@nfcls8 etc]# ll
total 16
drwxr-xr-x. 2 root root 75 Jul 15 16:42 catalog
-rw-r--r--. 1 root root 247 Jul 15 15:31 config.properties
-rw-r--r--. 1 root root 179 Jul 15 15:31 jvm.config
-rw-r--r--. 1 root root 25 Jul 15 15:31 log.properties
-rw-r--r--. 1 root root 84 Jul 15 15:31 node.properties
config.properties
[root@nfcls8 etc]# cat config.properties
coordinator=true
node-scheduler.include-coordinator=false
http-server.http.port=18080
query.max-memory=50GB
query.max-memory-per-node=5GB
query.max-total-memory-per-node=10GB
discovery-server.enabled=true
discovery.uri=http://nfcls8:18080
jvm.config
[root@nfcls8 etc]# cat jvm.config
-server
-Xmx16G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
log.properties
[root@nfcls8 etc]# cat log.properties
com.facebook.presto=INFO
node.properties
[root@nfcls8 etc]# cat node.properties
node.environment=production
node.id=node_worker8
node.data-dir=/data/presto/data
hive.properties
[root@nfcls8 catalog]# cat hive.properties
connector.name=hive-hadoop2
hive.metastore.uri=thrift://nfcls8:9083
hive.config.resources=/work/hadoop-2.7.7/etc/hadoop/core-site.xml,/work/hadoop-2.7.7/etc/hadoop/hdfs-site.xml
hive.allow-drop-table=true
jmx.properties
[root@nfcls8 catalog]# cat jmx.properties
connector.name=jmx
mysql.properties
[root@nfcls8 catalog]# cat mysql.properties
connector.name=mysql
connection-url=jdbc:mysql://192.168.129.1:3306
connection-user=root
connection-password=secret
其它slave 配置信息:
新建etc文件夹:
[root@nfcls7 presto-server-0.227]# pwd
/work/presto-server-0.227
[root@nfcls7 presto-server-0.227]# ll
total 208
drwxr-xr-x. 3 root root 84 Jul 15 15:29 bin
drwxr-xr-x. 3 root root 109 Jul 15 15:32 etc
drwxr-xr-x. 2 root root 8192 Jul 15 15:29 lib
-rw-r--r--. 1 root root 191539 Jul 15 15:29 NOTICE
drwxr-xr-x. 30 root root 4096 Jul 15 15:29 plugin
-rw-r--r--. 1 root root 126 Jul 15 15:29 README.txt
etc下配置文件信息:
[root@nfcls7 presto-server-0.227]# cd etc/
[root@nfcls7 etc]# ll
total 16
drwxr-xr-x. 2 root root 102 Jul 15 15:54 catalog
-rw-r--r--. 1 root root 175 Jul 15 15:32 config.properties
-rw-r--r--. 1 root root 179 Jul 15 15:32 jvm.config
-rw-r--r--. 1 root root 25 Jul 15 15:32 log.properties
-rw-r--r--. 1 root root 84 Jul 15 15:32 node.properties
config.properties
[root@nfcls7 etc]# cat config.properties
coordinator=false
http-server.http.port=18080
query.max-memory=50GB
query.max-memory-per-node=5GB
query.max-total-memory-per-node=10GB
discovery.uri=http://nfcls8:18080
jvm.config
[root@nfcls7 etc]# cat jvm.config
-server
-Xmx16G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
log.properties
[root@nfcls7 etc]# cat log.properties
com.facebook.presto=INFO
node.properties
[root@nfcls7 etc]# cat node.properties
node.environment=production
node.id=node_worker7
node.data-dir=/data/presto/data
hive.properties
[root@nfcls7 catalog]# cat hive.properties
connector.name=hive-hadoop2
hive.metastore.uri=thrift://nfcls8:9083
hive.config.resources=/work/hadoop-2.7.7/etc/hadoop/core-site.xml,/work/hadoop-2.7.7/etc/hadoop/hdfs-site.xml
hive.allow-drop-table=true
jmx.properties
[root@nfcls8 catalog]# cat jmx.properties
connector.name=jmx
mysql.properties
[root@nfcls8 catalog]# cat mysql.properties
connector.name=mysql
connection-url=jdbc:mysql://192.168.129.1:3306
connection-user=root
connection-password=secret
先启动master,后启动slave,依次启动。
[root@nfcls8 presto-server-0.227]# pwd
/work/presto-server-0.227
[root@nfcls8 presto-server-0.227]# ./bin/launcher start
大功告成:
访问:http://192.168.129.8:18080/ui/
将presto-cli-0.227-executable.jar制作为可执行文件presto-cli ,即可做任何操作了。
[root@nfcls8 work]# cat ./presto.sh
./presto-cli --server nfcls8:18080 --catalog hive --schema default --debug
[root@nfcls8 work]# ./presto.sh
presto:default>