tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bi...@apache.org
Subject git commit: TEZ-1500. DAG should be created via a create method (Siddharth Seth via bikas)
Date Tue, 26 Aug 2014 20:31:06 GMT
Repository: tez
Updated Branches:
  refs/heads/master 89d36629f -> 62e00b70a


TEZ-1500. DAG should be created via a create method (Siddharth Seth via bikas)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/62e00b70
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/62e00b70
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/62e00b70

Branch: refs/heads/master
Commit: 62e00b70ae96864f35d5bd96045bcdafdfbd52ff
Parents: 89d3662
Author: Bikas Saha <bikas@apache.org>
Authored: Tue Aug 26 13:30:59 2014 -0700
Committer: Bikas Saha <bikas@apache.org>
Committed: Tue Aug 26 13:30:59 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../java/org/apache/tez/client/TezClient.java   |  2 +-
 .../main/java/org/apache/tez/dag/api/DAG.java   | 11 +++-
 .../org/apache/tez/client/TestTezClient.java    |  4 +-
 .../org/apache/tez/dag/api/TestDAGPlan.java     |  8 +--
 .../org/apache/tez/dag/api/TestDAGVerify.java   | 56 ++++++++++----------
 .../org/apache/tez/client/TestLocalMode.java    |  2 +-
 .../tez/dag/app/dag/impl/TestDAGImpl.java       |  2 +-
 .../tez/dag/app/dag/impl/TestVertexImpl.java    |  3 +-
 .../tez/dag/history/utils/TestDAGUtils.java     |  2 +-
 .../org/apache/tez/examples/JoinDataGen.java    |  2 +-
 .../org/apache/tez/examples/JoinExample.java    |  2 +-
 .../org/apache/tez/examples/JoinValidate.java   |  2 +-
 .../apache/tez/examples/OrderedWordCount.java   |  2 +-
 .../java/org/apache/tez/examples/WordCount.java |  2 +-
 .../apache/tez/mapreduce/client/YARNRunner.java |  2 +-
 .../examples/BroadcastAndOneToOneExample.java   |  2 +-
 .../mapreduce/examples/FilterLinesByWord.java   |  2 +-
 .../examples/FilterLinesByWordOneToOne.java     |  2 +-
 .../tez/mapreduce/examples/MRRSleepJob.java     |  2 +-
 .../examples/TestOrderedWordCount.java          |  2 +-
 .../tez/mapreduce/examples/UnionExample.java    |  2 +-
 .../apache/tez/mapreduce/TestMRRJobsDAGApi.java | 10 ++--
 .../java/org/apache/tez/test/SimpleTestDAG.java |  4 +-
 .../apache/tez/test/SimpleTestDAG3Vertices.java |  2 +-
 .../org/apache/tez/test/TestFaultTolerance.java |  2 +-
 .../apache/tez/test/dag/MultiAttemptDAG.java    |  2 +-
 .../tez/test/dag/SimpleReverseVTestDAG.java     |  2 +-
 .../org/apache/tez/test/dag/SimpleVTestDAG.java |  2 +-
 .../tez/test/dag/SixLevelsFailingDAG.java       |  2 +-
 .../tez/test/dag/ThreeLevelsFailingDAG.java     |  2 +-
 .../tez/test/dag/TwoLevelsFailingDAG.java       |  2 +-
 32 files changed, 77 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2a21995..9326aa4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -92,6 +92,7 @@ INCOMPATIBLE CHANGES
   serialized/unserialized payloads
   TEZ-1485. Disable node blacklisting and ATS in AM for local mode
   TEZ-1490. dagid reported is incorrect in TezClient.java
