tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject [1/3] git commit: TEZ-188. Rename EdgeProperty input/output to edgeDestination and edgeSource. (sseth)
Date Wed, 12 Jun 2013 17:09:37 GMT
Updated Branches:
  refs/heads/master 8ce2ef1bd -> 2d8c9b6a9


TEZ-188. Rename EdgeProperty input/output to edgeDestination and
edgeSource. (sseth)


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

Branch: refs/heads/master
Commit: 9226a1fe712260ee0717cd3338965b15b437b8f7
Parents: 8ce2ef1
Author: Siddharth Seth <sseth@apache.org>
Authored: Wed Jun 12 10:06:33 2013 -0700
Committer: Siddharth Seth <sseth@apache.org>
Committed: Wed Jun 12 10:06:33 2013 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/tez/dag/api/DAG.java   |  4 +--
 .../apache/tez/dag/api/DagTypeConverters.java   |  4 +--
 .../org/apache/tez/dag/api/EdgeProperty.java    | 30 ++++++++++++++++----
 tez-dag-api/src/main/proto/DAGApiRecords.proto  |  4 +--
 .../org/apache/tez/dag/api/TestDAGPlan.java     | 22 +++++++-------
 .../org/apache/tez/dag/api/TestDAGVerify.java   | 26 ++++++++---------
 .../apache/tez/dag/app/MRRExampleHelper.java    | 12 ++++----
 .../apache/tez/dag/app/dag/impl/VertexImpl.java |  4 +--
 .../tez/dag/app/dag/impl/TestDAGImpl.java       | 24 ++++++++--------
 .../tez/dag/app/dag/impl/TestVertexImpl.java    | 24 ++++++++--------
 .../dag/app/dag/impl/TestVertexScheduler.java   | 12 ++++----
 .../apache/tez/mapreduce/TestMRRJobsDAGApi.java | 12 ++++----
 .../org/apache/tez/mapreduce/YARNRunner.java    |  4 +--
 13 files changed, 100 insertions(+), 82 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/tez-dag-api/src/main/java/org/apache/tez/dag/api/DAG.java
