Presto is a high performance, distributed SQL query engine for big data.

Installing Presto

Download the Presto server tarball from the download page, and unpack it. The tarball will contain a single top-level directory which we will call the installation directory. Presto needs a data directory for storing logs, etc. We recommend creating a data directory outside of the installation directory, which allows it to be easily preserved when upgrading Presto.

Configuring Presto is out of scope of this document, but you can find excellent instructions at the deployment page.

Enabling the Ranger Presto Plugin

a. We’ll start by extracting our Ranger plugin build at the appropriate place (/usr/local).

export RANGER_VERSION=1.2.0-SNAPSHOT
cd /usr/local
sudo tar zxvf ~/ranger/target/ranger-${RANGER_VERSION}-presto-plugin.tar.gz
sudo ln -­s ranger-${RANGER_VERSION}-presto-plugin ranger-presto-plugin
cd ranger-presto-plugin


b. edit the install.properties file. Here are the relevant lines that you should edit

PROPERTYVALUEDESCRIPTION
POLICY_MGR_URLhttp://localhost:6080Pull the address of the Ranger policy
REPOSITORY_NAMEprestodevPresto service name
COMPONENT_INSTALL_DIR_NAME/opt/presto/Presto component installed directory
XAAUDIT.SOLR.ENABLEtrue

Whether to save the audit log

true: save the audit log

false: do not save the audit log

XAAUDIT.SOLR.URLhttp://localhost:8983/solr/ranger_auditsThe address of the audit log
CUSTOM_USERprestoThe user of installing the Presto component
CUSTOM_GROUPprestoThe user group of installing the Presto component

c. Now enable the presto-plugin by running the enable-presto-plugin.sh command using root user.

cd /usr/local/ranger-presto-plugin
./enable-presto-plugin.sh

d. verify the contents of access-control.properties in $PRESTO_HOME/conf.

PROPERTYVALUEDESCRIPTION
access-control.namerangerFixed.
ranger.principalpresto-principalPrincipal name in case Kerberos is used
ranger.keytab /etc/security/keytabs/presto.headless.keytabKeytab to use in case of Kerberos

e. Restart apache presto

f. Restart apache ranger.

sudo ranger-admin restart

g.Verify install result

  • Check whether the presto_prestodev.json file exists under the /etc/ranger/prestodev/policycache directory.
  • Check the presto plugin status on the Plugins tab page of the Audit function on the Ranger Web page
  • No labels