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
PROPERTY | VALUE | DESCRIPTION |
---|---|---|
POLICY_MGR_URL | http://localhost:6080 | Pull the address of the Ranger policy |
REPOSITORY_NAME | prestodev | Presto service name |
COMPONENT_INSTALL_DIR_NAME | /opt/presto/ | Presto component installed directory |
XAAUDIT.SOLR.ENABLE | true | Whether to save the audit log true: save the audit log false: do not save the audit log |
XAAUDIT.SOLR.URL | http://localhost:8983/solr/ranger_audits | The address of the audit log |
CUSTOM_USER | presto | The user of installing the Presto component |
CUSTOM_GROUP | presto | The 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.
PROPERTY | VALUE | DESCRIPTION |
---|---|---|
access-control.name | ranger | Fixed. |
ranger.principal | presto-principal | Principal name in case Kerberos is used |
ranger.keytab | /etc/security/keytabs/presto.headless.keytab | Keytab to use in case of Kerberos |
e. Restart apache presto
f. Restart apache ranger.
|
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