[
https://issues.apache.org/jira/browse/TEZ-1247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14049496#comment-14049496
]
Jeff Zhang commented on TEZ-1247:
---------------------------------
[~bikassaha]
The case where verify method will been called multiple times is when I want to
generate graphviz in client side ( [TEZ-974|
https://issues.apache.org/jira/browse/TEZ-974] ) Maybe I can have a workaround
for this.
Do you mean the chain method call of DAG as builder pattern ? I don't think
it's a pure builder pattern. What I mean is something like following:
{code}
DAGBuilder.newBuilder()
.setDAGName
.addVertex
.addVertex
.addEdge
.build() // call verify here
{code}
After the DAG is created, it should be in the legal state and can been used for
other purposes ( create graphviz, submit it or other things in future ) And
all the setMethod should been make private. otherwise, the verify method must
been called again if user modify the DAG. Although we could write document to
tell user how to use the DAG API correctly, my purpose here is to do it in
API-level, eliminate the wrong usage of DAG. Of course, it has a big impact on
the API which will lead to backward-compatibility issue.
> 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
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)