ListFTP 2025.10.2.19

捆绑包

org.apache.nifi | nifi-standard-nar

描述

列出 FTP 服务器上驻留的文件。对于在远程服务器上找到的每个文件,将创建一个新的 FlowFile 文件,并将文件名属性设置为远程服务器上的文件名。然后可以将其与 FetchFTP 一起使用以提取这些文件。

标签

files、ftp、ingest、input、list、remote、source

输入要求

FORBIDDEN

支持敏感的动态属性

false

属性

属性

描述

连接模式

FTP 连接模式

连接超时

创建连接时在超时之前要等待的时间

数据超时

在本地和远程系统之间传输文件时,此值规定了系统间无数据传输的最长允许间隔时间

文件筛选器正则表达式

提供用于筛选文件名的 Java 正则表达式;如果提供了筛选器,则仅提取名称与该正则表达式匹配的文件

主机名

远程系统的完全限定主机名或 IP 地址

忽略带点的文件

如果为 true,则忽略名称以点(“.”)开头的文件

内部缓冲区大小

为缓冲数据流设置内部缓冲区大小

密码

用户账户的密码

路径筛选器正则表达式

当递归搜索为 true 时,只会扫描路径与给定正则表达式匹配的子目录

端口

远程主机上用于从中获取数据的连接端口

远程路径

远程系统上用于提取或推送文件的路径

远程轮询批次大小

The value specifies how many file paths to find in a given directory on the remote system when doing a file listing. This value in general should not need to be modified but when polling against a remote system with a tremendous number of files this value can be critical. Setting this value too high can result very poor performance and setting it too low can cause the flow to be slower than normal.

递归搜索

如果为 true,将从任意嵌套的子目录中提取文件;否则,不会遍历子目录

传输模式

FTP 传输模式

用户名

用户名

et-initial-listing-target

Specify how initial listing should be handled. Used by 'Tracking Entities'strategy.

et-state-cache

Listed entities are stored in the specified cache storage so that this processor can resume listing across NiFi restart or in case of primary node change. 'Tracking Entities'strategy require tracking information of all listed entities within the last 'Tracking Time Window'. To support large number of entities, the strategy uses DistributedMapCache instead of managed state. Cache key format is 'ListedEntities::{processorId}(::{nodeId})'. If it tracks per node listed entities, then the optional '::{nodeId}' part is added to manage state separately. E.g. cluster wide cache key ='ListedEntities::8dda2321-0164-1000-50fa-3042fe7d6a7b', per node cache key ='ListedEntities::8dda2321-0164-1000-50fa-3042fe7d6a7b::nifi-node3' The stored cache content is Gzipped JSON string. The cache key will be deleted when target listing configuration is changed. Used by 'Tracking Entities'strategy.

et-time-window

Specify how long this processor should track already-listed entities. 'Tracking Entities'strategy can pick any entity whose timestamp is inside the specified time window. For example, if set to '30 minutes', any entity having timestamp in recent 30 minutes will be the listing target when this processor runs. A listed entity is considered 'new/updated' and a FlowFile is emitted if one of following condition meets: 1. does not exist in the already-listed entities, 2. has newer timestamp than the cached entity, 3. has different size than the cached entity. If a cached entity 's timestamp becomes older than specified time window, that entity will be removed from the cached already-listed entities. Used by'Tracking Entities'strategy.

follow-symlink

如果为 true,则将提取偶数符号文件和嵌套的符号子目录;否则,将不读取符号文件,也不会遍历符号链接子目录

ftp-use-utf8

告知客户端在处理文件和文件名时使用 UTF-8 编码。如果设置为 true,则服务器还必须支持 UTF-8 编码。

listing-strategy

指定如何确定新的/更新的实体。有关详细信息,请参阅每种策略的描述。

proxy-configuration-service

指定代理配置控制器服务来代理网络请求。

record-writer

指定用于创建列表的记录写入器。如果未指定,则将为列出的每个实体创建一个 FlowFile。如果指定了记录写入器,则所有实体都将写入单个 FlowFile,而不是向单个 FlowFiles 添加属性。

target-system-timestamp-precision

指定目标系统的时间戳精度。由于该处理器使用实体的时间戳来决定应列出哪些实体,因此使用正确的时间戳精度至关重要。

状态管理

范围

描述

CLUSTER

执行文件列表后,将存储最新文件的时间戳。这允许处理器在下次运行时,仅列出在此日期之后添加或修改的文件。状态存储在整个集群中,因此该处理器只能在主节点上运行,如果选择了新的主节点,则新节点将不会复制先前主节点列出的数据。

关系

名称

描述

success

所有收到的 FlowFiles 都将路由至“success”

写入属性

名称

描述

ftp.remote.host

FTP 服务器的主机名

ftp.remote.port

FTP 服务器上连接的端口

ftp.listing.user

执行 FTP 列表的用户的用户名

file.owner

源文件的所有者 ID 的数字值

file.group

源文件的组 ID 数字值

file.permissions

源文件的读取/写入/执行权限

file.size

源文件中的字节数

file.lastModifiedTime

文件系统中文件最后一次修改的时间戳,格式为“yyyy-MM-dd'T'HH:mm:ssZ”

filename

FTP 服务器上文件的名称

path

从中提取文件的 FTP 服务器上的目录的完全限定名称

另请参阅

语言: 中文