public abstract class ReconfigurableBase extends Configured implements Reconfigurable
Constructor and Description |
---|
ReconfigurableBase()
Construct a ReconfigurableBase.
|
ReconfigurableBase(Configuration conf)
Construct a ReconfigurableBase with the
Configuration
conf. |
Modifier and Type | Method and Description |
---|---|
Collection<ReconfigurationUtil.PropertyChange> |
getChangedProperties(Configuration newConf,
Configuration oldConf) |
protected abstract Configuration |
getNewConf()
Create a new configuration.
|
abstract Collection<String> |
getReconfigurableProperties()
Return all the properties that can be changed at run time.
|
ReconfigurationTaskStatus |
getReconfigurationTaskStatus() |
boolean |
isPropertyReconfigurable(String property)
Return whether a given property is changeable at run time.
|
void |
reconfigureProperty(String property,
String newVal)
Change a configuration property on this object to the value specified.
|
protected abstract String |
reconfigurePropertyImpl(String property,
String newVal)
Change a configuration property.
|
void |
setReconfigurationUtil(ReconfigurationUtil ru) |
void |
shutdownReconfigurationTask() |
void |
startReconfigurationTask()
Start a reconfiguration task to reload configuration in background.
|
getConf, setConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConf, setConf
public ReconfigurableBase()
public ReconfigurableBase(Configuration conf)
Configuration
conf.public void setReconfigurationUtil(ReconfigurationUtil ru)
protected abstract Configuration getNewConf()
public Collection<ReconfigurationUtil.PropertyChange> getChangedProperties(Configuration newConf, Configuration oldConf)
public void startReconfigurationTask() throws IOException
IOException
public ReconfigurationTaskStatus getReconfigurationTaskStatus()
public void shutdownReconfigurationTask()
public final void reconfigureProperty(String property, String newVal) throws ReconfigurationException
ReconfigurationException
.
This method makes the change to this objects Configuration
and calls reconfigurePropertyImpl to update internal data structures.
This method cannot be overridden, subclasses should instead override
reconfigureProperty.reconfigureProperty
in interface Reconfigurable
ReconfigurationException
public abstract Collection<String> getReconfigurableProperties()
getReconfigurableProperties
in interface Reconfigurable
public boolean isPropertyReconfigurable(String property)
isPropertyReconfigurable
in interface Reconfigurable
protected abstract String reconfigurePropertyImpl(String property, String newVal) throws ReconfigurationException
property
- Name of the property that is being reconfigured.newVal
- Proposed new value of the property.ReconfigurationException
- if there was an error applying newVal.Copyright © 2017 Apache Software Foundation. All Rights Reserved.