[ 
https://issues.apache.org/jira/browse/NIFI-11776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard updated NIFI-11776:
----------------------------------
    Description: 
Currently, in state-management.xml, we can configure an instance of a local 
provider and a instances of a cluster provider.

We should introduce the concept of composite cluster provider (similar to what 
we do for user group authorizers). This would give the option to specify 
multiple cluster providers. NiFi would always read the state from the primary 
cluster provider but would write state to all configured cluster providers.

The configuration could be something like:
{code:java}
    <cluster-provider>
        <id>zk-provider-1</id>
        
<class>org.apache.nifi.controller.state.providers.zookeeper.ZooKeeperStateProvider</class>
        <property name="Connect String"></property>
        <property name="Root Node">/nifi</property>
        <property name="Session Timeout">10 seconds</property>
        <property name="Access Control">Open</property>
    </cluster-provider>

    <cluster-provider>
        <id>zk-provider-2</id>
        
<class>org.apache.nifi.controller.state.providers.zookeeper.ZooKeeperStateProvider</class>
        <property name="Connect String"></property>
        <property name="Root Node">/nifi</property>
        <property name="Session Timeout">10 seconds</property>
        <property name="Access Control">Open</property>
    </cluster-provider>

    <cluster-provider>
        <id>composite-provider</id>
        
<class>org.apache.nifi.controller.state.providers.CompositeStateProvider</class>
        <property name="Primary State Provider">zk-provider-1</property>
        <property name="Secondary State Provider">zk-provider-2</property>
     </cluster-provider> {code}
And, in nifi.properties:
{code:java}
nifi.state.management.provider.cluster=composite-provider{code}

  was:
Currently, in state-management.xml, we can configure an instance of a local 
provider and a instances of a cluster provider.

We should introduce the concept of composite cluster provider (similar to what 
we do for user group authorizers). This would give the option to specify 
multiple cluster providers. NiFi would always read the state from the primary 
cluster provider but would write state to all configured cluster providers.

The configuration could be something like:
{code:java}
    <cluster-provider>
        <id>zk-provider-1</id>
        
<class>org.apache.nifi.controller.state.providers.zookeeper.ZooKeeperStateProvider</class>
        <property name="Connect String"></property>
        <property name="Root Node">/nifi</property>
        <property name="Session Timeout">10 seconds</property>
        <property name="Access Control">Open</property>
    </cluster-provider>

    <cluster-provider>
        <id>zk-provider-2</id>
        
<class>org.apache.nifi.controller.state.providers.zookeeper.ZooKeeperStateProvider</class>
        <property name="Connect String"></property>
        <property name="Root Node">/nifi</property>
        <property name="Session Timeout">10 seconds</property>
        <property name="Access Control">Open</property>
    </cluster-provider>

    <cluster-provider>
        <id>composite-provider</id>
        
<class>org.apache.nifi.controller.state.providers.CompositeStateProvider</class>
        <property name="Primary State Provider">zk-provider-1</property>        
 <property name="Secondary State Provider">zk-provider-2</property>
     </cluster-provider> {code}
And, in nifi.properties:
{code:java}
nifi.state.management.provider.cluster=composite-provider{code}


> Composite Cluster State Provider
> --------------------------------
>
>                 Key: NIFI-11776
>                 URL: https://issues.apache.org/jira/browse/NIFI-11776
>             Project: Apache NiFi
>          Issue Type: New Feature
>          Components: Core Framework
>            Reporter: Pierre Villard
>            Priority: Major
>             Fix For: 2.latest
>
>
> Currently, in state-management.xml, we can configure an instance of a local 
> provider and a instances of a cluster provider.
> We should introduce the concept of composite cluster provider (similar to 
> what we do for user group authorizers). This would give the option to specify 
> multiple cluster providers. NiFi would always read the state from the primary 
> cluster provider but would write state to all configured cluster providers.
> The configuration could be something like:
> {code:java}
>     <cluster-provider>
>         <id>zk-provider-1</id>
>         
> <class>org.apache.nifi.controller.state.providers.zookeeper.ZooKeeperStateProvider</class>
>         <property name="Connect String"></property>
>         <property name="Root Node">/nifi</property>
>         <property name="Session Timeout">10 seconds</property>
>         <property name="Access Control">Open</property>
>     </cluster-provider>
>     <cluster-provider>
>         <id>zk-provider-2</id>
>         
> <class>org.apache.nifi.controller.state.providers.zookeeper.ZooKeeperStateProvider</class>
>         <property name="Connect String"></property>
>         <property name="Root Node">/nifi</property>
>         <property name="Session Timeout">10 seconds</property>
>         <property name="Access Control">Open</property>
>     </cluster-provider>
>     <cluster-provider>
>         <id>composite-provider</id>
>         
> <class>org.apache.nifi.controller.state.providers.CompositeStateProvider</class>
>         <property name="Primary State Provider">zk-provider-1</property>
>         <property name="Secondary State Provider">zk-provider-2</property>
>      </cluster-provider> {code}
> And, in nifi.properties:
> {code:java}
> nifi.state.management.provider.cluster=composite-provider{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to