Class InstrumentationService
java.lang.Object
org.apache.hadoop.lib.server.BaseService
org.apache.hadoop.lib.service.instrumentation.InstrumentationService
- All Implemented Interfaces:
Service,Instrumentation
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.lib.service.Instrumentation
Instrumentation.Variable<T> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCron(String group, String name, Instrumentation.Cron cron) voidaddSampler(String group, String name, int samplingSize, Instrumentation.Variable<Long> variable) voidaddVariable(String group, String name, Instrumentation.Variable<?> variable) org.apache.hadoop.lib.service.instrumentation.InstrumentationService.CronReturns the interface implemented by this service.voidvoidinit()Initializes the server.voidpostInit()Post initializes the service.Methods inherited from class org.apache.hadoop.lib.server.BaseService
destroy, getPrefix, getPrefixedName, getServer, getServiceConfig, getServiceDependencies, init, serverStatusChange
-
Field Details
-
PREFIX
- See Also:
-
CONF_TIMERS_SIZE
- See Also:
-
-
Constructor Details
-
InstrumentationService
public InstrumentationService()
-
-
Method Details
-
init
Description copied from class:BaseServiceInitializes the server.This method is called by
BaseService.init(Server)after all service properties (properties prefixed with- Specified by:
initin classBaseService- Throws:
ServiceException- thrown if the service could not be initialized.
-
postInit
Description copied from class:BaseServicePost initializes the service. This method is called by theServerafter all services of the server have been initialized.This method does a NOP.
- Specified by:
postInitin interfaceService- Overrides:
postInitin classBaseService- Throws:
ServiceException- thrown if the service could not be post-initialized.
-
getInterface
Description copied from interface:ServiceReturns the interface implemented by this service. This interface is used theServerwhen theServer.get(Class)method is used to retrieve a service.- Specified by:
getInterfacein interfaceService- Returns:
- the interface that identifies the service.
-
createCron
public org.apache.hadoop.lib.service.instrumentation.InstrumentationService.Cron createCron()- Specified by:
createCronin interfaceInstrumentation
-
incr
- Specified by:
incrin interfaceInstrumentation
-
addCron
- Specified by:
addCronin interfaceInstrumentation
-
addVariable
- Specified by:
addVariablein interfaceInstrumentation
-
addSampler
public void addSampler(String group, String name, int samplingSize, Instrumentation.Variable<Long> variable) - Specified by:
addSamplerin interfaceInstrumentation
-
getSnapshot
- Specified by:
getSnapshotin interfaceInstrumentation
-