Ben,

In standalone mode, the state data is written to the NIFI_HOME/state
directory.  It is OK, and very normal, for a standalone NiFi to use
processors that specify the CLUSTER scope.  Without a cluster state store
like Zookeeper, NiFi gracefully falls back to using the local file system.
A clustered NiFi will store data separately.

If you are developing a processor and using scope, you should set the value
as if NiFi was clustered.  You do not have to figure out what kind of NiFi
installation is running, and do conditional logic on the state.

NiFi Developer Guide - State Manager
https://nifi.apache.org/docs/nifi-docs/html/developer-
guide.html#state_manager

NiFi Admin Guide - State Management
https://nifi.apache.org/docs/nifi-docs/html/administration-
guide.html#state_management

Thanks,

James

On Mon, Jun 26, 2017 at 8:53 PM, 尹文才 <[email protected]> wrote:

> Hi guys, does anyone know where NIFI stores the state data when I call
> statemanager.setState() if NIFI is run in local standalone mode?
>
> And is it OK to use statemanager.setState(Scope.CLUSTER) for both
> standalone and clustered NIFI? Thanks.
>
> Regards,
> Ben
>

Reply via email to