----------------------------------------------------------------------
diff --git a/tez-dag-api/src/main/java/org/apache/tez/dag/api/DAG.java b/tez-dag-api/src/main/java/org/apache/tez/dag/api/DAG.java
index cd6391c..05a22cd 100644
--- a/tez-dag-api/src/main/java/org/apache/tez/dag/api/DAG.java
+++ b/tez-dag-api/src/main/java/org/apache/tez/dag/api/DAG.java
@@ -324,8 +324,8 @@ public class DAG { // FIXME rename to Topology
       edgeBuilder.setOutputVertexName(edge.getOutputVertex().getVertexName());
       edgeBuilder.setConnectionPattern(DagTypeConverters.convertToDAGPlan(edge.getEdgeProperty().connectionPattern));
       edgeBuilder.setSourceType(DagTypeConverters.convertToDAGPlan(edge.getEdgeProperty().getSourceType()));
-      edgeBuilder.setInputDescriptor(DagTypeConverters.convertToDAGPlan(edge.getEdgeProperty().getInputDescriptor()));
-      edgeBuilder.setOutputDescriptor(DagTypeConverters.convertToDAGPlan(edge.getEdgeProperty().getOutputDescriptor()));
+      edgeBuilder.setEdgeSource(DagTypeConverters.convertToDAGPlan(edge.getEdgeProperty().getEdgeSource()));
+      edgeBuilder.setEdgeDestination(DagTypeConverters.convertToDAGPlan(edge.getEdgeProperty().getEdgeDestination()));
       jobBuilder.addEdge(edgeBuilder);
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/tez-dag-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java
----------------------------------------------------------------------
diff --git a/tez-dag-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java b/tez-dag-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java
index 6773aba..ea5d8df 100644
--- a/tez-dag-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java
+++ b/tez-dag-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java
@@ -199,8 +199,8 @@ public class DagTypeConverters {
            new EdgeProperty(
                convertFromDAGPlan(edge.getConnectionPattern()),
                convertFromDAGPlan(edge.getSourceType()),
-               convertInputDescriptorFromDAGPlan(edge.getInputDescriptor()),
-               convertOutputDescriptorFromDAGPlan(edge.getOutputDescriptor())
+               convertOutputDescriptorFromDAGPlan(edge.getEdgeSource()),
+               convertInputDescriptorFromDAGPlan(edge.getEdgeDestination())
                )
            );
     }

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/tez-dag-api/src/main/java/org/apache/tez/dag/api/EdgeProperty.java
----------------------------------------------------------------------
diff --git a/tez-dag-api/src/main/java/org/apache/tez/dag/api/EdgeProperty.java b/tez-dag-api/src/main/java/org/apache/tez/dag/api/EdgeProperty.java
index f650105..d9ddd23 100644
--- a/tez-dag-api/src/main/java/org/apache/tez/dag/api/EdgeProperty.java
+++ b/tez-dag-api/src/main/java/org/apache/tez/dag/api/EdgeProperty.java
@@ -36,14 +36,22 @@ public class EdgeProperty { // FIXME rename to ChannelProperty
   InputDescriptor inputDescriptor;
   OutputDescriptor outputDescriptor;
   
+  /**
+   * @param connectionPattern
+   * @param sourceType
+   * @param edgeSource
+   *          The {@link OutputDescriptor} that generates data on the edge.
+   * @param edgeDestination
+   *          The {@link InputDescriptor} which will consume data from the edge.
+   */
   public EdgeProperty(ConnectionPattern connectionPattern, 
                        SourceType sourceType,
-                       InputDescriptor inputDescriptor,
-                       OutputDescriptor outputDescriptor) {
+                       OutputDescriptor edgeSource,
+                       InputDescriptor edgeDestination) {
     this.connectionPattern = connectionPattern;
     this.sourceType = sourceType;
-    this.inputDescriptor = inputDescriptor;
-    this.outputDescriptor = outputDescriptor;
+    this.inputDescriptor = edgeDestination;
+    this.outputDescriptor = edgeSource;
   }
   
   public ConnectionPattern getConnectionPattern() {
@@ -54,11 +62,21 @@ public class EdgeProperty { // FIXME rename to ChannelProperty
     return sourceType;
   }
   
-  public InputDescriptor getInputDescriptor() {
+  /**
+   * Returns the {@link InputDescriptor} which will consume data from the edge.
+   * 
+   * @return
+   */
+  public InputDescriptor getEdgeDestination() {
     return inputDescriptor;
   }
   
-  public OutputDescriptor getOutputDescriptor() {
+  /**
+   * Returns the {@link OutputDescriptor} which produces data on the edge.
+   * 
+   * @return
+   */
+  public OutputDescriptor getEdgeSource() {
     return outputDescriptor;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/tez-dag-api/src/main/proto/DAGApiRecords.proto
----------------------------------------------------------------------
diff --git a/tez-dag-api/src/main/proto/DAGApiRecords.proto b/tez-dag-api/src/main/proto/DAGApiRecords.proto
index ae1c370..b062c15 100644
--- a/tez-dag-api/src/main/proto/DAGApiRecords.proto
+++ b/tez-dag-api/src/main/proto/DAGApiRecords.proto
@@ -113,8 +113,8 @@ message EdgePlan {
   required string outputVertexName = 3;
   required PlanEdgeConnectionPattern connectionPattern = 4;
   required PlanEdgeSourceType sourceType = 5;
-  optional TezEntityDescriptorProto input_descriptor = 6;
-  optional TezEntityDescriptorProto output_descriptor = 7;
+  optional TezEntityDescriptorProto edge_source = 6;
+  optional TezEntityDescriptorProto edge_destination = 7;
 }
 
 message DAGPlan {

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/tez-dag-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
----------------------------------------------------------------------
diff --git a/tez-dag-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java b/tez-dag-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
index 5e4a007..1eb047f 100644
--- a/tez-dag-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
+++ b/tez-dag-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
@@ -114,7 +114,7 @@ public class TestDAGPlan {
     OutputDescriptor outputDescriptor = new OutputDescriptor("output",
         ByteBuffer.wrap("outputBytes".getBytes()));
     Edge edge = new Edge(v1, v2, new EdgeProperty(ConnectionPattern.BIPARTITE,
-        SourceType.STABLE, inputDescriptor, outputDescriptor));
+        SourceType.STABLE, outputDescriptor, inputDescriptor));
 
     dag.addVertex(v1).addVertex(v2).addEdge(edge);
 
@@ -135,29 +135,29 @@ public class TestDAGPlan {
         .getUserPayload().toByteArray()));
     assertEquals("processor2", v2Proto.getProcessorDescriptor().getClassName());
 
-    assertEquals("inputBytes", new String(edgeProto.getInputDescriptor()
+    assertEquals("inputBytes", new String(edgeProto.getEdgeDestination()
         .getUserPayload().toByteArray()));
-    assertEquals("input", edgeProto.getInputDescriptor().getClassName());
+    assertEquals("input", edgeProto.getEdgeDestination().getClassName());
 
-    assertEquals("outputBytes", new String(edgeProto.getOutputDescriptor()
+    assertEquals("outputBytes", new String(edgeProto.getEdgeSource()
         .getUserPayload().toByteArray()));
-    assertEquals("output", edgeProto.getOutputDescriptor().getClassName());
+    assertEquals("output", edgeProto.getEdgeSource().getClassName());
 
     Map<String, EdgeProperty> edgePropertyMap = DagTypeConverters
         .createEdgePropertyMapFromDAGPlan(dagProto.getEdgeList());
     assertEquals(1, edgePropertyMap.size());
     EdgeProperty edgeProperty = edgePropertyMap.values().iterator().next();
 
-    byte[] ib = new byte[edgeProperty.getInputDescriptor().getUserPayload()
+    byte[] ib = new byte[edgeProperty.getEdgeDestination().getUserPayload()
         .capacity()];
-    edgeProperty.getInputDescriptor().getUserPayload().get(ib);
+    edgeProperty.getEdgeDestination().getUserPayload().get(ib);
     assertEquals("inputBytes", new String(ib));
-    assertEquals("input", edgeProperty.getInputDescriptor().getClassName());
+    assertEquals("input", edgeProperty.getEdgeDestination().getClassName());
 
-    byte[] ob = new byte[edgeProperty.getOutputDescriptor().getUserPayload()
+    byte[] ob = new byte[edgeProperty.getEdgeSource().getUserPayload()
         .capacity()];
-    edgeProperty.getOutputDescriptor().getUserPayload().get(ob);
+    edgeProperty.getEdgeSource().getUserPayload().get(ob);
     assertEquals("outputBytes", new String(ob));
-    assertEquals("output", edgeProperty.getOutputDescriptor().getClassName());
+    assertEquals("output", edgeProperty.getEdgeSource().getClassName());
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/tez-dag-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java
----------------------------------------------------------------------
diff --git a/tez-dag-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java b/tez-dag-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java
index 2b40483..9b534c6 100644
--- a/tez-dag-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java
+++ b/tez-dag-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java
@@ -37,7 +37,7 @@ public class TestDAGVerify {
   public void testVerify1() {
     Vertex v1 = new Vertex("v1", new ProcessorDescriptor(dummyProcessorClassName, null),
dummyTaskCount);
     Vertex v2 = new Vertex("v2", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
-    Edge e1 = new Edge(v1, v2, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor(dummyInputClassName, null), new OutputDescriptor(dummyOutputClassName,
null)));
+    Edge e1 = new Edge(v1, v2, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor(dummyOutputClassName, null), new InputDescriptor(dummyInputClassName,
null)));
     DAG dag = new DAG();
     dag.addVertex(v1);
     dag.addVertex(v2);
@@ -57,10 +57,10 @@ public class TestDAGVerify {
     Vertex v2 = new Vertex("v2", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
     Vertex v3 = new Vertex("v3", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
     Vertex v4 = new Vertex("v4", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
-    Edge e1 = new Edge(v1, v2, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor("dummy input class", null), new OutputDescriptor("dummy output class",
null)));
-    Edge e2 = new Edge(v2, v3, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor("dummy input class", null), new OutputDescriptor("dummy output class",
null)));
-    Edge e3 = new Edge(v2, v4, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor("dummy input class", null), new OutputDescriptor("dummy output class",
null)));
-    Edge e4 = new Edge(v4, v1, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor("dummy input class", null), new OutputDescriptor("dummy output class",
null)));
+    Edge e1 = new Edge(v1, v2, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor("dummy output class", null), new InputDescriptor("dummy input class",
null)));
+    Edge e2 = new Edge(v2, v3, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor("dummy output class", null), new InputDescriptor("dummy input class",
null)));
+    Edge e3 = new Edge(v2, v4, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor("dummy output class", null), new InputDescriptor("dummy input class",
null)));
+    Edge e4 = new Edge(v4, v1, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor("dummy output class", null), new InputDescriptor("dummy input class",
null)));
     DAG dag = new DAG();
     dag.addVertex(v1);
     dag.addVertex(v2);
@@ -93,10 +93,10 @@ public class TestDAGVerify {
     Vertex v2 = new Vertex("v2", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
     Vertex v3 = new Vertex("v3", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
     Vertex v4 = new Vertex("v4", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
-    Edge e1 = new Edge(v1, v2, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor("dummy input class", null), new OutputDescriptor("dummy output class",
null)));
-    Edge e2 = new Edge(v2, v3, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor("dummy input class", null), new OutputDescriptor("dummy output class",
null)));
-    Edge e3 = new Edge(v2, v4, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor("dummy input class", null), new OutputDescriptor("dummy output class",
null)));
-    Edge e4 = new Edge(v3, v2, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor("dummy input class", null), new OutputDescriptor("dummy output class",
null)));
+    Edge e1 = new Edge(v1, v2, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor("dummy output class", null), new InputDescriptor("dummy input class",
null)));
+    Edge e2 = new Edge(v2, v3, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor("dummy output class", null), new InputDescriptor("dummy input class",
null)));
+    Edge e3 = new Edge(v2, v4, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor("dummy output class", null), new InputDescriptor("dummy input class",
null)));
+    Edge e4 = new Edge(v3, v2, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor("dummy output class", null), new InputDescriptor("dummy input class",
null)));
     DAG dag = new DAG();
     dag.addVertex(v1);
     dag.addVertex(v2);
@@ -146,8 +146,8 @@ public class TestDAGVerify {
       Vertex v1 = new Vertex("v1", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
       Vertex v2 = new Vertex("v2", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
       Vertex v3 = new Vertex("v3", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
-      Edge e1 = new Edge(v1, v3, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor("dummy input class", null), new OutputDescriptor("dummy output class",
null)));
-      Edge e2 = new Edge(v2, v3, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor("dummy input class", null), new OutputDescriptor("dummy output class",
null)));
+      Edge e1 = new Edge(v1, v3, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor("dummy output class", null), new InputDescriptor("dummy input class",
null)));
+      Edge e2 = new Edge(v2, v3, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor("dummy output class", null), new InputDescriptor("dummy input class",
null)));
       DAG dag = new DAG();
       dag.addVertex(v1);
       dag.addVertex(v2);
@@ -174,8 +174,8 @@ public class TestDAGVerify {
       Vertex v1 = new Vertex("v1", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
       Vertex v2 = new Vertex("v2", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
       Vertex v3 = new Vertex("v3", new ProcessorDescriptor("org.apache.tez.mapreduce.processor.reduce.MapProcessor",
null), dummyTaskCount);
-      Edge e1 = new Edge(v1, v2, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor("dummy input class", null), new OutputDescriptor("dummy output class",
null)));
-      Edge e2 = new Edge(v1, v2, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new InputDescriptor("dummy input class", null), new OutputDescriptor("dummy output class",
null)));
+      Edge e1 = new Edge(v1, v2, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor("dummy output class", null), new InputDescriptor("dummy input class",
null)));
+      Edge e2 = new Edge(v1, v2, new EdgeProperty(ConnectionPattern.BIPARTITE, SourceType.STABLE,
new OutputDescriptor("dummy output class", null), new InputDescriptor("dummy input class",
null)));
       DAG dag = new DAG();
       dag.addVertex(v1);
       dag.addVertex(v2);

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/tez-dag/src/main/java/org/apache/tez/dag/app/MRRExampleHelper.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/MRRExampleHelper.java b/tez-dag/src/main/java/org/apache/tez/dag/app/MRRExampleHelper.java
index d487594..3f5388c 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/MRRExampleHelper.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/MRRExampleHelper.java
@@ -100,13 +100,13 @@ public class MRRExampleHelper {
    Edge edge1 = new Edge(mapVertex, reduce1Vertex,
        new EdgeProperty(ConnectionPattern.BIPARTITE,
            SourceType.STABLE,
-           new InputDescriptor(ShuffledMergedInput.class.getName(), null),
-           new OutputDescriptor(OnFileSortedOutput.class.getName(), null)));
+           new OutputDescriptor(OnFileSortedOutput.class.getName(), null),
+           new InputDescriptor(ShuffledMergedInput.class.getName(), null)));
    Edge edge2 = new Edge(reduce1Vertex, reduce2Vertex,
        new EdgeProperty(ConnectionPattern.BIPARTITE,
            SourceType.STABLE,
-           new InputDescriptor(ShuffledMergedInput.class.getName(), null),
-           new OutputDescriptor(OnFileSortedOutput.class.getName(), null)));
+           new OutputDescriptor(OnFileSortedOutput.class.getName(), null),
+           new InputDescriptor(ShuffledMergedInput.class.getName(), null)));
    Map<String, LocalResource> jobRsrcs = createLocalResources(getMRRBaseDir(),
        getMRRLocalRsrcList());
 
