zoukankan      html  css  js  c++  java
  • 关于Flink--ProcessFunction的使用

    一、概念:

    处理函数(底层API),可以访问时间戳,水位线以及注册定时时间,还可以输出特定事件(超时事件)

    Flink主要提供了8个ProcessFunction(斜体标注的重要):

    • ProcessFunction
    • KeyedProcessFunction
    • CoProcessFunction
    • ProcessJoinFunction
    • BroadcastProcessFunction
    • KeyedBroadcastProcessFunction
    • ProcessWindowFunction
    • ProcessAllWindowFunction

    二、重点解读其中几个API

    Non-keyed-strema(没有分流的)

      ProcessFunction[In,Out]

        processElemnt:来一条数据处理一次

        onTimer:定时器

      KeyedProcedssFunction[Key,In,Out]

        processElement:来一条数据处理一次

        onTimer:定时器

    WindowedStream(分流开窗)

      ProcessWindowFunction[In,Out,Key,TimeWindow]

        process

    ConnectStream(两条流的合并)

      CoprocerssFunction

        processelements1 处理第一条流

        procesElements2 处理第二条流

        onTimer 定时器

        

  • 相关阅读:
    [Lydsy1706月赛]大根堆
    某考试 T1 Function
    [SHOI2016] 随机序列
    某考试 T1 至危警告
    某考试 T2 yja
    bzoj1880 [Sdoi2009]Elaxia的路线
    bzoj1804 [Ioi2007]Flood 洪水
    bzoj4546 codechef XRQRS
    bzoj4547 小奇的集合
    bzoj1443 [JSOI2009]游戏Game
  • 原文地址:https://www.cnblogs.com/atBruce/p/13137685.html
Copyright © 2011-2022 走看看