| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| http://www.apache.org/licenses/LICENSE-2.0 |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <!-- |
| This file provides a mechanism for defining and configuring the State Providers |
| that should be used for storing state locally and across a NiFi cluster. In order |
| to use a specific provider, it must be configured here and its identifier |
| must be specified in the nifi.properties file. |
| --> |
| <stateManagement> |
| <!-- |
| State Provider that stores state locally in a configurable directory. This Provider requires the following properties: |
| |
| Directory - the directory to store components' state in. If the directory being used is a sub-directory of the NiFi installation, it |
| is important that the directory be copied over to the new version when upgrading NiFi. |
| --> |
| <local-provider> |
| <id>local-provider</id> |
| <class>org.apache.nifi.controller.state.providers.local.WriteAheadLocalStateProvider</class> |
| <property name="Directory">./state/local</property> |
| </local-provider> |
| |
| <!-- |
| State Provider that is used to store state in ZooKeeper. This Provider requires the following properties: |
| |
| Root Node - the root node in ZooKeeper where state should be stored. The default is '/nifi', but it is advisable to change this to a different value if not using |
| the embedded ZooKeeper server and if multiple NiFi instances may all be using the same ZooKeeper Server. |
| |
| Connect String - A comma-separated list of host:port pairs to connect to ZooKeeper. For example, myhost.mydomain:2181,host2.mydomain:5555,host3:6666 |
| |
| Session Timeout - Specifies how long this instance of NiFi is allowed to be disconnected from ZooKeeper before creating a new ZooKeeper Session. Default value is "30 seconds" |
| |
| Access Control - Specifies which Access Controls will be applied to the ZooKeeper ZNodes that are created by this State Provider. This value must be set to one of: |
| - Open : ZNodes will be open to any ZooKeeper client. |
| - CreatorOnly : ZNodes will be accessible only by the creator. The creator will have full access to create children, read, write, delete, and administer the ZNodes. |
| This option is available only if access to ZooKeeper is secured via Kerberos or if a Username and Password are set. |
| |
| Username - An optional username that can be used to assign Access Controls to ZNodes. ZooKeeper allows users to assign arbitrary usernames and passwords to ZNodes. These usernames |
| and passwords are not explicitly defined elsewhere but are simply associated with ZNodes, so it is important that all NiFi nodes in a cluster have the same value for the |
| Username and Password properties. |
| |
| Password - An optional password that can be used to assign Access Controls to ZNodes. This property must be set if the Username property is set. NOTE: ZooKeeper transmits passwords |
| in plain text. As a result, a Username and Password should be used only if communicate with a ZooKeeper on a localhost or over encrypted comms (such as configuring SSL |
| communications with ZooKeeper). |
| --> |
| <cluster-provider> |
| <id>zk-provider</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">30 seconds</property> |
| <property name="Access Control">CreatorOnly</property> |
| <property name="Username">nifi</property> |
| <property name="Password">nifi</property> |
| </cluster-provider> |
| </stateManagement> |