org.apache.hadoop.chukwa.datacollection.adaptor
Class WriteaheadBuffered

java.lang.Object
  extended by org.apache.hadoop.chukwa.datacollection.adaptor.AbstractWrapper
      extended by org.apache.hadoop.chukwa.datacollection.adaptor.WriteaheadBuffered
All Implemented Interfaces:
Adaptor, NotifyOnCommitAdaptor, ChunkReceiver

public class WriteaheadBuffered
extends AbstractWrapper


Constructor Summary
WriteaheadBuffered()
           
 
Method Summary
 void add(Chunk event)
          Add a chunk to the queue, potentially blocking.
 void committed(long l)
           
 long shutdown(AdaptorShutdownPolicy p)
          Signals this adaptor to come to an orderly stop.
 void start(String adaptorID, String type, long offset, ChunkReceiver dest)
          Note that the name of the inner class will get parsed out as a type
 
Methods inherited from class org.apache.hadoop.chukwa.datacollection.adaptor.AbstractWrapper
getCurrentStatus, getType, parseArgs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteaheadBuffered

public WriteaheadBuffered()
Method Detail

add

public void add(Chunk event)
         throws InterruptedException
Description copied from interface: ChunkReceiver
Add a chunk to the queue, potentially blocking.

Specified by:
add in interface ChunkReceiver
Overrides:
add in class AbstractWrapper
Throws:
InterruptedException - if thread is interrupted while blocking

start

public void start(String adaptorID,
                  String type,
                  long offset,
                  ChunkReceiver dest)
           throws AdaptorException
Description copied from class: AbstractWrapper
Note that the name of the inner class will get parsed out as a type

Specified by:
start in interface Adaptor
Overrides:
start in class AbstractWrapper
type - the application type, who is starting this adaptor
offset - the stream offset of the first byte sent by this adaptor
Throws:
AdaptorException

committed

public void committed(long l)
Specified by:
committed in interface NotifyOnCommitAdaptor
Overrides:
committed in class AbstractWrapper

shutdown

public long shutdown(AdaptorShutdownPolicy p)
              throws AdaptorException
Description copied from interface: Adaptor
Signals this adaptor to come to an orderly stop. The adaptor ought to push out all the data it can before exiting depending of the shutdown policy

Specified by:
shutdown in interface Adaptor
Overrides:
shutdown in class AbstractWrapper
Returns:
the logical offset at which the adaptor was when the method return
Throws:
AdaptorException


Copyright © ${year} The Apache Software Foundation