Hi Salva,

Just wondering why not good to set the uid like this?
```
output.sinkTo(outputSink).uid("my-human-readable-sink-uid");
```

>From the mentioned UID Flink is going to make the hash which is consistent
from UID -> HASH transformation perspective.

BR,
G



On Fri, Jun 7, 2024 at 7:54 AM Salva Alcántara <salcantara...@gmail.com>
wrote:

> Hi,
>
> I want to add the uid for my Kafka sink in such a way that I can still use
> the existing savepoint. The problem I'm having is that I cannot set the uid
> hash. If I try something like this:
>
> ```
> output.sinkTo(outputSink).setUidHash("xyzbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
> ```
>
> I get the following error:
>
> ```
> Exception in thread "main" java.lang.UnsupportedOperationException: Cannot
> set a custom UID hash on a non-legacy sink
> at
> org.apache.flink.streaming.api.datastream.DataStreamSink.setUidHash(DataStreamSink.java:163)
> ```
>
> How can one set the operator id directly then for new (non-legacy) sinks?
>
> Kind regards,
>
> Salva
>
>

Reply via email to