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

java.lang.Object
  extended by 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


Field Summary
protected  String adaptorID
           
protected  AdaptorManager control
           
protected  ChunkReceiver dest
           
protected  String type
           
 
Constructor Summary
AbstractAdaptor()
           
 
Method Summary
 void deregisterAndStop()
           
 String getType()
           
 void hardStop()
          Deprecated. 
abstract  String parseArgs(String s)
           
 String parseArgs(String d, String s, AdaptorManager c)
          Parse args, return stream name.
 long shutdown()
          Deprecated. 
abstract  void start(long offset)
           
 void start(String adaptorID, String type, long offset, ChunkReceiver dest)
          Start this adaptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.chukwa.datacollection.adaptor.Adaptor
getCurrentStatus, shutdown
 

Field Detail

type

protected String type

dest

protected ChunkReceiver dest

adaptorID

protected String adaptorID

control

protected AdaptorManager control
Constructor Detail

AbstractAdaptor

public AbstractAdaptor()
Method Detail

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 adaptor
offset - 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