Re: Migrate custom partitioner from Flink 1.7 to Flink 1.9

Posted by Salva Alcántara on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Migrate-custom-partitioner-from-Flink-1-7-to-Flink-1-9-tp31839p31932.html

Thanks Chesnay! Just to be clear, this how my current code looks like:

```
unionChannel = broadcastChannel.broadcast().union(singleChannel)

result = new DataStream<>(
    unionChannel.getExecutionEnvironment(),
    new PartitionTransformation<>(unionChannel.getTransformation(), new
MyDynamicPartitioner())  
)
```

The problem when migrating to Flink 1.9 is that MyDynamicPartitioner cannot
handle broadcasted elements as explained in the question description. So,
based on your reply, I guess I could do something like this:

```
resultSingleChannel = new DataStream<>(
    singleChannel.getExecutionEnvironment(),
    new PartitionTransformation<>(singleChannel.getTransformation(), new
MyDynamicPartitioner())  
)

result = broadcastChannel.broadcast().union(resultSingleChannel)
```

I will give it a try and see if it works.




--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/