Great timing.  Pierre put in a JIRA/PR for this yesterday.

  https://issues.apache.org/jira/browse/NIFI-2832

Thanks
Joe

On Wed, Sep 28, 2016 at 8:22 AM, Bryan Bende <bbe...@gmail.com> wrote:
> Hi Selvam,
>
> It depends what processor you are using. For example, ListFile using a local
> file path will always store state locally even when clustered because no
> other node can take over that state since the directory to list only exists
> on that node. Each processor has an annotation at the top of it which
> specifies what type of state it stores, local or clustered. We should
> consider adding this to the docs if it's not included already.
>
> -Bryan
>
>
> On Wednesday, September 28, 2016, Selvam Raman <sel...@gmail.com> wrote:
>>
>> Hi,
>>
>> This is my state-management.xml attribute
>>
>>     <local-provider>
>>         <id>local-provider</id>
>>
>> <class>org.apache.nifi.controller.state.providers.local.WriteAheadLocalStateProvider</class>
>>         <property name="Directory">./state/local</property>
>>     </local-provider>
>>
>>
>>     <cluster-provider>
>>         <id>zk-provider</id>
>>
>> <class>org.apache.nifi.controller.state.providers.zookeeper.ZooKeeperStateProvider</class>
>>         <property name="Connect
>> String">hostname:2181,hostname:2181</property>
>>         <property name="Root Node">/opt/nifiroot</property>
>>         <property name="Session Timeout">10 seconds</property>
>>         <property name="Access Control">Open</property>
>>     </cluster-provider>
>>
>>
>> This is my nifi.poperties file attributes
>>
>> ####################
>> # State Management #
>> ####################
>> nifi.state.management.configuration.file=./conf/state-management.xml
>> # The ID of the local state provider
>> nifi.state.management.provider.local=local-provider
>> # The ID of the cluster-wide state provider. This will be ignored if NiFi
>> is not clustered but must be populated if running in a cluster.
>> nifi.state.management.provider.cluster=zk-provider
>> # Specifies whether or not this instance of NiFi should run an embedded
>> ZooKeeper server
>> nifi.state.management.embedded.zookeeper.start=false
>> # Properties file that provides the ZooKeeper properties to use if
>> <nifi.state.management.embedded.zookeeper.start> is set to true
>>
>> nifi.state.management.embedded.zookeeper.properties=./conf/zookeeper.properties
>>
>> # zookeeper properties, used for cluster management #
>> nifi.zookeeper.connect.string=hostname:2181,hostname:2181
>> nifi.zookeeper.connect.timeout=3 secs
>> nifi.zookeeper.session.timeout=3 secs
>> nifi.zookeeper.root.node=/opt/nifiroot
>>
>> the question here is, i am running nifi in cluster mode and i am expecting
>> state should be stored in zk-provider. But the state stored in
>> local-provider.
>>
>> local-state provider:
>> /home/nifi/nifi-1.0.0/state/local/partition-*
>>
>> zk-provider:(empty directory)
>> /opt/nifiroot
>>
>> any help on this.
>>
>>
>>
>> --
>> Selvam Raman
>> "லஞ்சம் தவிர்த்து நெஞ்சம் நிமிர்த்து"
>
>
>
> --
> Sent from Gmail Mobile

Reply via email to