Support Questions

Find answers, ask questions, and share your expertise

not able to see the progress of my sqoop import job in hdfs

avatar
New Contributor

Hi I am new to Hadoop and I am trying to import a table from the mysql db to hdfs directory but somehow my sqoop job is stuck without giving any error or notification, can somebody help here and guide me about this.

this is command i used as mentioned in screenshot:

after beginning code generation , it's showing no progress , how i can trace the issue here.

10205-capture.png

3 REPLIES 3

avatar
Master Mentor

Please go to Resource Manager UI and look whether associated Sqoop job is listed there. if not, pass your Sqoop query with --verbose switch.

avatar
Master Guru

@Singh Pratap

It looks like you are referring to wrong port for Mysql. By default port is 3306.

Please find below correct command:

sqoop import --connect jdbc:mysql://sandbox.hortonworks.com:3306/information_schema --username hive --password hive --table tables --target-dir sqoopdata

If you want to debug more, you can enable debug log by exporting HADOOP_ROOT_LOGGER to DEBUG.

e.g.

export HADOOP_ROOT_LOGGER=DEBUG,console

Then run your sqoop command.

Sample output:

[root@sandbox ~]# sqoop import --connect jdbc:mysql://sandbox.hortonworks.com:3306/information_schema --username hive --password hive --table tables --target-dir /tmp/
Warning: /usr/hdp/2.4.0.0-169/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
16/12/11 16:29:02 DEBUG util.Shell: setsid exited with exit code 0
16/12/11 16:29:02 DEBUG sqoop.SqoopOptions: Generated nonce dir: /tmp/sqoop-root/compile/1d5abdbc51cca65d714f390cebf546da
16/12/11 16:29:02 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.4.0.0-169
16/12/11 16:29:02 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
16/12/11 16:29:02 DEBUG sqoop.ConnFactory: Loaded manager factory: org.apache.sqoop.manager.oracle.OraOopManagerFactory
16/12/11 16:29:02 DEBUG sqoop.ConnFactory: Loaded manager factory: com.cloudera.sqoop.manager.DefaultManagerFactory
16/12/11 16:29:02 DEBUG sqoop.ConnFactory: Trying ManagerFactory: org.apache.sqoop.manager.oracle.OraOopManagerFactory
16/12/11 16:29:02 DEBUG oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop can be called by Sqoop!
16/12/11 16:29:02 DEBUG sqoop.ConnFactory: Trying ManagerFactory: com.cloudera.sqoop.manager.DefaultManagerFactory
16/12/11 16:29:02 DEBUG manager.DefaultManagerFactory: Trying with scheme: jdbc:mysql:
16/12/11 16:29:02 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
16/12/11 16:29:02 DEBUG sqoop.ConnFactory: Instantiated ConnManager org.apache.sqoop.manager.MySQLManager@3976d4a4
16/12/11 16:29:02 INFO tool.CodeGenTool: Beginning code generation
16/12/11 16:29:02 DEBUG manager.SqlManager: Execute getColumnInfoRawQuery : SELECT t.* FROM `tables` AS t LIMIT 1
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.4.0.0-169/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.4.0.0-169/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
16/12/11 16:29:02 DEBUG manager.SqlManager: No connection paramenters specified. Using regular API for making connection.
16/12/11 16:29:03 DEBUG manager.SqlManager: Using fetchSize for next query: -2147483648
16/12/11 16:29:03 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `tables` AS t LIMIT 1
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column TABLE_CATALOG of type [12, 512, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column TABLE_SCHEMA of type [12, 64, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column TABLE_NAME of type [12, 64, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column TABLE_TYPE of type [12, 64, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column ENGINE of type [12, 64, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column VERSION of type [-5, 21, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column ROW_FORMAT of type [12, 10, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column TABLE_ROWS of type [-5, 21, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column AVG_ROW_LENGTH of type [-5, 21, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column DATA_LENGTH of type [-5, 21, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column MAX_DATA_LENGTH of type [-5, 21, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column INDEX_LENGTH of type [-5, 21, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column DATA_FREE of type [-5, 21, 0]
16/12/11 16:29:03 DEBUG manager.SqlManager: Found column AUTO_INCREMENT of type [-5, 21, 0]
..
Output truncated!

Hope this helps! 🙂

avatar
Master Guru

@Singh Pratap - Please accept appropriate answer.