org.apache.hadoop.chukwa.datacollection.adaptor
Class AbstractAdaptor
java.lang.Object
org.apache.hadoop.chukwa.datacollection.adaptor.AbstractAdaptor
- All Implemented Interfaces:
- Adaptor
- Direct Known Subclasses:
- ConstRateAdaptor, DirTailingAdaptor, ExecAdaptor, FileAdaptor, LWFTAdaptor, UDPAdaptor
public abstract class AbstractAdaptor
- extends Object
- implements Adaptor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
type
protected String type
dest
protected ChunkReceiver dest
adaptorID
protected String adaptorID
control
protected AdaptorManager control
AbstractAdaptor
public AbstractAdaptor()
getType
public final String getType()
- Specified by:
getType
in interface Adaptor
start
public final void start(String adaptorID,
String type,
long offset,
ChunkReceiver dest)
throws AdaptorException
- Description copied from interface:
Adaptor
- Start this adaptor
- Specified by:
start
in interface Adaptor
type
- the application type, who is starting this adaptoroffset
- the stream offset of the first byte sent by this adaptor
- Throws:
AdaptorException
start
public abstract void start(long offset)
throws AdaptorException
- Throws:
AdaptorException
parseArgs
public abstract String parseArgs(String s)
deregisterAndStop
public void deregisterAndStop()
parseArgs
public String parseArgs(String d,
String s,
AdaptorManager c)
- Description copied from interface:
Adaptor
- Parse args, return stream name. Do not start running.
Return the stream name, given params.
The stream name is the part of the Adaptor status that's used to
determine uniqueness.
- Specified by:
parseArgs
in interface Adaptor
- Returns:
- Stream name as a string, null if params are malformed
hardStop
@Deprecated
public void hardStop()
throws AdaptorException
- Deprecated.
- Throws:
AdaptorException
shutdown
@Deprecated
public long shutdown()
throws AdaptorException
- Deprecated.
- Throws:
AdaptorException
Copyright © ${year} The Apache Software Foundation