Presto 101t Documentation

4.2. Readme for HDP VM Sandbox

4.2. Readme for HDP VM Sandbox

This is a VirtualBox sandbox image that can be used to experiment with the Presto distribution. The credentials for the VM are:

user: root
password: presto

The image is based on Hortonworks HDP 2.2.4 and contains following components:

  • Presto is installed in /usr/lib/presto. It it setup with Hive, TPCH and JMX connectors. Logs are located in /var/log/presto.
  • prestoadmin is installed in /opt/prestoadmin. You can run prestoadmin by executing: /opt/prestoadmin/presto-admin.
  • For documentation of the Presto release embedded in this VM see: Presto Documentation.

In addition the image contains:

  • The Hortonworks Hadoop distribution running in pseudo distributed mode.
  • Hive (setup to use YARN).
  • Hive Metastore.
  • Zookeeper (used by Hive).
  • MySQL (used by Hive Metastore).

The following sample tables are loaded to HDFS and visible from Hive:

  • nation TPC-H table.
  • region TPC-H table.

The presto-cli executable JAR can be found in /root and should be used to execute Presto queries. Please wait a few moments after the image boots for the Presto service to start.

Usage example:

[root@presto-demo-hdp ~]# java -jar /root/presto-cli.jar --catalog hive
show tables;
 Table
--------
 nation
 region
(2 rows)

presto:default> select * from nation;
...

JDBC Driver

You can also find the Presto JDBC JAR on the VM (/root/presto-jdbc.jar). It can be used to connect to the Presto server running in the VM from your Java application.

Hadoop Services Startup

After the VM boots, some Hadoop services may still not be started. Starting them takes a couple of minutes depending on the host machine. You can monitor the startup progress of these services through the Ambari UI, which is accessible on port 8081. http://<guest ip address>:8081/. The credentials are admin/admin.