@@ -166,8 +166,8 @@ public class MRRExampleHelper {
    Edge edge = new Edge(mapVertex, reduceVertex,
        new EdgeProperty(ConnectionPattern.BIPARTITE,
            SourceType.STABLE,
-           new InputDescriptor(ShuffledMergedInput.class.getName(), null),
-           new OutputDescriptor(OnFileSortedOutput.class.getName(), null)));
+           new OutputDescriptor(OnFileSortedOutput.class.getName(), null),
+           new InputDescriptor(ShuffledMergedInput.class.getName(), null)));
 
    Map<String, LocalResource> jobRsrcs = createLocalResources(getMRBaseDir(),
        getMRLocalRsrcList());

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java
index 07d4495..ffaf8d0 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java
@@ -1282,7 +1282,7 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex,
     for (Entry<Vertex, EdgeProperty> entry : this.getInputVertices().entrySet()) {
       InputSpec inputSpec = new InputSpec(entry.getKey().getName(),
           entry.getKey().getTotalTasks(),
-          entry.getValue().getInputDescriptor().getClassName());
+          entry.getValue().getEdgeDestination().getClassName());
       if (LOG.isDebugEnabled()) {
         LOG.debug("For vertex : " + this.getName()
             + ", Using InputSpec : " + inputSpec);
@@ -1301,7 +1301,7 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex,
       for (Entry<Vertex, EdgeProperty> entry : this.getOutputVertices().entrySet())
{
         OutputSpec outputSpec = new OutputSpec(entry.getKey().getName(),
             entry.getKey().getTotalTasks(),
-            entry.getValue().getOutputDescriptor().getClassName());
+            entry.getValue().getEdgeSource().getClassName());
         if (LOG.isDebugEnabled()) {
           LOG.debug("For vertex : " + this.getName()
               + ", Using OutputSpec : " + outputSpec);

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/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 a7b1007..7ed2b8b 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
@@ -272,9 +272,9 @@ public class TestDAGImpl {
             )
         .addEdge(
             EdgePlan.newBuilder()
-            .setInputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("i3_v1"))
+            .setEdgeDestination(TezEntityDescriptorProto.newBuilder().setClassName("i3_v1"))
             .setInputVertexName("vertex1")
-            .setOutputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("o1"))
+            .setEdgeSource(TezEntityDescriptorProto.newBuilder().setClassName("o1"))
             .setOutputVertexName("vertex3")
             .setConnectionPattern(PlanEdgeConnectionPattern.BIPARTITE)
             .setId("e1")
@@ -283,9 +283,9 @@ public class TestDAGImpl {
             )
         .addEdge(
             EdgePlan.newBuilder()
-            .setInputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("i3_v2"))
+            .setEdgeDestination(TezEntityDescriptorProto.newBuilder().setClassName("i3_v2"))
             .setInputVertexName("vertex2")
-            .setOutputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("o2"))
+            .setEdgeSource(TezEntityDescriptorProto.newBuilder().setClassName("o2"))
             .setOutputVertexName("vertex3")
             .setConnectionPattern(PlanEdgeConnectionPattern.BIPARTITE)
             .setId("e2")
