You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Boris Lublinsky <bo...@lightbend.com> on 2018/11/28 18:08:22 UTC

Changes in Flink 1.6.2



Prior to Flink version 1.6.2 including 1.6.1
env.getStreamGraph.getJobGraph was happily returning currently defined Graph, but in 1.6.2 this fails to compile with a pretty cryptic message
AM I missing something?


Boris Lublinsky
FDP Architect
boris.lublinsky@lightbend.com
https://www.lightbend.com/


Re: Changes in Flink 1.6.2

Posted by Dominik Wosiński <wo...@gmail.com>.
Hey,

@Dawid is right. It is a known issue in Scala. This is due to the
functional nature of Scala and is explained on StackOverflow[1].

Best Regards,
Dom.
[1]
https://stackoverflow.com/questions/7498677/why-is-this-reference-ambiguous

pt., 30 lis 2018 o 15:56 Dawid Wysakowicz <dw...@apache.org>
napisał(a):

> Hi Boris,
>
> I am not a scala expert, so I won't be able explain the root cause
> completely, but it is because you access empty-parameter java method as
> scala parameterless one (I don't know why it doesn't work).
>
> If you change your code to: env.getStreamGraph.getJobGraph().getJobID it
> will work.
>
> Best,
>
> Dawid
> On 30/11/2018 15:19, Boris Lublinsky wrote:
>
> Dominik,
> Any feedback on this?
>
> Boris Lublinsky
> FDP Architect
> boris.lublinsky@lightbend.com
> https://www.lightbend.com/
>
> On Nov 28, 2018, at 2:56 PM, Boris Lublinsky <
> boris.lublinsky@lightbend.com> wrote:
>
> Here is the code
>
> def executeLocal() : Unit = {
>   val env = StreamExecutionEnvironment.getExecutionEnvironment  buildGraph(env)
>   System.out.println("[info] Job ID: " + env.getStreamGraph.getJobGraph.getJobID)
>   env.execute()
> }
>
> And an error
>
> Error:(68, 63) ambiguous reference to overloaded definition,
> both method getJobGraph in class StreamGraph of type (x$1:
> org.apache.flink.api.common.JobID)org.apache.flink.runtime.jobgraph.JobGraph
> and  method getJobGraph in class StreamingPlan of type
> ()org.apache.flink.runtime.jobgraph.JobGraph
> match expected type ?
>     System.out.println("[info] Job ID: " +
> env.getStreamGraph.getJobGraph.getJobID)
>
> Boris Lublinsky
> FDP Architect
> boris.lublinsky@lightbend.com
> https://www.lightbend.com/
>
> On Nov 28, 2018, at 2:47 PM, Dominik Wosiński <wo...@gmail.com> wrote:
>
> Hey,
> Could you show the message that You are getting?
> Best Regards,
> Dom.
>
> śr., 28 lis 2018 o 19:08 Boris Lublinsky <bo...@lightbend.com>
> napisał(a):
>
>>
>>
>> Prior to Flink version 1.6.2 including 1.6.1
>> env.getStreamGraph.getJobGraph was happily returning currently defined
>> Graph, but in 1.6.2 this fails to compile with a pretty cryptic message
>> AM I missing something?
>>
>>
>> Boris Lublinsky
>> FDP Architect
>> boris.lublinsky@lightbend.com
>> https://www.lightbend.com/
>>
>>
>
>

Re: Changes in Flink 1.6.2

Posted by Boris Lublinsky <bo...@lightbend.com>.
It does, weird

Boris Lublinsky
FDP Architect
boris.lublinsky@lightbend.com
https://www.lightbend.com/

