Sqoop1 Install And Test MySQL/PostgreSQL
環境: Hadoop2.7.2(NameNode HA,ResourceManage HA)+HBASE+HIVE
環境: Hadoop2.7.2(NameNode HA,ResourceManage HA)
1.下載
[root@sht-sgmhadoopnn-01 hadoop]# wget
[root@sht-sgmhadoopnn-01 hadoop]# tar xzvf sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz
[root@sht-sgmhadoopnn-01 hadoop]# ln -s /hadoop/sqoop-1.4.6.bin__hadoop-2.0.4-alpha sqoop
2.配置sqoop-env.sh
[root@sht-sgmhadoopnn-01 conf]# pwd
/hadoop/sqoop/conf
[root@sht-sgmhadoopnn-01 conf]# cp sqoop-env-template.sh sqoop-env.sh
[root@sht-sgmhadoopnn-01 conf]#
[root@sht-sgmhadoopnn-01 conf]# vi sqoop-env.sh
export HADOOP_COMMON_HOME=/hadoop/hadoop
export HADOOP_MAPRED_HOME=/hadoop/hadoop/share/hadoop/mapreduce
export HBASE_HOME=/hadoop/hbase
export HIVE_HOME=/hadoop/hive
3.配置 mysql,postgresql jdbc驅動包
[root@sht-sgmhadoopnn-01 lib]# pwd
/hadoop/sqoop/lib
[root@sht-sgmhadoopnn-01 lib]# ll
total 17088
..............
..............
-rw-r--r-- 1 root root 703265 Jul 29 21:41 mysql-connector-java-5.1.6-bin.jar
..............
..............
-rw-r--r-- 1 root root 684978 Jul 30 10:13 postgresql-9.4.1209.jre6.jar
..............
..............
[root@sht-sgmhadoopnn-01 lib]#
4.測試連線mysql,列舉databases
[root@sht-sgmhadoopnn-01 bin]# sqoop list-databases --connect jdbc:mysql://sht-sgmhadoopnn-01:3306/ --username root --password agm43gadsg
Warning: /hadoop/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /hadoop/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Warning: /hadoop/zookeeper does not exist! Accumulo imports will fail.
Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.
16/07/30 10:01:12 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
16/07/30 10:01:12 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
16/07/30 10:01:12 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
information_schema
dba
hive
hive_remote_meta
mysql
performance_schema
repl
test1
5.測試連線postgres,列舉databases
[root@sht-sgmhadoopnn-01 bin]# sqoop-list-databases --connect jdbc:postgresql://172.16.101.54:5432/denali --username denaliadmin --password "rdyhdenali"
Warning: /hadoop/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Warning: /hadoop/zookeeper does not exist! Accumulo imports will fail.
Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.
16/07/30 10:28:31 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
16/07/30 10:28:31 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
16/07/30 10:28:31 INFO manager.SqlManager: Using default fetchSize of 1000
template1
template0
postgres
denali
[root@sht-sgmhadoopnn-01 bin]#
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30089851/viewspace-2122750/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Sqoop1 From PostgreSQL to HdfsOOPSQL
- postgreSQL install pgvectorSQL
- linux mint 18.2 install postgresqlLinuxSQL
- install mysql on centosMySqlCentOS
- Install PostgreSQL8.3 in MS VistaSQL
- Install MySQL 5.7 in the DockerMySqlDocker
- install mysql from sourceMySql
- MySQL MMM Install DeployMySql
- [Mysql] 2.Mysql 5.7 Install (Windows)MySqlWindows
- [MYSQL] mysql source code install(5.7.15)MySql
- local mysql and postgresqlMySql
- Mysql 5.7.22 install for windowsMySqlWindows
- Mysql 5.7.21 install for LinuxMySqlLinux
- yum install mysql5.7MySql
- PostgreSQL vs. MySQLMySql
- Android Studio Run專案出現Failure [INSTALL_FAILED_TEST_ONLY]AndroidAI
- MySQL 5.7 mysql_install_db工具介紹MySql
- Install mysql(5.6) for Using the MySQL Yum RepositoryMySql
- MySQL Cluster install on Redhat7MySqlRedhat
- aliyun install php apache mysql nginxPHPApacheMySqlNginx
- PostgreSQL使用MySQL外表(mysql_fdw)MySql
- Mysql 通過 Mysql_install_db 建立多例項MySql
- An Overview of PostgreSQL & MySQL Cross ReplicationViewMySqlROS
- PostgreSQL與MySQL比較MySql
- PostgreSQL 工具及mysql、mongoMySqlGo
- Install MySQL(5.6.29) using RPMMySql
- Install mysql5.6 on CentOS5.5MySqlCentOS
- mysql 5.6 for linux install(three types)MySqlLinux
- mysql異常 Install/Remove of the Service Denied!MySqlREM
- Postgresql與MySQL的區別MySql
- 個人的小專案mysql_mgr_test開放了MySql
- MySQL之test資料庫預設許可權MySql資料庫
- test
- Sqoop1.99.6 Install And From MySQL To HdfsOOPMySql
- gem install mysql遇到問題。解決方案MySql
- PostgreSQL與MySQL的比較 - hackrMySql
- 多表關聯更新(mysql,oracle,postgreSQL)MySqlOracle
- webservice testWeb