@@ -294,9 +294,9 @@ public class TestDAGImpl {
             )
         .addEdge(
             EdgePlan.newBuilder()
-            .setInputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("i4_v3"))
+            .setEdgeDestination(TezEntityDescriptorProto.newBuilder().setClassName("i4_v3"))
             .setInputVertexName("vertex3")
-            .setOutputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("o3_v4"))
+            .setEdgeSource(TezEntityDescriptorProto.newBuilder().setClassName("o3_v4"))
             .setOutputVertexName("vertex4")
             .setConnectionPattern(PlanEdgeConnectionPattern.BIPARTITE)
             .setId("e3")
@@ -305,9 +305,9 @@ public class TestDAGImpl {
             )
         .addEdge(
             EdgePlan.newBuilder()
-            .setInputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("i5_v3"))
+            .setEdgeDestination(TezEntityDescriptorProto.newBuilder().setClassName("i5_v3"))
             .setInputVertexName("vertex3")
-            .setOutputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("o3_v5"))
+            .setEdgeSource(TezEntityDescriptorProto.newBuilder().setClassName("o3_v5"))
             .setOutputVertexName("vertex5")
             .setConnectionPattern(PlanEdgeConnectionPattern.BIPARTITE)
             .setId("e4")
@@ -316,9 +316,9 @@ public class TestDAGImpl {
             )
         .addEdge(
             EdgePlan.newBuilder()
-            .setInputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("i6_v4"))
+            .setEdgeDestination(TezEntityDescriptorProto.newBuilder().setClassName("i6_v4"))
             .setInputVertexName("vertex4")
