@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, serverStatusChange
public static final String PREFIX
public static final String CONF_TIMERS_SIZE
public InstrumentationService()
public void init() throws ServiceException
BaseService
This method is called by BaseService.init(Server)
after all service properties
(properties prefixed with
init
in class BaseService
ServiceException
- thrown if the service could not be initialized.public void postInit() throws ServiceException
BaseService
Server
after all services of the server have been initialized.
This method does a NOP.
postInit
in interface Service
postInit
in class BaseService
ServiceException
- thrown if the service could not be
post-initialized.public Class getInterface()
Service
Server
when the Server.get(Class)
method is used to
retrieve a service.getInterface
in interface Service
public org.apache.hadoop.lib.service.instrumentation.InstrumentationService.Cron createCron()
createCron
in interface Instrumentation
public void incr(String group, String name, long count)
incr
in interface Instrumentation
public void addCron(String group, String name, Instrumentation.Cron cron)
addCron
in interface Instrumentation
public void addVariable(String group, String name, Instrumentation.Variable<?> variable)
addVariable
in interface Instrumentation
public void addSampler(String group, String name, int samplingSize, Instrumentation.Variable<Long> variable)
addSampler
in interface Instrumentation
public Map<String,Map<String,?>> getSnapshot()
getSnapshot
in interface Instrumentation
Copyright © 2018 Apache Software Foundation. All Rights Reserved.