InvokeScriptedProcessor 2025.10.2.19

捆绑包

org.apache.nifi | nifi-scripting-nar

描述

Experimental - Invokes a script engine for a Processor defined in the given script. The script must define a valid class that implements the Processor interface, and it must set a variable 'processor' to an instance of the class. Processor methods such as onTrigger() will be delegated to the scripted Processor instance. Also any Relationships or PropertyDescriptors defined by the scripted processor will be added to the configuration dialog. The scripted processor can implement public void setLogger(ComponentLog logger) to get access to the parent logger, as well as public void onScheduled(ProcessContext context) and public void onStopped(ProcessContext context) methods to be invoked when the parent InvokeScriptedProcessor is scheduled or stopped, respectively. NOTE: The script will be loaded when the processor is populated with property values, see the Restrictions section for more security implications. Experimental: Impact of sustained usage not yet verified.

标签

groovy、invoke、script

输入要求

支持敏感的动态属性

true

属性

属性

描述

模块目录

以逗号分隔的文件和/或目录的路径列表,包含脚本所需的模块。

脚本正文

要执行的脚本正文。只能使用脚本文件或脚本正文中的一个

脚本引擎

用于执行脚本的语言引擎

脚本文件

要执行的脚本文件的路径。只能使用脚本文件或脚本正文中的一个

状态管理

范围

描述

LOCAL

脚本可以使用状态管理 APIs 存储和检索状态。有关更多详细信息,请参阅开发者指南的“状态管理器”部分。

CLUSTER

脚本可以使用状态管理 APIs 存储和检索状态。有关更多详细信息,请参阅开发者指南的“状态管理器”部分。

限制

所需权限

解释

执行代码

允许操作员执行任意代码,并拥有 NiFi 的所有权限。

另请参阅

语言: 中文