Sqoop
  1. Sqoop
  2. SQOOP-510

Improve the error message for bad connector files

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.2
    • Fix Version/s: 1.4.2
    • Component/s: None
    • Labels:
      None

      Description

      This is related to SQOOP-505.

      If a connector file contains any lines that are not in the form of key=value, Sqoop fails with the following error:

      12/06/26 07:04:53 ERROR tool.BaseSqoopTool: Got error creating database manager: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      	at java.lang.String.substring(String.java:1937)
      	at org.apache.sqoop.ConnFactory.addManagersFromFile(ConnFactory.java:152)
      	at org.apache.sqoop.ConnFactory.loadManagersFromConfDir(ConnFactory.java:224)
      	at org.apache.sqoop.ConnFactory.instantiateFactories(ConnFactory.java:83)
      	at org.apache.sqoop.ConnFactory.<init>(ConnFactory.java:60)
      	at com.cloudera.sqoop.ConnFactory.<init>(ConnFactory.java:36)
      	at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:203)
      	at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:44)
      	at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
      	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)
      

      We need a better error message than this.

      1. SQOOP-510.patch
        0.7 kB
        Cheolsoo Park

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development