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

Siddharth Seth commented on TEZ-1447:
-------------------------------------

bq. There should probably be an unregister API to mirror the register API so 
that users can unregister from notifications.
I don't think this is required, not on the InputInitializer anyway. These are 
typically short lived, and are easy to ignore.

bq. I still dont understand the usefulness of 
VertexStateUpdateParallelismUpdated
If we're providing events - may as well provide all information in them.

bq. Visibility of these methods not public?
Interface, not required to be marked public.

bq. Shouldnt this be in tez-dag project?
Will look at moving this and the state machine into Tez DAG.

bq. ... ... ... move conversion logic into Vertex
Will look into this.
The state machine provides a very simple mechanism to generate these events, 
and is a natural extension to the definition.

bq. Also a change of name to PubSubNotifier or something like that would be 
good.
StateChangeNotifier seems like a better name.

bq. It may be better to store per vertex per enum a boolean that shows whether 
that notification has been received or not. 
That's where an enum on the API adds unnecessary complexity. Something like 
this for vertices is just about OK, but will not work for tasks. The current 
implementation worked well earlier, but can break if specific states are not 
subscribed for. Let me see what can be done about this.

In terms of the naming of the events - it's fairly clear already that this is 
the state the vertex has reached.



> 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
>
>
> 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