@InterfaceAudience.Private public class InstrumentationService extends BaseService implements Instrumentation
Instrumentation.Variable<T>| Modifier and Type | Field and Description |
|---|---|
static String |
CONF_TIMERS_SIZE |
static String |
PREFIX |
| Constructor and Description |
|---|
InstrumentationService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCron(String group,
String name,
Instrumentation.Cron cron) |
void |
addSampler(String group,
String name,
int samplingSize,
Instrumentation.Variable<Long> variable) |
void |
addVariable(String group,
String name,
Instrumentation.Variable<?> variable) |
org.apache.hadoop.lib.service.instrumentation.InstrumentationService.Cron |
createCron() |
Class |
getInterface()
Returns the interface implemented by this service.
|
Map<String,Map<String,?>> |
getSnapshot() |
void |
incr(String group,
String name,
long count) |
void |
init()
Initializes the server.
|
void |
postInit()
Post initializes the service.
|
destroy, getPrefix, getPrefixedName, getServer, getServiceConfig, getServiceDependencies, init, serverStatusChangepublic static final String PREFIX
public static final String CONF_TIMERS_SIZE
public void init()
throws ServiceException
BaseService
This method is called by BaseService.init(Server) after all service properties
(properties prefixed with
init in class BaseServiceServiceException - thrown if the service could not be initialized.public void postInit()
throws ServiceException
BaseServiceServer after all services of the server have been initialized.
This method does a NOP.
postInit in interface ServicepostInit in class BaseServiceServiceException - thrown if the service could not be
post-initialized.public Class getInterface()
ServiceServer when the Server.get(Class) method is used to
retrieve a service.getInterface in interface Servicepublic org.apache.hadoop.lib.service.instrumentation.InstrumentationService.Cron createCron()
createCron in interface Instrumentationpublic void incr(String group, String name, long count)
incr in interface Instrumentationpublic void addCron(String group, String name, Instrumentation.Cron cron)
addCron in interface Instrumentationpublic void addVariable(String group, String name, Instrumentation.Variable<?> variable)
addVariable in interface Instrumentationpublic void addSampler(String group, String name, int samplingSize, Instrumentation.Variable<Long> variable)
addSampler in interface Instrumentationpublic Map<String,Map<String,?>> getSnapshot()
getSnapshot in interface InstrumentationCopyright © 2008–2023 Apache Software Foundation. All rights reserved.