|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.flume.serialization.LineDeserializer
@InterfaceAudience.Private @InterfaceStability.Evolving public class LineDeserializer
A deserializer that parses text lines from a file.
| Nested Class Summary | |
|---|---|
static class |
LineDeserializer.Builder
|
| Field Summary | |
|---|---|
static String |
CHARSET_DFLT
|
static int |
MAXLINE_DFLT
|
static String |
MAXLINE_KEY
|
static String |
OUT_CHARSET_KEY
|
| Method Summary | |
|---|---|
void |
close()
Calls EventDeserializer.reset() on the stream and then closes it. |
void |
mark()
Marks the underlying input stream, indicating that the events previously returned by this EventDeserializer have been successfully committed. |
Event |
readEvent()
Reads a line from a file and returns an event |
List<Event> |
readEvents(int numEvents)
Batch line read |
void |
reset()
Resets the underlying input stream to the last known mark (or beginning of the stream if EventDeserializer.mark() was never previously called. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String OUT_CHARSET_KEY
public static final String CHARSET_DFLT
public static final String MAXLINE_KEY
public static final int MAXLINE_DFLT
| Method Detail |
|---|
public Event readEvent()
throws IOException
readEvent in interface EventDeserializerIOExceptionEventDeserializer.mark(),
EventDeserializer.reset()
public List<Event> readEvents(int numEvents)
throws IOException
readEvents in interface EventDeserializernumEvents - Maximum number of events to return.
IOExceptionEventDeserializer.mark(),
EventDeserializer.reset()
public void mark()
throws IOException
EventDeserializer
mark in interface EventDeserializermark in interface ResettableIOExceptionEventDeserializer.reset()
public void reset()
throws IOException
EventDeserializerEventDeserializer.mark() was never previously called. This should
be done in the case of inability to commit previously-deserialized events.
reset in interface EventDeserializerreset in interface ResettableIOExceptionEventDeserializer.mark()
public void close()
throws IOException
EventDeserializerEventDeserializer.reset() on the stream and then closes it.
In the case of successful completion of event consumption,
EventDeserializer.mark() MUST be called before close().
close in interface Closeableclose in interface EventDeserializerIOExceptionEventDeserializer.mark(),
EventDeserializer.reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||