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

python implementation calls seek on input, unable to read avros from a stream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.6.1
    • None
    • python
    • None

    Description

      The python implementation of Avro calls seek on the input file handle which precludes it from being a stream (stdin, hadoop streaming, etc)

      ack -a -i seek
      src/avro/datafile.py
      109:      # seek to the end of the file and prepare for writing
      110:      writer.seek(0, 2)
      190:    DataFileReader.seek(long). Forces the end of the current block,
      261:    self.reader.seek(0, 2)
      263:    self.reader.seek(remember_pos)
      270:    # seek to the beginning of the file to get magic block
      271:    self.reader.seek(0, 0) 
      316:    return True. Otherwise, seek back to where we started and return False.
      320:      self.reader.seek(-SYNC_SIZE, 1)
      
      src/avro/io.py
      148:    reader is a Python object on which we can call read, seek, and tell.
      267:    self.reader.seek(self.reader.tell() + n)
      
      src/avro/txipc.py
      217:    request.content.seek(0, 0)
      
      test/test_io.py
      137:    writer.seek(0)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sjg Sean Jensen-Grey
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: