I don't think it's impossible. I see two independent question:
1. How the interface should look like with annotation based configuration
2. How the changes can be identified.
About 1.
I think an ideal interface is an async event It can be connected with the event queue and the new conf can be delivered in an async way.
public class ReplicationManager {
private ReplicationManagerConfig config;
public ReplicationManager(ReplicationManagerConfig config) {
this.config = config
}
public void onConfigChanged(ReplicationManagerConfig newConfig){
if (newConfig.getThreadNo() != ccurrentConfig.getThreadNo()) {
}
}
}
About 2:
Under the hood we use plain old Hadoop configuration, I supposed the configuration reload supposed to be working. As far as I understood the problem is with the CLI override parameters (which exists in Hadoop, too. BTW).
But at most of the places we use `ConfigurationSource` interface which would make it easy to read configuration from multiple sources. For example:
ConfigSource hadoop = new LegacyHadoopConf();
ConfigSource cli = ConfigsFromCliParams();
ConfigSource ozoneConfiguration = new CompositeConfigurationSource(cli, hadoop);
With this approach the composite configuration can read configuration from mutiple sources but hadoop configuration can be reloaded.
(It requires a few adjustments on Hadoop RPC side as we have direct cast there, but it's possible to solve...)
Hi elek, I used to work well with HDFS reconfig framework, it helps us to solve many problem without restart the process, something like change the interval of redundancyMonitor, resize some queue size, anyway, it helps us a lot.
But, after some thought of Ozone, i think it hard to have a reconfig framework like HDFS by some following reasons.
Do you have some idea to make reconfig come true to Ozone?