You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ro...@apache.org on 2014/11/07 22:08:27 UTC

svn commit: r1637447 [4/4] - in /pig/trunk: ./ src/org/apache/pig/ src/org/apache/pig/backend/executionengine/ src/org/apache/pig/backend/hadoop/executionengine/ src/org/apache/pig/backend/hadoop/executionengine/tez/ src/org/apache/pig/backend/hadoop/e...

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-3.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-3.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-3.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-3.gld Fri Nov  7 21:08:25 2014
@@ -2,12 +2,12 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-45
+# TEZ DAG plan: pig-0_scope-0
 #--------------------------------------------------
 Tez vertex scope-43	->	Tez vertex scope-44,
-Tez vertex scope-37	->	Tez vertex group scope-46,
-Tez vertex scope-38	->	Tez vertex group scope-46,
-Tez vertex group scope-46	->	Tez vertex scope-44,
+Tez vertex scope-37	->	Tez vertex group scope-45,
+Tez vertex scope-38	->	Tez vertex group scope-45,
+Tez vertex group scope-45	->	Tez vertex scope-44,
 Tez vertex scope-44
 
 Tez vertex scope-43
@@ -29,9 +29,9 @@ e: Local Rearrange[tuple]{int}(false) - 
     |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-17
 Tez vertex scope-37
 # Plan on vertex
-e: Local Rearrange[tuple]{int}(false) - scope-47	->	 scope-44
+e: Local Rearrange[tuple]{int}(false) - scope-46	->	 scope-44
 |   |
-|   Project[int][0] - scope-48
+|   Project[int][0] - scope-47
 |
 |---a: New For Each(false,false)[bag] - scope-7
     |   |
@@ -46,9 +46,9 @@ e: Local Rearrange[tuple]{int}(false) - 
     |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
 Tez vertex scope-38
 # Plan on vertex
-e: Local Rearrange[tuple]{int}(false) - scope-49	->	 scope-44
+e: Local Rearrange[tuple]{int}(false) - scope-48	->	 scope-44
 |   |
-|   Project[int][0] - scope-50
+|   Project[int][0] - scope-49
 |
 |---c: New For Each(false,false)[bag] - scope-15
     |   |
@@ -61,7 +61,7 @@ e: Local Rearrange[tuple]{int}(false) - 
     |   |---Project[bytearray][0] - scope-12
     |
     |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-8
-Tez vertex group scope-46	<-	 [scope-37, scope-38]	->	 scope-44
+Tez vertex group scope-45	<-	 [scope-37, scope-38]	->	 scope-44
 # No plan on vertex group
 Tez vertex scope-44
 # Plan on vertex

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4-OPTOFF.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4-OPTOFF.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4-OPTOFF.gld Fri Nov  7 21:08:25 2014
@@ -2,68 +2,68 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-83
+# TEZ DAG plan: pig-0_scope-1
 #--------------------------------------------------
-Tez vertex scope-76	->	Tez vertex scope-78,
-Tez vertex scope-77	->	Tez vertex scope-78,
-Tez vertex scope-82	->	Tez vertex scope-78,
-Tez vertex scope-78
+Tez vertex scope-75	->	Tez vertex scope-77,
+Tez vertex scope-76	->	Tez vertex scope-77,
+Tez vertex scope-81	->	Tez vertex scope-77,
+Tez vertex scope-77
 
-Tez vertex scope-76
+Tez vertex scope-75
 # Plan on vertex
-POValueOutputTez - scope-80	->	 [scope-78]
+POValueOutputTez - scope-79	->	 [scope-77]
 |
-|---a: New For Each(false,false)[bag] - scope-49
+|---a: New For Each(false,false)[bag] - scope-48
     |   |
-    |   Cast[int] - scope-44
+    |   Cast[int] - scope-43
     |   |
-    |   |---Project[bytearray][0] - scope-43
+    |   |---Project[bytearray][0] - scope-42
     |   |
-    |   Cast[chararray] - scope-47
+    |   Cast[chararray] - scope-46
     |   |
-    |   |---Project[bytearray][1] - scope-46
+    |   |---Project[bytearray][1] - scope-45
     |
-    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-42
-Tez vertex scope-77
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-41
+Tez vertex scope-76
 # Plan on vertex
-POValueOutputTez - scope-81	->	 [scope-78]
+POValueOutputTez - scope-80	->	 [scope-77]
 |
-|---c: New For Each(false,false)[bag] - scope-57
+|---c: New For Each(false,false)[bag] - scope-56
     |   |
-    |   Cast[int] - scope-52
+    |   Cast[int] - scope-51
     |   |
-    |   |---Project[bytearray][1] - scope-51
+    |   |---Project[bytearray][1] - scope-50
     |   |
-    |   Cast[chararray] - scope-55
+    |   Cast[chararray] - scope-54
     |   |
-    |   |---Project[bytearray][0] - scope-54
+    |   |---Project[bytearray][0] - scope-53
     |
-    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-50
-Tez vertex scope-82
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-49
+Tez vertex scope-81
 # Plan on vertex
-Local Rearrange[tuple]{int}(false) - scope-72	->	 scope-78
+Local Rearrange[tuple]{int}(false) - scope-71	->	 scope-77
 |   |
-|   Project[int][0] - scope-68
+|   Project[int][0] - scope-67
 |
-|---d: New For Each(false,false)[bag] - scope-66
+|---d: New For Each(false,false)[bag] - scope-65
     |   |
-    |   Cast[int] - scope-61
+    |   Cast[int] - scope-60
     |   |
-    |   |---Project[bytearray][0] - scope-60
+    |   |---Project[bytearray][0] - scope-59
     |   |
-    |   Cast[chararray] - scope-64
+    |   Cast[chararray] - scope-63
     |   |
-    |   |---Project[bytearray][1] - scope-63
+    |   |---Project[bytearray][1] - scope-62
     |
-    |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-59
-Tez vertex scope-78
+    |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-58
+Tez vertex scope-77
 # Plan on vertex
-e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-75
+e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-74
 |
-|---e: FRJoin[tuple] - scope-69	<-	 scope-82
+|---e: FRJoin[tuple] - scope-68	<-	 scope-81
     |   |
-    |   Project[int][0] - scope-67
+    |   Project[int][0] - scope-66
     |   |
-    |   Project[int][0] - scope-68
+    |   Project[int][0] - scope-67
     |
-    |---POShuffledValueInputTez - scope-79	<-	 [scope-77, scope-76]
+    |---POShuffledValueInputTez - scope-78	<-	 [scope-76, scope-75]

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4.gld Fri Nov  7 21:08:25 2014
@@ -2,7 +2,7 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-41
+# TEZ DAG plan: pig-0_scope-0
 #--------------------------------------------------
 Tez vertex scope-34	->	Tez vertex scope-36,
 Tez vertex scope-35	->	Tez vertex scope-36,

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5-OPTOFF.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5-OPTOFF.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5-OPTOFF.gld Fri Nov  7 21:08:25 2014
@@ -2,68 +2,68 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-172
+# TEZ DAG plan: pig-0_scope-3
 #--------------------------------------------------
-Tez vertex scope-166	->	Tez vertex scope-168,
-Tez vertex scope-167	->	Tez vertex scope-168,
-Tez vertex scope-168	->	Tez vertex scope-165,
-Tez vertex scope-165
+Tez vertex scope-163	->	Tez vertex scope-165,
+Tez vertex scope-164	->	Tez vertex scope-165,
+Tez vertex scope-165	->	Tez vertex scope-162,
+Tez vertex scope-162
 
-Tez vertex scope-166
+Tez vertex scope-163
 # Plan on vertex
-POValueOutputTez - scope-170	->	 [scope-168]
+POValueOutputTez - scope-167	->	 [scope-165]
 |
-|---a: New For Each(false,false)[bag] - scope-146
+|---a: New For Each(false,false)[bag] - scope-143
     |   |
