org.apache.hadoop.chukwa.util
Class MaxRateSender
java.lang.Object
java.lang.Thread
org.apache.hadoop.chukwa.util.MaxRateSender
- All Implemented Interfaces:
- Runnable, Adaptor
public class MaxRateSender
- extends Thread
- implements Adaptor
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
BUFFER_SIZE
public static final int BUFFER_SIZE
- See Also:
- Constant Field Values
ADAPTOR_NAME
public static final String ADAPTOR_NAME
- See Also:
- Constant Field Values
MaxRateSender
public MaxRateSender()
getCurrentStatus
public String getCurrentStatus()
- Description copied from interface:
Adaptor
- Return the adaptor's state Should not include class name or byte
offset, which are written by caller. The datatype should, however,
be written by this method.
- Specified by:
getCurrentStatus
in interface Adaptor
- Returns:
- the adaptor state as a string
start
public 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
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
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
toString
public String toString()
- Overrides:
toString
in class Thread
shutdown
public long shutdown(AdaptorShutdownPolicy shutdownPolicy)
- 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
- Returns:
- the logical offset at which the adaptor was when the method return
getType
public String getType()
- Specified by:
getType
in interface Adaptor
Copyright © ${year} The Apache Software Foundation