Configurable, Reconfigurablepublic abstract class ReconfigurableBase extends Configured implements Reconfigurable
| Constructor | Description |
|---|---|
ReconfigurableBase() |
Construct a ReconfigurableBase.
|
ReconfigurableBase(Configuration conf) |
Construct a ReconfigurableBase with the
Configuration
conf. |
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Collection<ReconfigurationUtil.PropertyChange> |
getChangedProperties(Configuration newConf,
Configuration oldConf) |
|
protected abstract Configuration |
getNewConf() |
Create a new configuration.
|
abstract java.util.Collection<java.lang.String> |
getReconfigurableProperties() |
Return all the properties that can be changed at run time.
|
ReconfigurationTaskStatus |
getReconfigurationTaskStatus() |
|
boolean |
isPropertyReconfigurable(java.lang.String property) |
Return whether a given property is changeable at run time.
|
void |
reconfigureProperty(java.lang.String property,
java.lang.String newVal) |
Change a configuration property on this object to the value specified.
|
protected abstract java.lang.String |
reconfigurePropertyImpl(java.lang.String property,
java.lang.String newVal) |
Change a configuration property.
|
void |
setReconfigurationUtil(ReconfigurationUtil ru) |
|
void |
shutdownReconfigurationTask() |
|
void |
startReconfigurationTask() |
Start a reconfiguration task to reload configuration in background.
|
getConf, setConfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConf, setConfpublic ReconfigurableBase()
public ReconfigurableBase(Configuration conf)
Configuration
conf.conf - configuration.@VisibleForTesting public void setReconfigurationUtil(ReconfigurationUtil ru)
protected abstract Configuration getNewConf()
@VisibleForTesting public java.util.Collection<ReconfigurationUtil.PropertyChange> getChangedProperties(Configuration newConf, Configuration oldConf)
public void startReconfigurationTask()
throws java.io.IOException
java.io.IOException - raised on errors performing I/O.public ReconfigurationTaskStatus getReconfigurationTaskStatus()
public void shutdownReconfigurationTask()
public final void reconfigureProperty(java.lang.String property,
java.lang.String newVal)
throws ReconfigurationException
Configuration
and calls reconfigurePropertyImpl to update internal data structures.
This method cannot be overridden, subclasses should instead override
reconfigurePropertyImpl.reconfigureProperty in interface Reconfigurableproperty - property name.newVal - new value.ReconfigurationException - if there was an error applying newVal.
If the property cannot be changed, throw a
ReconfigurationException.public abstract java.util.Collection<java.lang.String> getReconfigurableProperties()
getReconfigurableProperties in interface Reconfigurablepublic boolean isPropertyReconfigurable(java.lang.String property)
isPropertyReconfigurable in interface Reconfigurableproperty - property name.protected abstract java.lang.String reconfigurePropertyImpl(java.lang.String property,
java.lang.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 © 2008–2025 Apache Software Foundation. All rights reserved.