[ 
https://issues.apache.org/jira/browse/TEZ-1447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14125026#comment-14125026
 ] 

Bikas Saha commented on TEZ-1447:
---------------------------------

This should change to state that getting this event means the vertex had 
started running. The vertex state at the time of receiving the notification may 
not be running (due to races later on as the impl changes or because the user 
subscribed to this event after the vertex was already done). E.g. Saying has 
entered running state. Changing the name of the enum to remove the present 
continuous tense would also help.
{code}+  /**
+   * Indicates that the Vertex is RUNNING. This state can be reached after 
SUCCEEDED, if some
+   * tasks belonging to the vertex are restarted due to errors
+   */
+  RUNNING,{code}

If we are going to make use of VertexParallelismUpdatedEvent then to make it 
more useful than context.getNumTasks() we should send the old and new 
parallelism so that we can get the complete transition information via the 
event. Thats something that actually reduces user book-keeping in this scenario 
because they dont have to track this data on their own.

Rest looks fine for now. This may evolve with usage.

> Provide a mechanism for InputInitializers to know about interesting Vertex 
> state changes
> ----------------------------------------------------------------------------------------
>
>                 Key: TEZ-1447
>                 URL: https://issues.apache.org/jira/browse/TEZ-1447
>             Project: Apache Tez
>          Issue Type: Bug
>    Affects Versions: 0.5.0
>            Reporter: Gunther Hagleitner
>            Assignee: Siddharth Seth
>            Priority: Blocker
>         Attachments: TEZ-1447.1.wip.txt, TEZ-1447.2.txt, TEZ-1447.3.txt, 
> TEZ-1447.4.txt
>
>
> I'm trying to do dynamic partition pruning through input initializer events 
> in Hive. That means that the initializer of a table scan vertex has to 
> receive events from all tasks in another vertex (which contain the pruning 
> info) before generating tasks to run.
> The problem with the current API I ran into:
> getNumTasks: I'm currently using a busy loop to wait for the num tasks for a 
> vertex to be decided (-1 -> x). There's no way around it, because it's the 
> only way to find out what number of events to expect (0 is a valid number of 
> tasks - so I can't wait for the first to complete).
> With auto-reducer parallelism I have to employ another busy loop. Because I 
> might be initially expecting 10 events, which later get's knocked down to 5. 
> Since there's no event associated with this, I have to periodically check 
> whether I have enough events.
> Versioning: Events have a version number, but I don't know which task they 
> are coming from. Thus I can't de-dup events.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to