简体   繁体   English

在一天结束时安排 NiFi 流的停机时间

[英]Schedule a downtime for NiFi flow at the end of the day

I have a Nifi flow which reads data from a Kafka queue, splits the message into 2 different components and then writes it to 2 different locations in HDFS. I want to schedule a downtime for 15 minutes at the end of the day (11:45pm to 12:00am) which could allow all the messages already split to be drained from the queues and landed to the respective HDFS locations on the same day.我有一个 Nifi 流,它从 Kafka 队列读取数据,将消息拆分为 2 个不同的组件,然后将其写入 HDFS 中的 2 个不同位置。我想在一天结束时(晚上 11:45)安排 15 分钟的停机时间至凌晨 12:00),这可以让所有已拆分的消息从队列中排出并在同一天到达相应的 HDFS 位置。 Is there a way to get this done?有没有办法完成这项工作?

I have tried looking at the wait processor.我试过查看等待处理器。 I can schedule the processor to start at a certain time but I'm unable to identify how to stop the processor after 12:00am.我可以安排处理器在特定时间启动,但我无法确定如何在上午 12:00 之后停止处理器。

There are a couple of implementation options I can think of,我可以想到几个实现选项,

  • NiFi REST API call to stop-start the required processor NiFi REST API 调用停止-启动需要的处理器
  • Routing - check current timestamp is between 11:45pm and 12:00am and route such FlowFiles to LogAttribute with Run Schedule every 15 mins.路由 - 检查当前时间戳是在晚上 11:45 到凌晨 12:00 之间,并每 15 分钟将此类 FlowFiles 路由到带有运行计划的LogAttribute

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM