Re: Is it possible to get Flink job name in an operator?

2019-10-15 Thread Aleksandar Mastilovic
I got mine in AbstractStreamOperator.open() method through 
this.getContainingTask().getEnvironment().getJobID();


> On Oct 14, 2019, at 11:53 PM, 马阳阳  wrote:
> 
> As the title. Is it possible now? Or if we can do something to achieve this. 
> I tried to put the job name into the ExecutionConfig.GlobalJobParameters. But 
> it is not possible to get the job name before Environment.execute() is called.
> 
> Best regards,
> mayangyang



Re: Is it possible to get Flink job name in an operator?

2019-10-15 Thread Zhu Zhu
I think ExecutionConfig.GlobalJobParameters is the way to do this if you
want to retrieve it in runtime.
Or you can just pass the name to each operator you implement to have it
serialized together with the udf.

Thanks,
Zhu Zhu

马阳阳  于2019年10月15日周二 下午3:11写道:

> As the title. Is it possible now? Or if we can do something to achieve
> this. I tried to put the job name into the 
> ExecutionConfig.GlobalJobParameters.
> But it is not possible to get the job name before Environment.execute() is
> called.
>
> Best regards,
> mayangyang
>