Apache Nifi 简明教程
Apache NiFi - Basic Concepts
Apache NiFi 由 Web 服务器、流控制器和处理器组成,在 Java 虚拟机上运行。它还有 3 个存储库流文件存储库、内容存储库和来源存储库,如下图所示。
Apache NiFi consist of a web server, flow controller and a processor, which runs on Java Virtual Machine. It also has 3 repositories Flowfile Repository, Content Repository, and Provenance Repository as shown in the figure below.
Flowfile Repository
此存储库存储通过 apache NiFi 的数据流的每个流文件的当前状态和属性。此存储库的默认位置是在 apache NiFi 的根目录中。可以通过更改名为“nifi.flowfile.repository.directory”的属性来更改此存储库的位置。
This repository stores the current state and attributes of every flowfile that goes through the data flows of apache NiFi. The default location of this repository is in the root directory of apache NiFi. The location of this repository can be changed by changing the property named "nifi.flowfile.repository.directory".
Content Repository
此存储库包含 NiFi 的所有流文件中出现的所有内容。它的默认目录也位于 NiFi 的根目录中,可以使用“org.apache.nifi.controller.repository.FileSystemRepository”属性更改此目录。此目录会在磁盘中使用大量空间,因此建议在安装磁盘中有足够的空间。
This repository contains all the content present in all the flowfiles of NiFi. Its default directory is also in the root directory of NiFi and it can be changed using "org.apache.nifi.controller.repository.FileSystemRepository" property. This directory uses large space in disk so it is advisable to have enough space in the installation disk.
Provenance Repository
存储库会跟踪并存储所有在 NiFi 中流动的流文件的所有事件。有两个源存储库 - volatile provenance repository (在该存储库中,所有源数据都会在重启后丢失)和 persistent provenance repository 。它的默认目录也在 NiFi 的根目录中,并且可以使用“org.apache.nifi.provenance.PersistentProvenanceRepository”和“org.apache.nifi.provenance.VolatileProvenanceRepositor”属性为相应的存储库更改它。
The repository tracks and stores all the events of all the flowfiles that flow in NiFi. There are two provenance repositories - volatile provenance repository (in this repository all the provenance data get lost after restart) and persistent provenance repository. Its default directory is also in the root directory of NiFi and it can be changed using "org.apache.nifi.provenance.PersistentProvenanceRepository" and "org.apache.nifi.provenance.VolatileProvenanceRepositor" property for the respective repositories.