[
https://issues.apache.org/jira/browse/HADOOP-7001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Patrick Kling updated HADOOP-7001:
----------------------------------
Attachment: HADOOP-7001.patch
Here is a new version of my patch. I have changed the interface Reconfigurable
somewhat: Since only a subset of configuration properties can be changed at run
time, it makes more sense to have an interface that allows us to change a
single property at a time, rather than passing a Configuration object and then
detecting all changes that need to be made. I have also added methods for
detecting which configuration properties can be changed at runtime.
{code}
/**
* Something whose {...@link Configuration} can be changed at run time.
*/
public interface Reconfigurable extends Configurable {
/**
* Change a the configuration property on this object to the value specified.
*
* Change a the configuration property on this object to the value specified
* and return the previous value that the configuration property was set to
* (or null if it was not previously set).
*
* If the property cannot be changed, throw a
* {...@link ConfigurationChangeException}.
*/
public String changeConfProperty(String property, String newVal)
throws ConfigurationChangeException;
/**
* Return whether a given property is changeable at run time.
*
* If isConfPropertyChangeable returns true for a property,
* then changeConf should not throw an exception when changing
* this property.
*/
public boolean isConfPropertyChangeable(String property);
/**
* Return all the properties that can be changed at run time.
*/
public List<String> getChangeableConfProperties();
}
{code}
The patch also includes a simple servlet for changing the configuration of a
Reconfigurable. In order to allow configuration changes at run time, I made all
the getters and setters in Configuration synchronized.
> Allow configuration changes without restarting configured nodes
> ---------------------------------------------------------------
>
> Key: HADOOP-7001
> URL: https://issues.apache.org/jira/browse/HADOOP-7001
> Project: Hadoop Common
> Issue Type: Task
> Reporter: Patrick Kling
> Assignee: Patrick Kling
> Attachments: HADOOP-7001.patch, reconfigurable.patch
>
>
> Currently, changing the configuration on a node (e.g., the name node)
> requires that we restart the node. We propose a change that would allow us to
> make configuration changes without restarting. Nodes that support
> configuration changes at run time should implement the following interface:
> interface ChangeableConfigured extends Configured {
> void changeConfiguration(Configuration newConf) throws
> ConfigurationChangeException;
> }
> The contract of changeConfiguration is as follows:
> The node will compare newConf to the existing configuration. For each
> configuration property that is set to a different value than in the current
> configuration, the node will either adjust its behaviour to conform to the
> new configuration or throw a ConfigurationChangeException if this change is
> not possible at run time. If a configuration property is set in the current
> configuration but is unset in newConf, the node should use its default value
> for this property. After a successful invocation of changeConfiguration, the
> behaviour of the configured node should be indistinguishable from the
> behaviour of a node that was configured with newConf at creation.
> It should be easy to change existing nodes to implement this interface. We
> can start by throwing the exception for all changes and then gradually start
> supporting more and more changes at run time. (We might even consider
> replacing Configured with ChangeableConfigured entirely, but I think the
> proposal above afford greater flexibility).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.