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

Blob import doesn't work with avro 1.7.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.1-incubating
    • 1.4.2
    • None
    • None

    Description

      I see the following test failures when updating avro dependency from 1.5.3 to 1.7.1:

      • MySQLLobAvroImportTest
      • OracleLobAvroImportTest

      The reason is because byte[] fails to be mapped to avro bytes type (see below the isBytes() method of GenericData in avro 1.7.1).

      /** Called by the default implementation of {@link #instanceOf}.*/
      protected boolean isBytes(Object datum) {
        return datum instanceof ByteBuffer;
      }
      

      The fix is to wrap byte[] as ByteBuffer so that avro GenericData can map it to bytes type.

      Attachments

        1. SQOOP-536.patch
          0.8 kB
          Cheolsoo Park

        Activity

          People

            cheolsoo Cheolsoo Park
            cheolsoo Cheolsoo Park
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: