Apache Nifi 简明教程
Apache NiFi - Configuration
Apache NiFi 是一个高度可配置的平台。conf 目录中的 nifi.properties 文件
Apache NiFi is highly configurable platform. The nifi.properties file in conf directory
包含大部分配置。
contains most of the configuration.
Apache NiFi 常用的属性如下 −
The commonly used properties of Apache NiFi are as follows −
Core properties
此部分包含运行 NiFi 实例所需的属性。
This section contains the properties, which are compulsory to run a NiFi instance.
S.No. |
Property name |
Default Value |
description |
1 |
nifi.flow.configuration.file |
./conf/flow.xml.gz |
This property contains the path to flow.xml file. This file contains all the data flows created in NiFi. |
2 |
nifi.flow.configuration.archive.enabled |
true |
This property is used to enable or disable archiving in NiFi. |
3 |
nifi.flow.configuration.archive.dir |
./conf/archive/ |
This property is used to specify the archive directory. |
4 |
nifi.flow.configuration.archive.max.time |
30 days |
This is used to specify the retention time for archiving content. |
5 |
nifi.flow.configuration.archive.max.storage |
500 MB |
it contains the maximum size of archiving directory can grow. |
6 |
nifi.authorizer.configuration.file |
./conf/authorizers.xml |
To specify the authorizer configuration file, which is used for user authorization. |
7 |
nifi.login.identity.provider.configuration.file |
./conf/login-identity-providers.xml |
This property contains the configuration of login identity providers, |
8 |
nifi.templates.directory |
./conf/templates |
This property is used to specify the directory, where NiFi templates will be stored. |
9 |
nifi.nar.library.directory |
./lib |
This property contains the path to library, which NiFi will use to load all the components using NAR files present in this lib folder. |
10 |
nifi.nar.working.directory |
./work/nar/ |
This directory will be storing the unpacked nar files, once NiFi processes them. |
11 |
nifi.documentation.working.directory |
./work/docs/components |
This directory contains the documentation of all components. |
State Management
这些属性用于存储组件状态,这些状态有助于启动处理,即组件在重新启动后剩余的状态和在下次计划运行时的状态。
These properties are used to store the state of the components helpful to start the processing, where components left after a restart and in the next schedule running.
S.No. |
Property name |
Default Value |
description |
1 |
nifi.state.management.configuration.file |
./conf/state-management.xml |
This property contains the path to state-management.xml file. This file contains all component state present in the data flows of that NiFi instance. |
2 |
nifi.state.management.provider.local |
local-provider |
It contains the ID of the local state provider. |
3 |
nifi.state.management.provider.cluster |
zk-provider |
This property contains 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. |
4 |
nifi.state.management. embedded. zookeeper. start |
false |
This property specifies whether or not this instance of NiFi should run an embedded ZooKeeper server. |
5 |
nifi.state.management. embedded. zookeeper.properties |
./conf/zookeeper.properties |
This property contains the path of the properties file that provides the ZooKeeper properties to use if <nifi.state.management. embedded. zookeeper. start> is set to true. |
FlowFile Repository
现在,我们来看一看 FlowFile 存储库的重要说明 –
Let us now look into the important details of the FlowFile repository −
S.No. |
Property name |
Default Value |
description |
1 |
nifi.flowfile.repository. implementation |
org.apache.nifi. controller. repository. WriteAhead FlowFileRepository |
This property is used to specify either to store the flowfiles in memory or disk. If a user want to stores the flowfiles in memory then change to "org.apache.nifi.controller. repository.VolatileFlowFileRepository". |
2 |
nifi.flowfile.repository.directory |
./flowfile_repository |
To specify the directory for flowfile repository. |