Installing Apache Sqoop2

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
PROPERTYVALUEDESCRIPTION
POLICY_MGR_URLhttp://localhost:6080Pull the address of the sqoop2 policy
REPOSITORY_NAMEsqoopdevsqoop2 service name
COMPONENT_INSTALL_DIR_NAME/opt/sqoop/sqoop-1.99.7-bin-hadoop200sqoop2 component installed directory
XAAUDIT.SOLR.ENABLEtrue

Whether to save the audit log

true: save the audit log

false: do not save the audit log

XAAUDIT.SOLR.URLhttp://localhost:8983/solr/ranger_auditsThe address of the audit log
CUSTOM_USERsqoop2The user of installing the kylin component
CUSTOM_GROUPsqoop2The 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

 

  • No labels