PackageFlowFile

文档中心 › 组件索引 › PackageFlowFile

PackageFlowFile Processor

类型全限定名:cn.org.acal.lynxus.processors.standard.PackageFlowFile

所属 Bundle:cn.org.acal.lynxus:lynxus-standard-nar:2.11.8

描述

该处理器将 FlowFile 属性和内容打包到输出 FlowFile 中,该输出 FlowFile 可以从 Lynxus 导出并导入回 Lynxus,同时保留原始属性和内容。

标签

flowfileflowfile-streamflowfile-stream-v3packageattributes

多处理器协同场景

将 FlowFile 内容和属性从一个 Lynxus 实例发送到另一个 Lynxus 实例。

说明:在两个 Lynxus 实例之间发送 FlowFiles 时,首选 Remote Process Group,但另一种方式是 使用 PackageFlowFile,然后通过 InvokeHTTP 发送到 ListenHTTP。

flowfileattributescontentffv3flowfile-stream-v3transfer

配置 PackageFlowFile:

    "Maximum Batch Size" > 1 can improve storage or transmission efficiency by batching many FlowFiles together into 1 larger file.
    "Maximum Batch Content Size" can be used to enforce a soft upper limit on the overall package size.

    Note, that the Batch properties only restrict the maximum amount of FlowFiles to incorporate into a single package.
    In case less FlowFiles are queued than the properties allow for,
    the processor will not wait for the limits to be reached but create smaller packages instead.

    Connect the success relationship of PackageFlowFile to the input of InvokeHTTP.

配置 InvokeHTTP:

    "HTTP Method" = "POST" to send data to ListenHTTP.
    "HTTP URL" should include the hostname, port, and path to the ListenHTTP.
    "Request Content-Type" = "${mime.type}" because PackageFlowFile output files have attribute mime.type=application/flowfile-v3.

配置 ListenHTTP:

    "Listening Port" = a unique port number.

    ListenHTTP automatically unpacks files that have attribute mime.type=application/flowfile-v3.
    If PackageFlowFile batches 99 FlowFiles into 1 file that InvokeHTTP sends, then the original 99 FlowFiles will be output by ListenHTTP.

将 FlowFile 内容和属性从 Lynxus 导出到外部存储并重新导入。

flowfileattributescontentffv3flowfile-stream-v3offlinestorage

配置 PackageFlowFile:

    "Maximum Batch Size" > 1 can improve storage or transmission efficiency by batching many FlowFiles together into 1 larger file.
    "Maximum Batch Content Size" can be used to enforce a soft upper limit on the overall package size.

    Note, that the Batch properties only restrict the maximum amount of FlowFiles to incorporate into a single package.
    In case less FlowFiles are queued than the properties allow for,
    the processor will not wait for the limits to be reached but create smaller packages instead.

    Connect the success relationship to the input of any Lynxus egress processor for offline storage.

配置 UnpackContent:

    "Packaging Format" = "application/flowfile-v3".

    Connect the output of a Lynxus ingress processor that reads files stored offline to the input of UnpackContent.
    If PackageFlowFile batches 99 FlowFiles into 1 file that is read from storage, then the original 99 FlowFiles will be output by UnpackContent.

属性

下表中,加粗的属性为必填项;其余为可选项。表格同时标注默认值、是否支持表达式语言,以及是否为敏感属性(值会被加密)。

名称默认值可选值描述
Maximum Batch Size1打包到一个输出 FlowFile 中的最大 FlowFile 数量。
最大批内容大小1 GB打包到一个输出 FlowFile 中的 FlowFile 的最大合并内容大小。注意,内容超过此限制的 FlowFile 将单独打包。

关系 (Relationships)

名称描述自动终止
original用于创建包的 FlowFiles 被发送到此关系否
success打包好的FlowFile发送到这个关系中否

写入的 FlowFile 属性

名称描述
mime.typemime.type 将更改为 application/flowfile-v3

状态管理

该组件不存储状态。

受限 (Restricted)

该组件不受限。

输入要求

该组件要求有传入连接。