THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
Installing Apache Sqoop2
- Now let’s download and install Apache sqoop2 by following the excellent instructions available on the sqoop2 site itself. Please follow the steps to install apache sqoop2(Apache sqoop2 Installation Guide).
- These instructions were written for version 1.99.7. So grab that tar (sqoop-1.99.7-bin-hadoop200.tar.gz).
- If java is not there, install JDK first.
Enabling Ranger Sqoop2 Plugins
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-1.0.0-sqoop-plugin.tar.gz sudo ln -s ranger-1.0.0-sqoop-plugin ranger-sqoop-plugin cd ranger-sqoop-plugin
b. Now let’s edit the install.properties file. Here are the relevant lines that you should edit
- Change the install.properties file
PROPERTY | VALUE | DESCRIPTION |
---|---|---|
POLICY_MGR_URL | http://localhost:6080 | Pull the address of the sqoop2 policy |
REPOSITORY_NAME | sqoopdev | sqoop2 service name |
COMPONENT_INSTALL_DIR_NAME | /opt/sqoop/sqoop-1.99.7-bin-hadoop200 | sqoop2 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 | sqoop2 | The user of installing the kylin component |
CUSTOM_GROUP | sqoop2 | The user group of installing the kylin component |
c. Now enable the sqoop2-plugin by running the enable-sqoop-plugin.sh command using root user (Remember to set JAVA_HOME before running the command)
cd /usr/local/enable-sqoop-plugin ./enable-sqoop-plugin
d.Restart apache sqoop2
e. Restart apache ranger.
sudo ranger-admin restart
f.Verify install result
- Check whether thesqoop_sqoopdev.json file exists under the /etc/ranger/kylindev/policycache directory.
- Check the sqoop2 plugin status on the Plugins tab page of the Audit function on the Ranger Web page