-            .setOutputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("o4"))
+            .setEdgeSource(TezEntityDescriptorProto.newBuilder().setClassName("o4"))
             .setOutputVertexName("vertex6")
             .setConnectionPattern(PlanEdgeConnectionPattern.BIPARTITE)
             .setId("e5")
@@ -327,9 +327,9 @@ public class TestDAGImpl {
             )
         .addEdge(
             EdgePlan.newBuilder()
-            .setInputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("i6_v5"))
+            .setEdgeDestination(TezEntityDescriptorProto.newBuilder().setClassName("i6_v5"))
             .setInputVertexName("vertex5")
-            .setOutputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("o5"))
+            .setEdgeSource(TezEntityDescriptorProto.newBuilder().setClassName("o5"))
             .setOutputVertexName("vertex6")
             .setConnectionPattern(PlanEdgeConnectionPattern.BIPARTITE)
             .setId("e6")

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/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 d932662..af8b1e1 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
@@ -338,9 +338,9 @@ public class TestVertexImpl {
             )
         .addEdge(
             EdgePlan.newBuilder()
-            .setInputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("i3_v1"))
+            .setEdgeDestination(TezEntityDescriptorProto.newBuilder().setClassName("i3_v1"))
             .setInputVertexName("vertex1")
-            .setOutputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("o1"))
+            .setEdgeSource(TezEntityDescriptorProto.newBuilder().setClassName("o1"))
             .setOutputVertexName("vertex3")
             .setConnectionPattern(PlanEdgeConnectionPattern.BIPARTITE)
             .setId("e1")
