Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1873

avro gem doesn't compatible with other languages with snappy compression

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersStop watchingWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.8.1
    • 1.8.2
    • ruby
    • None
    • CentOS 6.8 64bit, Snappy 1.1.0, Python 3.5, Ruby 2.2.3

    Description

      I've tested avro gem today, then found some weird result.

      With python library like "fastavro", generated an avro file snappy compressed. This file works fine with avro-tools-1.8.1.jar.

      java -jar avro-tools-1.8.1.jar tojson testing.avro returns what I expected.

      But NOT compatible with ruby using avro gem returns "Invalid Input" message. And snappy compressed avro file made with avro gem doesn't work with avro-tools nor in python with avro-python3 and fastavro.

      my ruby codes are below:

      schema = Avro::Schema.paese(File.open('test.avsc', 'r').read)
      avrofile = File.open('test.avro', 'wb')
      writer = Avro::IO::DatumWriter.new(schema)
      datawriter = Avro::DataFile::Writer.new file, writer, schema, 'snappy'
      datawriter<<

      {"title" => "Avro", "author" => "Apache Foundation"}

      datawriter.close

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rdblue Ryan Blue Assign to me
            ACodeFarmer Pumsuk Cho
            Votes:
            0 Vote for this issue
            Watchers:
            4 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment