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

Java generated Avro classes make using Avro painful and surprising

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.0
    • 1.6.0
    • java
    • None
    • Any

    Description

      Currently the Avro generated Java classes expose CharSequence in their API. However, you cannot use any old CharSequence when interacting with them. In fact, you have to use the Utf8 class if you want to get consistent results. I think that Avro should work with any CharSequence if that is the API. Here is an example where this happens:

      https://github.com/spullara/avro-generated-code/blob/master/src/test/java/AnnoyingTest.java

      That prints out 'false' three times unexpectedly. If you can't get it to print 'true' three times then you should probably change it back to Utf8.

      Attachments

        1. AVRO-803.patch
          54 kB
          Doug Cutting
        2. AVRO-803.patch
          45 kB
          Doug Cutting
        3. Foo.java
          4 kB
          Doug Cutting

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

              jadler Joseph Adler
              spullara Sam Pullara
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: