Uploaded image for project: 'Sqoop (Retired)'
  1. Sqoop (Retired)
  2. SQOOP-1826

NPE in ImportTool.lastModifiedMerge during postgres import

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.5
    • 1.4.6
    • None
    • None

    Description

      Stacktrace:

      java.lang.NullPointerException
      	at org.apache.sqoop.tool.ImportTool.lastModifiedMerge(ImportTool.java:436)
      	at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:506)
      	at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:601)
      	at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
      	at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
      	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
      	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
      	at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
      

      here are the relevant args in my options file:

      import
      --direct
      --warehouse-dir
      warehouse/
      --incremental
      lastmodified
      --check-column
      updated_at
      --merge-key
      id
      

      Seems like context.getConnManager() is returning null because DirectPostgresqlManager#importTable never calls context.setConnManager(this) in a similar way to DirectMySQLManager#importTable

      Attachments

        1. sqoop-1826.patch
          0.6 kB
          Ricky Nguyen
        2. sqoop-1826.2.patch
          3 kB
          Ricky Nguyen

        Activity

          People

            rickdn Ricky Nguyen
            rickdn Ricky Nguyen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: