You are on page 1of 10

INSTALLING APACHE

SQOOP
Bulking data from SQL server into Hive
 Verify if your server has java installed
 java –version
 You need hadoop already installed on your server
 Try:
 hadoop version

 If you don’t have java and hadoop already installed, wont be


possible to run sqoop on your server

PREREQUISITES BEFORE INSTALLING


SQOOP
 Previous on this course, we created a folder called hadoop_install
 Create a subfolder within hadoop_install, name it sqoop
 Move into this new folder try command:
 cd sqoop

 For this example I will download sqoop from apache: http://www-


us.apache.org/dist/sqoop/1.4.6/sqoop-1.4.6.bin__hadoop-0.23.tar.gz
 You can download it using wget command from terminal
 wget http://www-us.apache.org/dist/sqoop/1.4.6/sqoop-1.4.6.bin__hadoop-0.23.tar.gz
 TO UNTAR THE FILE JUST:
 tar –zxvf sqoop-1.4.6.bin__hadoop-0.23.tar.gz
 New folder created sqoop-1.4.6.bin__hadoop-0.23

UNPACK SQOOP-1.4.6.BIN__HADOOP-0.23.TAR.GZ
 You would need to edit bash profile
 sudo nano ~/.bashrc

 To refresh the new values Type

source ~/.bashrc
 See full text next slide

EDIT BASH PROFILE


export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
export HADOOP_INSTALL=/home/hadoop/hadoop_install/hadoop-2.7.3/
export PATH=$PATH:$HADOOP_INSTALL/bin
export PATH=$PATH:$HADOOP_INSTALL/sbin
export HIVE_HOME=/home/hadoop/hadoop_install/hive/apache-hive-2.1.0-bin/
export PATH=$HIVE_HOME/bin:$PATH
export SQOOP_HOME=/home/hadoop/hadoop_install/sqoop/sqoop-1.4.6.bin__hadoop-0.23
export PATH=$PATH:$SQOOP_HOME/bin
 You need to point your sqoop file to your actual hadoop conf files
 Within path: home/hadoop/hadoop_install/sqoop/sqoop-1.4.6.bin__hadoop-
0.23/conf
 Find the file: sqoop-env-template.sh
 Modify the variables(remove the ‘#’):
 export HADOOP_MAPRED_HOME=/home/hadoop/hadoop_install/hadoop-2.7.3
 export HADOOP_COMMON_HOME=/home/hadoop/hadoop_install/hadoop-2.7.3

POINT YOUR SQOOP CONF FILE O


YOUR ACTUAL HADOOP FOLDER
CONFIGURING SQOOP
 You need to rename your file, try:
 mv sqoop-env-template.sh sqoop-env.sh

RENAME YOUR FILE


 Verify sqoop is fully installed, try:
 sqoop-versión
 If you see screen below, sqoop is installed

VERIFY SQOOP IS INSTALLED

You might also like