MySQL Import into HDFs command:
Sqoop import--connect Jdbc:mysql://192.168.0.161:3306/angel--username anqi-password anqi--table test2-- Fields-terminated-by ' t '-M 1
FAQ 1:
Warning:/opt/cloudera/parcels/cdh-5.12.0-1.cdh5.12.0.p0.29/bin/. /lib/sqoop/. /accumulo does not exist! Accumulo imports would fail.
Please set $ACCUMULO _home to the root of your Accumulo installation.
Solve:
Mkdir/var/lib/accumulo
Export Accumulo_home=/var/lib/accumulo
FAQ 2:
17/09/14 17:02:17 ERROR Sqoop. Sqoop:got exception running Sqoop:java.lang.RuntimeException:java.sql.SQLException:Access denied for user ' root ' @ ' vm3 ' (using Password:yes)
Java.lang.RuntimeException:java.sql.SQLException:Access denied for user ' root ' @ ' vm3 ' (using Password:yes)
Solve:
Do not use the root user of MySQL. Use another user such as root in 1 sentences to change to the Anqi in 2 sentences
Sqoop list-tables--connect jdbc:mysql://192.168.0.161:3306/angel--username root-password MySQL
Sqoop list-tables--connect Jdbc:mysql://192.168.0.161:3306/angel--username Anqi-password Anqi
FAQ 3:
caused By:org.apache.hadoop.ipc.RemoteException (org.apache.hadoop.security.AccessControlException): Permission Denied:user=root, Access=write, inode= "/user": hdfs:supergroup:drwxr-xr-x
Do not use the root user of Linux for import commands
Su HDFs re-executes Sqoop import
FAQ 4:
Java.io.IOException:Bad Connect ack with Firstbadlink as 192.168.0.109:50010
Solve:
Shutting down the firewall
Service iptables Stop (temporary shutdown)
Chkconfig iptables off (effective after reboot)
MySQL Import into HDFs FAQ