+  TEZ-1500. DAG should be created via a create method
 
 Release 0.4.0-incubating: 2014-04-05
 

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-api/src/main/java/org/apache/tez/client/TezClient.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/client/TezClient.java b/tez-api/src/main/java/org/apache/tez/client/TezClient.java
index cd753eb..13ca2dc 100644
--- a/tez-api/src/main/java/org/apache/tez/client/TezClient.java
+++ b/tez-api/src/main/java/org/apache/tez/client/TezClient.java
@@ -564,7 +564,7 @@ public class TezClient {
     
     verifySessionStateForSubmission();
     
-    DAG dag = new org.apache.tez.dag.api.DAG(TezConstants.TEZ_PREWARM_DAG_NAME_PREFIX + "_"
+    DAG dag = org.apache.tez.dag.api.DAG.create(TezConstants.TEZ_PREWARM_DAG_NAME_PREFIX
+ "_"
         + preWarmDAGCounter++);
     dag.addVertex(preWarmVertex);
 

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-api/src/main/java/org/apache/tez/dag/api/DAG.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/DAG.java b/tez-api/src/main/java/org/apache/tez/dag/api/DAG.java
index fe73c47..0a95ff3 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/DAG.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/DAG.java
@@ -90,11 +90,20 @@ public class DAG {
   
   private Stack<String> topologicalVertexStack = new Stack<String>();
 
-  public DAG(String name) {
+  private DAG(String name) {
     this.name = name;
   }
 
   /**
+   * Create a DAG with the specified name.
+   * @param name the name of the DAG
+   * @return this {@link DAG}
+   */
+  public static DAG create(String name) {
+    return new DAG(name);
+  }
+
+  /**
    * Set the files etc that must be provided to the tasks of this DAG
    * @param localFiles
    *          files that must be available locally for each task. These files

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-api/src/test/java/org/apache/tez/client/TestTezClient.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/client/TestTezClient.java b/tez-api/src/test/java/org/apache/tez/client/TestTezClient.java
index e05b004..5044d55 100644
--- a/tez-api/src/test/java/org/apache/tez/client/TestTezClient.java
+++ b/tez-api/src/test/java/org/apache/tez/client/TestTezClient.java
@@ -150,7 +150,7 @@ public class TestTezClient {
             LocalResourceVisibility.PUBLIC, 1, 1));
     Vertex vertex = Vertex.create("Vertex", ProcessorDescriptor.create("P"), 1,
         Resource.newInstance(1, 1));
-    DAG dag = new DAG("DAG").addVertex(vertex).addTaskLocalFiles(lrDAG);
+    DAG dag = DAG.create("DAG").addVertex(vertex).addTaskLocalFiles(lrDAG);
     DAGClient dagClient = client.submitDAG(dag);
     
     // verify that both DAG and TezClient localResources are added to the vertex
@@ -187,7 +187,7 @@ public class TestTezClient {
     when(client.mockYarnClient.createApplication().getNewApplicationResponse().getApplicationId())
         .thenReturn(appId2);
     
-    dag = new DAG("DAG").addVertex(
+    dag = DAG.create("DAG").addVertex(
         Vertex.create("Vertex", ProcessorDescriptor.create("P"), 1, Resource.newInstance(1,
1)));
     dagClient = client.submitDAG(dag);
     

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java b/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
index fbea24b..22fe3a1 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
@@ -100,7 +100,7 @@ public class TestDAGPlan {
 
   @Test(timeout = 5000)
   public void testEdgeManagerSerde() {
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     ProcessorDescriptor pd1 = ProcessorDescriptor.create("processor1")
         .setUserPayload(UserPayload.create(ByteBuffer.wrap("processor1Bytes".getBytes())));
     ProcessorDescriptor pd2 = ProcessorDescriptor.create("processor2")
@@ -136,7 +136,7 @@ public class TestDAGPlan {
 
   @Test(timeout = 5000)
   public void testUserPayloadSerde() {
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     ProcessorDescriptor pd1 = ProcessorDescriptor.create("processor1").
         setUserPayload(UserPayload.create(ByteBuffer.wrap("processor1Bytes".getBytes())));
     ProcessorDescriptor pd2 = ProcessorDescriptor.create("processor2").
@@ -197,7 +197,7 @@ public class TestDAGPlan {
 
   @Test(timeout = 5000)
   public void userVertexOrderingIsMaintained() {
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     ProcessorDescriptor pd1 = ProcessorDescriptor.create("processor1").
         setUserPayload(UserPayload.create(ByteBuffer.wrap("processor1Bytes".getBytes())));
     ProcessorDescriptor pd2 = ProcessorDescriptor.create("processor2").
@@ -270,7 +270,7 @@ public class TestDAGPlan {
 
   @Test (timeout=5000)
   public void testCredentialsSerde() {
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     ProcessorDescriptor pd1 = ProcessorDescriptor.create("processor1").
         setUserPayload(UserPayload.create(ByteBuffer.wrap("processor1Bytes".getBytes())));
     ProcessorDescriptor pd2 = ProcessorDescriptor.create("processor2").

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java b/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java
index 033d08b..bf9abf1 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java
@@ -64,7 +64,7 @@ public class TestDAGVerify {
             DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
             OutputDescriptor.create(dummyOutputClassName),
             InputDescriptor.create(dummyInputClassName)));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addEdge(e1);
@@ -85,7 +85,7 @@ public class TestDAGVerify {
             SchedulingType.SEQUENTIAL,
             OutputDescriptor.create(dummyOutputClassName),
             InputDescriptor.create(dummyInputClassName)));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addEdge(e1);
@@ -105,7 +105,7 @@ public class TestDAGVerify {
             DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
             OutputDescriptor.create(dummyOutputClassName),
             InputDescriptor.create(dummyInputClassName)));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addEdge(e1);
@@ -134,7 +134,7 @@ public class TestDAGVerify {
             DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
             OutputDescriptor.create(dummyOutputClassName),
             InputDescriptor.create(dummyInputClassName)));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addVertex(v3);
@@ -168,7 +168,7 @@ public class TestDAGVerify {
             DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
             OutputDescriptor.create(dummyOutputClassName),
             InputDescriptor.create(dummyInputClassName)));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v3);
     dag.addVertex(v1);
     dag.addVertex(v2);
@@ -192,7 +192,7 @@ public class TestDAGVerify {
             DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
             OutputDescriptor.create(dummyOutputClassName),
             InputDescriptor.create(dummyInputClassName)));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addEdge(e1);
@@ -222,7 +222,7 @@ public class TestDAGVerify {
             DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
             OutputDescriptor.create(dummyOutputClassName),
             InputDescriptor.create(dummyInputClassName)));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addVertex(v3);
@@ -268,7 +268,7 @@ public class TestDAGVerify {
             DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
             OutputDescriptor.create(dummyOutputClassName),
             InputDescriptor.create(dummyInputClassName)));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addVertex(v3);
@@ -298,7 +298,7 @@ public class TestDAGVerify {
             DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
             OutputDescriptor.create(dummyOutputClassName),
             InputDescriptor.create(dummyInputClassName)));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addEdge(e1);
@@ -318,7 +318,7 @@ public class TestDAGVerify {
             DataSourceType.EPHEMERAL, SchedulingType.SEQUENTIAL,
             OutputDescriptor.create(dummyOutputClassName),
             InputDescriptor.create(dummyInputClassName)));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addEdge(e1);
@@ -338,7 +338,7 @@ public class TestDAGVerify {
             DataSourceType.EPHEMERAL, SchedulingType.CONCURRENT,
             OutputDescriptor.create(dummyOutputClassName),
             InputDescriptor.create(dummyInputClassName)));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addEdge(e1);
@@ -385,7 +385,7 @@ public class TestDAGVerify {
             DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
             OutputDescriptor.create("dummy output class"),
             InputDescriptor.create("dummy input class")));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addVertex(v3);
@@ -445,7 +445,7 @@ public class TestDAGVerify {
             DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
             OutputDescriptor.create("dummy output class"),
             InputDescriptor.create("dummy input class")));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addVertex(v3);
@@ -475,7 +475,7 @@ public class TestDAGVerify {
         ProcessorDescriptor.create("MapProcessor"),
         dummyTaskCount, dummyTaskResource);
     try {
-      DAG dag = new DAG("testDag");
+      DAG dag = DAG.create("testDag");
       dag.addVertex(v1);
       dag.addVertex(v1repeat);
       dag.verify();
@@ -505,7 +505,7 @@ public class TestDAGVerify {
             OutputDescriptor.create("dummy output class"),
             InputDescriptor.create("dummy input class")));
     
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addEdge(e1);
@@ -529,7 +529,7 @@ public class TestDAGVerify {
             OutputDescriptor.create("dummy output class"),
             InputDescriptor.create("dummy input class")));
     
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addEdge(e1);
@@ -547,7 +547,7 @@ public class TestDAGVerify {
     
     v1.addDataSink("v2", new DataSinkDescriptor(null, null, null));
     
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.verify();
@@ -564,7 +564,7 @@ public class TestDAGVerify {
     
     v1.addDataSource("v2", DataSourceDescriptor.create(null, null, null));
     
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.verify();
@@ -594,7 +594,7 @@ public class TestDAGVerify {
             DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
             OutputDescriptor.create("dummy output class"),
             InputDescriptor.create("dummy input class")));
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addVertex(v3);
@@ -618,7 +618,7 @@ public class TestDAGVerify {
         ProcessorDescriptor.create("Processor"),
         dummyTaskCount, dummyTaskResource);
     
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     VertexGroup uv12 = dag.createVertexGroup("uv12", v1, v2);
     OutputDescriptor outDesc = new OutputDescriptor();
     uv12.addDataSink("uvOut", new DataSinkDescriptor(outDesc, null, null));
@@ -674,7 +674,7 @@ public class TestDAGVerify {
         ProcessorDescriptor.create("Processor"),
         dummyTaskCount, dummyTaskResource);
     
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     String groupName1 = "uv12";
     VertexGroup uv12 = dag.createVertexGroup(groupName1, v1, v2);
     OutputDescriptor outDesc = new OutputDescriptor();
@@ -756,7 +756,7 @@ public class TestDAGVerify {
         ProcessorDescriptor.create("Processor"),
         -1, dummyTaskResource);
     
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     String groupName1 = "uv12";
     VertexGroup uv12 = dag.createVertexGroup(groupName1, v1, v2);
     OutputDescriptor outDesc = new OutputDescriptor();
@@ -818,7 +818,7 @@ public class TestDAGVerify {
               DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
               OutputDescriptor.create("dummy output class"),
               InputDescriptor.create("dummy input class")));
-      DAG dag = new DAG("testDag");
+      DAG dag = DAG.create("testDag");
       dag.addVertex(v1);
       dag.addVertex(v2);
       dag.addVertex(v3);
@@ -836,7 +836,7 @@ public class TestDAGVerify {
   public void testDagWithNoVertices() {
     IllegalStateException ex=null;
     try {
-      DAG dag = new DAG("testDag");
+      DAG dag = DAG.create("testDag");
       dag.verify();
     }
     catch (IllegalStateException e){
@@ -883,7 +883,7 @@ public class TestDAGVerify {
 
   @Test(timeout = 5000)
   public void testMultipleRootInputsAllowed() {
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     ProcessorDescriptor pd1 = ProcessorDescriptor.create("processor1")
         .setUserPayload(UserPayload.create(ByteBuffer.wrap("processor1Bytes".getBytes())));
     Vertex v1 = Vertex.create("v1", pd1, 10, Resource.newInstance(1024, 1));
@@ -923,7 +923,7 @@ public class TestDAGVerify {
     lrs.put(lrName1, LocalResource.newInstance(URL.newInstance("file:///", "localhost", 0,
"test"),
         LocalResourceType.FILE, LocalResourceVisibility.PUBLIC, 1, 1));
     
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addEdge(e1);
@@ -957,7 +957,7 @@ public class TestDAGVerify {
     } catch (TezUncheckedException e) {
       Assert.assertTrue(e.getMessage().contains("Attempting to add duplicate resource"));
     }
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     dag.addVertex(v1);
     dag.addVertex(v2);
     dag.addEdge(e1);
@@ -979,7 +979,7 @@ public class TestDAGVerify {
   
   @Test(timeout = 5000)
   public void testDAGAccessControls() {
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     ProcessorDescriptor pd1 = ProcessorDescriptor.create("processor1")
         .setUserPayload(UserPayload.create(ByteBuffer.wrap("processor1Bytes".getBytes())));
     Vertex v1 = Vertex.create("v1", pd1, 10, Resource.newInstance(1024, 1));

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-dag/src/test/java/org/apache/tez/client/TestLocalMode.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/client/TestLocalMode.java b/tez-dag/src/test/java/org/apache/tez/client/TestLocalMode.java
index d25cf09..cd8a3de 100644
--- a/tez-dag/src/test/java/org/apache/tez/client/TestLocalMode.java
+++ b/tez-dag/src/test/java/org/apache/tez/client/TestLocalMode.java
@@ -189,7 +189,7 @@ public class TestLocalMode {
   }
 
   private DAG createSimpleDAG(String dagName, String processorName) {
-    DAG dag = new DAG(dagName).addVertex(Vertex.create("Sleep", ProcessorDescriptor.create(
+    DAG dag = DAG.create(dagName).addVertex(Vertex.create("Sleep", ProcessorDescriptor.create(
         processorName).setUserPayload(
         new SleepProcessor.SleepProcessorConfig(1).toUserPayload()), 1));
     return dag;

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java
index b640f1d..ec05815 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java
@@ -358,7 +358,7 @@ public class TestDAGImpl {
         ProcessorDescriptor.create("Processor"),
         dummyTaskCount, dummyTaskResource);
 
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     String groupName1 = "uv12";
     OutputCommitterDescriptor ocd = OutputCommitterDescriptor.create(
         TotalCountingOutputCommitter.class.getName());

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
index d4243ba..7d698cc 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
@@ -105,7 +105,6 @@ import org.apache.tez.dag.app.dag.DAG;
 import org.apache.tez.dag.app.dag.RootInputInitializerManager;
 import org.apache.tez.dag.app.dag.Task;
 import org.apache.tez.dag.app.dag.TaskAttemptStateInternal;
-import org.apache.tez.dag.app.dag.TaskStateInternal;
 import org.apache.tez.dag.app.dag.Vertex;
 import org.apache.tez.dag.app.dag.VertexState;
 import org.apache.tez.dag.app.dag.VertexTerminationCause;
@@ -385,7 +384,7 @@ public class TestVertexImpl {
   
   private DAGPlan createDAGPlanWithMixedEdges() {
     LOG.info("Setting up mixed edge dag plan");
-    org.apache.tez.dag.api.DAG dag = new org.apache.tez.dag.api.DAG("MixedEdges");
+    org.apache.tez.dag.api.DAG dag = org.apache.tez.dag.api.DAG.create("MixedEdges");
     org.apache.tez.dag.api.Vertex v1 = org.apache.tez.dag.api.Vertex.create("vertex1",
         ProcessorDescriptor.create("v1.class"), 1, Resource.newInstance(0, 0));
     org.apache.tez.dag.api.Vertex v2 = org.apache.tez.dag.api.Vertex.create("vertex2",

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-dag/src/test/java/org/apache/tez/dag/history/utils/TestDAGUtils.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/history/utils/TestDAGUtils.java b/tez-dag/src/test/java/org/apache/tez/dag/history/utils/TestDAGUtils.java
index 9dd0a9a..4a0120b 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/history/utils/TestDAGUtils.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/history/utils/TestDAGUtils.java
@@ -66,7 +66,7 @@ public class TestDAGUtils {
         ProcessorDescriptor.create("Processor").setHistoryText("vertex3 Processor HistoryText"),
         dummyTaskCount, dummyTaskResource);
 
-    DAG dag = new DAG("testDag");
+    DAG dag = DAG.create("testDag");
     String groupName1 = "uv12";
     org.apache.tez.dag.api.VertexGroup uv12 = dag.createVertexGroup(groupName1, v1, v2);
     OutputDescriptor outDesc = OutputDescriptor.create("output.class")

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-examples/src/main/java/org/apache/tez/examples/JoinDataGen.java
----------------------------------------------------------------------
diff --git a/tez-examples/src/main/java/org/apache/tez/examples/JoinDataGen.java b/tez-examples/src/main/java/org/apache/tez/examples/JoinDataGen.java
index c20f24b..8231b6f 100644
--- a/tez-examples/src/main/java/org/apache/tez/examples/JoinDataGen.java
+++ b/tez-examples/src/main/java/org/apache/tez/examples/JoinDataGen.java
@@ -198,7 +198,7 @@ public class JoinDataGen extends Configured implements Tool {
     long largeOutSizePerTask = largeOutSize / numTasks;
     long smallOutSizePerTask = smallOutSize / numTasks;
 
-    DAG dag = new DAG("JoinDataGen");
+    DAG dag = DAG.create("JoinDataGen");
 
     Vertex genDataVertex = Vertex.create("datagen", ProcessorDescriptor.create(
         GenDataProcessor.class.getName()).setUserPayload(

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-examples/src/main/java/org/apache/tez/examples/JoinExample.java
----------------------------------------------------------------------
diff --git a/tez-examples/src/main/java/org/apache/tez/examples/JoinExample.java b/tez-examples/src/main/java/org/apache/tez/examples/JoinExample.java
index 20224fa..5ead275 100644
--- a/tez-examples/src/main/java/org/apache/tez/examples/JoinExample.java
+++ b/tez-examples/src/main/java/org/apache/tez/examples/JoinExample.java
@@ -197,7 +197,7 @@ public class JoinExample extends Configured implements Tool {
 
   private DAG createDag(TezConfiguration tezConf, Path streamPath, Path hashPath, Path outPath,
       int numPartitions, boolean doBroadcast) throws IOException {
-    DAG dag = new DAG("JoinExample" + (doBroadcast ? "-WithBroadcast" : ""));
+    DAG dag = DAG.create("JoinExample" + (doBroadcast ? "-WithBroadcast" : ""));
 
     /**
      * This vertex represents the side of the join that will be accumulated in a hash 

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-examples/src/main/java/org/apache/tez/examples/JoinValidate.java
----------------------------------------------------------------------
diff --git a/tez-examples/src/main/java/org/apache/tez/examples/JoinValidate.java b/tez-examples/src/main/java/org/apache/tez/examples/JoinValidate.java
index 6eae72e..3630184 100644
--- a/tez-examples/src/main/java/org/apache/tez/examples/JoinValidate.java
+++ b/tez-examples/src/main/java/org/apache/tez/examples/JoinValidate.java
@@ -179,7 +179,7 @@ public class JoinValidate extends Configured implements Tool {
 
   private DAG createDag(TezConfiguration tezConf, Path lhs, Path rhs, int numPartitions)
       throws IOException {
-    DAG dag = new DAG("JoinValidate");
+    DAG dag = DAG.create("JoinValidate");
 
     // Configuration for intermediate output - shared by Vertex1 and Vertex2
     // This should only be setting selective keys from the underlying conf. Fix after there's
a

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-examples/src/main/java/org/apache/tez/examples/OrderedWordCount.java
----------------------------------------------------------------------
diff --git a/tez-examples/src/main/java/org/apache/tez/examples/OrderedWordCount.java b/tez-examples/src/main/java/org/apache/tez/examples/OrderedWordCount.java
index c3ea105..fd18592 100644
--- a/tez-examples/src/main/java/org/apache/tez/examples/OrderedWordCount.java
+++ b/tez-examples/src/main/java/org/apache/tez/examples/OrderedWordCount.java
@@ -161,7 +161,7 @@ public class OrderedWordCount extends Configured implements Tool  {
 
     // No need to add jar containing this class as assumed to be part of the tez jars.
     
-    DAG dag = new DAG(dagName);
+    DAG dag = DAG.create(dagName);
     dag.addVertex(tokenizerVertex)
         .addVertex(summationVertex)
         .addVertex(sorterVertex)

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-examples/src/main/java/org/apache/tez/examples/WordCount.java
----------------------------------------------------------------------
diff --git a/tez-examples/src/main/java/org/apache/tez/examples/WordCount.java b/tez-examples/src/main/java/org/apache/tez/examples/WordCount.java
index ba69077..e0e94cb 100644
--- a/tez-examples/src/main/java/org/apache/tez/examples/WordCount.java
+++ b/tez-examples/src/main/java/org/apache/tez/examples/WordCount.java
@@ -187,7 +187,7 @@ public class WordCount extends Configured implements Tool {
     // we would have to add the jars for this code as local files to the vertices.
     
     // Create DAG and add the vertices. Connect the producer and consumer vertices via the
edge
-    DAG dag = new DAG("WordCount");
+    DAG dag = DAG.create("WordCount");
     dag.addVertex(tokenizerVertex)
         .addVertex(summationVertex)
         .addEdge(

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/client/YARNRunner.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/client/YARNRunner.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/client/YARNRunner.java
index a966316..515e910 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/client/YARNRunner.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/client/YARNRunner.java
@@ -471,7 +471,7 @@ public class YARNRunner implements ClientProtocol {
 
     String jobName = stageConfs[0].get(MRJobConfig.JOB_NAME,
         YarnConfiguration.DEFAULT_APPLICATION_NAME);
-    DAG dag = new DAG(jobName);
+    DAG dag = DAG.create(jobName);
 
     LOG.info("Number of stages: " + stageConfs.length);
 

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/BroadcastAndOneToOneExample.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/BroadcastAndOneToOneExample.java
b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/BroadcastAndOneToOneExample.java
index f856956..81f9581 100644
--- a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/BroadcastAndOneToOneExample.java
+++ b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/BroadcastAndOneToOneExample.java
@@ -161,7 +161,7 @@ public class BroadcastAndOneToOneExample extends Configured implements
Tool {
     UnorderedKVEdgeConfig edgeConf = UnorderedKVEdgeConfig
         .newBuilder(Text.class.getName(), IntWritable.class.getName()).build();
 
-    DAG dag = new DAG("BroadcastAndOneToOneExample");
+    DAG dag = DAG.create("BroadcastAndOneToOneExample");
     dag.addVertex(inputVertex)
         .addVertex(broadcastVertex)
         .addVertex(oneToOneVertex)

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWord.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWord.java
b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWord.java
index d9304e4..9f533d9 100644
--- a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWord.java
+++ b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWord.java
@@ -201,7 +201,7 @@ public class FilterLinesByWord extends Configured implements Tool {
     UnorderedKVEdgeConfig edgeConf = UnorderedKVEdgeConfig
         .newBuilder(Text.class.getName(), TextLongPair.class.getName()).build();
 
-    DAG dag = new DAG("FilterLinesByWord");
+    DAG dag = DAG.create("FilterLinesByWord");
     Edge edge =
         Edge.create(stage1Vertex, stage2Vertex, edgeConf.createDefaultBroadcastEdgeProperty());
     dag.addVertex(stage1Vertex).addVertex(stage2Vertex).addEdge(edge);

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWordOneToOne.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWordOneToOne.java
b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWordOneToOne.java
index ca2a288..e038170 100644
--- a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWordOneToOne.java
+++ b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWordOneToOne.java
@@ -192,7 +192,7 @@ public class FilterLinesByWordOneToOne extends Configured implements Tool
{
     UnorderedKVEdgeConfig edgeConf = UnorderedKVEdgeConfig
         .newBuilder(Text.class.getName(), TextLongPair.class.getName()).build();
 
-    DAG dag = new DAG("FilterLinesByWord");
+    DAG dag = DAG.create("FilterLinesByWord");
     Edge edge =
         Edge.create(stage1Vertex, stage2Vertex, edgeConf.createDefaultOneToOneEdgeProperty());
     dag.addVertex(stage1Vertex).addVertex(stage2Vertex).addEdge(edge);

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/MRRSleepJob.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/MRRSleepJob.java b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/MRRSleepJob.java
index 7f365da..3f9d222 100644
--- a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/MRRSleepJob.java
+++ b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/MRRSleepJob.java
@@ -494,7 +494,7 @@ public class MRRSleepJob extends Configured implements Tool {
           .generateSplitsInAM(generateSplitsInAM).build();
     }
 
-    DAG dag = new DAG("MRRSleepJob");
+    DAG dag = DAG.create("MRRSleepJob");
     String jarPath = ClassUtil.findContainingJar(getClass());
     if (jarPath == null)  {
         throw new TezUncheckedException("Could not find any jar containing"

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
index 6157cbd..2c5db10 100644
--- a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
+++ b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
@@ -228,7 +228,7 @@ public class TestOrderedWordCount extends Configured implements Tool {
             .build());
     vertices.add(finalReduceVertex);
 
-    DAG dag = new DAG("OrderedWordCount" + dagIndex);
+    DAG dag = DAG.create("OrderedWordCount" + dagIndex);
     for (int i = 0; i < vertices.size(); ++i) {
       dag.addVertex(vertices.get(i));
     }

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/UnionExample.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/UnionExample.java b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/UnionExample.java
index 78a5566..56fb1a3 100644
--- a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/UnionExample.java
+++ b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/UnionExample.java
@@ -164,7 +164,7 @@ public class UnionExample {
   private DAG createDAG(FileSystem fs, TezConfiguration tezConf,
       Map<String, LocalResource> localResources, Path stagingDir,
       String inputPath, String outputPath) throws IOException {
-    DAG dag = new DAG("UnionExample");
+    DAG dag = DAG.create("UnionExample");
     
     int numMaps = -1;
     Configuration inputConf = new Configuration(tezConf);

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java b/tez-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
index 48faefe..9ca2762 100644
--- a/tez-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
+++ b/tez-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
@@ -185,7 +185,7 @@ public class TestMRRJobsDAGApi {
   public void testSleepJob() throws TezException, IOException, InterruptedException {
     SleepProcessorConfig spConf = new SleepProcessorConfig(1);
 
-    DAG dag = new DAG("TezSleepProcessor");
+    DAG dag = DAG.create("TezSleepProcessor");
     Vertex vertex = Vertex.create("SleepVertex", ProcessorDescriptor.create(
             SleepProcessor.class.getName()).setUserPayload(spConf.toUserPayload()), 1,
         Resource.newInstance(1024, 1));
@@ -234,7 +234,7 @@ public class TestMRRJobsDAGApi {
 
       SleepProcessorConfig spConf = new SleepProcessorConfig(1);
       for (int dagIndex = 1; dagIndex <= 2; dagIndex++) {
-        DAG dag = new DAG("TezSleepProcessor");
+        DAG dag = DAG.create("TezSleepProcessor");
         Vertex vertex = Vertex.create("SleepVertex", ProcessorDescriptor.create(
                 SleepProcessor.class.getName()).setUserPayload(spConf.toUserPayload()), 1,
             Resource.newInstance(1024, 1));
@@ -273,7 +273,7 @@ public class TestMRRJobsDAGApi {
   public void testNonDefaultFSStagingDir() throws Exception {
     SleepProcessorConfig spConf = new SleepProcessorConfig(1);
 
-    DAG dag = new DAG("TezSleepProcessor");
+    DAG dag = DAG.create("TezSleepProcessor");
     Vertex vertex = Vertex.create("SleepVertex", ProcessorDescriptor.create(
             SleepProcessor.class.getName()).setUserPayload(spConf.toUserPayload()), 1,
         Resource.newInstance(1024, 1));
@@ -315,7 +315,7 @@ public class TestMRRJobsDAGApi {
       InterruptedException, TezException, ClassNotFoundException, YarnException {
     SleepProcessorConfig spConf = new SleepProcessorConfig(1);
 
-    DAG dag = new DAG("TezSleepProcessorHistoryLogging");
+    DAG dag = DAG.create("TezSleepProcessorHistoryLogging");
     Vertex vertex = Vertex.create("SleepVertex", ProcessorDescriptor.create(
             SleepProcessor.class.getName()).setUserPayload(spConf.toUserPayload()), 2,
         Resource.newInstance(1024, 1));
@@ -657,7 +657,7 @@ public class TestMRRJobsDAGApi {
     UserPayload stage2Payload = TezUtils.createUserPayloadFromConf(stage2Conf);
     UserPayload stage3Payload = TezUtils.createUserPayloadFromConf(stage3Conf);
     
-    DAG dag = new DAG("testMRRSleepJobDagSubmit-" + random.nextInt(1000));
+    DAG dag = DAG.create("testMRRSleepJobDagSubmit-" + random.nextInt(1000));
 
     Class<? extends InputInitializer> inputInitializerClazz =
         genSplitsInAM ?

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/test/java/org/apache/tez/test/SimpleTestDAG.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/SimpleTestDAG.java b/tez-tests/src/test/java/org/apache/tez/test/SimpleTestDAG.java
index f3a8b9c..90a8cf6 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/SimpleTestDAG.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/SimpleTestDAG.java
@@ -52,7 +52,7 @@ public class SimpleTestDAG {
       taskCount = conf.getInt(TEZ_SIMPLE_DAG_NUM_TASKS, TEZ_SIMPLE_DAG_NUM_TASKS_DEFAULT);
       payload = TezUtils.createUserPayloadFromConf(conf);
     }
-    DAG dag = new DAG(name);
+    DAG dag = DAG.create(name);
     Vertex v1 = Vertex.create("v1", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
     Vertex v2 = Vertex.create("v2", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
     dag.addVertex(v1).addVertex(v2).addEdge(Edge.create(v1, v2,
@@ -88,7 +88,7 @@ public class SimpleTestDAG {
       taskCount = conf.getInt(TEZ_SIMPLE_DAG_NUM_TASKS, TEZ_SIMPLE_DAG_NUM_TASKS_DEFAULT);
       payload = TezUtils.createUserPayloadFromConf(conf);
     }
-    DAG dag = new DAG(name);
+    DAG dag = DAG.create(name);
 
     Vertex v1 = Vertex.create("v1", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
     Vertex v2 = Vertex.create("v2", TestProcessor.getProcDesc(payload), taskCount, defaultResource);

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/test/java/org/apache/tez/test/SimpleTestDAG3Vertices.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/SimpleTestDAG3Vertices.java b/tez-tests/src/test/java/org/apache/tez/test/SimpleTestDAG3Vertices.java
index c509fe0..a48b2d6 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/SimpleTestDAG3Vertices.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/SimpleTestDAG3Vertices.java
@@ -54,7 +54,7 @@ public class SimpleTestDAG3Vertices {
       taskCount = conf.getInt(TEZ_SIMPLE_DAG_NUM_TASKS, TEZ_SIMPLE_DAG_NUM_TASKS_DEFAULT);
       payload = TezUtils.createUserPayloadFromConf(conf);
     }
-    DAG dag = new DAG(name);
+    DAG dag = DAG.create(name);
     Vertex v1 = Vertex.create("v1", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
     Vertex v2 = Vertex.create("v2", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
     Vertex v3 = Vertex.create("v3", TestProcessor.getProcDesc(payload), taskCount, defaultResource);

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/test/java/org/apache/tez/test/TestFaultTolerance.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/TestFaultTolerance.java b/tez-tests/src/test/java/org/apache/tez/test/TestFaultTolerance.java
index d894403..7042859 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/TestFaultTolerance.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/TestFaultTolerance.java
@@ -134,7 +134,7 @@ public class TestFaultTolerance {
   
   @Test (timeout=60000)
   public void testBasicSuccessBroadcast() throws Exception {
-    DAG dag = new DAG("testBasicSuccessBroadcast");
+    DAG dag = DAG.create("testBasicSuccessBroadcast");
     Vertex v1 =
         Vertex.create("v1", TestProcessor.getProcDesc(null), 2, SimpleTestDAG.defaultResource);
     Vertex v2 =

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/test/java/org/apache/tez/test/dag/MultiAttemptDAG.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/dag/MultiAttemptDAG.java b/tez-tests/src/test/java/org/apache/tez/test/dag/MultiAttemptDAG.java
index 9157beb..7fc9ad7 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/dag/MultiAttemptDAG.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/dag/MultiAttemptDAG.java
@@ -326,7 +326,7 @@ public class MultiAttemptDAG {
       taskCount = conf.getInt(MULTI_ATTEMPT_DAG_VERTEX_NUM_TASKS, MULTI_ATTEMPT_DAG_VERTEX_NUM_TASKS_DEFAULT);
       payload = TezUtils.createUserPayloadFromConf(conf);
     }
-    DAG dag = new DAG(name);
+    DAG dag = DAG.create(name);
     Vertex v1 = Vertex.create("v1", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
     Vertex v2 = Vertex.create("v2", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
     Vertex v3 = Vertex.create("v3", TestProcessor.getProcDesc(payload), taskCount, defaultResource);

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/test/java/org/apache/tez/test/dag/SimpleReverseVTestDAG.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/dag/SimpleReverseVTestDAG.java b/tez-tests/src/test/java/org/apache/tez/test/dag/SimpleReverseVTestDAG.java
index e5c25ac..4c8771c 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/dag/SimpleReverseVTestDAG.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/dag/SimpleReverseVTestDAG.java
@@ -54,7 +54,7 @@ public class SimpleReverseVTestDAG {
       taskCount = conf.getInt(TEZ_SIMPLE_REVERSE_V_DAG_NUM_TASKS, TEZ_SIMPLE_REVERSE_V_DAG_NUM_TASKS_DEFAULT);
       payload = TezUtils.createUserPayloadFromConf(conf);
     }
-    DAG dag = new DAG(name);
+    DAG dag = DAG.create(name);
     Vertex v1 = Vertex.create("v1", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
     Vertex v2 = Vertex.create("v2", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
     Vertex v3 = Vertex.create("v3", TestProcessor.getProcDesc(payload), taskCount, defaultResource);

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/test/java/org/apache/tez/test/dag/SimpleVTestDAG.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/dag/SimpleVTestDAG.java b/tez-tests/src/test/java/org/apache/tez/test/dag/SimpleVTestDAG.java
index fb85588..a4eb95e 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/dag/SimpleVTestDAG.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/dag/SimpleVTestDAG.java
@@ -54,7 +54,7 @@ public class SimpleVTestDAG {
       taskCount = conf.getInt(TEZ_SIMPLE_V_DAG_NUM_TASKS, TEZ_SIMPLE_V_DAG_NUM_TASKS_DEFAULT);
       payload = TezUtils.createUserPayloadFromConf(conf);
     }
-    DAG dag = new DAG(name);
+    DAG dag = DAG.create(name);
     Vertex v1 = Vertex.create("v1", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
     Vertex v2 = Vertex.create("v2", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
     Vertex v3 = Vertex.create("v3", TestProcessor.getProcDesc(payload), taskCount, defaultResource);

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/test/java/org/apache/tez/test/dag/SixLevelsFailingDAG.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/dag/SixLevelsFailingDAG.java b/tez-tests/src/test/java/org/apache/tez/test/dag/SixLevelsFailingDAG.java
index e2f7919..036bedf 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/dag/SixLevelsFailingDAG.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/dag/SixLevelsFailingDAG.java
@@ -84,7 +84,7 @@ public class SixLevelsFailingDAG extends ThreeLevelsFailingDAG {
         if (conf != null) {
           payload = TezUtils.createUserPayloadFromConf(conf);
         } 
-        dag = new DAG(name);
+        dag = DAG.create(name);
         addDAGVerticesAndEdges();
         return dag;
     }

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/test/java/org/apache/tez/test/dag/ThreeLevelsFailingDAG.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/dag/ThreeLevelsFailingDAG.java b/tez-tests/src/test/java/org/apache/tez/test/dag/ThreeLevelsFailingDAG.java
index 633c8e7..7f2e4f8 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/dag/ThreeLevelsFailingDAG.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/dag/ThreeLevelsFailingDAG.java
@@ -64,7 +64,7 @@ public class ThreeLevelsFailingDAG extends TwoLevelsFailingDAG {
         if (conf != null) {
           payload = TezUtils.createUserPayloadFromConf(conf);
         } 
-        dag = new DAG(name);
+        dag = DAG.create(name);
         addDAGVerticesAndEdges();
         return dag;
     }

http://git-wip-us.apache.org/repos/asf/tez/blob/62e00b70/tez-tests/src/test/java/org/apache/tez/test/dag/TwoLevelsFailingDAG.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/dag/TwoLevelsFailingDAG.java b/tez-tests/src/test/java/org/apache/tez/test/dag/TwoLevelsFailingDAG.java
index df3bf97..151e385 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/dag/TwoLevelsFailingDAG.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/dag/TwoLevelsFailingDAG.java
@@ -59,7 +59,7 @@ public class TwoLevelsFailingDAG {
         if (conf != null) {
           payload = TezUtils.createUserPayloadFromConf(conf);
         } 
-        dag = new DAG(name);
+        dag = DAG.create(name);
         addDAGVerticesAndEdges();
         return dag;
     }


Mime
View raw message