-    |   Cast[int] - scope-141
+    |   Cast[int] - scope-138
     |   |
-    |   |---Project[bytearray][0] - scope-140
+    |   |---Project[bytearray][0] - scope-137
     |   |
-    |   Cast[chararray] - scope-144
+    |   Cast[chararray] - scope-141
     |   |
-    |   |---Project[bytearray][1] - scope-143
+    |   |---Project[bytearray][1] - scope-140
     |
-    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-139
-Tez vertex scope-167
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-136
+Tez vertex scope-164
 # Plan on vertex
-POValueOutputTez - scope-171	->	 [scope-168]
+POValueOutputTez - scope-168	->	 [scope-165]
 |
-|---c: New For Each(false,false)[bag] - scope-154
+|---c: New For Each(false,false)[bag] - scope-151
     |   |
-    |   Cast[int] - scope-149
+    |   Cast[int] - scope-146
     |   |
-    |   |---Project[bytearray][1] - scope-148
+    |   |---Project[bytearray][1] - scope-145
     |   |
-    |   Cast[chararray] - scope-152
+    |   Cast[chararray] - scope-149
     |   |
-    |   |---Project[bytearray][0] - scope-151
+    |   |---Project[bytearray][0] - scope-148
     |
-    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-147
-Tez vertex scope-168
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-144
+Tez vertex scope-165
 # Plan on vertex
-Local Rearrange[tuple]{int}(false) - scope-161	->	 scope-165
+Local Rearrange[tuple]{int}(false) - scope-158	->	 scope-162
 |   |
-|   Project[int][0] - scope-157
+|   Project[int][0] - scope-154
 |
-|---POShuffledValueInputTez - scope-169	<-	 [scope-166, scope-167]
-Tez vertex scope-165
+|---POShuffledValueInputTez - scope-166	<-	 [scope-163, scope-164]
+Tez vertex scope-162
 # Plan on vertex
-e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-164
+e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-161
 |
-|---e: FRJoin[tuple] - scope-158	<-	 scope-168
+|---e: FRJoin[tuple] - scope-155	<-	 scope-165
     |   |
-    |   Project[int][0] - scope-156
+    |   Project[int][0] - scope-153
     |   |
-    |   Project[int][0] - scope-157
+    |   Project[int][0] - scope-154
     |
-    |---d: New For Each(false,false)[bag] - scope-138
+    |---d: New For Each(false,false)[bag] - scope-135
         |   |
-        |   Cast[int] - scope-133
+        |   Cast[int] - scope-130
         |   |
-        |   |---Project[bytearray][0] - scope-132
+        |   |---Project[bytearray][0] - scope-129
         |   |
-        |   Cast[chararray] - scope-136
+        |   Cast[chararray] - scope-133
         |   |
-        |   |---Project[bytearray][1] - scope-135
+        |   |---Project[bytearray][1] - scope-132
         |
-        |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-131
+        |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-128

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5.gld Fri Nov  7 21:08:25 2014
@@ -2,67 +2,67 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-125
+# TEZ DAG plan: pig-0_scope-2
 #--------------------------------------------------
-Tez vertex scope-119	->	Tez vertex group scope-126,
-Tez vertex scope-120	->	Tez vertex group scope-126,
-Tez vertex group scope-126	->	Tez vertex scope-118,
-Tez vertex scope-118
+Tez vertex scope-117	->	Tez vertex group scope-123,
+Tez vertex scope-118	->	Tez vertex group scope-123,
+Tez vertex group scope-123	->	Tez vertex scope-116,
+Tez vertex scope-116
 
-Tez vertex scope-119
+Tez vertex scope-117
 # Plan on vertex
-Local Rearrange[tuple]{int}(false) - scope-127	->	 scope-118
+Local Rearrange[tuple]{int}(false) - scope-124	->	 scope-116
 |   |
-|   Project[int][0] - scope-128
+|   Project[int][0] - scope-125
 |
-|---a: New For Each(false,false)[bag] - scope-99
+|---a: New For Each(false,false)[bag] - scope-97
     |   |
-    |   Cast[int] - scope-94
+    |   Cast[int] - scope-92
     |   |
-    |   |---Project[bytearray][0] - scope-93
+    |   |---Project[bytearray][0] - scope-91
     |   |
-    |   Cast[chararray] - scope-97
+    |   Cast[chararray] - scope-95
     |   |
-    |   |---Project[bytearray][1] - scope-96
+    |   |---Project[bytearray][1] - scope-94
     |
-    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-92
-Tez vertex scope-120
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-90
+Tez vertex scope-118
 # Plan on vertex
-Local Rearrange[tuple]{int}(false) - scope-129	->	 scope-118
+Local Rearrange[tuple]{int}(false) - scope-126	->	 scope-116
 |   |
-|   Project[int][0] - scope-130
+|   Project[int][0] - scope-127
 |
-|---c: New For Each(false,false)[bag] - scope-107
+|---c: New For Each(false,false)[bag] - scope-105
     |   |
-    |   Cast[int] - scope-102
+    |   Cast[int] - scope-100
     |   |
-    |   |---Project[bytearray][1] - scope-101
+    |   |---Project[bytearray][1] - scope-99
     |   |
-    |   Cast[chararray] - scope-105
+    |   Cast[chararray] - scope-103
     |   |
-    |   |---Project[bytearray][0] - scope-104
+    |   |---Project[bytearray][0] - scope-102
     |
-    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-100
-Tez vertex group scope-126	<-	 [scope-119, scope-120]	->	 scope-118
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-98
+Tez vertex group scope-123	<-	 [scope-117, scope-118]	->	 scope-116
 # No plan on vertex group
-Tez vertex scope-118
+Tez vertex scope-116
 # Plan on vertex
-e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-117
+e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-115
 |
-|---e: FRJoin[tuple] - scope-111	<-	 scope-126
+|---e: FRJoin[tuple] - scope-109	<-	 scope-123
     |   |
-    |   Project[int][0] - scope-109
+    |   Project[int][0] - scope-107
     |   |
-    |   Project[int][0] - scope-110
+    |   Project[int][0] - scope-108
     |
-    |---d: New For Each(false,false)[bag] - scope-91
+    |---d: New For Each(false,false)[bag] - scope-89
         |   |
-        |   Cast[int] - scope-86
+        |   Cast[int] - scope-84
         |   |
-        |   |---Project[bytearray][0] - scope-85
+        |   |---Project[bytearray][0] - scope-83
         |   |
-        |   Cast[chararray] - scope-89
+        |   Cast[chararray] - scope-87
         |   |
-        |   |---Project[bytearray][1] - scope-88
+        |   |---Project[bytearray][1] - scope-86
         |
-        |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-84
+        |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-82

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-6-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-6-OPTOFF.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-6-OPTOFF.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-6-OPTOFF.gld Fri Nov  7 21:08:25 2014
@@ -2,114 +2,114 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-148
+# TEZ DAG plan: pig-0_scope-1
 #--------------------------------------------------
-Tez vertex scope-115	->	Tez vertex scope-117,
-Tez vertex scope-116	->	Tez vertex scope-117,
-Tez vertex scope-117	->	Tez vertex scope-139,Tez vertex scope-129,
-Tez vertex scope-129	->	Tez vertex scope-139,Tez vertex scope-121,
-Tez vertex scope-139	->	Tez vertex scope-143,
-Tez vertex scope-121	->	Tez vertex scope-143,
-Tez vertex scope-143
+Tez vertex scope-114	->	Tez vertex scope-116,
+Tez vertex scope-115	->	Tez vertex scope-116,
+Tez vertex scope-116	->	Tez vertex scope-138,Tez vertex scope-128,
+Tez vertex scope-128	->	Tez vertex scope-138,Tez vertex scope-120,
+Tez vertex scope-138	->	Tez vertex scope-142,
+Tez vertex scope-120	->	Tez vertex scope-142,
+Tez vertex scope-142
 
