【问题标题】:Flink State Across multiple TransformersFlink State 跨多个 Transformer
【发布时间】:2022-12-02 04:45:22
【问题描述】:

How can I access a state using the same-id across multiple transformers, for example the following stores an Order object via ValueState in OrderMapper class:

env.addSource(source1()).keyBy(Order::getId).flatMap(new OrderMapper()).addSink(sink1());

Now I would like to access the same Order object via a SubOrderMapper class:

env.addSource(source2()).keyBy(SubOrder::getOrderId).flatMap(new SubOrderMapper()).addSink(sink2());

Edit: Looks like it\'s not possible to have state maintained across multiple operators, is there a way to have one operator accept multiple inputs, lets say 5 sources?

    标签: java apache-flink


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多