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

Pramod Immaneni edited comment on APEXCORE-577 at 3/2/17 2:00 PM:
------------------------------------------------------------------

This lifecycle seems very localized and constrained. I suggest the following 
lifecycle.

visitor->prePopulateDAG
populateDAG
visitor->postPopulateDAG
visitor->preSetProperties
setProperties and attributes from property file
visitor->postSetProperties
visitor->preValidateDAG - No need for validation of DAG structure or ordering
validate
visitor->postValidateDAG - Let the visitor developer do what they want to do 
with walking with operators or streams. You can provide convenience methods in 
the interface to get access to operators and streams in a topographical order.


was (Author: pramodssimmaneni):
This lifecycle seems very localized and constrained. I suggest the following 
lifecycle.

visitor->prePopulateDAG
populateDAG
visitor->postPopulateDAG
visitor->preSetProperties
setProperties and attributes from property file
visitor->postSetProperties
visitor->preValidateDAG - No need for validation of DAG structure or ordering
validate
visitor->postValidateDAG - Let the visitor developer do what they want to do 
with walking with operators or streams. You can provide convenience methods in 
the interface to get access to operators and streams in a topographical order)

> Visitor API for DAG
> -------------------
>
>                 Key: APEXCORE-577
>                 URL: https://issues.apache.org/jira/browse/APEXCORE-577
>             Project: Apache Apex Core
>          Issue Type: Sub-task
>            Reporter: Tushar Gosavi
>            Assignee: Tushar Gosavi
>
> Support an Visitor like api for DAG, which could be used to write plugins for 
> Apex.
> change DAG interface to add a visitor
> {code}
> registerVisitor(DagVisitor visitor)
> {code}
> The DagVisitor interface
> {code}
> interface DagVisitor {
>   boolean startDAG(DAG* dag);
>   boolean visitOperator(OperatorMeta *ometa)
>   boolean visitStream(StreamMeta *smeta);
>   boolean endDAG()
> }
> {code}
> dev thread discussions
> https://lists.apache.org/thread.html/1c37e0954cee029c9de537cc35ecb35beebdf49aba17de89bd2ce9ed@%3Cdev.apex.apache.org%3E



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to