Hi, ReduceFunction实现如下:

new ReduceFunction<Order>() {
    @Override
    public Order reduce(Order o1, Order o2) throws Exception {
        LOGGER.error("reduce=====>{}", o1);
        return new Order(o1.getId(),
                o1.getAct() + o2.getAct(),
                o1.getTimestamp());
    }
}


| |
Jimmy Wong
|
|
[email protected]
|
签名由网易邮箱大师定制


在2020年02月26日 11:07,zhisheng<[email protected]> 写道:
可以发下你的 ReduceFunction 是咋写的

Jimmy Wong <[email protected]> 于2020年2月26日周三 上午10:37写道:

Hi,All:
请教一下,我用一个 Flink ReduceFunction 计算,但是发送到下游的数据不变了,而上游一直有数据过来,请问会是啥原因,谢谢!




| |
Jimmy Wong
|
|
[email protected]
|
签名由网易邮箱大师定制


回复