You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by sjk <sh...@163.com> on 2016/12/30 10:03:05 UTC

[DISCUSS] schedule for execution from different list of ExecutionJobVertex

Hi, all

On  [FLINK-1425][1]  add executeMode supporting by Ufuk Celebi .
I want to know why two loop using different list object: task.value() and getVerticesTopologically(). 
task and getVerticesTopologically() all filled in attachJobGraph function:

public void attachJobGraph(List<JobVertex> topologiallySorted) throws JobException {
...
ExecutionJobVertex previousTask = this.tasks.putIfAbsent(jobVertex.getID(), ejv);
...
this.verticesInCreationOrder.add(ejv);
…
}

At the moment of before starting run ExecutionJobVertex, are the task.value and getVerticesTopologically having same elements?


[1] https://github.com/apache/flink/commit/ad31f611150b4b95147dca26932b7ad11bb4b920#diff-db400d27f89469eca0a85a5e9b564bc7L326 <https://github.com/apache/flink/commit/ad31f611150b4b95147dca26932b7ad11bb4b920#diff-db400d27f89469eca0a85a5e9b564bc7L326>

Thanks

Best regards
from Jinkui Shi

Re: [DISCUSS] schedule for execution from different list of ExecutionJobVertex

Posted by Till Rohrmann <tr...@apache.org>.
Hi Jinkui,

the difference between `getVerticesTopologically` and `tasks.values()` is
that the former returns an `Iterator` which iterates over the different
`ExecutionJobVertices` in topological order whereas the latter returns a
simple collection of `ExecutionJobVertices` with no specified order.

One could probably get rid of this additional collection by using a
`LinkedHashMap` but it shouldn't hurt too much either.

I hope this answers your question. If not, then don't hesitate to ask again.

Cheers,
Till

On Fri, Dec 30, 2016 at 11:03 AM, sjk <sh...@163.com> wrote:

> Hi, all
>
> On  [FLINK-1425][1]  add executeMode supporting by Ufuk Celebi .
> I want to know why two loop using different list object: task.value() and
> getVerticesTopologically().
> task and getVerticesTopologically() all filled in attachJobGraph function:
>
> public void attachJobGraph(List<JobVertex> topologiallySorted) throws
> JobException {
> ...
> ExecutionJobVertex previousTask = this.tasks.putIfAbsent(jobVertex.getID(),
> ejv);
> ...
> this.verticesInCreationOrder.add(ejv);
> …
> }
>
> At the moment of before starting run ExecutionJobVertex, are the
> task.value and getVerticesTopologically having same elements?
>
>
> [1] https://github.com/apache/flink/commit/ad31f611150b4b95147dca26932b7a
> d11bb4b920#diff-db400d27f89469eca0a85a5e9b564bc7L326 <
> https://github.com/apache/flink/commit/ad31f611150b4b95147dca26932b7a
> d11bb4b920#diff-db400d27f89469eca0a85a5e9b564bc7L326>
>
> Thanks
>
> Best regards
> from Jinkui Shi