public class AbstractWrapper extends Object implements NotifyOnCommitAdaptor, ChunkReceiver
Constructor and Description |
---|
AbstractWrapper() |
Modifier and Type | Method and Description |
---|---|
void |
add(Chunk event)
Add a chunk to the queue, potentially blocking.
|
void |
committed(long commitedByte) |
String |
getCurrentStatus()
Return the adaptor's state Should not include class name or byte
offset, which are written by caller.
|
String |
getType() |
String |
parseArgs(String innerClassName,
String params,
AdaptorManager a)
Note that the name of the inner class will get parsed out as a type
|
long |
shutdown(AdaptorShutdownPolicy shutdownPolicy)
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
|
public String getCurrentStatus()
Adaptor
getCurrentStatus
in interface Adaptor
public String parseArgs(String innerClassName, String params, AdaptorManager a)
public long shutdown(AdaptorShutdownPolicy shutdownPolicy) throws AdaptorException
Adaptor
shutdown
in interface Adaptor
shutdownPolicy
- is defined as forcefully or gracefullyAdaptorException
- Exception on shutdownpublic void start(String adaptorID, String type, long offset, ChunkReceiver dest) throws AdaptorException
start
in interface Adaptor
adaptorID
- Adaptor IDtype
- the application type, who is starting this adaptoroffset
- the stream offset of the first byte sent by this adaptordest
- Chunk receiving destinationAdaptorException
- if adaptor can not be startedpublic void add(Chunk event) throws InterruptedException
ChunkReceiver
add
in interface ChunkReceiver
event
- is a Chukwa ChunkInterruptedException
- if thread is interrupted while blockingpublic void committed(long commitedByte)
committed
in interface NotifyOnCommitAdaptor
Copyright © 2016 Apache Software Foundation. All Rights Reserved.