Since no released version of CDH supports the version of Apache Sentry that CDAP is integrating with, we cannot use Cloudera Manager to set up Sentry for testing. This page lists the steps to build Sentry from source and start the on a CDH cluster created using Coopr.
Setting up MySQL (Optional)
- Clone Apache Sentry source from https://github.com/apache/incubator-sentry
- There is a problem compiling the sentry-tests module right now, so comment it out temporarily from the root
pom.xmluntil we find a fix
mvn clean install -DskipTestswill generate a sentry distribution under
sentry-dist/target/apache-sentry-1.7.0-incubating-SNAPSHOT-bin/. Only takes a few mins.
sentry-site.xmlin the conf directory with the following contents. This is a bare-minimum sentry-site.xml without kerberos.
Set up the sentry policy store using a Derby DB
Or, for MySQL:
Note: mysql jdbc driver jar should be in sentry/lib. Also, sentry does not accept a user without password for mysql (and perhaps postgresql etc)
Start the sentry service
If you get the following error, it is because of an old
hadoop classpath. If you see this, remove the file
/usr/lib/hadoop-mapreduce/metrics-core-3.0.2.jaruntil we fix the error, and restart sentry using the above step.