Sentry enables role-based, fine-grained authorization for HiveServer2 and Cloudera Impala. It provides classic database-style authorization for Hive and Impala. For more information, and instructions on configuring Sentry for Hive and Impala, see Sentry Service Configuration.
Installing and Upgrading Sentry
- If you use Cloudera Manager, do not use these command-line instructions.
- This information applies specifically to CDH 5.2.x. If you use an earlier version of CDH, see the documentation for that version located at Cloudera Documentation.
Upgrading Sentry from CDH 4 to CDH 5
To upgrade Sentry from CDH 4 to CDH 5, you must uninstall the old version and install the new version. If you have already performed the steps to uninstall CDH 4 and all components, as described under Upgrading from CDH 4 to CDH 5, you can skip Step 1 below and proceed with installing the new CDH 5 version of Sentry.
- Remove the CDH 4 Version of
Remove Sentry as follows, depending on your operating system:
OS Command RHEL
$ sudo yum remove sentry
$ sudo zypper remove sentry
Ubuntu or Debian
$ sudo apt-get remove sentry
- Install the New Version of Sentry
Follow instructions in the Installing Sentry section to install the CDH 5 version of Sentry.Important
- If you install a newer version of a package that is already on the system, configuration files that you have modified will remain intact.
- If you uninstall a package, the package manager renames any configuration files you have modified from <file> to <file>.rpmsave. If you then re-install the package (probably to install a new version) the package manager creates a new <file> with applicable defaults. You are responsible for applying any changes captured in the original configuration file to the new configuration file. In the case of Ubuntu and Debian upgrades, you will be prompted if you have made changes to a file for which there is a new version; for details, see Automatic handling of configuration files by dpkg.
The upgrade is now complete.
Upgrading Sentry from CDH 5.x to the latest version of CDH 5
- Stop the Sentry ServiceTo stop the Sentry service, identify the PID of the Sentry Service and use the kill command to end the process:
ps -ef | grep sentry kill -9 <PID>Replace <PID> with the PID of the Sentry Service.
- Install the New Version of
Use the appropriate commands from the Installing Sentry section below to install the latest CDH 5 version of Sentry.
- Upgrade Sentry Database
SchemaUse the Sentry schematool to upgrade the database schema as follows:
bin/sentry --command schema-tool --conffile <sentry-site.xml> --dbType <db-type> --upgradeSchemaWhere <db-type> should be either mysql, postgres or oracle.
- Start the Sentry Service
- Set the SENTRY_HOME and HADOOP_HOME parameters.
- Run the following
bin/sentry --command service --conffile <sentry-site.xml>
Installing SentryInstall Sentry as follows, depending on your operating system:
$ sudo yum install sentry
$ sudo zypper install sentry
|Ubuntu or Debian||
$ sudo apt-get update; $ sudo apt-get install sentry