org.apache.hadoop.chukwa.datacollection.adaptor.filetailer
Class RCheckFTAdaptor

java.lang.Object
  extended by org.apache.hadoop.chukwa.datacollection.adaptor.AbstractAdaptor
      extended by org.apache.hadoop.chukwa.datacollection.adaptor.filetailer.LWFTAdaptor
          extended by org.apache.hadoop.chukwa.datacollection.adaptor.filetailer.RCheckFTAdaptor
All Implemented Interfaces:
FileFilter, Adaptor

public class RCheckFTAdaptor
extends LWFTAdaptor
implements FileFilter

Checkpoint state: date modified of most-recently tailed file, offset of first byte of that file, then regular FTA arts


Field Summary
 
Fields inherited from class org.apache.hadoop.chukwa.datacollection.adaptor.filetailer.LWFTAdaptor
conf, DEFAULT_MAX_READ_SIZE, fileReadOffset, MAX_READ_SIZE, MAX_READ_SIZE_OPT, offsetOfFirstByte, tailer
 
Fields inherited from class org.apache.hadoop.chukwa.datacollection.adaptor.AbstractAdaptor
adaptorID, control, dest, type
 
Constructor Summary
RCheckFTAdaptor()
           
 
Method Summary
 boolean accept(File pathname)
           
protected  void advanceQ()
           
 String getCurrentStatus()
          Return the adaptor's state Should not include class name or byte offset, which are written by caller.
protected  void mkFileQ()
           
 String parseArgs(String params)
          Check for date-modified and offset; if absent assume we just got a name.
 void start(long offset)
           
 boolean tailFile()
           
 String toString()
           
 
Methods inherited from class org.apache.hadoop.chukwa.datacollection.adaptor.filetailer.LWFTAdaptor
extractRecords, getStreamName, shutdown, slurp
 
Methods inherited from class org.apache.hadoop.chukwa.datacollection.adaptor.AbstractAdaptor
deregisterAndStop, getType, hardStop, parseArgs, shutdown, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RCheckFTAdaptor

public RCheckFTAdaptor()
Method Detail

parseArgs

public String parseArgs(String params)
Check for date-modified and offset; if absent assume we just got a name.

Overrides:
parseArgs in class LWFTAdaptor

getCurrentStatus

public String getCurrentStatus()
Description copied from interface: Adaptor
Return the adaptor's state Should not include class name or byte offset, which are written by caller. The datatype should, however, be written by this method.

Specified by:
getCurrentStatus in interface Adaptor
Overrides:
getCurrentStatus in class LWFTAdaptor
Returns:
the adaptor state as a string
See Also:
Adaptor.getCurrentStatus()

accept

public boolean accept(File pathname)
Specified by:
accept in interface FileFilter

mkFileQ

protected void mkFileQ()

advanceQ

protected void advanceQ()

start

public void start(long offset)
Overrides:
start in class LWFTAdaptor

tailFile

public boolean tailFile()
                 throws InterruptedException
Overrides:
tailFile in class LWFTAdaptor
Throws:
InterruptedException

toString

public String toString()
Overrides:
toString in class LWFTAdaptor


Copyright © 2011 Apache Software Foundation. All Rights Reserved.