@@ -349,9 +349,9 @@ public class TestVertexImpl {
             )
         .addEdge(
             EdgePlan.newBuilder()
-            .setInputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("i3_v2"))
+            .setEdgeDestination(TezEntityDescriptorProto.newBuilder().setClassName("i3_v2"))
             .setInputVertexName("vertex2")
-            .setOutputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("o2"))
+            .setEdgeSource(TezEntityDescriptorProto.newBuilder().setClassName("o2"))
             .setOutputVertexName("vertex3")
             .setConnectionPattern(PlanEdgeConnectionPattern.BIPARTITE)
             .setId("e2")
@@ -360,9 +360,9 @@ public class TestVertexImpl {
             )
         .addEdge(
             EdgePlan.newBuilder()
-            .setInputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("i4_v3"))
+            .setEdgeDestination(TezEntityDescriptorProto.newBuilder().setClassName("i4_v3"))
             .setInputVertexName("vertex3")
-            .setOutputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("o3_v4"))
+            .setEdgeSource(TezEntityDescriptorProto.newBuilder().setClassName("o3_v4"))
             .setOutputVertexName("vertex4")
             .setConnectionPattern(PlanEdgeConnectionPattern.BIPARTITE)
             .setId("e3")
@@ -371,9 +371,9 @@ public class TestVertexImpl {
             )
         .addEdge(
             EdgePlan.newBuilder()
-            .setInputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("i5_v3"))
+            .setEdgeDestination(TezEntityDescriptorProto.newBuilder().setClassName("i5_v3"))
             .setInputVertexName("vertex3")
