[
https://issues.apache.org/jira/browse/TEZ-1247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14053260#comment-14053260
]
Jeff Zhang commented on TEZ-1247:
---------------------------------
[~bikassaha] DAG.createDag() has already been annotated with @private
The reason I need to verify 2 times over graph is that I'd like reuse the code
of generating graph dot file. Currently, the dot file is generated from DAGPlan
rather than DAG, so It is possible to call createDAG 2 times in client side
(createDAG will call verify) , one for generateGraphViz another for submitDAG.
Since we can't guarantee whether the DAG is in legal state, we have to call
verify it before using this DAG ( generating GraphViz, submitting DAG or other
things in future). That's why I think here needs the builder pattern to ensure
the DAG is in legal state after constructing it. (only call verify one time in
build method )
> Method verify() of DAG can't been called multiples times in some cases
> ----------------------------------------------------------------------
>
> Key: TEZ-1247
> URL: https://issues.apache.org/jira/browse/TEZ-1247
> Project: Apache Tez
> Issue Type: Bug
> Affects Versions: 0.4.0
> Reporter: Jeff Zhang
> Assignee: Jeff Zhang
> Attachments: Tez-1247.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)