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, waitForServiceToStop
public 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.AbstractService
Exception
protected void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.AbstractService
Exception
protected void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.AbstractService
Exception
protected abstract void cleanUp() throws Exception
Exception
public Set<org.apache.hadoop.yarn.api.records.NodeLabel> getNodeLabels()
NodeLabelsProvider
getNodeLabels
in interface NodeLabelsProvider
protected void setNodeLabels(Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabelsSet)
public abstract TimerTask createTimerTask()
Copyright © 2018 Apache Software Foundation. All Rights Reserved.