> On Nov 30, 2018, at 8:56 AM, Dawid Wysakowicz <dw...@apache.org> wrote:
> 
> Hi Boris,
> 
> I am not a scala expert, so I won't be able explain the root cause completely, but it is because you access empty-parameter java method as scala parameterless one (I don't know why it doesn't work).
> 
> If you change your code to: env.getStreamGraph.getJobGraph().getJobID it will work.
> 
> Best,
> 
> Dawid
> On 30/11/2018 15:19, Boris Lublinsky wrote:
>> Dominik,
>> Any feedback on this?
>> 
>> Boris Lublinsky
>> FDP Architect
>> boris.lublinsky@lightbend.com <ma...@lightbend.com>
>> https://www.lightbend.com/ <https://www.lightbend.com/>
>>> On Nov 28, 2018, at 2:56 PM, Boris Lublinsky <boris.lublinsky@lightbend.com <ma...@lightbend.com>> wrote:
>>> 
>>> Here is the code
>>> 
>>> def executeLocal() : Unit = {
>>>   val env = StreamExecutionEnvironment.getExecutionEnvironment
>>>   buildGraph(env)
>>>   System.out.println("[info] Job ID: " + env.getStreamGraph.getJobGraph.getJobID)
>>>   env.execute()
>>> }
>>> And an error
>>> 
>>> Error:(68, 63) ambiguous reference to overloaded definition,
>>> both method getJobGraph in class StreamGraph of type (x$1: org.apache.flink.api.common.JobID)org.apache.flink.runtime.jobgraph.JobGraph
>>> and  method getJobGraph in class StreamingPlan of type ()org.apache.flink.runtime.jobgraph.JobGraph
>>> match expected type ?
>>>     System.out.println("[info] Job ID: " + env.getStreamGraph.getJobGraph.getJobID)
>>> 
>>> Boris Lublinsky
>>> FDP Architect
>>> boris.lublinsky@lightbend.com <ma...@lightbend.com>
>>> https://www.lightbend.com/ <https://www.lightbend.com/>
>>>> On Nov 28, 2018, at 2:47 PM, Dominik Wosiński <wossyn@gmail.com <ma...@gmail.com>> wrote:
>>>> 
>>>> Hey, 
>>>> Could you show the message that You are getting? 
>>>> Best Regards,
>>>> Dom.
>>>> 
>>>> śr., 28 lis 2018 o 19:08 Boris Lublinsky <boris.lublinsky@lightbend.com <ma...@lightbend.com>> napisał(a):
>>>> 
>>>> 
>>>> Prior to Flink version 1.6.2 including 1.6.1
>>>> env.getStreamGraph.getJobGraph was happily returning currently defined Graph, but in 1.6.2 this fails to compile with a pretty cryptic message
>>>> AM I missing something?
>>>> 
>>>> 
>>>> Boris Lublinsky
>>>> FDP Architect
>>>> boris.lublinsky@lightbend.com <ma...@lightbend.com>
>>>> https://www.lightbend.com/ <https://www.lightbend.com/>
>>> 
>> 


Re: Changes in Flink 1.6.2

Posted by Dawid Wysakowicz <dw...@apache.org>.
Hi Boris,

I am not a scala expert, so I won't be able explain the root cause
completely, but it is because you access empty-parameter java method as
scala parameterless one (I don't know why it doesn't work).

If you change your code to: env.getStreamGraph.getJobGraph().getJobID it
will work.

Best,

Dawid

On 30/11/2018 15:19, Boris Lublinsky wrote:
> Dominik,
> Any feedback on this?
>
> Boris Lublinsky
> FDP Architect
> boris.lublinsky@lightbend.com <ma...@lightbend.com>
> https://www.lightbend.com/
>
>> On Nov 28, 2018, at 2:56 PM, Boris Lublinsky
>> <boris.lublinsky@lightbend.com
>> <ma...@lightbend.com>> wrote:
>>
>> Here is the code
>>
>> def executeLocal() : Unit = {
>>   val env = StreamExecutionEnvironment.getExecutionEnvironment buildGraph(env)
>>   System.out.println("[info] Job ID: " + env.getStreamGraph.getJobGraph.getJobID)
>>   env.execute()
>> }
>> And an error
>>
>> Error:(68, 63) ambiguous reference to overloaded definition,
>> both method getJobGraph in class StreamGraph of type (x$1:
>> org.apache.flink.api.common.JobID)org.apache.flink.runtime.jobgraph.JobGraph
>> and  method getJobGraph in class StreamingPlan of type
>> ()org.apache.flink.runtime.jobgraph.JobGraph
>> match expected type ?
>>     System.out.println("[info] Job ID: " +
>> env.getStreamGraph.getJobGraph.getJobID)
>>
>> Boris Lublinsky
>> FDP Architect
>> boris.lublinsky@lightbend.com <ma...@lightbend.com>
>> https://www.lightbend.com/
>>
>>> On Nov 28, 2018, at 2:47 PM, Dominik Wosiński <wossyn@gmail.com
>>> <ma...@gmail.com>> wrote:
>>>
>>> Hey, 
>>> Could you show the message that You are getting? 
>>> Best Regards,
>>> Dom.
>>>
>>> śr., 28 lis 2018 o 19:08 Boris Lublinsky
>>> <boris.lublinsky@lightbend.com
>>> <ma...@lightbend.com>> napisał(a):
>>>
>>>
>>>
>>>     Prior to Flink version 1.6.2 including 1.6.1
>>>     env.getStreamGraph.getJobGraph was happily returning currently
>>>     defined Graph, but in 1.6.2 this fails to compile with a pretty
>>>     cryptic message
>>>     AM I missing something?
>>>
>>>
>>>     Boris Lublinsky
>>>     FDP Architect
>>>     boris.lublinsky@lightbend.com <ma...@lightbend.com>
>>>     https://www.lightbend.com/
>>>
>>
>

