org.apache.hadoop.chukwa.datacollection.adaptor
Class WriteaheadBuffered
java.lang.Object
org.apache.hadoop.chukwa.datacollection.adaptor.AbstractWrapper
org.apache.hadoop.chukwa.datacollection.adaptor.WriteaheadBuffered
- All Implemented Interfaces:
- Adaptor, NotifyOnCommitAdaptor, ChunkReceiver
public class WriteaheadBuffered
- extends AbstractWrapper
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WriteaheadBuffered
public WriteaheadBuffered()
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 adaptoroffset
- 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