Class ConfigurationNodeAttributesProvider
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.ConfigurationNodeAttributesProvider
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service,NodeDescriptorsProvider<org.apache.hadoop.yarn.api.records.NodeAttribute>
Configuration based node attributes provider.
-
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.Set<org.apache.hadoop.yarn.api.records.NodeAttribute>parseAttributes(String config) 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
-
ConfigurationNodeAttributesProvider
public ConfigurationNodeAttributesProvider()
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classAbstractNodeDescriptorsProvider<org.apache.hadoop.yarn.api.records.NodeAttribute>- Throws:
Exception
-
parseAttributes
@VisibleForTesting public Set<org.apache.hadoop.yarn.api.records.NodeAttribute> parseAttributes(String config) throws IOException - Throws:
IOException
-
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.
-