Apache nifi 如何调用NIFI REST API启动/停止生成流文件

Apache nifi 如何调用NIFI REST API启动/停止生成流文件,apache-nifi,Apache Nifi,我想使用NIFI REST API调用开始和停止生成流文件 例如,从Python或shell脚本中,可以使用NIFI REST API < /P> < P>调用NIFI生成流文件。如果您想使用Python与NIFI API进行交互,请考虑使用 具体而言,您可以使用以下方式启动和停止处理器: nipyapi.canvas.schedule_processor 请参见此处的文档: 看看这个- nipyapi.canvas.schedule_processor(processor, schedul

我想使用NIFI REST API调用开始和停止生成流文件


例如,从Python或shell脚本中,可以使用NIFI REST API < /P> < P>调用NIFI生成流文件。如果您想使用Python与NIFI API进行交互,请考虑使用

具体而言,您可以使用以下方式启动和停止处理器:

nipyapi.canvas.schedule_processor
请参见此处的文档:

看看这个-
nipyapi.canvas.schedule_processor(processor, scheduled, refresh=True)

Set a Processor to Start or Stop.

Note that this doesn’t guarantee that it will change state, merely that it will be instructed to try. Some effort is made to wait and see if the processor starts
Parameters: 

    processor (ProcessorEntity) – The Processor to target
    scheduled (bool) – True to start, False to stop
    refresh (bool) – Whether to refresh the object before action

Returns:    

True for success, False for failure
Return type:    

(bool)