In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Operating environment, hadoop2.6.0-cdh5.5.2
Therefore, the downloaded sqoop1.4.6 is also version 5.5.2, as opposed to it.
The files are installed in / usr/local/
[root@fa01 hadoop] # tar-zxvf / home/hadoop/sqoop-1.4.6-cdh6.5.2.tar.gz-C / usr/local/
[root@fa01 hadoop] # mv. / sqoop-1.4.6-cdh6.5.2. / sqoop-1.4.6
[root@fa01 hadoop] # chown-R hadoop:hadoop. / sqoop-1.4.6
Download JDBC and put it in the sqoop-1.4.6/lib directory
[hadoop@fa01 lib] $mv mysql-connector-java-5.1.43-bin.jar / usr/local/sqoop-1.4.6/lib
Modify the configuration file and make a copy
[hadoop@fa01 conf] $cp sqoop-env-template.sh sqoop-env.sh
[hadoop@fa01 conf] $vi sqoop-env.sh
# Set path to where bin/hadoop is available
Export HADOOP_COMMON_HOME=/home/hadoop/hadoop-2.6.0-cdh6.5.2
# Set path to where hadoop-*-core.jar is available
Export HADOOP_MAPRED_HOME=/home/hadoop/hadoop-2.6.0-cdh6.5.2
Configure environment variables, adding
[hadoop@fa01 bin] $vi / home/hadoop/.bash_profile
Export SQOOP_HOME=/usr/local/sqoop-1.4.6
A warning appears:
[hadoop@fa01 bin] $. / sqoop
Warning: / home/hadoop/sqoopsqoop-1.99.7/../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: / home/hadoop/sqoopsqoop-1.99.7/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: / home/hadoop/sqoopsqoop-1.99.7/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Warning: / home/hadoop/sqoopsqoop-1.99.7/../zookeeper does not exist! Accumulo imports will fail.
Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.
Error: Could not find or load main class org.apache.sqoop.Sqoop
Solution:
[hadoop@fa01 bin] $vi configure-sqoop
After commenting out all four of the above, only the last one was wrong.
Step one, copy the jar package
[hadoop@fa01 sqoop-1.4.6] $cp sqoop-1.4.6-cdh6.5.2.jar. / lib/
Will still report the wrong message.
Second, modify the startup configuration file
[hadoop@fa01 bin] $cd / usr/local/sqoop-1.4.6/bin
Make a backup for sqoop first.
[hadoop@fa01 bin] $cp sqoop sqoop.bak
Modify
[hadoop@fa01 bin] $vi sqoop
A paragraph has been added.
Exec ${HADOOP_COMMON_HOME} / bin/hadoop jar $SQOOP_HOME/sqoop-1.4.6-cdh6.5.2.jar org.apache.sqoop.Sqoop "$@"
It's good for me to be here.
If you still report an error, put the sqoop-1.4.6-cdh6.5.2.jar under $SQOOP_HOME/ into the $SQOOP_HOME/lib directory.
Connectivity testing:
[hadoop@fa01 bin] $. / sqoop list-tables-- connect jdbc:mysql://192.111.111.111:3306/dasename-- username mysqlname-- password mysqlmima
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.