Avro
  1. Avro
  2. AVRO-1286

Python script avro cat should be able to read from stdin

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: python
    • Labels:
      None

      Description

      Currently, you have to specify a target file on the command line. But it would be nice to be able to stream data through avro cat.

        Issue Links

          Activity

          Uri Laserson created issue -
          Hide
          Jeremy Kahn added a comment -

          Biggest headache here is that the python avro data file library requires that the file be seekable. Standard in is not seekable.

          I think this is a bug or a misfeature in the python library and probably deserves a ticket of its own.

          Show
          Jeremy Kahn added a comment - Biggest headache here is that the python avro data file library requires that the file be seekable. Standard in is not seekable. I think this is a bug or a misfeature in the python library and probably deserves a ticket of its own.
          Hide
          Harsh J added a comment -

          Dupe of AVRO-959?

          Show
          Harsh J added a comment - Dupe of AVRO-959 ?
          Hide
          Jeremy Kahn added a comment -

          Oops. my request was a dupe of AVRO-959. This issue should be considered blocked by AVRO-959. Thanks Harsh.

          Show
          Jeremy Kahn added a comment - Oops. my request was a dupe of AVRO-959 . This issue should be considered blocked by AVRO-959 . Thanks Harsh.
          Harsh J made changes -
          Field Original Value New Value
          Link This issue is related to AVRO-959 [ AVRO-959 ]
          Hide
          Scott Nottingham added a comment -

          What you are trying to do can be easily accomplished as follows:
          import cStringIO
          file_like_obj = cStringIO.StringIO()
          file_like_obj.write(sys.stdin.read())
          file_like_obj.seek(0)

          now you can pass this file_like_obj into avro's read method.

          Show
          Scott Nottingham added a comment - What you are trying to do can be easily accomplished as follows: import cStringIO file_like_obj = cStringIO.StringIO() file_like_obj.write(sys.stdin.read()) file_like_obj.seek(0) now you can pass this file_like_obj into avro's read method.

            People

            • Assignee:
              Unassigned
              Reporter:
              Uri Laserson
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Development