具体需求是这样,采集取得的通道总流量5分钟一次存入 hive 表,为了取得 5 分钟内该通道的流量,需要前后2次采集到的总流量相减,我想用同一个 hive
表自己相互 join,形成 2 个 hive 流 join,不知道是否可以实现?或者有其他实现方法吗?
我现在使用 crontab 定时 batch 模式做,希望能改成 stream 模式

select p1.traffic -p2.traffic
from p as p1
inner join p as p2 on p1.id=p2.id and p1.time=p2.time + interval 5 minutes



--
Sent from: http://apache-flink.147419.n8.nabble.com/

回复