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

java.lang.ArrayIndexOutOfBoundsException thrown when malformed column mapping is provided

    XMLWordPrintableJSON

Details

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

    Description

      The following command line

      sqoop import --verbose --connect 'jdbc:mysql://host/demo' --table t --username user --password password --create-hcatalog-table --hcatalog-table customer_address --hcatalog-storage-stanza "stored as orc" --map-column-hive fdsa -m 1

      throws the following exception

      2014-10-17 21:49:27,597 DEBUG sqoop.Sqoop (Sqoop.java:run(137)) - 1
      java.lang.ArrayIndexOutOfBoundsException: 1
      at org.apache.sqoop.SqoopOptions.parseColumnMapping(SqoopOptions.java:1196)
      at org.apache.sqoop.SqoopOptions.setMapColumnHive(SqoopOptions.java:1201)
      at org.apache.sqoop.tool.BaseSqoopTool.applyHiveOptions(BaseSqoopTool.java:1111)
      at org.apache.sqoop.tool.ImportTool.applyOptions(ImportTool.java:961)
      at org.apache.sqoop.tool.SqoopTool.parseArguments(SqoopTool.java:433)
      at org.apache.sqoop.Sqoop.run(Sqoop.java:131)
      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)

      This is a malformed mapping provided. We should instead handle this and provide an appropriate message here.

      gwenshap/stanleyxu2005 - I have marked this for both 1.4.6 and 1.4.7 since I think this is a simple fix and good to include into 1.4.6 also since we are respinning the RC. If you think it is too late to pull it in for 1.4.6, please remove the 1.4.6 fix version

      Attachments

        1. SQOOP-2290.patch
          2 kB
          Venkat Ranganathan

        Issue Links

          Activity

            People

              venkatnrangan Venkat Ranganathan
              venkatnrangan Venkat Ranganathan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: