ListS3 2025.10.2.19

捆绑包

org.apache.nifi | nifi-aws-nar

描述

从 S3 桶中检索对象列表。对于列出的每个对象,创建一个代表该对象的 FlowFile,以便可以将其与 FetchS3Object 一起提取。该处理器仅在集群中的主节点上运行。如果主节点发生变化,新的主节点将从前一个节点中断的地方继续,而不是复制所有数据。

标签

AWS、Amazon、S3、list

输入要求

FORBIDDEN

支持敏感的动态属性

false

属性

属性

描述

AWS 凭据提供商服务

用于获取 AWS 凭据提供商的控制器服务

要与之交互的 S3 桶

通信超时

超时之前为与 AWS 建立连接或从 AWS 接收数据而等待的时间。

Custom Signer Class Name

Fully qualified class name of the custom signer class. The signer must implement com.amazonaws.auth. Signer interface.

Custom Signer Module Location

以逗号分隔的文件和/或目录路径列表,这些文件和/或目录包含自定义签名器的 JAR 文件及其依赖关系(如果有)。

Delimiter

用于分隔桶内目录的字符串。请查阅 AWS 文档以正确使用此字段。

端点替换 URL

要使用的端点 URL 而不是 AWS 默认端点,包括架构、主机、端口和路径。AWS 库会根据 AWS 区域选择端点 URL,但此属性会替换所选端点 URL,允许与其他与 S3 兼容的端点一起使用。

List Type

指定是使用原始列表对象还是较新的列表对象版本 2 端点。

列表批处理大小

如果不使用记录写入器,则此属性用于指定应在单次批处理中列出多少个 S3 对象。达到此数量后,已创建的 FlowFiles 将被传输出处理器。将此值设置得较低可能会通过在完整列表完成前发出 FlowFiles 来降低延迟。但是,这样会显著降低性能。较大的值可能需要更多内存来存储所有信息,然后再发出 FlowFiles。如果使用记录写入器,则此属性会被忽略,因为记录写入器的主要优点之一是能够将整个列表作为单个 FlowFile 发出。

Listing Strategy

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

对象最大存留时间

S3 对象可以考虑的最大时间范围;任何超过此时间(根据上次修改日期)的对象都将被忽略

对象最小存留时间

S3 对象可以考虑的最小时间范围;任何不足此时间(根据上次修改日期)的对象都将被忽略

Prefix

用于筛选对象列表的前缀。请勿以正斜杠“/”开头。在大多数情况下,应当以正斜杠“/”结尾。

Record Writer

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

区域

要连接的 AWS 区域。

Requester Pays

If true, indicates that the requester consents to pay any charges associated with listing the S3 bucket. This sets the 'x-amz-request-payer' header to 'requester'. Note that this setting is not applicable when 'Use Versions' is 'true'.

SSL Context Service

指定可选的 SSL Context Service,如果提供该服务,将用于创建连接

签名器替换

默认情况下,AWS S3 库使用签名版本 4,但此属性允许您指定版本 2 签名器以支持较早的 S3 兼容服务,甚至可以插入自己的自定义签名器实现。

Use Versions

Specifies whether to use S3 versions, if applicable. If false, only the latest version of each object will be returned.

Write Object Tags

如果设置为“True”,则与 S3 对象关联的标签将写入为 FlowFile 属性

Write User Metadata

如果设置为“True”,则用户定义的与 S3 对象关联的元数据将被添加到 FlowFile 属性/记录中

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.

proxy-configuration-service

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

状态管理

范围

描述

CLUSTER

执行密钥列表后,系统将存储最新密钥的时间戳以及具有相同时间戳的其他密钥。这允许处理器在下次运行时,仅列出在此日期之后添加或修改的密钥。状态存储在整个集群中,因此该处理器只能在主节点上运行,如果选择了新的主节点,则新节点可以从前一个节点中断的地方继续,而无需复制数据。

关系

名称

描述

success

FlowFiles 成功处理后,将路由到此关系。

写入属性

名称

描述

s3.bucket

S3 桶的名称

s3.region

S3 桶的区域

filename

文件的名称

s3.etag

可以用来查看文件是否已更改的 ETag

s3.isLatest

一个布尔值,表示这是否是对象的最新版本

s3.lastModified

自 UTC 时间纪元以来的最后修改时间(以毫秒为单位)

s3.length

对象的大小(以字节为单位)

s3.storeClass

对象的存储类别

s3.version

对象的版本(如果适用)

s3.tag.___

如果“写入对象标签”设置为“True”,则与列出的 S3 对象关联的标签将作为 Flowfile 属性的一部分写入

s3.user.metadata.___

如果“写入用户元数据”设置为“True”,则与列出的 S3 对象关联的用户定义元数据将作为 Flowfile 属性的一部分写入

另请参阅

语言: 中文