-Tez vertex scope-115
+Tez vertex scope-114
 # Plan on vertex
-POValueOutputTez - scope-119	->	 [scope-117]
+POValueOutputTez - scope-118	->	 [scope-116]
 |
-|---a: New For Each(false,false)[bag] - scope-93
+|---a: New For Each(false,false)[bag] - scope-92
     |   |
-    |   Cast[int] - scope-88
+    |   Cast[int] - scope-87
     |   |
-    |   |---Project[bytearray][0] - scope-87
+    |   |---Project[bytearray][0] - scope-86
     |   |
-    |   Cast[chararray] - scope-91
+    |   Cast[chararray] - scope-90
     |   |
-    |   |---Project[bytearray][1] - scope-90
+    |   |---Project[bytearray][1] - scope-89
     |
-    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-86
-Tez vertex scope-116
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-85
+Tez vertex scope-115
 # Plan on vertex
-POValueOutputTez - scope-120	->	 [scope-117]
+POValueOutputTez - scope-119	->	 [scope-116]
 |
-|---c: New For Each(false,false)[bag] - scope-101
+|---c: New For Each(false,false)[bag] - scope-100
     |   |
-    |   Cast[int] - scope-96
+    |   Cast[int] - scope-95
     |   |
-    |   |---Project[bytearray][1] - scope-95
+    |   |---Project[bytearray][1] - scope-94
     |   |
-    |   Cast[chararray] - scope-99
+    |   Cast[chararray] - scope-98
     |   |
-    |   |---Project[bytearray][0] - scope-98
+    |   |---Project[bytearray][0] - scope-97
     |
-    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-94
-Tez vertex scope-117
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-93
+Tez vertex scope-116
 # Plan on vertex
-Local Rearrange[tuple]{tuple}(false) - scope-124	->	 scope-129
+Local Rearrange[tuple]{tuple}(false) - scope-123	->	 scope-128
 |   |
-|   Constant(DummyVal) - scope-123
+|   Constant(DummyVal) - scope-122
 |
-|---New For Each(true,true)[tuple] - scope-128
+|---New For Each(true,true)[tuple] - scope-127
     |   |
-    |   Project[int][0] - scope-111
+    |   Project[int][0] - scope-110
     |   |
-    |   POUserFunc(org.apache.pig.impl.builtin.GetMemNumRows)[tuple] - scope-127
+    |   POUserFunc(org.apache.pig.impl.builtin.GetMemNumRows)[tuple] - scope-126
     |   |
-    |   |---Project[tuple][*] - scope-126
+    |   |---Project[tuple][*] - scope-125
     |
-    |---PoissonSample - scope-125
+    |---PoissonSample - scope-124
         |
-        |---Local Rearrange[tuple]{int}(false) - scope-122	->	 scope-139
+        |---Local Rearrange[tuple]{int}(false) - scope-121	->	 scope-138
             |   |
-            |   Project[int][0] - scope-111
+            |   Project[int][0] - scope-110
             |
-            |---POShuffledValueInputTez - scope-118	<-	 [scope-116, scope-115]
-Tez vertex scope-129
+            |---POShuffledValueInputTez - scope-117	<-	 [scope-114, scope-115]
+Tez vertex scope-128
 # Plan on vertex
-POValueOutputTez - scope-138	->	 [scope-139, scope-121]
+POValueOutputTez - scope-137	->	 [scope-138, scope-120]
 |
-|---New For Each(false)[tuple] - scope-137
+|---New For Each(false)[tuple] - scope-136
     |   |
-    |   POUserFunc(org.apache.pig.backend.hadoop.executionengine.tez.plan.udf.PartitionSkewedKeysTez)[tuple] - scope-136
+    |   POUserFunc(org.apache.pig.backend.hadoop.executionengine.tez.plan.udf.PartitionSkewedKeysTez)[tuple] - scope-135
     |   |
-    |   |---Project[tuple][*] - scope-135
+    |   |---Project[tuple][*] - scope-134
     |
-    |---New For Each(false,false)[tuple] - scope-134
+    |---New For Each(false,false)[tuple] - scope-133
         |   |
-        |   Constant(-1) - scope-133
+        |   Constant(-1) - scope-132
         |   |
-        |   Project[bag][1] - scope-131
+        |   Project[bag][1] - scope-130
         |
-        |---Package(Packager)[tuple]{bytearray} - scope-130
-Tez vertex scope-139
+        |---Package(Packager)[tuple]{bytearray} - scope-129
+Tez vertex scope-138
 # Plan on vertex
-POIdentityInOutTez - scope-140	<-	 scope-117	->	 scope-143
+POIdentityInOutTez - scope-139	<-	 scope-116	->	 scope-142
 |   |
-|   Project[int][0] - scope-111
-Tez vertex scope-121
+|   Project[int][0] - scope-110
+Tez vertex scope-120
 # Plan on vertex
-Partition Rearrange[tuple]{int}(false) - scope-141	->	 scope-143
+Partition Rearrange[tuple]{int}(false) - scope-140	->	 scope-142
 |   |
-|   Project[int][0] - scope-112
+|   Project[int][0] - scope-111
 |
-|---d: New For Each(false,false)[bag] - scope-110
+|---d: New For Each(false,false)[bag] - scope-109
     |   |
-    |   Cast[int] - scope-105
+    |   Cast[int] - scope-104
     |   |
-    |   |---Project[bytearray][0] - scope-104
+    |   |---Project[bytearray][0] - scope-103
     |   |
-    |   Cast[chararray] - scope-108
+    |   Cast[chararray] - scope-107
     |   |
-    |   |---Project[bytearray][1] - scope-107
+    |   |---Project[bytearray][1] - scope-106
     |
-    |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-103
-Tez vertex scope-143
+    |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-102
+Tez vertex scope-142
 # Plan on vertex
-e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-114
+e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-113
 |
-|---New For Each(true,true)[tuple] - scope-147
+|---New For Each(true,true)[tuple] - scope-146
     |   |
-    |   Project[bag][1] - scope-145
+    |   Project[bag][1] - scope-144
     |   |
-    |   Project[bag][2] - scope-146
+    |   Project[bag][2] - scope-145
     |
-    |---Package(Packager)[tuple]{int} - scope-144
+    |---Package(Packager)[tuple]{int} - scope-143

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-6.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-6.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-6.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-6.gld Fri Nov  7 21:08:25 2014
@@ -2,36 +2,36 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-62
+# TEZ DAG plan: pig-0_scope-0
 #--------------------------------------------------
-Tez vertex scope-29	->	Tez vertex group scope-64,Tez vertex group scope-65,
-Tez vertex scope-30	->	Tez vertex group scope-64,Tez vertex group scope-65,
-Tez vertex group scope-65	->	Tez vertex scope-43,
+Tez vertex scope-29	->	Tez vertex group scope-63,Tez vertex group scope-64,
+Tez vertex scope-30	->	Tez vertex group scope-63,Tez vertex group scope-64,
+Tez vertex group scope-64	->	Tez vertex scope-43,
 Tez vertex scope-43	->	Tez vertex scope-53,Tez vertex scope-35,
-Tez vertex group scope-64	->	Tez vertex scope-53,
+Tez vertex group scope-63	->	Tez vertex scope-53,
 Tez vertex scope-53	->	Tez vertex scope-57,
 Tez vertex scope-35	->	Tez vertex scope-57,
 Tez vertex scope-57
 
 Tez vertex scope-29
 # Plan on vertex
-Local Rearrange[tuple]{tuple}(false) - scope-68	->	 scope-43
+Local Rearrange[tuple]{tuple}(false) - scope-67	->	 scope-43
 |   |
-|   Constant(DummyVal) - scope-69
+|   Constant(DummyVal) - scope-68
 |
-|---New For Each(true,true)[tuple] - scope-75
+|---New For Each(true,true)[tuple] - scope-74
     |   |
