Re: Disabling autogenerated uid/hash doesn't work when using file source

2021-08-26 Thread Matthias Pohl
Hi Vishal,
you're right: the FileSource itself doesn't provide these methods. But you
could get them through the DataStreamSource (which
implements SingleOutputStreamOperator and provides these two methods
[1,2]). It is returned by StreamExecutionEnvironment.fromSource [3].
fromSource would need the FileSource being passed as a parameter.

Best,
Matthias

PS: Thanks to Chesnay for the hint.

[1]
https://javadoc.io/doc/org.apache.flink/flink-streaming-java_2.12/latest/org/apache/flink/streaming/api/datastream/SingleOutputStreamOperator.html#uid-java.lang.String-
[2]
https://javadoc.io/doc/org.apache.flink/flink-streaming-java_2.12/latest/org/apache/flink/streaming/api/datastream/SingleOutputStreamOperator.html#uid-java.lang.String-
[3]
https://javadoc.io/doc/org.apache.flink/flink-streaming-java_2.12/latest/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.html

On Wed, Aug 25, 2021 at 9:28 AM Vishal Surana  wrote:

> I set names and uid for all my flink operators and have explicitly
> disabled auto generation of uid to force developers in my team the same
> practice. However, when using a file source, there's no option of providing
> it due to which the job fails to start unless we enable auto generation. Am
> I doing something wrong?


Disabling autogenerated uid/hash doesn't work when using file source

2021-08-25 Thread Vishal Surana
I set names and uid for all my flink operators and have explicitly disabled 
auto generation of uid to force developers in my team the same practice. 
However, when using a file source, there's no option of providing it due to 
which the job fails to start unless we enable auto generation. Am I doing 
something wrong?