-            .setOutputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("o3_v5"))
+            .setEdgeSource(TezEntityDescriptorProto.newBuilder().setClassName("o3_v5"))
             .setOutputVertexName("vertex5")
             .setConnectionPattern(PlanEdgeConnectionPattern.BIPARTITE)
             .setId("e4")
@@ -382,9 +382,9 @@ public class TestVertexImpl {
             )
         .addEdge(
             EdgePlan.newBuilder()
-            .setInputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("i6_v4"))
+            .setEdgeDestination(TezEntityDescriptorProto.newBuilder().setClassName("i6_v4"))
             .setInputVertexName("vertex4")
-            .setOutputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("o4"))
+            .setEdgeSource(TezEntityDescriptorProto.newBuilder().setClassName("o4"))
             .setOutputVertexName("vertex6")
             .setConnectionPattern(PlanEdgeConnectionPattern.BIPARTITE)
             .setId("e5")
@@ -393,9 +393,9 @@ public class TestVertexImpl {
             )
         .addEdge(
             EdgePlan.newBuilder()
-            .setInputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("i6_v5"))
+            .setEdgeDestination(TezEntityDescriptorProto.newBuilder().setClassName("i6_v5"))
             .setInputVertexName("vertex5")
-            .setOutputDescriptor(TezEntityDescriptorProto.newBuilder().setClassName("o5"))
+            .setEdgeSource(TezEntityDescriptorProto.newBuilder().setClassName("o5"))
             .setOutputVertexName("vertex6")
             .setConnectionPattern(PlanEdgeConnectionPattern.BIPARTITE)
             .setId("e6")

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexScheduler.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexScheduler.java
b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexScheduler.java
index bdd8fbf..030a6ac 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexScheduler.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexScheduler.java
@@ -53,22 +53,22 @@ public class TestVertexScheduler {
     TezVertexID mockSrcVertexId1 = new TezVertexID(dagId, 1);
     EdgeProperty eProp1 = new EdgeProperty(
         EdgeProperty.ConnectionPattern.BIPARTITE,
-        EdgeProperty.SourceType.STABLE, new InputDescriptor("in", null),
-        new OutputDescriptor("out", null));
+        EdgeProperty.SourceType.STABLE, new OutputDescriptor("out", null),
+        new InputDescriptor("in", null));
     when(mockSrcVertex1.getVertexId()).thenReturn(mockSrcVertexId1);
     Vertex mockSrcVertex2 = mock(Vertex.class);
     TezVertexID mockSrcVertexId2 = new TezVertexID(dagId, 2);
     EdgeProperty eProp2 = new EdgeProperty(
         EdgeProperty.ConnectionPattern.BIPARTITE,
-        EdgeProperty.SourceType.STABLE, new InputDescriptor("in", null),
-        new OutputDescriptor("out", null));
+        EdgeProperty.SourceType.STABLE, new OutputDescriptor("out", null),
+        new InputDescriptor("in", null));
     when(mockSrcVertex2.getVertexId()).thenReturn(mockSrcVertexId2);
     Vertex mockSrcVertex3 = mock(Vertex.class);
     TezVertexID mockSrcVertexId3 = new TezVertexID(dagId, 3);
     EdgeProperty eProp3 = new EdgeProperty(
         EdgeProperty.ConnectionPattern.ONE_TO_ALL,
-        EdgeProperty.SourceType.STABLE, new InputDescriptor("in", null),
-        new OutputDescriptor("out", null));
+        EdgeProperty.SourceType.STABLE, new OutputDescriptor("out", null),
+        new InputDescriptor("in", null));
     when(mockSrcVertex3.getVertexId()).thenReturn(mockSrcVertexId3);
     
     Vertex mockManagedVertex = mock(Vertex.class);

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/tez-mapreduce-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
b/tez-mapreduce-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
index ddca1be..f43601b 100644
--- a/tez-mapreduce-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
+++ b/tez-mapreduce-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
@@ -302,13 +302,13 @@ public class TestMRRJobsDAGApi {
     dag.addVertex(stage3Vertex);
 
     Edge edge1 = new Edge(stage1Vertex, stage2Vertex, new EdgeProperty(
-        ConnectionPattern.BIPARTITE, SourceType.STABLE, new InputDescriptor(
-            ShuffledMergedInput.class.getName(), null), new OutputDescriptor(
-            OnFileSortedOutput.class.getName(), null)));
+        ConnectionPattern.BIPARTITE, SourceType.STABLE, new OutputDescriptor(
+        OnFileSortedOutput.class.getName(), null), new InputDescriptor(
+                ShuffledMergedInput.class.getName(), null)));
     Edge edge2 = new Edge(stage2Vertex, stage3Vertex, new EdgeProperty(
-        ConnectionPattern.BIPARTITE, SourceType.STABLE, new InputDescriptor(
-            ShuffledMergedInput.class.getName(), null), new OutputDescriptor(
-            OnFileSortedOutput.class.getName(), null)));
+        ConnectionPattern.BIPARTITE, SourceType.STABLE, new OutputDescriptor(
+        OnFileSortedOutput.class.getName(), null), new InputDescriptor(
+                ShuffledMergedInput.class.getName(), null)));
 
     dag.addEdge(edge1);
     dag.addEdge(edge2);

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/9226a1fe/tez-yarn-client/src/main/java/org/apache/tez/mapreduce/YARNRunner.java
----------------------------------------------------------------------
diff --git a/tez-yarn-client/src/main/java/org/apache/tez/mapreduce/YARNRunner.java b/tez-yarn-client/src/main/java/org/apache/tez/mapreduce/YARNRunner.java
index 8fade03..48e3f12 100644
--- a/tez-yarn-client/src/main/java/org/apache/tez/mapreduce/YARNRunner.java
+++ b/tez-yarn-client/src/main/java/org/apache/tez/mapreduce/YARNRunner.java
@@ -641,8 +641,8 @@ public class YARNRunner implements ClientProtocol {
       EdgeProperty edgeProperty =
           new EdgeProperty(ConnectionPattern.BIPARTITE,
               SourceType.STABLE,
-              new InputDescriptor(ShuffledMergedInput.class.getName(), null),
-              new OutputDescriptor(OnFileSortedOutput.class.getName(), null));
+              new OutputDescriptor(OnFileSortedOutput.class.getName(), null),
+              new InputDescriptor(ShuffledMergedInput.class.getName(), null));
       Edge edge = null;
       if (!isMRR) {
         edge = new Edge(mapVertex, reduceVertex, edgeProperty);


Mime
View raw message