-    |   Project[int][0] - scope-72
+    |   Project[int][0] - scope-71
     |   |
-    |   POUserFunc(org.apache.pig.impl.builtin.GetMemNumRows)[tuple] - scope-73
+    |   POUserFunc(org.apache.pig.impl.builtin.GetMemNumRows)[tuple] - scope-72
     |   |
-    |   |---Project[tuple][*] - scope-74
+    |   |---Project[tuple][*] - scope-73
     |
-    |---PoissonSample - scope-71
+    |---PoissonSample - scope-70
         |
-        |---Local Rearrange[tuple]{int}(false) - scope-66	->	 scope-53
+        |---Local Rearrange[tuple]{int}(false) - scope-65	->	 scope-53
             |   |
-            |   Project[int][0] - scope-67
+            |   Project[int][0] - scope-66
             |
             |---a: New For Each(false,false)[bag] - scope-7
                 |   |
@@ -46,23 +46,23 @@ Local Rearrange[tuple]{tuple}(false) - s
                 |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
 Tez vertex scope-30
 # Plan on vertex
-Local Rearrange[tuple]{tuple}(false) - scope-78	->	 scope-43
+Local Rearrange[tuple]{tuple}(false) - scope-77	->	 scope-43
 |   |
-|   Constant(DummyVal) - scope-79
+|   Constant(DummyVal) - scope-78
 |
-|---New For Each(true,true)[tuple] - scope-85
+|---New For Each(true,true)[tuple] - scope-84
     |   |
-    |   Project[int][0] - scope-82
+    |   Project[int][0] - scope-81
     |   |
-    |   POUserFunc(org.apache.pig.impl.builtin.GetMemNumRows)[tuple] - scope-83
+    |   POUserFunc(org.apache.pig.impl.builtin.GetMemNumRows)[tuple] - scope-82
     |   |
-    |   |---Project[tuple][*] - scope-84
+    |   |---Project[tuple][*] - scope-83
     |
-    |---PoissonSample - scope-81
+    |---PoissonSample - scope-80
         |
-        |---Local Rearrange[tuple]{int}(false) - scope-76	->	 scope-53
+        |---Local Rearrange[tuple]{int}(false) - scope-75	->	 scope-53
             |   |
-            |   Project[int][0] - scope-77
+            |   Project[int][0] - scope-76
             |
             |---c: New For Each(false,false)[bag] - scope-15
                 |   |
@@ -75,7 +75,7 @@ Local Rearrange[tuple]{tuple}(false) - s
                 |   |---Project[bytearray][0] - scope-12
                 |
                 |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-8
-Tez vertex group scope-65	<-	 [scope-29, scope-30]	->	 scope-43
+Tez vertex group scope-64	<-	 [scope-29, scope-30]	->	 scope-43
 # No plan on vertex group
 Tez vertex scope-43
 # Plan on vertex
