org.apache.hadoop.lib.service.instrumentation
Class InstrumentationService
java.lang.Object
org.apache.hadoop.lib.server.BaseService
org.apache.hadoop.lib.service.instrumentation.InstrumentationService
- All Implemented Interfaces:
- Service, Instrumentation
@InterfaceAudience.Private
public class InstrumentationService
- extends BaseService
- implements Instrumentation
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PREFIX
public static final String PREFIX
- See Also:
- Constant Field Values
CONF_TIMERS_SIZE
public static final String CONF_TIMERS_SIZE
- See Also:
- Constant Field Values
InstrumentationService
public InstrumentationService()
init
public void init()
throws ServiceException
- Description copied from class:
BaseService
- Initializes the server.
This method is called by
BaseService.init(Server)
after all service properties
(properties prefixed with
- Specified by:
init
in class BaseService
- Throws:
ServiceException
- thrown if the service could not be initialized.
postInit
public void postInit()
throws ServiceException
- Description copied from class:
BaseService
- Post initializes the service. This method is called by the
Server
after all services of the server have been initialized.
This method does a NOP.
- Specified by:
postInit
in interface Service
- Overrides:
postInit
in class BaseService
- Throws:
ServiceException
- thrown if the service could not be
post-initialized.
getInterface
public Class getInterface()
- Description copied from interface:
Service
- Returns the interface implemented by this service. This interface is used
the
Server
when the Server.get(Class)
method is used to
retrieve a service.
- Specified by:
getInterface
in interface Service
- Returns:
- the interface that identifies the service.
createCron
public org.apache.hadoop.lib.service.instrumentation.InstrumentationService.Cron createCron()
- Specified by:
createCron
in interface Instrumentation
incr
public void incr(String group,
String name,
long count)
- Specified by:
incr
in interface Instrumentation
addCron
public void addCron(String group,
String name,
Instrumentation.Cron cron)
- Specified by:
addCron
in interface Instrumentation
addVariable
public void addVariable(String group,
String name,
Instrumentation.Variable<?> variable)
- Specified by:
addVariable
in interface Instrumentation
addSampler
public void addSampler(String group,
String name,
int samplingSize,
Instrumentation.Variable<Long> variable)
- Specified by:
addSampler
in interface Instrumentation
getSnapshot
public Map<String,Map<String,?>> getSnapshot()
- Specified by:
getSnapshot
in interface Instrumentation
Copyright © 2014 Apache Software Foundation. All Rights Reserved.