Support Questions

Find answers, ask questions, and share your expertise

Can we specify multiple directories for Nifi local state store?

avatar
Master Guru

Was reading this - https://nifi.apache.org/docs.html ( Configuring State Providers )

Can we specify more than one directory for WriteAheadLocalStateProvider?

E.g. By default it has below property in state-management.xml

    <local-provider>
        <id>local-provider</id>
        <class>org.apache.nifi.controller.state.providers.local.WriteAheadLocalStateProvider</class>
        <property name="Directory">/var/lib/nifi/state/local</property>
    </local-provider>

Can I add one more disk partition as a value of Directory in above xml? If yes, How to do that?

FYI: Below does not work.

    <local-provider>
        <id>local-provider</id>
        <class>org.apache.nifi.controller.state.providers.local.WriteAheadLocalStateProvider</class>
        <property name="Directory">/var/lib/nifi/state/local</property>
        <property name="Directory">/blahblah</property>
    </local-provider>
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Kuldeep Kulkarni

No you can not specify more then one local state directory. There is not much in the way of local state that is store by NiFi, so i am not sure the use case for needing more then one.

Thanks,

Matt

View solution in original post

5 REPLIES 5

avatar
Master Guru

avatar
Master Mentor

@Kuldeep Kulkarni

No you can not specify more then one local state directory. There is not much in the way of local state that is store by NiFi, so i am not sure the use case for needing more then one.

Thanks,

Matt

avatar
Master Guru

@Matt Clarke - Perfect! Thanks.

avatar
Master Mentor

NiFi allows you to specify multiple of the following:

- Content repositories directories

- Provenance repositories directories

- NiFi lib directories

- Variable registry files

Having multiple of any of these does not mean cloning of any data I going on.

Thanks,

Matt

avatar
Master Guru
@Matt Clarke

You already answered my next question 🙂

For all above mentioned directories, it stores data in round robin manner like Datanode stores blocks on local disks. Got it.