|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.chukwa.datacollection.controller.ChukwaAgentController
public class ChukwaAgentController
A convenience library for applications to communicate to the
ChukwaAgent
. Can be used to register and unregister new
Adaptor
s. Also contains functions for applications to use for
handling log rations.
Nested Class Summary | |
---|---|
class |
ChukwaAgentController.AddAdaptorTask
|
Field Summary | |
---|---|
static String |
CharFileTailUTF8
|
static String |
CharFileTailUTF8NewLineEscaped
|
Constructor Summary | |
---|---|
ChukwaAgentController()
|
|
ChukwaAgentController(String hostname,
int portno)
|
Method Summary | |
---|---|
long |
add(String adaptorName,
String type,
String params,
long offset)
Registers a new adaptor. |
long |
add(String adaptorName,
String type,
String params,
long offset,
long numRetries,
long retryInterval)
Registers a new adaptor. |
long |
addFile(String appType,
String filename)
|
long |
addFile(String appType,
String filename,
long numRetries,
long retryInterval)
Registers a new "LineFileTailUTF8" adaptor and starts it at offset 0. |
boolean |
isFilePaused(String appType,
String filename)
|
static void |
main(String[] args)
|
Collection<Long> |
pauseFile(String appType,
String filename)
Pause all active adaptors of the default file tailing type who are tailing this file This means we actually stop the adaptor and it goes away forever, but we store it state so that we can re-launch a new adaptor with the same state later. |
org.apache.hadoop.chukwa.datacollection.controller.ChukwaAgentController.Adaptor |
remove(long adaptorID)
|
void |
remove(String className,
String appType,
String filename)
|
void |
removeAll()
|
void |
removeFile(String appType,
String filename)
|
Collection<Long> |
resumeFile(String appType,
String filename)
Resume all adaptors for this filename that have been paused |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CharFileTailUTF8
public static final String CharFileTailUTF8NewLineEscaped
Constructor Detail |
---|
public ChukwaAgentController()
public ChukwaAgentController(String hostname, int portno)
Method Detail |
---|
public long add(String adaptorName, String type, String params, long offset)
public long add(String adaptorName, String type, String params, long offset, long numRetries, long retryInterval)
numRetries
times, every
retryInterval
milliseconds.
public org.apache.hadoop.chukwa.datacollection.controller.ChukwaAgentController.Adaptor remove(long adaptorID) throws IOException
IOException
public void remove(String className, String appType, String filename) throws IOException
IOException
public void removeAll()
public long addFile(String appType, String filename, long numRetries, long retryInterval)
pauseFile(String, String)
and
resumeFile(String, String)
which will store
the adaptors metadata and re-use them to pick up where it left off.
type
- the datatype associated with the file to pass throughfilename
- of the file for the tail adaptor to start monitoring
public long addFile(String appType, String filename)
public Collection<Long> pauseFile(String appType, String filename) throws IOException
appType
- filename
-
IOException
public boolean isFilePaused(String appType, String filename)
public Collection<Long> resumeFile(String appType, String filename) throws IOException
appType
- the appTypefilename
- filename by which to lookup adaptors which are paused (and
tailing this file)
IOException
public void removeFile(String appType, String filename) throws IOException
IOException
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |