- Apache NiFi 教程
- Apache NiFi - 首頁
- Apache NiFi - 簡介
- Apache NiFi - 基本概念
- Apache NiFi - 環境設定
- Apache NiFi - 使用者介面
- Apache NiFi - 處理器
- Apache NiFi - 處理器分類
- Apache NiFi - 處理器關係
- Apache NiFi - FlowFile
- Apache NiFi - 佇列
- Apache NiFi - 處理組
- Apache NiFi - 標籤
- Apache NiFi - 配置
- Apache NiFi - 管理
- Apache NiFi - 建立資料流
- Apache NiFi - 模板
- Apache NiFi - API
- Apache NiFi - 資料溯源
- Apache NiFi - 監控
- Apache NiFi - 升級
- Apache NiFi - 遠端處理組
- Apache NiFi - 控制器設定
- Apache NiFi - 報告任務
- Apache NiFi - 自定義處理器
- Apache NiFi - 自定義控制器服務
- Apache NiFi - 日誌
- Apache NiFi 有用資源
- Apache NiFi - 快速指南
- Apache NiFi - 有用資源
- Apache NiFi - 討論
Apache NiFi - 配置
Apache NiFi 是一個高度可配置的平臺。conf 目錄下的 nifi.properties 檔案
包含大部分配置。
Apache NiFi 常用的屬性如下:
核心屬性
本節包含執行 NiFi 例項所需的必填屬性。
| 序號 | 屬性名稱 | 預設值 | 描述 |
|---|---|---|---|
| 1 | nifi.flow.configuration.file | ./conf/flow.xml.gz | 此屬性包含 flow.xml 檔案的路徑。此檔案包含在 NiFi 中建立的所有資料流。 |
| 2 | nifi.flow.configuration.archive.enabled | true | 此屬性用於啟用或停用 NiFi 中的歸檔功能。 |
| 3 | nifi.flow.configuration.archive.dir | ./conf/archive/ | 此屬性用於指定歸檔目錄。 |
| 4 | nifi.flow.configuration.archive.max.time | 30 天 | 此屬性用於指定歸檔內容的保留時間。 |
| 5 | nifi.flow.configuration.archive.max.storage | 500 MB | 它包含歸檔目錄可以增長的最大大小。 |
| 6 | nifi.authorizer.configuration.file | ./conf/authorizers.xml | 指定授權器配置檔案,用於使用者授權。 |
| 7 | nifi.login.identity.provider.configuration.file | ./conf/login-identity-providers.xml | 此屬性包含登入身份提供程式的配置, |
| 8 | nifi.templates.directory | ./conf/templates | 此屬性用於指定 NiFi 模板儲存的目錄。 |
| 9 | nifi.nar.library.directory | ./lib | 此屬性包含庫的路徑,NiFi 將使用此路徑載入此 lib 資料夾中存在的 NAR 檔案中的所有元件。 |
| 10 | nifi.nar.working.directory | ./work/nar/ | 一旦 NiFi 處理 NAR 檔案,此目錄將儲存解壓後的 NAR 檔案。 |
| 11 | nifi.documentation.working.directory | ./work/docs/components | 此目錄包含所有元件的文件。 |
狀態管理
這些屬性用於儲存元件的狀態,有助於啟動處理過程,其中元件在重啟後和下一個計劃執行中遺留。
| 序號 | 屬性名稱 | 預設值 | 描述 |
|---|---|---|---|
| 1 | nifi.state.management.configuration.file | ./conf/state-management.xml | 此屬性包含 state-management.xml 檔案的路徑。此檔案包含該 NiFi 例項資料流中存在的所有元件狀態。 |
| 2 | nifi.state.management.provider.local | local-provider | 它包含本地狀態提供程式的 ID。 |
| 3 | nifi.state.management.provider.cluster | zk-provider | 此屬性包含叢集範圍狀態提供程式的 ID。如果 NiFi 不是叢集化的,則會忽略此屬性,但如果在叢集中執行,則必須填充此屬性。 |
| 4 | nifi.state.management. embedded. zookeeper. start | false | 此屬性指定此 NiFi 例項是否應執行嵌入式 ZooKeeper 伺服器。 |
| 5 | nifi.state.management. embedded. zookeeper.properties | ./conf/zookeeper.properties | 此屬性包含屬性檔案的路徑,該檔案提供 ZooKeeper 屬性以供使用,如果 <nifi.state.management. embedded. zookeeper. start> 設定為 true。 |
FlowFile 儲存庫
現在讓我們瞭解 FlowFile 儲存庫的重要細節:
| 序號 | 屬性名稱 | 預設值 | 描述 |
|---|---|---|---|
| 1 | nifi.flowfile.repository. implementation | org.apache.nifi.controller.repository.WriteAhead FlowFileRepository | 此屬性用於指定是在記憶體中還是在磁碟中儲存 flowfile。如果使用者希望在記憶體中儲存 flowfile,則更改為“org.apache.nifi.controller.repository.VolatileFlowFileRepository”。 |
| 2 | nifi.flowfile.repository.directory | ./flowfile_repository | 指定 flowfile 儲存庫的目錄。 |
廣告