You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Marton Elek (Jira)" <ji...@apache.org> on 2020/08/03 08:47:00 UTC

[jira] [Commented] (HDDS-3835) Ozone reconfiguration framework

    [ https://issues.apache.org/jira/browse/HDDS-3835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17169825#comment-17169825 ] 

Marton Elek commented on HDDS-3835:
-----------------------------------

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.

{code}
public class ReplicationManager {
  private ReplicationManagerConfig config;

  public ReplicationManager(ReplicationManagerConfig config) {
     this.config = config
    //init 
  }


   public void onConfigChanged(ReplicationManagerConfig newConfig){
      if (newConfig.getThreadNo() != ccurrentConfig.getThreadNo()) {
             // restart thread pool
      }
  }
}
{code}

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:

{code}
ConfigSource hadoop = new LegacyHadoopConf();
ConfigSource cli = ConfigsFromCliParams(); 

ConfigSource ozoneConfiguration = new CompositeConfigurationSource(cli, hadoop);
{code} 

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...)

> Ozone reconfiguration framework
> -------------------------------
>
>                 Key: HDDS-3835
>                 URL: https://issues.apache.org/jira/browse/HDDS-3835
>             Project: Hadoop Distributed Data Store
>          Issue Type: New Feature
>    Affects Versions: 0.7.0
>            Reporter: maobaolong
>            Assignee: maobaolong
>            Priority: Major
>
> We need Ozone reconfigure framework to support reload new config value dynamically



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org