1. Prepare a 5-node Cassandra Cluster
Slightly
Node1,node2,node3,node4,node5
2. Download Presto on Node1
wget https://repo1.maven.org/maven2/com/facebook/presto/presto-server/0.131/presto-server-0.131.tar.gz
3. Decompression
Tar zxvf presto-server-0.131.tar.gz
MV Presto-server-0.131/presto
4. Change the owner to be NoSQL
Chown Nosql.nosql/presto
5. Set up Data Catalog
Mkdir/prestodata
Chown Nosql.nosql/prestodata
In Node2, Node3, Node4, NODE5 also to establish
6. configuration file Editing
Node.properties: Environment configuration for each node
JVM.CONFIG:JVM parameters
Config.properties: Configuring Presto Server Parameters
Log.properties: Configuring Log Levels
Configuration of Catalog Properties:catalog
mkdir/presto/etc/
Vim/presto/etc/node.properties
Join:
Node.environment=production
Node.id=1
Node.data-dir=/prestodata
Vim/presto/etc/jvm.config
Join:
-server
-xmx2g
-xx:+useconcmarksweepgc
-xx:+explicitgcinvokesconcurrent
-xx:+cmsclassunloadingenabled
-xx:+aggressiveopts
-xx:+heapdumponoutofmemoryerror
-xx:onoutofmemoryerror=kill-9%p
-xx:reservedcodecachesize=150m
Vim/presto/etc/config.properties
Join:
Coordinator=true
Node-scheduler.include-coordinator=false
http-server.http.port=8080
Discovery-server.enabled=true
discovery.uri=http://node1:8080
Vim/presto/etc/log.properties
Join:
Com.facebook.presto=info
Vim/presto/etc/jmx.properties
Join:
Connector.name=jmx
Mkdir/presto/etc/catalog
Vim/presto/etc/catalog/cassandra.properties
Join:
Connector.name=cassandra
Cassandra.contact-points=node2,node3,node4,node5
7. Distribution
Scp-r/presto node2:/
Scp-r/presto node3:/
Scp-r/presto node4:/
Scp-r/presto node5:/
Go to Node2, Node3, node4, NODE5 change owner
Chown Nosql.nosql/presto-r
8. Change each node's respective configuration file
Vim/presto/etc/node.properties
Change
node.id=2 (Node.id=3, 4, 5, use UUID recommended)
Vim Config.properties
Change:
Coordinator=false
http-server.http.port=8080
discovery.uri=http://node1:8080
9. Start
Start Coordinator first
On the Node1.
/presto/bin/launcher Run
Start worker again
On the NODE2/3/4/5.
/presto/bin/launcher Run
10. Other
Download CLI
wget Https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.100/presto-cli-0.100-executable.jar
MV Presto-cli-0.100-executable.jar PRESTO-CLI
./presto-cli--server node1:8080--catalog Cassandra--schema default
Enter SQL:
Use Mykeyspace;
Select COUNT (*) from users;
This article is from the "7727197" blog, please be sure to keep this source http://7737197.blog.51cto.com/7727197/1727186
Deploy Prestodb on Cassandra