Installation and use of sqoop
This article mainly explains the "installation and use of sqoop", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "the installation and use of sqoop" bar!
# the decompression package is downloaded from http://sqoop.apache.org/.
Tar-xvf sqoop-1.4.5.tar.gz
Ln-s sqoop-1.4.5.bin__hadoop-2.5.0 sqoop
# add environment variables to ~ / .bashrc
Export SQOOP_HOME=/opt/huawei/hbase/sqoop
Export PATH=$SQOOP_HOME/bin:$PATH
# just import the jdbc jar of oracle.
Cp / opt/oracle/product/11g/db/sqldeveloper/jdbc/lib/ojdbc14.jar / opt/huawei/hbase/sqoop/lib/
# modify configuration file
Cd / home/mycluster/sqoop/conf
Cp sqoop-env-template.sh sqoop-env.sh
Vi sqoop-env.sh
Export HADOOP_COMMON_HOME=/opt/huawei/hbase/hadoop-2.5.0
Export HADOOP_MAPRED_HOME=/opt/huawei/hbase/hadoop-2.5.0/share/hadoop/mapreduce
# Test whether the link oracle is normal. If you return the database list, you can
Sqoop list-databases-connect jdbc:oracle:thin:@192.168.193.37:1521:hispacedb-username hwmarket-password hwmarket37
= Common errors =
# when an error is reported, such as NoSuchMethod cannot be found, it means that the jar package of mapreduce cannot be found because of the environment variable. Just send mapreduce's jar copy directly.
Copy ~ / hadoop-2.5.0/share/hadoop/mapreduce/*.jar ~ / sqoop/lib/
Reference: http://blog.csdn.net/zhangzhaokun/article/details/44313531
# the following error occurred:
Error: Could not find or load main class org.apache.sqoop.Sqoop
Solution: http://blog.chinaunix.net/uid-22948773-id-3563685.html
The JAR package is missing. Put the sqoop-1.4.5.jar package in the sqoop/lib/ directory.
Jar is available from the
Look inside the http://mirror.bit.edu.cn/apache/sqoop/1.4.5/sqoop-1.4.5.bin__hadoop-2.0.4-alpha.tar.gz.
Thank you for your reading, the above is the content of "the installation and use of sqoop". After the study of this article, I believe you have a deeper understanding of the installation and use of sqoop, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!