【问题标题】:apache fink 0.10 Filtering duplicates over an infinite stream with time window purgeapache fink 0.10 使用时间窗口清除过滤无限流上的重复项
【发布时间】:2016-06-06 23:34:39
【问题描述】:

如何通过时间窗口清除过滤掉无限流上的重复项?我没有无限的空间/内存,我知道在说 2 秒(在本地时钟上)之后,任何可能发生的重复都会发生。这意味着 2 秒后我可以丢弃(清除)旧数据。

使用时间窗口清除过滤无限流上的重复项。

我得到了关于如何在这个问题中删除重复项的绝佳答案(非常感谢 Till):apache flink 0.10 how to get the first occurence of a composite key from an unbounded input dataStream?

但我不知道如何告诉 flink 在 2 秒(当地时间)后丢弃旧数据。

请问我如何使用 flink 0.10 做到这一点?

非常感谢!!!

这是删除重复但不清除的语句:

input.keyBy(0, 1).flatMap(new DuplicateFilter()).print();

如果我在keyBy(0, 1) 之后添加.timeWindow(Time.minutes(1), Time.seconds(30)),则它不可编译。

【问题讨论】:

    标签: purge flink-streaming


    【解决方案1】:

    感谢 Till - 答案在以下链接的更新中给出: apache flink 0.10 how to get the first occurence of a composite key from an unbounded input dataStream?

    查看更新。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-04-29
      • 1970-01-01
      • 2014-08-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多