This is the documentation for Cloudera Enterprise 5.8.x. Documentation for other versions is available at Cloudera Documentation.

Installing and Upgrading the Sentry Service

Adding the Sentry Service

Use one of the following sections to add/install the Sentry service:

Adding the Sentry Service Using Cloudera Manager

Minimum Required Role: Cluster Administrator (also provided by Full Administrator)

  1. On the Home > Status tab, click to the right of the cluster name and select Add a Service. A list of service types display. You can add one type of service at a time.
  2. Select the Sentry service and click Continue.
  3. Select the services on which the new service should depend. All services must depend on the same ZooKeeper service. Click Continue.
  4. Customize the assignment of role instances to hosts. The wizard evaluates the hardware configurations of the hosts to determine the best hosts for each role. These assignments are typically acceptable, but you can reassign role instances to hosts of your choosing, if desired.

    Click a field below a role to display a dialog box containing a pageable list of hosts. If you click a field containing multiple hosts, you can also select All Hosts to assign the role to all hosts or Custom to display the pageable hosts dialog box.

    The following shortcuts for specifying hostnames are supported:
    • Range of hostnames (without the domain portion)
      Range Definition Matching Hosts
      10.1.1.[1-4] 10.1.1.1, 10.1.1.2, 10.1.1.3, 10.1.1.4
      host[1-3].company.com host1.company.com, host2.company.com, host3.company.com
      host[07-10].company.com host07.company.com, host08.company.com, host09.company.com, host10.company.com
    • IP addresses
    • Rack name

    Click the View By Host button for an overview of the role assignment by host ranges.

  5. Configure database settings. You can use either an embedded or a custom database.
    1. Choose the database type:
      • Leave the default setting of Use Embedded Database to have Cloudera Manager create and configure required databases. Make a note of the auto-generated passwords.
      • Select Use Custom Databases to specify external databases.
        1. Enter the database host, database type, database name, username, and password for the database that you created when you set up the database.
    2. Click Test Connection to confirm that Cloudera Manager can communicate with the database using the information you have supplied. If the test succeeds in all cases, click Continue. Otherwise check and correct the information you have provided for the database and then try the test again. (For some servers, if you are using the embedded database, you will see a message saying the database will be created at a later step in the installation process.) The Review Changes page displays.
  6. Click Continue then click Finish. You are returned to the Home page.
  7. Verify the new service is started properly by checking the health status for the new service. If the Health Status is Good, then the service started properly.
  8. To use the Sentry service, begin by enabling Hive Impala, and Search for the service.

Installing Sentry Using the Command Line

Use the following the instructions, depending on your operating system, to install the latest version of Sentry.
  Important: Configuration files
  • 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.
OS Command
RHEL
$ sudo yum install sentry
SLES
$ sudo zypper install sentry
Ubuntu or Debian
$ sudo apt-get update; 
$ sudo apt-get install sentry

Starting the Sentry Service

Perform the following steps to start the Sentry service on your cluster.
  1. Set the SENTRY_HOME and HADOOP_HOME parameters.
  2. Create the Sentry database schema using the Sentry schematool. Sentry, by default, does not initialize the schema. The schematool is a built-in way for you to deploy the backend schema required by the Sentry service. For example, the following command uses the schematool to initialize the schema for a MySQL database.
    bin/sentry --command schema-tool --conffile <sentry-site.xml> --dbType mysql --initSchema
    Alternatively, you can set the sentry.verify.schema.version configuration property to false. However, this is not recommended.
  3. Start the Sentry service.
    bin/sentry --command service --conffile <sentry-site.xml>

Upgrading the Sentry Service

Use one of the following sections to upgrade the Sentry service:

Upgrading the Sentry Service Using Cloudera Manager

If you have a cluster managed by Cloudera Manager, go to Upgrading CDH and Managed Services Using Cloudera Manager and follow the instructions depending on the version of CDH you are upgrading to. If you are upgrading from CDH 5.1, you will notice an extra step in the procedure to upgrade the Sentry database schema.

Upgrading the Sentry Service Using the Command Line

  1. Stop the Sentry service by identifying 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.
  2. Remove the previous version of Sentry.
    OS Command
    RHEL
    $ sudo yum remove sentry
    SLES
    $ sudo zypper remove sentry
    Ubuntu or Debian
    $ sudo apt-get remove sentry
  3. Install the new version of Sentry.
    OS Command
    RHEL
    $ sudo yum install sentry
    SLES
    $ sudo zypper install sentry
    Ubuntu or Debian
    $ sudo apt-get update; 
    $ sudo apt-get install sentry
  4. (From CDH 5.1 to CDH 5.x) Upgrade Sentry Database Schema
    Use the Sentry schematool to upgrade the database schema as follows:
    bin/sentry --command schema-tool --conffile <sentry-site.xml> --dbType <db-type> --upgradeSchema
    Where <db-type> should be either mysql, postgres or oracle.
  5. Start the Sentry Service
    1. Set the SENTRY_HOME and HADOOP_HOME parameters.
    2. Run the following command:
      bin/sentry --command service --conffile <sentry-site.xml>
Page generated July 8, 2016.