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

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 file. Here are the relevant lines that you should edit

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

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 command using root user.

cd /usr/local/ranger-presto-plugin

d. verify the contents of in $PRESTO_HOME/conf.

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