public class ChukwaAgentController extends Object
ChukwaAgent
. Can be used to register and unregister new
Adaptor
s. Also contains functions for applications to use for
handling log rations.Modifier and Type | Class and Description |
---|---|
class |
ChukwaAgentController.AddAdaptorTask |
Modifier and Type | Field and Description |
---|---|
static String |
CharFileTailUTF8 |
static String |
CharFileTailUTF8NewLineEscaped |
Constructor and Description |
---|
ChukwaAgentController() |
ChukwaAgentController(String hostname,
int portno) |
Modifier and Type | Method and Description |
---|---|
String |
add(String adaptorName,
String type,
String params,
long offset)
Registers a new adaptor.
|
String |
addByName(String adaptorID,
String adaptorName,
String type,
String params,
long offset,
long numRetries,
long retryInterval)
Registers a new adaptor.
|
String |
addFile(String appType,
String filename) |
String |
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<String> |
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(String adaptorID) |
void |
remove(String className,
String appType,
String filename) |
void |
removeAll() |
void |
removeFile(String appType,
String filename) |
void |
removeInstanceAdaptors() |
Collection<String> |
resumeFile(String appType,
String filename)
Resume all adaptors for this filename that have been paused
|
public static final String CharFileTailUTF8
public static final String CharFileTailUTF8NewLineEscaped
public ChukwaAgentController()
public ChukwaAgentController(String hostname, int portno)
public String add(String adaptorName, String type, String params, long offset)
adaptorName
- is adaptor class nametype
- is data typeparams
- is adaptor specific parametersoffset
- is starting sequence idpublic String addByName(String adaptorID, String adaptorName, String type, String params, long offset, long numRetries, long retryInterval)
numRetries
times, every
retryInterval
milliseconds.adaptorID
- is unique adaptor identifieradaptorName
- is adaptor class nametype
- is user defined data type nameparams
- is adaptor specific configurationoffset
- is starting sequence idnumRetries
- is number of retriesretryInterval
- is time between retriespublic org.apache.hadoop.chukwa.datacollection.controller.ChukwaAgentController.Adaptor remove(String adaptorID) throws IOException
IOException
public void remove(String className, String appType, String filename) throws IOException
IOException
public void removeAll()
public void removeInstanceAdaptors()
public String 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.appType
- is user defined name for the data streamfilename
- of the file for the tail adaptor to start monitoringnumRetries
- is number of retriesretryInterval
- is time between retriespublic Collection<String> pauseFile(String appType, String filename) throws IOException
appType
- is application typefilename
- is file name suffix patternIOException
- if error pausing adaptorspublic Collection<String> resumeFile(String appType, String filename) throws IOException
appType
- is application typefilename
- filename by which to lookup adaptors which are paused (and
tailing this file)IOException
- if unable to resume all adaptorspublic void removeFile(String appType, String filename) throws IOException
IOException
public static void main(String[] args)
Copyright © 2016 Apache Software Foundation. All Rights Reserved.