@InterfaceAudience.Private @InterfaceStability.Evolving public class ReliableTaildirEventReader extends Object implements ReliableEventReader
| Modifier and Type | Class and Description | 
|---|---|
| static class  | ReliableTaildirEventReader.BuilderSpecial builder class for ReliableTaildirEventReader | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close()Clean-up any state associated with this reader. | 
| void | commit()Commit the last lines which were read. | 
| Map<Long,TailFile> | getTailFiles() | 
| void | loadPositionFile(String filePath)Load a position file which has the last read position of each file. | 
| Event | readEvent()Get the next line associated with the input stream. | 
| List<Event> | readEvents(int numEvents)Get up to  nlines associated with the input stream. | 
| List<Event> | readEvents(int numEvents,
          boolean backoffWithoutNL) | 
| List<Event> | readEvents(TailFile tf,
          int numEvents) | 
| void | setCurrentFile(TailFile currentFile) | 
| List<Long> | updateTailFiles() | 
| List<Long> | updateTailFiles(boolean skipToEnd)Update tailFiles mapping if a new file is created or appends are detected
 to the existing file. | 
public void loadPositionFile(String filePath)
public void setCurrentFile(TailFile currentFile)
public Event readEvent() throws IOException
EventReadernull, 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.readEvent in interface EventReaderIOExceptionpublic List<Event> readEvents(int numEvents) throws IOException
EventReadern 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.readEvents in interface EventReaderIOExceptionpublic List<Event> readEvents(TailFile tf, int numEvents) throws IOException
IOExceptionpublic List<Event> readEvents(int numEvents, boolean backoffWithoutNL) throws IOException
IOExceptionpublic void close()
           throws IOException
EventReaderclose in interface Closeableclose in interface AutoCloseableclose in interface EventReaderIOExceptionpublic void commit()
            throws IOException
commit in interface ReliableEventReaderIOExceptionpublic List<Long> updateTailFiles(boolean skipToEnd) throws IOException
IOExceptionpublic List<Long> updateTailFiles() throws IOException
IOExceptionCopyright © 2009-2017 Apache Software Foundation. All Rights Reserved.