nifi中清空 Queue

来源:互联网 发布:淘宝your highness 编辑:程序博客网 时间:2024/06/09 21:50

参考:https://kisstechdocs.wordpress.com/2015/01/15/simple-tasks-in-nifi-clearing-a-queue/

Clearing a Queue

A common question that new users of Apache NiFi (incubating) have is how to clear out a queue of FlowFiles that has built up in a connection. Sometimes your dataflow doesn’t work as you expected, and data starts to build up in a queue. The answer to this question depends on whether you care about the data that is in the queue. If not, see the first scenario below. If so, see the second scenario.

Scenario 1

If you are merely setting up a new dataflow and have “test data” running through it that you don’t care about, then here is a simple solution:

  1. Stop both processors on either side of the connection.
  2. Right-click on the connection and select Configure.
  3. On the Settings tab of the Configure Connection window, change the FlowFile expiration setting from 0 sec to 1 sec.

FlowFile Expiration Setting

This will cause all the FlowFiles in the queue to expire and be removed from the dataflow. You may find that you need to restart the processors to see the files clear out of the queue. But often, you just need to right-click on a blank space in the graph and select “Refresh status” to see the queue update.

NOTE: Be sure to change the setting back to 0 sec before running data through your flow again!

Scenario 2

If you do care about the data in the queue and you don’t want to lose it, there is also a way to deal with that scenario. It may or may not provide a solution to what is causing your dataflow to fail, but it will give you a way to move the data elsewhere in any case:

  1. Stop both processors on either side of the connection.
  2. Left-click on the connection so that it is selected.

Connection

  1. You will notice that source-side of the connection has a small red box, and the destination side has a small blue box.
  2. You may click and drag the blue box to move that end of the connection to another processor.
  3. Perhaps you will want to try sending the data to a new copy of the processor where the data was building up, but with a different configuration — to see if that solves the problem. Alternatively, you can at least send the data to a PutFile processor to copy the data off into a local error directory. This could allow you to troubleshoot an issue with the data itself before trying to send it back through the flow.

0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 在菲律宾黑了博彩老板的钱怎么办 九阴真经3d先遣服更新失败怎么办 公司核名通过不想用了怎么办 公司核名下来了不想注册了怎么办 家人受到小贷公司催款威胁怎么办 商标抽签资料提交上去有问题怎么办 花椒直播助手苹果版下载不了怎么办 在香港酒店住把床单弄上血了怎么办 综英美我能怎么办我也很绝望百度云 护照的名字中间有个空格怎么办 开车不小心压死黄鼠狼了怎么办 三户联保贷款一方不还怎么办 因为隔断中介违约…我该怎么办 上海居住证没下来换住址了怎么办 工商注册后大股东不注资怎么办 公司不给去办理变更股东信息怎么办 滴滴车主注册没有自己的车型怎么办 代办用虚假地址注册的公司怎么办? 写字楼注册公司租户不租了怎么办 租户没把公司迁出我该怎么办 租户不肯把户口迁出了业主怎么办 同片区个体户营业场所搬迁怎么办 个体领发票的本丢了怎么办 领房产证发票和合同丢了怎么办 税务登记证5年没有办怎么办 二证合一后税务登记证怎么办? 微信漂流瓶打招呼对方收不到怎么办 添加不上徽信好友的微信帐号怎么办 手机号码不用了微信密码忘了怎么办 别人用我的手机号码注册微信怎么办 电脑此网站的安全证书有问题怎么办 起诉离婚开庭时被告不到场怎么办 商标35类被别人注册了怎么办 商标被注销后被别人注册怎么办 电商35类商标被抢注怎么办 血小板太低怎么办可以吃水果吗? 微信好友删除了只记得昵称怎么办 优酷会员1080p很卡怎么办 电脑最下面的任务栏不显示怎么办 ea账号保留的问题忘了怎么办 微博超级话题账号被屏蔽怎么办