Class ScriptBasedNodeAttributesProvider
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.nodemanager.nodelabels.AbstractNodeDescriptorsProvider<org.apache.hadoop.yarn.api.records.NodeAttribute>
org.apache.hadoop.yarn.server.nodemanager.nodelabels.NodeAttributesProvider
org.apache.hadoop.yarn.server.nodemanager.nodelabels.ScriptBasedNodeAttributesProvider
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service,NodeDescriptorsProvider<org.apache.hadoop.yarn.api.records.NodeAttribute>
Node attribute provider that periodically runs a script to collect
node attributes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
Fields inherited from class org.apache.hadoop.yarn.server.nodemanager.nodelabels.AbstractNodeDescriptorsProvider
DISABLE_NODE_DESCRIPTORS_PROVIDER_FETCH_TIMER, readLock, timerTask, writeLock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcleanUp()method for subclasses to cleanup.Creates a timer task which be scheduled periodically by the provider, and the task is responsible to update node descriptors to the provider.protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) Methods inherited from class org.apache.hadoop.yarn.server.nodemanager.nodelabels.AbstractNodeDescriptorsProvider
getDescriptors, getIntervalTime, getScheduler, serviceStart, serviceStop, setDescriptors, setIntervalTime, verifyConfiguredScriptMethods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
-
Constructor Details
-
ScriptBasedNodeAttributesProvider
public ScriptBasedNodeAttributesProvider()
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classAbstractNodeDescriptorsProvider<org.apache.hadoop.yarn.api.records.NodeAttribute>- Throws:
Exception
-
cleanUp
Description copied from class:AbstractNodeDescriptorsProvidermethod for subclasses to cleanup.- Specified by:
cleanUpin classAbstractNodeDescriptorsProvider<org.apache.hadoop.yarn.api.records.NodeAttribute>- Throws:
Exception
-
createTimerTask
Description copied from class:AbstractNodeDescriptorsProviderCreates a timer task which be scheduled periodically by the provider, and the task is responsible to update node descriptors to the provider.- Specified by:
createTimerTaskin classAbstractNodeDescriptorsProvider<org.apache.hadoop.yarn.api.records.NodeAttribute>- Returns:
- a timer task.
-