You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by hi...@apache.org on 2014/02/19 22:59:06 UTC
git commit: TEZ-847. Visualize tez statemachines. (Min Zhou via
hitesh)
Repository: incubator-tez
Updated Branches:
refs/heads/master 89e6ab246 -> 816e2e5a9
TEZ-847. Visualize tez statemachines. (Min Zhou via hitesh)
Project: http://git-wip-us.apache.org/repos/asf/incubator-tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tez/commit/816e2e5a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tez/tree/816e2e5a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tez/diff/816e2e5a
Branch: refs/heads/master
Commit: 816e2e5a92817e2a896eb51c93f1d13d14640f44
Parents: 89e6ab2
Author: Hitesh Shah <hi...@apache.org>
Authored: Wed Feb 19 13:57:21 2014 -0800
Committer: Hitesh Shah <hi...@apache.org>
Committed: Wed Feb 19 13:58:55 2014 -0800
----------------------------------------------------------------------
BUILDING.txt | 24 ++++++++++++++++++++++++
tez-dag/pom.xml | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/816e2e5a/BUILDING.txt
----------------------------------------------------------------------
diff --git a/BUILDING.txt b/BUILDING.txt
index ed180e0..5245101 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -38,6 +38,7 @@ Maven build goals:
* Run Rat : mvn apache-rat:check
* Build javadocs : mvn javadoc:javadoc
* Build distribution : mvn package[-Dtar][-Dhadoop.version=2.2.0]
+ * Visualize state machines : mvn compile -Pvisualize -DskipTests=true
Build options:
@@ -99,3 +100,26 @@ An alternative is to run 'mvn install -DskipTests' from Tez source top
level once; and then work from the submodule. Keep in mind that SNAPSHOTs
time out after a while, using the Maven '-nsu' will stop Maven from trying
to update SNAPSHOTs from external repos.
+
+----------------------------------------------------------------------------------
+Visualize the State Machines used in Tez internals:
+
+Use -Pvisualize to generate a graphviz file named Tez.gv which can then be
+converted into a state machine diagram that represents the state transitions of
+the state machine for the classses provided.
+
+Optional parameters:
+ * -Dtez.dag.state.classes=<comma-separated list of classes>
+ - By default, all 4 state machines - DAG, Vertex, Task and TaskAttempt are generated.
+ * -Dtez.graphviz.title
+ - Title for the Graph ( Default is Tez )
+ * -Dtez.graphviz.output.file
+ - Output file to be generated with the state machines ( Default is Tez.gv )
+
+For example, to generate the state machine graphviz file for DAGImpl, run:
+
+ $ mvn compile -Pvisualize -Dtez.dag.state.classes=org.apache.tez.dag.app.dag.impl.DAGImpl -DskipTests=true
+
+To generate the diagram, you can use a Graphviz application or something like:
+
+ $ dot -Tpng -o Tez.png Tez.gv'
http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/816e2e5a/tez-dag/pom.xml
----------------------------------------------------------------------
diff --git a/tez-dag/pom.xml b/tez-dag/pom.xml
index 4c98ed8..fd4b5a7 100644
--- a/tez-dag/pom.xml
+++ b/tez-dag/pom.xml
@@ -23,6 +23,12 @@
</parent>
<properties>
<tez.component>tez-dag</tez.component>
+ <tez.dag.state.classes>org.apache.tez.dag.app.dag.impl.DAGImpl,
+ org.apache.tez.dag.app.dag.impl.VertexImpl,
+ org.apache.tez.dag.app.dag.impl.TaskImpl,
+ org.apache.tez.dag.app.dag.impl.TaskAttemptImpl</tez.dag.state.classes>
+ <tez.graphviz.title>Tez</tez.graphviz.title>
+ <tez.graphviz.output.file>Tez.gv</tez.graphviz.output.file>
</properties>
<artifactId>tez-dag</artifactId>
@@ -143,4 +149,38 @@
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>visualize</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <classpathScope>test</classpathScope>
+ <mainClass>org.apache.hadoop.yarn.state.VisualizeStateMachine</mainClass>
+ <arguments>
+ <argument>${tez.graphviz.title}</argument>
+ <argument>${tez.dag.state.classes}</argument>
+ <argument>${tez.graphviz.output.file}</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>