Avro
  1. Avro
  2. AVRO-88

BlockingBinaryEncoder should override writeEnum() method

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.0
    • Component/s: java
    • Labels:
      None

      Description

      When I was experimenting with BlockingBinaryEncoder to write objects into a file, I see that writeEnum() is missing in BlockingBinaryEncoder. So BinaryEncoder's writeEnum() was getting called. Where as all other things are written to buffer of BlockingBinaryEncoder, only enum is directly written to to outputStream, breaking the overall order in which objects are to be written to(as buffer is flushed only after reaching a limitSize).

      1. AVRO-88.patch
        6 kB
        Thiruvalluvan M. G.
      2. AVRO-88.patch
        0.5 kB
        Ravi Gummadi

        Issue Links

          Activity

          Hide
          Ravi Gummadi added a comment -

          Attaching patch that overrides the method writeEnum() in BlockingBinaryEncoder.

          Please review and provide your comments.

          Show
          Ravi Gummadi added a comment - Attaching patch that overrides the method writeEnum() in BlockingBinaryEncoder. Please review and provide your comments.
          Hide
          Doug Cutting added a comment -

          Thiru, can you please review this?

          Show
          Doug Cutting added a comment - Thiru, can you please review this?
          Hide
          Thiruvalluvan M. G. added a comment -

          Good catch Ravi. Your patch is fine. The problem must have been caught in the unit tests. Now I added more unit tests which catch this bug and exercises larger portion of blocking encoder.

          So the new patch has the original change Ravi made plus the new unit tests.

          Show
          Thiruvalluvan M. G. added a comment - Good catch Ravi. Your patch is fine. The problem must have been caught in the unit tests. Now I added more unit tests which catch this bug and exercises larger portion of blocking encoder. So the new patch has the original change Ravi made plus the new unit tests.
          Hide
          Doug Cutting added a comment -

          I just committed this. Thanks Ravi & Thiru!

          Show
          Doug Cutting added a comment - I just committed this. Thanks Ravi & Thiru!

            People

            • Assignee:
              Ravi Gummadi
              Reporter:
              Ravi Gummadi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development