Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Deploy PrestoDB on Cassandra

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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. Decompress

Tar zxvf presto-server-0.131.tar.gz

Mv presto-server-0.131 / presto

4. Change the owner to nosql

Chown nosql.nosql / presto

5. Set up a data catalog

Mkdir / prestodata

Chown nosql.nosql / prestodata

Also set up on node2, node3, node4 and node5

6. Configuration file editing

Node.properties: environment configuration for each node

Jvm.config:jvm parameter

Config.properties: configuring Presto Server parameter

Log.properties: configure log level

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 to change ownership

Chown nosql.nosql / presto-R

8. Change the configuration file of each node

Vim / presto/etc/node.properties

Change

Node.id=2 (node.id=3, 4, 5, uuid is recommended)

Vim config.properties

Change:

Coordinator=false

Http-server.http.port=8080

Discovery.uri= http://node1:8080

9. Start

Start coordinator first

On node1

/ presto/bin/launcher run

Restart worker

On 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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report