mkdir etc
cd etc
#配置
cat >config.properties << EOF
coordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=8080
query.max-memory=50GB
query.max-memory-per-node=1GB
query.max-total-memory-per-node=2GB
discovery-server.enabled=true
discovery.uri=http://node1:8080
EOF
#jvm参数
cat > jvm.config << EOF
-server
-Xmx16G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
EOF
#log参数
cat >log.properties << EOF
com.facebook.presto = INFO
EOF
#node参数
cat >node.properties << EOF
node.environment=hjimi
node.id=node-1
node.data-dir=/home/presto/data
EOF
mkdir catalog
cd catalog
#hive template
cat >hive.properties.template << EOF
connector.name=hive-hadoop2
hive.metastore.uri=thrift://node1:9083
EOF
#mysql template
cat >mysql.properties.template << EOF
connector.name=mysql
connection-url=jdbc:mysql://192.168.30.58:3306
connection-user=imiland
connection-password=ilandll1!
EOF