camille caulier
03/12/2024, 11:37 AMDataStream<Tuple2String, Integer> aggregation = operatorAggregateStream.partitionCustom(new RandomPartitioner(), value->value.f0 )
but I want to create an operation that would reconcile the partitions after the partial evaluations all together e.g. a max operation
here is a little schema
subtask 1: key 1 = max val 10
subtask 2: key 1= max val 20
subtask 3: key 2 = max val 15
subtask 4: key 4 = max val 25
after a reconciliation the reconciliator would take the highest values after the partial evaluations
the reconciliator would have in memory :
key1 = max val 20
key 2 = max val 25
I had another implementation which followed this but I'm fairly certain this does not work since the output proved that it no longer followed a correct parititoning (all the outputs would come from the same subtasks)
DataStream<Tuple2String, Integer> aggregation = operatorAggregateStream.partitionCustom(new RandomPartitioner(), value->value.f0 ).keyBy(value->value.f0)
.maxBy(1);
the output would give this
aggregation:14> (A,100)
aggregation:3> (C,94)
aggregation:3> (C,94)
aggregation:14> (A,100)
aggregation:3> (C,94)
aggregation:14> (A,100)
aggregation:3> (C,94)
aggregation:14> (A,100)
aggregation:3> (C,94)
aggregation:14> (A,100)
aggregation:3> (C,94)
aggregation:14> (A,100)
aggregation:3> (C,94)
aggregation:14> (A,100)
aggregation:3> (B,80)
albeit a simple attempt I was curious as to how I could go about with this π
I'm happy to any advice