Sqoop
  1. Sqoop
  2. SQOOP-473

Sqoop import-all-tables fails with MySQL connector

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.1-incubating
    • Fix Version/s: 1.4.2
    • Component/s: connectors
    • Labels:
      None

      Description

      Sqoop command
      sqoop import-all-tables --connect jdbc:mysql://xxxx/mysqltestdb2 --username=xxxx --warehouse-dir output-dir/alltables

      Output:

      12/03/29 10:42:20 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
      12/03/29 10:42:21 INFO tool.CodeGenTool: Beginning code generation
      12/03/29 10:42:21 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `testtable` AS t LIMIT 1
      12/03/29 10:42:21 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
      java.lang.NullPointerException
      	at org.apache.sqoop.manager.ConnManager.getColumnTypeNames(ConnManager.java:306)
      	at org.apache.sqoop.manager.MySQLManager.toJavaType(MySQLManager.java:237)
      	at org.apache.sqoop.orm.ClassWriter.toJavaType(ClassWriter.java:253)
      	at org.apache.sqoop.orm.ClassWriter.generateFields(ClassWriter.java:480)
      	at org.apache.sqoop.orm.ClassWriter.generateClassForColumns(ClassWriter.java:1306)
      	at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1138)
      	at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:82)
      	at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:390)
      	at org.apache.sqoop.tool.ImportAllTablesTool.run(ImportAllTablesTool.java:64)
      	at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:69)
      	at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
      	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
      	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
      	at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
      	at com.cloudera.sqoop.Sqoop.main(Sqoop.java:57)
      
      

      I have not tested with other connectors.

      1. SQOOP-473.patch
        12 kB
        Cheolsoo Park

        Activity

          People

          • Assignee:
            Cheolsoo Park
            Reporter:
            Prashant Gokhale
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development