@@ -94,11 +94,11 @@ POValueOutputTez - scope-52	->	 [scope-5
         |   Project[bag][1] - scope-45
         |
         |---Package(Packager)[tuple]{bytearray} - scope-44
-Tez vertex group scope-64	<-	 [scope-29, scope-30]	->	 scope-53
+Tez vertex group scope-63	<-	 [scope-29, scope-30]	->	 scope-53
 # No plan on vertex group
 Tez vertex scope-53
 # Plan on vertex
-POIdentityInOutTez - scope-54	<-	 scope-64	->	 scope-57
+POIdentityInOutTez - scope-54	<-	 scope-63	->	 scope-57
 |   |
 |   Project[int][0] - scope-25
 Tez vertex scope-35

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-7-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-7-OPTOFF.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-7-OPTOFF.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-7-OPTOFF.gld Fri Nov  7 21:08:25 2014
@@ -2,94 +2,94 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-124
+# TEZ DAG plan: pig-0_scope-1
 #--------------------------------------------------
-Tez vertex scope-94	->	Tez vertex scope-96,
-Tez vertex scope-95	->	Tez vertex scope-96,
-Tez vertex scope-96	->	Tez vertex scope-118,Tez vertex scope-108,
-Tez vertex scope-108	->	Tez vertex scope-118,
-Tez vertex scope-118	->	Tez vertex scope-120,
-Tez vertex scope-120
+Tez vertex scope-93	->	Tez vertex scope-95,
+Tez vertex scope-94	->	Tez vertex scope-95,
+Tez vertex scope-95	->	Tez vertex scope-117,Tez vertex scope-107,
+Tez vertex scope-107	->	Tez vertex scope-117,
+Tez vertex scope-117	->	Tez vertex scope-119,
+Tez vertex scope-119
 
-Tez vertex scope-94
+Tez vertex scope-93
 # Plan on vertex
-POValueOutputTez - scope-98	->	 [scope-96]
+POValueOutputTez - scope-97	->	 [scope-95]
 |
-|---a: New For Each(false,false)[bag] - scope-81
+|---a: New For Each(false,false)[bag] - scope-80
     |   |
-    |   Cast[int] - scope-76
+    |   Cast[int] - scope-75
     |   |
-    |   |---Project[bytearray][0] - scope-75
+    |   |---Project[bytearray][0] - scope-74
     |   |
-    |   Cast[chararray] - scope-79
+    |   Cast[chararray] - scope-78
     |   |
-    |   |---Project[bytearray][1] - scope-78
+    |   |---Project[bytearray][1] - scope-77
     |
-    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-74
-Tez vertex scope-95
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-73
+Tez vertex scope-94
 # Plan on vertex
-POValueOutputTez - scope-99	->	 [scope-96]
+POValueOutputTez - scope-98	->	 [scope-95]
 |
-|---c: New For Each(false,false)[bag] - scope-89
+|---c: New For Each(false,false)[bag] - scope-88
     |   |
-    |   Cast[int] - scope-84
+    |   Cast[int] - scope-83
     |   |
-    |   |---Project[bytearray][1] - scope-83
+    |   |---Project[bytearray][1] - scope-82
     |   |
-    |   Cast[chararray] - scope-87
+    |   Cast[chararray] - scope-86
     |   |
-    |   |---Project[bytearray][0] - scope-86
+    |   |---Project[bytearray][0] - scope-85
     |
-    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-82
-Tez vertex scope-96
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-81
+Tez vertex scope-95
 # Plan on vertex
-Local Rearrange[tuple]{tuple}(false) - scope-102	->	 scope-108
+Local Rearrange[tuple]{tuple}(false) - scope-101	->	 scope-107
 |   |
-|   Constant(DummyVal) - scope-101
+|   Constant(DummyVal) - scope-100
 |
-|---New For Each(false,true)[tuple] - scope-107
+|---New For Each(false,true)[tuple] - scope-106
     |   |
-    |   Project[int][0] - scope-91
+    |   Project[int][0] - scope-90
     |   |
-    |   POUserFunc(org.apache.pig.impl.builtin.GetMemNumRows)[tuple] - scope-106
+    |   POUserFunc(org.apache.pig.impl.builtin.GetMemNumRows)[tuple] - scope-105
     |   |
-    |   |---Project[tuple][*] - scope-105
+    |   |---Project[tuple][*] - scope-104
     |
-    |---ReservoirSample - scope-104
+    |---ReservoirSample - scope-103
         |
-        |---d: Local Rearrange[tuple]{int}(false) - scope-100	->	 scope-118
+        |---d: Local Rearrange[tuple]{int}(false) - scope-99	->	 scope-117
             |   |
-            |   Project[int][0] - scope-91
+            |   Project[int][0] - scope-90
             |
-            |---POShuffledValueInputTez - scope-97	<-	 [scope-94, scope-95]
-Tez vertex scope-108
+            |---POShuffledValueInputTez - scope-96	<-	 [scope-93, scope-94]
+Tez vertex scope-107
 # Plan on vertex
-POValueOutputTez - scope-117	->	 [scope-118]
+POValueOutputTez - scope-116	->	 [scope-117]
 |
-|---New For Each(false)[tuple] - scope-116
+|---New For Each(false)[tuple] - scope-115
     |   |
-    |   POUserFunc(org.apache.pig.backend.hadoop.executionengine.tez.plan.udf.FindQuantilesTez)[tuple] - scope-115
+    |   POUserFunc(org.apache.pig.backend.hadoop.executionengine.tez.plan.udf.FindQuantilesTez)[tuple] - scope-114
     |   |
-    |   |---Project[tuple][*] - scope-114
+    |   |---Project[tuple][*] - scope-113
     |
-    |---New For Each(false,false)[tuple] - scope-113
+    |---New For Each(false,false)[tuple] - scope-112
         |   |
-        |   Constant(-1) - scope-112
+        |   Constant(-1) - scope-111
         |   |
-        |   Project[bag][1] - scope-110
+        |   Project[bag][1] - scope-109
         |
-        |---Package(Packager)[tuple]{bytearray} - scope-109
-Tez vertex scope-118
+        |---Package(Packager)[tuple]{bytearray} - scope-108
+Tez vertex scope-117
 # Plan on vertex
-POIdentityInOutTez - scope-119	<-	 scope-96	->	 scope-120
+POIdentityInOutTez - scope-118	<-	 scope-95	->	 scope-119
 |   |
-|   Project[int][0] - scope-91
-Tez vertex scope-120
+|   Project[int][0] - scope-90
+Tez vertex scope-119
 # Plan on vertex
-d: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-93
+d: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-92
 |
-|---New For Each(true)[tuple] - scope-123
+|---New For Each(true)[tuple] - scope-122
     |   |
-    |   Project[bag][1] - scope-122
+    |   Project[bag][1] - scope-121
     |
-    |---Package(LitePackager)[tuple]{int} - scope-121
+    |---Package(LitePackager)[tuple]{int} - scope-120

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-7.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-7.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-7.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-7.gld Fri Nov  7 21:08:25 2014
@@ -2,35 +2,35 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-50
+# TEZ DAG plan: pig-0_scope-0
 #--------------------------------------------------
-Tez vertex scope-20	->	Tez vertex group scope-52,Tez vertex group scope-53,
-Tez vertex scope-21	->	Tez vertex group scope-52,Tez vertex group scope-53,
-Tez vertex group scope-53	->	Tez vertex scope-34,
+Tez vertex scope-20	->	Tez vertex group scope-51,Tez vertex group scope-52,
+Tez vertex scope-21	->	Tez vertex group scope-51,Tez vertex group scope-52,
+Tez vertex group scope-52	->	Tez vertex scope-34,
 Tez vertex scope-34	->	Tez vertex scope-44,
-Tez vertex group scope-52	->	Tez vertex scope-44,
+Tez vertex group scope-51	->	Tez vertex scope-44,
 Tez vertex scope-44	->	Tez vertex scope-46,
 Tez vertex scope-46
 
 Tez vertex scope-20
 # Plan on vertex
-Local Rearrange[tuple]{tuple}(false) - scope-55	->	 scope-34
+Local Rearrange[tuple]{tuple}(false) - scope-54	->	 scope-34
 |   |
-|   Constant(DummyVal) - scope-56
+|   Constant(DummyVal) - scope-55
 |
-|---New For Each(false,true)[tuple] - scope-63
+|---New For Each(false,true)[tuple] - scope-62
     |   |
-    |   Project[int][0] - scope-60
+    |   Project[int][0] - scope-59
     |   |
-    |   POUserFunc(org.apache.pig.impl.builtin.GetMemNumRows)[tuple] - scope-62
+    |   POUserFunc(org.apache.pig.impl.builtin.GetMemNumRows)[tuple] - scope-61
     |   |
-    |   |---Project[tuple][*] - scope-61
+    |   |---Project[tuple][*] - scope-60
     |
-    |---ReservoirSample - scope-54
+    |---ReservoirSample - scope-53
         |
-        |---d: Local Rearrange[tuple]{int}(false) - scope-58	->	 scope-44
+        |---d: Local Rearrange[tuple]{int}(false) - scope-57	->	 scope-44
             |   |
-            |   Project[int][0] - scope-59
+            |   Project[int][0] - scope-58
             |
             |---a: New For Each(false,false)[bag] - scope-7
                 |   |
@@ -45,23 +45,23 @@ Local Rearrange[tuple]{tuple}(false) - s
                 |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
 Tez vertex scope-21
 # Plan on vertex
-Local Rearrange[tuple]{tuple}(false) - scope-65	->	 scope-34
+Local Rearrange[tuple]{tuple}(false) - scope-64	->	 scope-34
 |   |
-|   Constant(DummyVal) - scope-66
+|   Constant(DummyVal) - scope-65
 |
-|---New For Each(false,true)[tuple] - scope-73
+|---New For Each(false,true)[tuple] - scope-72
     |   |
-    |   Project[int][0] - scope-70
+    |   Project[int][0] - scope-69
     |   |
-    |   POUserFunc(org.apache.pig.impl.builtin.GetMemNumRows)[tuple] - scope-72
+    |   POUserFunc(org.apache.pig.impl.builtin.GetMemNumRows)[tuple] - scope-71
     |   |
-    |   |---Project[tuple][*] - scope-71
+    |   |---Project[tuple][*] - scope-70
     |
-    |---ReservoirSample - scope-64
+    |---ReservoirSample - scope-63
         |
-        |---d: Local Rearrange[tuple]{int}(false) - scope-68	->	 scope-44
+        |---d: Local Rearrange[tuple]{int}(false) - scope-67	->	 scope-44
             |   |
-            |   Project[int][0] - scope-69
+            |   Project[int][0] - scope-68
             |
             |---c: New For Each(false,false)[bag] - scope-15
                 |   |
@@ -74,7 +74,7 @@ Local Rearrange[tuple]{tuple}(false) - s
                 |   |---Project[bytearray][0] - scope-12
                 |
                 |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-8
-Tez vertex group scope-53	<-	 [scope-20, scope-21]	->	 scope-34
+Tez vertex group scope-52	<-	 [scope-20, scope-21]	->	 scope-34
 # No plan on vertex group
 Tez vertex scope-34
 # Plan on vertex
@@ -93,11 +93,11 @@ POValueOutputTez - scope-43	->	 [scope-4
         |   Project[bag][1] - scope-36
         |
         |---Package(Packager)[tuple]{bytearray} - scope-35
-Tez vertex group scope-52	<-	 [scope-20, scope-21]	->	 scope-44
+Tez vertex group scope-51	<-	 [scope-20, scope-21]	->	 scope-44
 # No plan on vertex group
 Tez vertex scope-44
 # Plan on vertex
-POIdentityInOutTez - scope-45	<-	 scope-52	->	 scope-46
+POIdentityInOutTez - scope-45	<-	 scope-51	->	 scope-46
 |   |
 |   Project[int][0] - scope-17
 Tez vertex scope-46

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-8-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-8-OPTOFF.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-8-OPTOFF.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-8-OPTOFF.gld Fri Nov  7 21:08:25 2014
@@ -2,70 +2,70 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-75
+# TEZ DAG plan: pig-0_scope-1
 #--------------------------------------------------
-Tez vertex scope-61	->	Tez vertex scope-63,
-Tez vertex scope-63	->	Tez vertex scope-71,
-Tez vertex scope-66	->	Tez vertex scope-68,
-Tez vertex scope-68	->	Tez vertex scope-71,
-Tez vertex scope-71
+Tez vertex scope-60	->	Tez vertex scope-62,
+Tez vertex scope-62	->	Tez vertex scope-70,
+Tez vertex scope-65	->	Tez vertex scope-67,
+Tez vertex scope-67	->	Tez vertex scope-70,
+Tez vertex scope-70
 
-Tez vertex scope-61
+Tez vertex scope-60
 # Plan on vertex
-POValueOutputTez - scope-62	->	 [scope-63]
+POValueOutputTez - scope-61	->	 [scope-62]
 |
-|---Limit - scope-39
+|---Limit - scope-38
     |
-    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-38
-Tez vertex scope-63
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-37
+Tez vertex scope-62
 # Plan on vertex
-POValueOutputTez - scope-73	->	 [scope-71]
+POValueOutputTez - scope-72	->	 [scope-70]
 |
-|---a: New For Each(false,false)[bag] - scope-47
+|---a: New For Each(false,false)[bag] - scope-46
     |   |
-    |   Cast[int] - scope-42
+    |   Cast[int] - scope-41
     |   |
-    |   |---Project[bytearray][0] - scope-41
+    |   |---Project[bytearray][0] - scope-40
     |   |
-    |   Cast[chararray] - scope-45
+    |   Cast[chararray] - scope-44
     |   |
-    |   |---Project[bytearray][1] - scope-44
+    |   |---Project[bytearray][1] - scope-43
     |
-    |---Limit - scope-40
+    |---Limit - scope-39
         |
-        |---Limit - scope-65
+        |---Limit - scope-64
             |
-            |---POValueInputTez - scope-64	<-	 scope-61
-Tez vertex scope-66
+            |---POValueInputTez - scope-63	<-	 scope-60
+Tez vertex scope-65
 # Plan on vertex
-POValueOutputTez - scope-67	->	 [scope-68]
+POValueOutputTez - scope-66	->	 [scope-67]
 |
-|---Limit - scope-49
+|---Limit - scope-48
     |
-    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-48
-Tez vertex scope-68
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-47
+Tez vertex scope-67
 # Plan on vertex
-POValueOutputTez - scope-74	->	 [scope-71]
+POValueOutputTez - scope-73	->	 [scope-70]
 |
-|---c: New For Each(false,false)[bag] - scope-57
+|---c: New For Each(false,false)[bag] - scope-56
     |   |
-    |   Cast[int] - scope-52
+    |   Cast[int] - scope-51
     |   |
-    |   |---Project[bytearray][1] - scope-51
+    |   |---Project[bytearray][1] - scope-50
     |   |
-    |   Cast[chararray] - scope-55
+    |   Cast[chararray] - scope-54
     |   |
-    |   |---Project[bytearray][0] - scope-54
+    |   |---Project[bytearray][0] - scope-53
     |
-    |---Limit - scope-50
+    |---Limit - scope-49
         |
-        |---Limit - scope-70
+        |---Limit - scope-69
             |
-            |---POValueInputTez - scope-69	<-	 scope-66
-Tez vertex scope-71
+            |---POValueInputTez - scope-68	<-	 scope-65
+Tez vertex scope-70
 # Plan on vertex
-d: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-60
+d: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-59
 |
-|---d: Limit - scope-59
+|---d: Limit - scope-58
     |
-    |---POShuffledValueInputTez - scope-72	<-	 [scope-68, scope-63]
+    |---POShuffledValueInputTez - scope-71	<-	 [scope-67, scope-62]

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-8.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-8.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-8.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-8.gld Fri Nov  7 21:08:25 2014
@@ -2,7 +2,7 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-37
+# TEZ DAG plan: pig-0_scope-0
 #--------------------------------------------------
 Tez vertex scope-23	->	Tez vertex scope-25,
 Tez vertex scope-25	->	Tez vertex scope-33,

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9-OPTOFF.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9-OPTOFF.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9-OPTOFF.gld Fri Nov  7 21:08:25 2014
@@ -2,88 +2,88 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-119
+# TEZ DAG plan: pig-0_scope-1
 #--------------------------------------------------
-Tez vertex scope-109	->	Tez vertex scope-110,
-Tez vertex scope-103	->	Tez vertex scope-110,
-Tez vertex scope-110
-
+Tez vertex scope-108	->	Tez vertex scope-109,
+Tez vertex scope-102	->	Tez vertex scope-109,
 Tez vertex scope-109
+
+Tez vertex scope-108
 # Plan on vertex
-POValueOutputTez - scope-113	->	 [scope-110]
+POValueOutputTez - scope-112	->	 [scope-109]
 |
-|---c: New For Each(false,false)[bag] - scope-89
+|---c: New For Each(false,false)[bag] - scope-88
     |   |
-    |   Cast[int] - scope-84
+    |   Cast[int] - scope-83
     |   |
-    |   |---Project[bytearray][1] - scope-83
+    |   |---Project[bytearray][1] - scope-82
     |   |
-    |   Cast[chararray] - scope-87
+    |   Cast[chararray] - scope-86
     |   |
-    |   |---Project[bytearray][0] - scope-86
+    |   |---Project[bytearray][0] - scope-85
     |
-    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-82
-Tez vertex scope-103
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-81
+Tez vertex scope-102
 # Plan on vertex
-1-12: Split - scope-121
+1-12: Split - scope-119
 |   |
-|   a2: Store(file:///tmp/output/a2:org.apache.pig.builtin.PigStorage) - scope-77
+|   a2: Store(file:///tmp/output/a2:org.apache.pig.builtin.PigStorage) - scope-76
 |   |
-|   |---a2: Filter[bag] - scope-72
+|   |---a2: Filter[bag] - scope-71
 |       |   |
-|       |   Not[boolean] - scope-76
+|       |   Not[boolean] - scope-75
 |       |   |
-|       |   |---Greater Than[boolean] - scope-75
+|       |   |---Greater Than[boolean] - scope-74
 |       |       |
-|       |       |---Project[int][0] - scope-73
+|       |       |---Project[int][0] - scope-72
 |       |       |
-|       |       |---Constant(100) - scope-74
+|       |       |---Constant(100) - scope-73
 |   |
-|   POValueOutputTez - scope-112	->	 [scope-110]
+|   POValueOutputTez - scope-111	->	 [scope-109]
 |   |
-|   |---a1: Filter[bag] - scope-78
+|   |---a1: Filter[bag] - scope-77
 |       |   |
-|       |   Greater Than[boolean] - scope-81
+|       |   Greater Than[boolean] - scope-80
 |       |   |
-|       |   |---Project[int][0] - scope-79
+|       |   |---Project[int][0] - scope-78
 |       |   |
-|       |   |---Constant(100) - scope-80
+|       |   |---Constant(100) - scope-79
 |
-|---a: New For Each(false,false)[bag] - scope-70
+|---a: New For Each(false,false)[bag] - scope-69
     |   |
-    |   Cast[int] - scope-65
+    |   Cast[int] - scope-64
     |   |
-    |   |---Project[bytearray][0] - scope-64
+    |   |---Project[bytearray][0] - scope-63
     |   |
-    |   Cast[chararray] - scope-68
+    |   Cast[chararray] - scope-67
     |   |
-    |   |---Project[bytearray][1] - scope-67
+    |   |---Project[bytearray][1] - scope-66
     |
-    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-63
-Tez vertex scope-110
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-62
+Tez vertex scope-109
 # Plan on vertex
-1-13: Split - scope-120
+1-13: Split - scope-118
 |   |
-|   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-96
+|   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-95
 |   |
-|   |---d: Filter[bag] - scope-92
+|   |---d: Filter[bag] - scope-91
 |       |   |
-|       |   Greater Than[boolean] - scope-95
+|       |   Greater Than[boolean] - scope-94
 |       |   |
-|       |   |---Project[int][0] - scope-93
+|       |   |---Project[int][0] - scope-92
 |       |   |
-|       |   |---Constant(500) - scope-94
+|       |   |---Constant(500) - scope-93
 |   |
-|   e: Store(file:///tmp/output/e:org.apache.pig.builtin.PigStorage) - scope-102
+|   e: Store(file:///tmp/output/e:org.apache.pig.builtin.PigStorage) - scope-101
 |   |
-|   |---e: Filter[bag] - scope-97
+|   |---e: Filter[bag] - scope-96
 |       |   |
-|       |   Not[boolean] - scope-101
+|       |   Not[boolean] - scope-100
 |       |   |
-|       |   |---Greater Than[boolean] - scope-100
+|       |   |---Greater Than[boolean] - scope-99
 |       |       |
-|       |       |---Project[int][0] - scope-98
+|       |       |---Project[int][0] - scope-97
 |       |       |
-|       |       |---Constant(500) - scope-99
+|       |       |---Constant(500) - scope-98
 |
-|---POShuffledValueInputTez - scope-111	<-	 [scope-109, scope-103]
+|---POShuffledValueInputTez - scope-110	<-	 [scope-108, scope-102]

Modified: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9.gld?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9.gld (original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9.gld Fri Nov  7 21:08:25 2014
@@ -2,16 +2,16 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: scope-56
+# TEZ DAG plan: pig-0_scope-0
 #--------------------------------------------------
-Tez vertex scope-40	->	Tez vertex group scope-59,Tez vertex group scope-60,
-Tez vertex scope-46	->	Tez vertex group scope-59,Tez vertex group scope-60,
+Tez vertex scope-40	->	Tez vertex group scope-58,Tez vertex group scope-59,
+Tez vertex scope-46	->	Tez vertex group scope-58,Tez vertex group scope-59,
 Tez vertex group scope-59
-Tez vertex group scope-60
+Tez vertex group scope-58
 
 Tez vertex scope-40
 # Plan on vertex
-1-2: Split - scope-58
+1-2: Split - scope-57
 |   |
 |   a2: Store(file:///tmp/output/a2:org.apache.pig.builtin.PigStorage) - scope-14
 |   |
@@ -25,7 +25,7 @@ Tez vertex scope-40
 |       |       |
 |       |       |---Constant(100) - scope-11
 |   |
-|   1-3: Split - scope-61
+|   1-3: Split - scope-60
 |   |   |
 |   |   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-33
 |   |   |
@@ -70,7 +70,7 @@ Tez vertex scope-40
     |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
 Tez vertex scope-46
 # Plan on vertex
-1-3: Split - scope-62
+1-3: Split - scope-61
 |   |
 |   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-33
 |   |
@@ -107,5 +107,5 @@ Tez vertex scope-46
     |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-19
 Tez vertex group scope-59	<-	 [scope-40, scope-46]	->	 null
 # No plan on vertex group
-Tez vertex group scope-60	<-	 [scope-40, scope-46]	->	 null
+Tez vertex group scope-58	<-	 [scope-40, scope-46]	->	 null
 # No plan on vertex group

Modified: pig/trunk/test/org/apache/pig/tez/TestGroupConstParallelTez.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/tez/TestGroupConstParallelTez.java?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/tez/TestGroupConstParallelTez.java (original)
+++ pig/trunk/test/org/apache/pig/tez/TestGroupConstParallelTez.java Fri Nov  7 21:08:25 2014
@@ -24,12 +24,17 @@ import org.apache.pig.backend.hadoop.exe
 import org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezCompiler;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezOperPlan;
+import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezPlanContainerNode;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.optimizer.LoaderProcessor;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.optimizer.ParallelismSetter;
 import org.apache.pig.impl.PigContext;
+import org.apache.pig.impl.plan.OperatorKey;
 import org.apache.pig.test.TestGroupConstParallel;
 import org.apache.pig.tools.pigstats.PigStats.JobGraph;
-import org.apache.pig.tools.pigstats.tez.TezTaskStats;
+import org.apache.pig.tools.pigstats.ScriptState;
+import org.apache.pig.tools.pigstats.tez.TezDAGStats;
+import org.apache.pig.tools.pigstats.tez.TezScriptState;
+import org.apache.pig.tools.pigstats.tez.TezVertexStats;
 import org.apache.tez.dag.api.DAG;
 import org.apache.tez.dag.api.Vertex;
 import org.junit.Assume;
@@ -46,7 +51,9 @@ public class TestGroupConstParallelTez e
 
     @Override
     public void checkGroupAllWithParallelGraphResult(JobGraph jGraph) {
-        TezTaskStats ts = (TezTaskStats)jGraph.getSinks().get(0);
+        TezDAGStats ds = (TezDAGStats) jGraph.getJobList().get(0);
+        jGraph = (JobGraph)ds.getPlan();
+        TezVertexStats ts = (TezVertexStats)jGraph.getSinks().get(0);
         assertEquals(ts.getParallelism(), 1);
     }
 
@@ -60,7 +67,7 @@ public class TestGroupConstParallelTez e
         ParallelismSetter parallelismSetter = new ParallelismSetter(tezPlan, pc);
         parallelismSetter.visit();
 
-        DAG tezDag = DAG.create("test");
+        DAG tezDag = getTezDAG(tezPlan, pc);
         TezDagBuilder dagBuilder = new TezDagBuilder(pc, tezPlan, tezDag, null);
         dagBuilder.visit();
         for (Vertex v : tezDag.getVertices()) {
@@ -80,7 +87,7 @@ public class TestGroupConstParallelTez e
         ParallelismSetter parallelismSetter = new ParallelismSetter(tezPlan, pc);
         parallelismSetter.visit();
 
-        DAG tezDag = DAG.create("test");
+        DAG tezDag = getTezDAG(tezPlan, pc);
         TezDagBuilder dagBuilder = new TezDagBuilder(pc, tezPlan, tezDag, null);
         dagBuilder.visit();
         for (Vertex v : tezDag.getVertices()) {
@@ -95,4 +102,13 @@ public class TestGroupConstParallelTez e
         comp.compile();
         return comp.getTezPlan();
     }
+
+    private DAG getTezDAG(TezOperPlan tezPlan, PigContext pc) {
+        TezPlanContainerNode tezPlanNode = new TezPlanContainerNode(OperatorKey.genOpKey("DAGName"), tezPlan);
+        TezScriptState scriptState = new TezScriptState("test");
+        ScriptState.start(scriptState);
+        scriptState.setDAGScriptInfo(tezPlanNode);
+        DAG tezDag = DAG.create(tezPlanNode.getOperatorKey().toString());
+        return tezDag;
+    }
 }

Modified: pig/trunk/test/org/apache/pig/tez/TestJobSubmissionTez.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/tez/TestJobSubmissionTez.java?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/tez/TestJobSubmissionTez.java (original)
+++ pig/trunk/test/org/apache/pig/tez/TestJobSubmissionTez.java Fri Nov  7 21:08:25 2014
@@ -26,12 +26,16 @@ import org.apache.pig.backend.hadoop.exe
 import org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezCompiler;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezOperPlan;
+import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezPlanContainerNode;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.optimizer.LoaderProcessor;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.optimizer.ParallelismSetter;
 import org.apache.pig.impl.PigContext;
+import org.apache.pig.impl.plan.OperatorKey;
 import org.apache.pig.impl.plan.VisitorException;
 import org.apache.pig.test.TestJobSubmission;
 import org.apache.pig.test.Util;
+import org.apache.pig.tools.pigstats.ScriptState;
+import org.apache.pig.tools.pigstats.tez.TezScriptState;
 import org.apache.tez.common.TezUtils;
 import org.apache.tez.dag.api.DAG;
 import org.apache.tez.dag.api.Vertex;
@@ -57,7 +61,7 @@ public class TestJobSubmissionTez extend
         ParallelismSetter parallelismSetter = new ParallelismSetter(tezPlan, pc);
         parallelismSetter.visit();
 
-        DAG tezDag = DAG.create("test");
+        DAG tezDag = getTezDAG(tezPlan, pc);
         TezDagBuilder dagBuilder = new TezDagBuilder(pc, tezPlan, tezDag, null);
         try {
             dagBuilder.visit();
@@ -76,7 +80,7 @@ public class TestJobSubmissionTez extend
         ParallelismSetter parallelismSetter = new ParallelismSetter(tezPlan, pc);
         parallelismSetter.visit();
 
-        DAG tezDag = DAG.create("test");
+        DAG tezDag = getTezDAG(tezPlan, pc);
         TezDagBuilder dagBuilder = new TezDagBuilder(pc, tezPlan, tezDag, null);
         dagBuilder.visit();
         for (Vertex v : tezDag.getVertices()) {
@@ -96,4 +100,13 @@ public class TestJobSubmissionTez extend
         comp.compile();
         return comp.getTezPlan();
     }
+
+    private DAG getTezDAG(TezOperPlan tezPlan, PigContext pc) {
+        TezPlanContainerNode tezPlanNode = new TezPlanContainerNode(OperatorKey.genOpKey("DAGName"), tezPlan);
+        TezScriptState scriptState = new TezScriptState("test");
+        ScriptState.start(scriptState);
+        scriptState.setDAGScriptInfo(tezPlanNode);
+        DAG tezDag = DAG.create(tezPlanNode.getOperatorKey().toString());
+        return tezDag;
+    }
 }

Modified: pig/trunk/test/org/apache/pig/tez/TestLoaderStorerShipCacheFilesTez.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/tez/TestLoaderStorerShipCacheFilesTez.java?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/tez/TestLoaderStorerShipCacheFilesTez.java (original)
+++ pig/trunk/test/org/apache/pig/tez/TestLoaderStorerShipCacheFilesTez.java Fri Nov  7 21:08:25 2014
@@ -36,7 +36,7 @@ public class TestLoaderStorerShipCacheFi
     protected void checkPlan(PhysicalPlan pp, String[] expectedFiles, int size, PigContext pigContext) throws Exception {
         TezLauncher launcher = new TezLauncher();
         TezPlanContainer tezPlanContainer = launcher.compile(pp, pigContext);
-        assertPlanContains(tezPlanContainer.getRoots().get(0).getNode(), expectedFiles, size);
+        assertPlanContains(tezPlanContainer.getRoots().get(0).getTezOperPlan(), expectedFiles, size);
     }
 
     private void assertPlanContains(TezOperPlan plan, String[] expectedFiles, int size) throws VisitorException {

Modified: pig/trunk/test/org/apache/pig/tez/TestTezCompiler.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/tez/TestTezCompiler.java?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/tez/TestTezCompiler.java (original)
+++ pig/trunk/test/org/apache/pig/tez/TestTezCompiler.java Fri Nov  7 21:08:25 2014
@@ -23,7 +23,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.PrintStream;
-import java.util.Map;
 import java.util.Properties;
 
 import org.apache.pig.PigConfiguration;
@@ -32,13 +31,10 @@ import org.apache.pig.backend.executione
 import org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PhysicalPlan;
 import org.apache.pig.backend.hadoop.executionengine.tez.TezLauncher;
 import org.apache.pig.backend.hadoop.executionengine.tez.TezLocalExecType;
-import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezOperPlan;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezPlanContainer;
-import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezPlanContainerNode;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezPlanContainerPrinter;
 import org.apache.pig.impl.PigContext;
 import org.apache.pig.impl.plan.NodeIdGenerator;
-import org.apache.pig.impl.plan.OperatorKey;
 import org.apache.pig.test.Util;
 import org.apache.pig.test.utils.TestHelper;
 import org.junit.AfterClass;
@@ -86,6 +82,7 @@ public class TestTezCompiler {
     private void resetScope() {
         NodeIdGenerator.reset();
         PigServer.resetScope();
+        TezPlanContainer.resetScope();
     }
 
     @Test
@@ -581,10 +578,6 @@ public class TestTezCompiler {
         TezLauncher launcher = new TezLauncher();
         pc.inExplain = true;
         TezPlanContainer tezPlanContainer = launcher.compile(pp, pc);
-        for (Map.Entry<OperatorKey,TezPlanContainerNode> entry : tezPlanContainer.getKeys().entrySet()) {
-            TezOperPlan tezPlan = entry.getValue().getNode();
-            TezLauncher.optimize(tezPlan, pc);
-        }
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         PrintStream ps = new PrintStream(baos);

Modified: pig/trunk/test/org/apache/pig/tez/TestTezJobControlCompiler.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/tez/TestTezJobControlCompiler.java?rev=1637447&r1=1637446&r2=1637447&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/tez/TestTezJobControlCompiler.java (original)
+++ pig/trunk/test/org/apache/pig/tez/TestTezJobControlCompiler.java Fri Nov  7 21:08:25 2014
@@ -21,7 +21,6 @@ import static org.junit.Assert.assertEqu
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-import java.io.File;
 import java.io.IOException;
 import java.net.URI;
 import java.util.ArrayList;
@@ -42,19 +41,21 @@ import org.apache.pig.PigServer;
 import org.apache.pig.backend.executionengine.ExecException;
 import org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PhysicalPlan;
 import org.apache.pig.backend.hadoop.executionengine.tez.TezJobCompiler;
+import org.apache.pig.backend.hadoop.executionengine.tez.TezLauncher;
 import org.apache.pig.backend.hadoop.executionengine.tez.TezLocalExecType;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezCompiler;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezOperPlan;
 import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezOperator;
-import org.apache.pig.backend.hadoop.executionengine.tez.plan.optimizer.LoaderProcessor;
-import org.apache.pig.backend.hadoop.executionengine.tez.plan.optimizer.MultiQueryOptimizerTez;
-import org.apache.pig.backend.hadoop.executionengine.tez.plan.optimizer.ParallelismSetter;
+import org.apache.pig.backend.hadoop.executionengine.tez.plan.TezPlanContainerNode;
 import org.apache.pig.builtin.PigStorage;
 import org.apache.pig.impl.PigContext;
+import org.apache.pig.impl.plan.OperatorKey;
 import org.apache.pig.impl.util.Pair;
 import org.apache.pig.test.Util;
 import org.apache.pig.test.junit.OrderedJUnit4Runner;
 import org.apache.pig.test.junit.OrderedJUnit4Runner.TestOrder;
+import org.apache.pig.tools.pigstats.ScriptState;
+import org.apache.pig.tools.pigstats.tez.TezScriptState;
 import org.apache.tez.dag.api.DAG;
 import org.apache.tez.dag.api.Vertex;
 import org.junit.AfterClass;
@@ -289,14 +290,15 @@ public class TestTezJobControlCompiler {
         PhysicalPlan pp = Util.buildPp(pigServer, query);
         TezCompiler comp = new TezCompiler(pp, pc);
         TezOperPlan tezPlan = comp.compile();
+        TezLauncher.processLoadAndParallelism(tezPlan, pc);
+
+        TezPlanContainerNode tezPlanNode = new TezPlanContainerNode(OperatorKey.genOpKey("DAGName"), tezPlan);
+        TezScriptState scriptState = new TezScriptState("test");
+        ScriptState.start(scriptState);
+        scriptState.setDAGScriptInfo(tezPlanNode);
+
         TezJobCompiler jobComp = new TezJobCompiler(pc, new Configuration());
-        MultiQueryOptimizerTez mqOptimizer = new MultiQueryOptimizerTez(tezPlan);
-        mqOptimizer.visit();
-        LoaderProcessor loaderStorer = new LoaderProcessor(tezPlan, pc);
-        loaderStorer.visit();
-        ParallelismSetter parallelismSetter = new ParallelismSetter(tezPlan, pc);
-        parallelismSetter.visit();
-        DAG dag = jobComp.buildDAG(tezPlan, new HashMap<String, LocalResource>());
+        DAG dag = jobComp.buildDAG(tezPlanNode, new HashMap<String, LocalResource>());
         return new Pair<TezOperPlan, DAG>(tezPlan, dag);
     }
 }