org.apache.flume.client.avro
Interface EventReader

All Superinterfaces:
Closeable
All Known Subinterfaces:
ReliableEventReader
All Known Implementing Classes:
ReliableSpoolingFileEventReader, SimpleTextLineEventReader

@InterfaceAudience.Private
@InterfaceStability.Evolving
public interface EventReader
extends Closeable

A line reader produces a stream of lines for the AvroCLIClient to ingest into Flume. The stream may be finite or infinite.


Method Summary
 void close()
          Clean-up any state associated with this reader.
 Event readEvent()
          Get the next line associated with the input stream.
 List<Event> readEvents(int n)
          Get up to n lines associated with the input stream.
 

Method Detail

readEvent

Event readEvent()
                throws IOException
Get the next line associated with the input stream. If this returns null, the input underlying input source is considered finished. Note that this is allowed to block for indefinite amounts of time waiting to generate a new line.

Throws:
IOException

readEvents

List<Event> readEvents(int n)
                       throws IOException
Get up to n lines associated with the input stream. If this returns less than n lines, the input underlying input source is considered finished. Note that this is allowed to block for indefinite amounts of time waiting to generate a new line.

Throws:
IOException

close

void close()
           throws IOException
Clean-up any state associated with this reader.

Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2009-2013 Apache Software Foundation. All Rights Reserved.