Apache NIFI Jon不会自动终止 [英] Apache NIFI Jon is not terminating automatically

查看:161
本文介绍了Apache NIFI Jon不会自动终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Apache NIFI工具的新手.我正在尝试从mongo db导入数据,并将该数据放入HDFS.我已经为MongoDB创建了2个处理器,为HDFS创建了2个处理器,并且正确配置了它们.作业正在成功运行,并将数据存储到HDFS中,但作业成功后应自动终止.但是事实并非如此,并且在HDFS中创建了太多文件.我想知道如何在NIFI中完成按需工作,以及如何确定一项工作是否成功.

I am new to Apache NIFI tool. I am trying to import data from mongo db and put that data into the HDFS. I have created 2 processors one for MongoDB and second for HDFS and I configured them correctly. The job is running successfully and storing the data into HDFS but the job should terminate automatically on success. But it is not, and creating too many files in HDFS. I want to know how to make On Demand Job in NIFI and how to determine that a job is successfull.

推荐答案

GetMongo将继续根据提供的属性(例如QueryProjectionLimit)从MongoDB中提取数据.至少到目前为止,它无法跟踪执行过程.但是,您可以做的是更改Run Schedule和/或Scheduling Strategy.您可以通过右键单击处理器并单击Configure来找到它们.默认情况下,Run Schedule将为0秒,这意味着将连续运行.将其更改为60 min将使处理器每隔一小时运行一次.这样仍将每隔一小时再次从MongoDB中读取相同的文档,但是由于您已经提到只想运行一次,因此建议使用这种方法.

GetMongo will continue to pull data from MongoDB based on the provided properties such as Query, Projection, Limit. It has no way of tracking the execution process, at least for now. What you can do, however, is changing the Run Schedule and/or Scheduling Strategy. You can find them by right clicking on the processor and clicking Configure. By default, Run Schedule will be 0 sec which means running continuously. Changing it to, say, 60 min will make the processor run every one hour. This will still read the same documents from MongoDB again every one hour but since you have mentioned that you just want to run it only once, I'm suggesting this approach.

这篇关于Apache NIFI Jon不会自动终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