Manual construction of hadoop big data platform - sqoop

Sqoop mainly interacts data with hadoop in relational databases. As a client tool for hadoop. Can be installed on any node, I installed on the master.

1.tar -zxvf /opt/sqoop-1.4.6-cdh5.8.0.tar.gz

2. Modify environment variables

vi /etc/profile

join in:

export SQOOP_HOME=/opt/sqoop-1.4.6-cdh5.8.0

export PATH=$PATH:$SQOOP_HOME/bin

Excuting an order:

source /etc/profile

3. Verify success

[hadoop@master ~]$ sqoop list-databases --connect jdbc:mysql://master:3306/ --username root -password 123456

Warning: /opt/sqoop-1.4.6-cdh5.8.0/../hcatalog does not exist! HCatalog jobs will fail.

Please set $HCAT_HOME to the root of your HCatalog installation.

Warning: /opt/sqoop-1.4.6-cdh5.8.0/../accumulo does not exist! Accumulo imports will fail.

Please set $ACCUMULO_HOME to the root of your Accumulo installation.

Warning: /opt/sqoop-1.4.6-cdh5.8.0/../zookeeper does not exist! Accumulo imports will fail.

Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.

17/03/23 15:44:43 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.8.0

17/03/23 15:44:43 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.

17/03/23 15:44:43 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.

information_schema

hive

hue

mysql

test

[hadoop@master ~]$ 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326394225&siteId=291194637