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

Further improve error reporting when exporting malformed data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.4.3
    • 1.4.5
    • None
    • None

    Description

      We've significantly improved error handling when exporting malformed data in SQOOP-720, where we started dumping a lot of state into log. Unfortunately current output do show on which column the parsing exception occurred. This is usually not an issue for primitive Java types as the underlying exception is descriptive enough:

      Caused by: java.lang.NumberFormatException: For input string: "A"
      	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      	at java.lang.Integer.parseInt(Integer.java:449)
      	at java.lang.Integer.valueOf(Integer.java:554)
      	at text.__loadFromFields(text.java:196)
      

      However BigDecimal do not print out the value:

      Exception: 
      java.lang.NumberFormatException
      	at java.math.BigDecimal.<init>(BigDecimal.java:459)
      	at java.math.BigDecimal.<init>(BigDecimal.java:728)
      

      I would therefore suggest to start catching {{RuntimeException}}s in the parsing code and re-throwing them with value of currently parsed column.

      Attachments

        1. bugSQOOP-1107.patch
          1 kB
          Jarek Jarcec Cecho

        Issue Links

          Activity

            People

              jarcec Jarek Jarcec Cecho
              jarcec Jarek Jarcec Cecho
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: