public abstract class AbstractNodeLabelsProvider extends org.apache.hadoop.service.AbstractService implements NodeLabelsProvider
| Modifier and Type | Field and Description |
|---|---|
static long |
DISABLE_NODE_LABELS_PROVIDER_FETCH_TIMER |
protected long |
intervalTime |
static String |
NODE_LABELS_SEPRATOR |
protected Set<org.apache.hadoop.yarn.api.records.NodeLabel> |
nodeLabels |
protected Timer |
nodeLabelsScheduler |
protected Lock |
readLock |
protected TimerTask |
timerTask |
protected Lock |
writeLock |
| Constructor and Description |
|---|
AbstractNodeLabelsProvider(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
cleanUp()
method for subclasses to cleanup.
|
abstract TimerTask |
createTimerTask() |
Set<org.apache.hadoop.yarn.api.records.NodeLabel> |
getNodeLabels()
Provides the labels.
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop()
terminate the timer
|
protected void |
setNodeLabels(Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabelsSet) |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic static final long DISABLE_NODE_LABELS_PROVIDER_FETCH_TIMER
protected long intervalTime
protected Timer nodeLabelsScheduler
public static final String NODE_LABELS_SEPRATOR
protected Lock readLock
protected Lock writeLock
protected TimerTask timerTask
protected Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabels
public AbstractNodeLabelsProvider(String name)
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStop()
throws Exception
serviceStop in class org.apache.hadoop.service.AbstractServiceExceptionprotected abstract void cleanUp()
throws Exception
Exceptionpublic Set<org.apache.hadoop.yarn.api.records.NodeLabel> getNodeLabels()
NodeLabelsProvidergetNodeLabels in interface NodeLabelsProviderprotected void setNodeLabels(Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabelsSet)
public abstract TimerTask createTimerTask()
Copyright © 2022 Apache Software Foundation. All rights reserved.