Re: Changes in Flink 1.6.2

Posted by Boris Lublinsky <bo...@lightbend.com>.
Dominik,
Any feedback on this?

Boris Lublinsky
FDP Architect
boris.lublinsky@lightbend.com
https://www.lightbend.com/

> On Nov 28, 2018, at 2:56 PM, Boris Lublinsky <bo...@lightbend.com> wrote:
> 
> Here is the code
> 
> def executeLocal() : Unit = {
>   val env = StreamExecutionEnvironment.getExecutionEnvironment
>   buildGraph(env)
>   System.out.println("[info] Job ID: " + env.getStreamGraph.getJobGraph.getJobID)
>   env.execute()
> }
> And an error
> 
> Error:(68, 63) ambiguous reference to overloaded definition,
> both method getJobGraph in class StreamGraph of type (x$1: org.apache.flink.api.common.JobID)org.apache.flink.runtime.jobgraph.JobGraph
> and  method getJobGraph in class StreamingPlan of type ()org.apache.flink.runtime.jobgraph.JobGraph
> match expected type ?
>     System.out.println("[info] Job ID: " + env.getStreamGraph.getJobGraph.getJobID)
> 
> Boris Lublinsky
> FDP Architect
> boris.lublinsky@lightbend.com <ma...@lightbend.com>
> https://www.lightbend.com/
> 
>> On Nov 28, 2018, at 2:47 PM, Dominik Wosiński <wossyn@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Hey, 
>> Could you show the message that You are getting? 
>> Best Regards,
>> Dom.
>> 
>> śr., 28 lis 2018 o 19:08 Boris Lublinsky <boris.lublinsky@lightbend.com <ma...@lightbend.com>> napisał(a):
>> 
>> 
>> 
>> Prior to Flink version 1.6.2 including 1.6.1
>> env.getStreamGraph.getJobGraph was happily returning currently defined Graph, but in 1.6.2 this fails to compile with a pretty cryptic message
>> AM I missing something?
>> 
>> 
>> Boris Lublinsky
>> FDP Architect
>> boris.lublinsky@lightbend.com <ma...@lightbend.com>
>> https://www.lightbend.com/ <https://www.lightbend.com/>
> 


Re: Changes in Flink 1.6.2

Posted by Boris Lublinsky <bo...@lightbend.com>.
Here is the code

def executeLocal() : Unit = {
  val env = StreamExecutionEnvironment.getExecutionEnvironment
  buildGraph(env)
  System.out.println("[info] Job ID: " + env.getStreamGraph.getJobGraph.getJobID)
  env.execute()
}
And an error

Error:(68, 63) ambiguous reference to overloaded definition,
both method getJobGraph in class StreamGraph of type (x$1: org.apache.flink.api.common.JobID)org.apache.flink.runtime.jobgraph.JobGraph
and  method getJobGraph in class StreamingPlan of type ()org.apache.flink.runtime.jobgraph.JobGraph
match expected type ?
    System.out.println("[info] Job ID: " + env.getStreamGraph.getJobGraph.getJobID)

Boris Lublinsky
FDP Architect
boris.lublinsky@lightbend.com
https://www.lightbend.com/

> On Nov 28, 2018, at 2:47 PM, Dominik Wosiński <wo...@gmail.com> wrote:
> 
> Hey, 
> Could you show the message that You are getting? 
> Best Regards,
> Dom.
> 
> śr., 28 lis 2018 o 19:08 Boris Lublinsky <boris.lublinsky@lightbend.com <ma...@lightbend.com>> napisał(a):
> 
> 
> 
> Prior to Flink version 1.6.2 including 1.6.1
> env.getStreamGraph.getJobGraph was happily returning currently defined Graph, but in 1.6.2 this fails to compile with a pretty cryptic message
> AM I missing something?
> 
> 
> Boris Lublinsky
> FDP Architect
> boris.lublinsky@lightbend.com <ma...@lightbend.com>
> https://www.lightbend.com/ <https://www.lightbend.com/>


Re: Changes in Flink 1.6.2

Posted by Dominik Wosiński <wo...@gmail.com>.
Hey,
Could you show the message that You are getting?
Best Regards,
Dom.

śr., 28 lis 2018 o 19:08 Boris Lublinsky <bo...@lightbend.com>
napisał(a):

>
>
>
> Prior to Flink version 1.6.2 including 1.6.1
> env.getStreamGraph.getJobGraph was happily returning currently defined
> Graph, but in 1.6.2 this fails to compile with a pretty cryptic message
> AM I missing something?
>
>
> Boris Lublinsky
> FDP Architect
> boris.lublinsky@lightbend.com
> https://www.lightbend.com/
>
>