Apache Presto – Configuration and administration tools

Tram Ho

Today’s article will cover the configuration settings for Presto and its administration interface.

1. Configuration

Presto Verifier

Presto Verifier can be used to test Presto against another database (such as MySQL) or to test two Presto clusters against each other.

Create database in MySQL

Open MySQL Server and create a database using the following command:

You have just created a database “test” in the server. Create the table and load it with the following query.

Add Configuration Settings

Create a property file to configure the verifier –

Here, in the query-database field , enter the following details – mysql database name, username and password.

Download JAR file

Download the Presto-verifier jar file at the following link:https://repo1.maven.org/maven2/com/facebook/presto/presto-verifier/0.149/ => Download presto-verifier-0.149-executable.jar

Execute JAR

Execute the JAR file using the command

Run Verifier

Run verifier using the following command:

Create Table

Create a simple table in the “test” database using the following query:

Insert table

After creating the table, insert 2 records using the following query:

Run the Verifier query

Execute the following sample query in the verifier terminal (./verifier config.propeties) to check the verifier result.

Query form

Here, the query select * from mysql.test.product mentions the list mysql, test is the database name, and product is the table name. In this way you can access the mysql connector using the Presto server.

Here, two similar select queries are tested against each other to see performance. Similarly, you can run other queries to test the performance results. You can also connect 2 Presto clusters to check performance results.

2. Administrative tools

In this chapter, let’s discuss the administrative tools in Presto. Let’s get started with Preso’s Web Interface.

Web display

Presto provides a web interface for tracking and managing queries. It can be accessed from the port number specified in the Config Properties of the coordinator. Start the Presto server and the Presto CLI. You can then access the web interface from the following url – http: // localhost: 8080 /

You will see an interface similar to the one above.

Here, the main page has a query list with information such as the unique query ID, query text, query status, percent complete, username, and query origin. The last running queries first, followed by the completed or incomplete queries are displayed at the bottom.

Performance tuning on the Presto

If the Presto cluster is experiencing any performance related issues, change your default configuration settings to the following.

Config Properties
  • task. info -refresh-max-wait – Reduces the coordinator workload.
  • task.max-worker-threads – Split process and assign to each worker node.
  • distributed-joins-enabled – Hash-enabled distributed joins.
  • node-scheduler.network-topology – Set the network topology to the scheduler.
Install JVM

Change your default JVM settings to the following. This will be helpful for diagnosing garbage collection problems.

Share the news now

Source : Viblo