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)
public String addByName(String adaptorID, 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(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.type
- the datatype associated with the file to pass throughfilename
- of the file for the tail adaptor to start monitoringpublic Collection<String> pauseFile(String appType, String filename) throws IOException
appType
- filename
- IOException
public Collection<String> 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)
Copyright © 2014 Apache Software Foundation. All Rights Reserved.