You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by bi...@apache.org on 2014/08/11 19:59:06 UTC

[1/5] TEZ-1237. Consolidate naming of API classes (bikas)

Repository: tez
Updated Branches:
  refs/heads/master c171220b7 -> 27e5b6c68


http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledUnorderedKVInput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledUnorderedKVInput.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledUnorderedKVInput.java
index 30c1d7b..d0770ec 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledUnorderedKVInput.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledUnorderedKVInput.java
@@ -38,7 +38,7 @@ import org.apache.tez.common.counters.TezCounter;
 import org.apache.tez.dag.api.TezConfiguration;
 import org.apache.tez.runtime.api.AbstractLogicalInput;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.library.api.KeyValueReader;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.ConfigUtils;
@@ -69,7 +69,7 @@ public class ShuffledUnorderedKVInput extends AbstractLogicalInput {
   private SimpleFetchedInputAllocator inputManager;
   private ShuffleEventHandler inputEventHandler;
 
-  public ShuffledUnorderedKVInput(TezInputContext inputContext, int numPhysicalInputs) {
+  public ShuffledUnorderedKVInput(InputContext inputContext, int numPhysicalInputs) {
     super(inputContext, numPhysicalInputs);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/SortedGroupedMergedInput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/SortedGroupedMergedInput.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/SortedGroupedMergedInput.java
index f7d9c7f..40db2cb 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/SortedGroupedMergedInput.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/SortedGroupedMergedInput.java
@@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.io.RawComparator;
 import org.apache.tez.runtime.api.Input;
 import org.apache.tez.runtime.api.MergedLogicalInput;
-import org.apache.tez.runtime.api.TezMergedInputContext;
+import org.apache.tez.runtime.api.MergedInputContext;
 import org.apache.tez.runtime.library.api.KeyValuesReader;
 
 /**
@@ -49,7 +49,7 @@ public class SortedGroupedMergedInput extends MergedLogicalInput {
   private final Set<Input> completedInputs = Collections
       .newSetFromMap(new IdentityHashMap<Input, Boolean>());
 
-  public SortedGroupedMergedInput(TezMergedInputContext context, List<Input> inputs) {
+  public SortedGroupedMergedInput(MergedInputContext context, List<Input> inputs) {
     super(context, inputs);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/LocalOnFileSorterOutput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/LocalOnFileSorterOutput.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/LocalOnFileSorterOutput.java
index 550448e..96ee87e 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/LocalOnFileSorterOutput.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/LocalOnFileSorterOutput.java
@@ -26,14 +26,14 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.library.common.task.local.output.TezTaskOutput;
 
 public class LocalOnFileSorterOutput extends OnFileSortedOutput {
 
   private static final Log LOG = LogFactory.getLog(LocalOnFileSorterOutput.class);
 
-  public LocalOnFileSorterOutput(TezOutputContext outputContext, int numPhysicalOutputs) {
+  public LocalOnFileSorterOutput(OutputContext outputContext, int numPhysicalOutputs) {
     super(outputContext, numPhysicalOutputs);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileSortedOutput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileSortedOutput.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileSortedOutput.java
index 6aa319b..10bbb69 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileSortedOutput.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileSortedOutput.java
@@ -43,7 +43,7 @@ import org.apache.tez.common.counters.TaskCounter;
 import org.apache.tez.dag.api.TezConfiguration;
 import org.apache.tez.runtime.api.AbstractLogicalOutput;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.api.events.CompositeDataMovementEvent;
 import org.apache.tez.runtime.api.events.VertexManagerEvent;
 import org.apache.tez.runtime.library.api.KeyValuesWriter;
@@ -74,7 +74,7 @@ public class OnFileSortedOutput extends AbstractLogicalOutput {
   private boolean sendEmptyPartitionDetails;
   private final AtomicBoolean isStarted = new AtomicBoolean(false);
 
-  public OnFileSortedOutput(TezOutputContext outputContext, int numPhysicalOutputs) {
+  public OnFileSortedOutput(OutputContext outputContext, int numPhysicalOutputs) {
     super(outputContext, numPhysicalOutputs);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileUnorderedKVOutput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileUnorderedKVOutput.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileUnorderedKVOutput.java
index 2636c5c..e61013d 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileUnorderedKVOutput.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileUnorderedKVOutput.java
@@ -38,7 +38,7 @@ import org.apache.tez.dag.api.TezConfiguration;
 import org.apache.tez.dag.api.TezUncheckedException;
 import org.apache.tez.runtime.api.AbstractLogicalOutput;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.library.api.KeyValuesWriter;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
@@ -62,7 +62,7 @@ public class OnFileUnorderedKVOutput extends AbstractLogicalOutput {
   private boolean dataViaEventsEnabled;
   private int dataViaEventsMaxSize;
 
-  public OnFileUnorderedKVOutput(TezOutputContext outputContext, int numPhysicalOutputs) {
+  public OnFileUnorderedKVOutput(OutputContext outputContext, int numPhysicalOutputs) {
     super(outputContext, numPhysicalOutputs);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileUnorderedPartitionedKVOutput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileUnorderedPartitionedKVOutput.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileUnorderedPartitionedKVOutput.java
index 75d6e00..f8181fb 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileUnorderedPartitionedKVOutput.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/output/OnFileUnorderedPartitionedKVOutput.java
@@ -36,7 +36,7 @@ import org.apache.tez.dag.api.TezConfiguration;
 import org.apache.tez.runtime.api.AbstractLogicalOutput;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.LogicalOutput;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.api.Writer;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.MemoryUpdateCallbackHandler;
@@ -56,7 +56,7 @@ public class OnFileUnorderedPartitionedKVOutput extends AbstractLogicalOutput {
   private UnorderedPartitionedKVWriter kvWriter;
   private final AtomicBoolean isStarted = new AtomicBoolean(false);
 
-  public OnFileUnorderedPartitionedKVOutput(TezOutputContext outputContext, int numPhysicalOutputs) {
+  public OnFileUnorderedPartitionedKVOutput(OutputContext outputContext, int numPhysicalOutputs) {
     super(outputContext, numPhysicalOutputs);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/PreWarmProcessor.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/PreWarmProcessor.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/PreWarmProcessor.java
index d8d7aac..fa7593e 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/PreWarmProcessor.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/PreWarmProcessor.java
@@ -19,7 +19,7 @@
 package org.apache.tez.runtime.library.processor;
 
 import org.apache.tez.runtime.api.Processor;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 
 /**
  * Built-in convenience {@link Processor} to be used for pre-warming
@@ -27,7 +27,7 @@ import org.apache.tez.runtime.api.TezProcessorContext;
  */
 public class PreWarmProcessor extends SimpleProcessor {
 
-  public PreWarmProcessor(TezProcessorContext context) {
+  public PreWarmProcessor(ProcessorContext context) {
     super(context);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/SimpleProcessor.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/SimpleProcessor.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/SimpleProcessor.java
index 85ba412..0af1e10 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/SimpleProcessor.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/SimpleProcessor.java
@@ -24,13 +24,13 @@ import org.apache.tez.runtime.api.AbstractLogicalIOProcessor;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.LogicalOutput;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 
 public abstract class SimpleProcessor extends AbstractLogicalIOProcessor {
   protected Map<String, LogicalInput> inputs;
   protected Map<String, LogicalOutput> outputs;
 
-  public SimpleProcessor(TezProcessorContext context) {
+  public SimpleProcessor(ProcessorContext context) {
     super(context);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/SleepProcessor.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/SleepProcessor.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/SleepProcessor.java
index 7b3d9b1..4b7d01b 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/SleepProcessor.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/processor/SleepProcessor.java
@@ -24,7 +24,7 @@ import org.apache.tez.runtime.api.AbstractLogicalIOProcessor;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.LogicalOutput;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 
 import java.util.List;
 import java.util.Map;
@@ -41,7 +41,7 @@ public class SleepProcessor extends AbstractLogicalIOProcessor {
 
   private int timeToSleepMS;
 
-  public SleepProcessor(TezProcessorContext context) {
+  public SleepProcessor(ProcessorContext context) {
     super(context);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/shuffle/common/impl/ShuffleInputEventHandlerImpl.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/shuffle/common/impl/ShuffleInputEventHandlerImpl.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/shuffle/common/impl/ShuffleInputEventHandlerImpl.java
index d93608c..f5c486c 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/shuffle/common/impl/ShuffleInputEventHandlerImpl.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/shuffle/common/impl/ShuffleInputEventHandlerImpl.java
@@ -35,7 +35,7 @@ import org.apache.tez.common.TezRuntimeFrameworkConfigs;
 import org.apache.tez.common.TezUtils;
 import org.apache.tez.dag.api.TezUncheckedException;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.api.events.InputFailedEvent;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
@@ -65,7 +65,7 @@ public class ShuffleInputEventHandlerImpl implements ShuffleEventHandler {
   private final boolean doLocalFetch;
   
   
-  public ShuffleInputEventHandlerImpl(TezInputContext inputContext,
+  public ShuffleInputEventHandlerImpl(InputContext inputContext,
                                       ShuffleManager shuffleManager,
                                       FetchedInputAllocator inputAllocator, CompressionCodec codec,
                                       boolean ifileReadAhead, int ifileReadAheadLength,

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/shuffle/common/impl/ShuffleManager.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/shuffle/common/impl/ShuffleManager.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/shuffle/common/impl/ShuffleManager.java
index 2a0ae0e..0f5a996 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/shuffle/common/impl/ShuffleManager.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/shuffle/common/impl/ShuffleManager.java
@@ -49,7 +49,7 @@ import org.apache.tez.common.counters.TezCounter;
 import org.apache.tez.dag.api.TezConfiguration;
 import org.apache.tez.dag.api.TezUncheckedException;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.api.events.InputReadErrorEvent;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.InputAttemptIdentifier;
@@ -83,7 +83,7 @@ public class ShuffleManager implements FetcherCallback {
 
   private static final Log LOG = LogFactory.getLog(ShuffleManager.class);
   
-  private final TezInputContext inputContext;
+  private final InputContext inputContext;
   private final int numInputs;
 
   private final FetchedInputAllocator inputManager;
@@ -136,7 +136,7 @@ public class ShuffleManager implements FetcherCallback {
   
   // TODO More counters - FetchErrors, speed?
   
-  public ShuffleManager(TezInputContext inputContext, Configuration conf, int numInputs,
+  public ShuffleManager(InputContext inputContext, Configuration conf, int numInputs,
       int bufferSize, boolean ifileReadAheadEnabled, int ifileReadAheadLength,
       CompressionCodec codec, FetchedInputAllocator inputAllocator) throws IOException {
     this.inputContext = inputContext;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/test/java/org/apache/tez/dag/library/vertexmanager/TestShuffleVertexManager.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/test/java/org/apache/tez/dag/library/vertexmanager/TestShuffleVertexManager.java b/tez-runtime-library/src/test/java/org/apache/tez/dag/library/vertexmanager/TestShuffleVertexManager.java
index caed74a..5efb79a 100644
--- a/tez-runtime-library/src/test/java/org/apache/tez/dag/library/vertexmanager/TestShuffleVertexManager.java
+++ b/tez-runtime-library/src/test/java/org/apache/tez/dag/library/vertexmanager/TestShuffleVertexManager.java
@@ -28,9 +28,9 @@ import java.util.Map.Entry;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.tez.common.ReflectionUtils;
 import org.apache.tez.common.TezUtils;
-import org.apache.tez.dag.api.EdgeManager;
-import org.apache.tez.dag.api.EdgeManagerContext;
-import org.apache.tez.dag.api.EdgeManagerDescriptor;
+import org.apache.tez.dag.api.EdgeManagerPlugin;
+import org.apache.tez.dag.api.EdgeManagerPluginContext;
+import org.apache.tez.dag.api.EdgeManagerPluginDescriptor;
 import org.apache.tez.dag.api.EdgeProperty;
 import org.apache.tez.dag.api.InputDescriptor;
 import org.apache.tez.dag.api.OutputDescriptor;
@@ -116,19 +116,19 @@ public class TestShuffleVertexManager {
           return null;
       }}).when(mockContext).scheduleVertexTasks(anyList());
     
-    final Map<String, EdgeManager> newEdgeManagers =
-        new HashMap<String, EdgeManager>();
+    final Map<String, EdgeManagerPlugin> newEdgeManagers =
+        new HashMap<String, EdgeManagerPlugin>();
     
     doAnswer(new Answer() {
       public Object answer(InvocationOnMock invocation) {
           when(mockContext.getVertexNumTasks(mockManagedVertexId)).thenReturn(2);
           newEdgeManagers.clear();
-          for (Entry<String, EdgeManagerDescriptor> entry :
-              ((Map<String, EdgeManagerDescriptor>)invocation.getArguments()[2]).entrySet()) {
+          for (Entry<String, EdgeManagerPluginDescriptor> entry :
+              ((Map<String, EdgeManagerPluginDescriptor>)invocation.getArguments()[2]).entrySet()) {
 
 
             final byte[] userPayload = entry.getValue().getUserPayload();
-            EdgeManagerContext emContext = new EdgeManagerContext() {
+            EdgeManagerPluginContext emContext = new EdgeManagerPluginContext() {
               @Override
               public byte[] getUserPayload() {
                 return userPayload;
@@ -154,9 +154,9 @@ public class TestShuffleVertexManager {
                 return 0;
               }
             };
-            EdgeManager edgeManager = ReflectionUtils
+            EdgeManagerPlugin edgeManager = ReflectionUtils
                 .createClazzInstance(entry.getValue().getClassName(),
-                    new Class[]{EdgeManagerContext.class}, new Object[]{emContext});
+                    new Class[]{EdgeManagerPluginContext.class}, new Object[]{emContext});
             edgeManager.initialize();
             newEdgeManagers.put(entry.getKey(), edgeManager);
           }
@@ -242,7 +242,7 @@ public class TestShuffleVertexManager {
     verify(mockContext).setVertexParallelism(eq(2), any(VertexLocationHint.class), anyMap(), anyMap());
     Assert.assertEquals(2, newEdgeManagers.size());
     
-    EdgeManager edgeManager = newEdgeManagers.values().iterator().next();
+    EdgeManagerPlugin edgeManager = newEdgeManagers.values().iterator().next();
     Map<Integer, List<Integer>> targets = Maps.newHashMap();
     DataMovementEvent dmEvent = new DataMovementEvent(1, new byte[0]);
     // 4 source task outputs - same as original number of partitions

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/test/java/org/apache/tez/runtime/common/resources/TestWeightedScalingMemoryDistributor.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/test/java/org/apache/tez/runtime/common/resources/TestWeightedScalingMemoryDistributor.java b/tez-runtime-library/src/test/java/org/apache/tez/runtime/common/resources/TestWeightedScalingMemoryDistributor.java
index dc2c1bc..137b1f4 100644
--- a/tez-runtime-library/src/test/java/org/apache/tez/runtime/common/resources/TestWeightedScalingMemoryDistributor.java
+++ b/tez-runtime-library/src/test/java/org/apache/tez/runtime/common/resources/TestWeightedScalingMemoryDistributor.java
@@ -29,8 +29,8 @@ import org.apache.tez.dag.api.TezConfiguration;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.LogicalOutput;
 import org.apache.tez.runtime.api.MemoryUpdateCallback;
-import org.apache.tez.runtime.api.TezInputContext;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.InputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.library.input.ShuffledMergedInput;
 import org.apache.tez.runtime.library.input.ShuffledUnorderedKVInput;
 import org.apache.tez.runtime.library.output.OnFileSortedOutput;
@@ -65,25 +65,25 @@ public class TestWeightedScalingMemoryDistributor extends TestMemoryDistributor
 
     // First request - ScatterGatherShuffleInput
     MemoryUpdateCallbackForTest e1Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e1InputContext1 = createTestInputContext();
+    InputContext e1InputContext1 = createTestInputContext();
     InputDescriptor e1InDesc1 = createTestInputDescriptor(ShuffledMergedInput.class);
     dist.requestMemory(10000, e1Callback, e1InputContext1, e1InDesc1);
 
     // Second request - BroadcastInput
     MemoryUpdateCallbackForTest e2Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e2InputContext2 = createTestInputContext();
+    InputContext e2InputContext2 = createTestInputContext();
     InputDescriptor e2InDesc2 = createTestInputDescriptor(ShuffledUnorderedKVInput.class);
     dist.requestMemory(10000, e2Callback, e2InputContext2, e2InDesc2);
 
     // Third request - randomOutput (simulates MROutput)
     MemoryUpdateCallbackForTest e3Callback = new MemoryUpdateCallbackForTest();
-    TezOutputContext e3OutputContext1 = createTestOutputContext();
+    OutputContext e3OutputContext1 = createTestOutputContext();
     OutputDescriptor e3OutDesc1 = createTestOutputDescriptor();
     dist.requestMemory(10000, e3Callback, e3OutputContext1, e3OutDesc1);
 
     // Fourth request - OnFileSortedOutput
     MemoryUpdateCallbackForTest e4Callback = new MemoryUpdateCallbackForTest();
-    TezOutputContext e4OutputContext2 = createTestOutputContext();
+    OutputContext e4OutputContext2 = createTestOutputContext();
     OutputDescriptor e4OutDesc2 = createTestOutputDescriptor(OnFileSortedOutput.class);
     dist.requestMemory(10000, e4Callback, e4OutputContext2, e4OutDesc2);
 
@@ -112,25 +112,25 @@ public class TestWeightedScalingMemoryDistributor extends TestMemoryDistributor
 
     // First request - ScatterGatherShuffleInput [weight 6]
     MemoryUpdateCallbackForTest e1Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e1InputContext1 = createTestInputContext();
+    InputContext e1InputContext1 = createTestInputContext();
     InputDescriptor e1InDesc1 = createTestInputDescriptor(ShuffledMergedInput.class);
     dist.requestMemory(10000, e1Callback, e1InputContext1, e1InDesc1);
 
     // Second request - BroadcastInput [weight 2]
     MemoryUpdateCallbackForTest e2Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e2InputContext2 = createTestInputContext();
+    InputContext e2InputContext2 = createTestInputContext();
     InputDescriptor e2InDesc2 = createTestInputDescriptor(ShuffledUnorderedKVInput.class);
     dist.requestMemory(10000, e2Callback, e2InputContext2, e2InDesc2);
 
     // Third request - randomOutput (simulates MROutput) [weight 1]
     MemoryUpdateCallbackForTest e3Callback = new MemoryUpdateCallbackForTest();
-    TezOutputContext e3OutputContext1 = createTestOutputContext();
+    OutputContext e3OutputContext1 = createTestOutputContext();
     OutputDescriptor e3OutDesc1 = createTestOutputDescriptor();
     dist.requestMemory(10000, e3Callback, e3OutputContext1, e3OutDesc1);
 
     // Fourth request - OnFileSortedOutput [weight 3]
     MemoryUpdateCallbackForTest e4Callback = new MemoryUpdateCallbackForTest();
-    TezOutputContext e4OutputContext2 = createTestOutputContext();
+    OutputContext e4OutputContext2 = createTestOutputContext();
     OutputDescriptor e4OutDesc2 = createTestOutputDescriptor(OnFileSortedOutput.class);
     dist.requestMemory(10000, e4Callback, e4OutputContext2, e4OutDesc2);
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/TestValuesIterator.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/TestValuesIterator.java b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/TestValuesIterator.java
index b74789a..ed38569 100644
--- a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/TestValuesIterator.java
+++ b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/TestValuesIterator.java
@@ -27,7 +27,7 @@ import org.apache.tez.common.TezRuntimeFrameworkConfigs;
 import org.apache.tez.common.counters.GenericCounter;
 import org.apache.tez.common.counters.TezCounter;
 import org.apache.tez.common.counters.TezCounters;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.comparator.TezBytesComparator;
 import org.apache.tez.runtime.library.common.serializer.TezBytesWritableSerialization;
@@ -332,7 +332,7 @@ public class TestValuesIterator {
 
     LocalDirAllocator localDirAllocator =
         new LocalDirAllocator(TezRuntimeFrameworkConfigs.LOCAL_DIRS);
-    TezInputContext context = createTezInputContext();
+    InputContext context = createTezInputContext();
     MergeManager mergeManager = new MergeManager(conf, fs, localDirAllocator,
         context, null, null, null, null, null, 1024 * 1024 * 10, null, false, -1);
 
@@ -371,9 +371,9 @@ public class TestValuesIterator {
     return segments;
   }
 
-  private TezInputContext createTezInputContext() {
+  private InputContext createTezInputContext() {
     TezCounters counters = new TezCounters();
-    TezInputContext inputContext = mock(TezInputContext.class);
+    InputContext inputContext = mock(InputContext.class);
     doReturn(1024 * 1024 * 100l).when(inputContext).getTotalMemoryAvailableToTask();
     doReturn(counters).when(inputContext).getCounters();
     doReturn(1).when(inputContext).getInputIndex();

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/shuffle/impl/TestShuffleInputEventHandler.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/shuffle/impl/TestShuffleInputEventHandler.java b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/shuffle/impl/TestShuffleInputEventHandler.java
index bc1e2b0..55be630 100644
--- a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/shuffle/impl/TestShuffleInputEventHandler.java
+++ b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/shuffle/impl/TestShuffleInputEventHandler.java
@@ -6,7 +6,7 @@ import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.tez.common.TezCommonUtils;
 import org.apache.tez.common.TezUtils;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.api.events.InputFailedEvent;
 import org.apache.tez.runtime.library.common.InputAttemptIdentifier;
@@ -52,9 +52,9 @@ public class TestShuffleInputEventHandler {
   private ShuffleInputEventHandler handler;
   private ShuffleScheduler scheduler;
 
-  private TezInputContext createTezInputContext() {
+  private InputContext createTezInputContext() {
     ApplicationId applicationId = ApplicationId.newInstance(1, 1);
-    TezInputContext inputContext = mock(TezInputContext.class);
+    InputContext inputContext = mock(InputContext.class);
     doReturn(applicationId).when(inputContext).getApplicationId();
     return inputContext;
   }
@@ -78,7 +78,7 @@ public class TestShuffleInputEventHandler {
 
   @Before
   public void setup() throws Exception {
-    TezInputContext inputContext = createTezInputContext();
+    InputContext inputContext = createTezInputContext();
     scheduler = mock(ShuffleScheduler.class);
     Configuration conf = mock(Configuration.class);
     MergeManager merger = mock(MergeManager.class);

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/writers/TestUnorderedPartitionedKVWriter.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/writers/TestUnorderedPartitionedKVWriter.java b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/writers/TestUnorderedPartitionedKVWriter.java
index ad99d29..27d6ae3 100644
--- a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/writers/TestUnorderedPartitionedKVWriter.java
+++ b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/writers/TestUnorderedPartitionedKVWriter.java
@@ -64,7 +64,7 @@ import org.apache.tez.common.counters.TaskCounter;
 import org.apache.tez.common.counters.TezCounter;
 import org.apache.tez.common.counters.TezCounters;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.api.events.CompositeDataMovementEvent;
 import org.apache.tez.runtime.library.api.Partitioner;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
@@ -131,7 +131,7 @@ public class TestUnorderedPartitionedKVWriter {
     ApplicationId appId = ApplicationId.newInstance(10000, 1);
     TezCounters counters = new TezCounters();
     String uniqueId = UUID.randomUUID().toString();
-    TezOutputContext outputContext = createMockOutputContext(counters, appId, uniqueId);
+    OutputContext outputContext = createMockOutputContext(counters, appId, uniqueId);
 
     int maxSingleBufferSizeBytes = 2047;
     Configuration conf = createConfiguration(outputContext, IntWritable.class, LongWritable.class,
@@ -221,7 +221,7 @@ public class TestUnorderedPartitionedKVWriter {
     ApplicationId appId = ApplicationId.newInstance(10000, 1);
     TezCounters counters = new TezCounters();
     String uniqueId = UUID.randomUUID().toString();
-    TezOutputContext outputContext = createMockOutputContext(counters, appId, uniqueId);
+    OutputContext outputContext = createMockOutputContext(counters, appId, uniqueId);
     Random random = new Random();
 
     Configuration conf = createConfiguration(outputContext, Text.class, Text.class, shouldCompress,
@@ -393,7 +393,7 @@ public class TestUnorderedPartitionedKVWriter {
     ApplicationId appId = ApplicationId.newInstance(10000, 1);
     TezCounters counters = new TezCounters();
     String uniqueId = UUID.randomUUID().toString();
-    TezOutputContext outputContext = createMockOutputContext(counters, appId, uniqueId);
+    OutputContext outputContext = createMockOutputContext(counters, appId, uniqueId);
 
     Configuration conf = createConfiguration(outputContext, IntWritable.class, LongWritable.class,
         shouldCompress, -1);
@@ -594,9 +594,9 @@ public class TestUnorderedPartitionedKVWriter {
     return sb.toString();
   }
 
-  private TezOutputContext createMockOutputContext(TezCounters counters, ApplicationId appId,
+  private OutputContext createMockOutputContext(TezCounters counters, ApplicationId appId,
       String uniqueId) {
-    TezOutputContext outputContext = mock(TezOutputContext.class);
+    OutputContext outputContext = mock(OutputContext.class);
     doReturn(counters).when(outputContext).getCounters();
     doReturn(appId).when(outputContext).getApplicationId();
     doReturn(1).when(outputContext).getDAGAttemptNumber();
@@ -620,14 +620,14 @@ public class TestUnorderedPartitionedKVWriter {
     return outputContext;
   }
 
-  private Configuration createConfiguration(TezOutputContext outputContext,
+  private Configuration createConfiguration(OutputContext outputContext,
       Class<? extends Writable> keyClass, Class<? extends Writable> valClass,
       boolean shouldCompress, int maxSingleBufferSizeBytes) {
     return createConfiguration(outputContext, keyClass, valClass, shouldCompress,
         maxSingleBufferSizeBytes, PartitionerForTest.class);
   }
 
-  private Configuration createConfiguration(TezOutputContext outputContext,
+  private Configuration createConfiguration(OutputContext outputContext,
       Class<? extends Writable> keyClass, Class<? extends Writable> valClass,
       boolean shouldCompress, int maxSingleBufferSizeBytes,
       Class<? extends Partitioner> partitionerClass) {
@@ -662,7 +662,7 @@ public class TestUnorderedPartitionedKVWriter {
 
   private static class UnorderedPartitionedKVWriterForTest extends UnorderedPartitionedKVWriter {
 
-    public UnorderedPartitionedKVWriterForTest(TezOutputContext outputContext, Configuration conf,
+    public UnorderedPartitionedKVWriterForTest(OutputContext outputContext, Configuration conf,
         int numOutputs, long availableMemoryBytes) throws IOException {
       super(outputContext, conf, numOutputs, availableMemoryBytes);
     }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/input/TestSortedGroupedMergedInput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/input/TestSortedGroupedMergedInput.java b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/input/TestSortedGroupedMergedInput.java
index 834ad29..0816e94 100644
--- a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/input/TestSortedGroupedMergedInput.java
+++ b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/input/TestSortedGroupedMergedInput.java
@@ -34,14 +34,14 @@ import org.apache.tez.runtime.InputReadyTracker;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.Input;
 import org.apache.tez.runtime.api.MergedLogicalInput;
-import org.apache.tez.runtime.api.TezMergedInputContext;
+import org.apache.tez.runtime.api.MergedInputContext;
 import org.apache.tez.runtime.api.impl.TezMergedInputContextImpl;
 import org.apache.tez.runtime.library.api.KeyValuesReader;
 import org.junit.Test;
 
 public class TestSortedGroupedMergedInput {
 
-  TezMergedInputContext createMergedInputContext() {
+  MergedInputContext createMergedInputContext() {
     return new TezMergedInputContextImpl(null, "mergedInputName", new HashMap<String, MergedLogicalInput>(),
         mock(InputReadyTracker.class), null);
   }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/output/TestOnFileSortedOutput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/output/TestOnFileSortedOutput.java b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/output/TestOnFileSortedOutput.java
index 51c6a25..33ad480 100644
--- a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/output/TestOnFileSortedOutput.java
+++ b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/output/TestOnFileSortedOutput.java
@@ -30,7 +30,7 @@ import org.apache.tez.common.counters.TezCounters;
 import org.apache.tez.dag.utils.EnvironmentUpdateUtils;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.MemoryUpdateCallback;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.api.events.CompositeDataMovementEvent;
 import org.apache.tez.runtime.library.api.KeyValuesWriter;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
@@ -148,7 +148,7 @@ public class TestOnFileSortedOutput {
   }
 
   private void startSortedOutput(int partitions) throws Exception {
-    TezOutputContext context = createTezOutputContext();
+    OutputContext context = createTezOutputContext();
     sortedOutput = new OnFileSortedOutput(context, partitions);
     sortedOutput.initialize();
     sortedOutput.start();
@@ -231,7 +231,7 @@ public class TestOnFileSortedOutput {
     }
   }
 
-  private TezOutputContext createTezOutputContext() throws IOException {
+  private OutputContext createTezOutputContext() throws IOException {
     String[] workingDirs = { workingDir.toString() };
     byte[] payLoad = TezUtils.createUserPayloadFromConf(conf);
     DataOutputBuffer serviceProviderMetaData = new DataOutputBuffer();
@@ -239,7 +239,7 @@ public class TestOnFileSortedOutput {
 
     TezCounters counters = new TezCounters();
 
-    TezOutputContext context = mock(TezOutputContext.class);
+    OutputContext context = mock(OutputContext.class);
     doReturn(counters).when(context).getCounters();
     doReturn(workingDirs).when(context).getWorkDirs();
     doReturn(payLoad).when(context).getUserPayload();

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/output/TestOnFileUnorderedKVOutput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/output/TestOnFileUnorderedKVOutput.java b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/output/TestOnFileUnorderedKVOutput.java
index ac91e44..00940ef 100644
--- a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/output/TestOnFileUnorderedKVOutput.java
+++ b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/output/TestOnFileUnorderedKVOutput.java
@@ -47,7 +47,7 @@ import org.apache.tez.dag.records.TezTaskID;
 import org.apache.tez.dag.records.TezVertexID;
 import org.apache.tez.runtime.RuntimeTask;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.api.impl.TezOutputContextImpl;
 import org.apache.tez.runtime.api.impl.TezUmbilical;
@@ -119,7 +119,7 @@ public class TestOnFileUnorderedKVOutput {
     OutputDescriptor outputDescriptor = mock(OutputDescriptor.class);
     when(outputDescriptor.getClassName()).thenReturn("OutputDescriptor");
 
-    TezOutputContext outputContext = new TezOutputContextImpl(conf, new String[] {workDir.toString()},
+    OutputContext outputContext = new TezOutputContextImpl(conf, new String[] {workDir.toString()},
         appAttemptNumber, tezUmbilical, dagName, taskVertexName, destinationVertexName,
         taskAttemptID, counters, 0, userPayload, runtimeTask,
         null, auxEnv, new MemoryDistributor(1, 1, conf) , outputDescriptor, null);
@@ -154,7 +154,7 @@ public class TestOnFileUnorderedKVOutput {
 
   private static class OnFileUnorderedKVOutputForTest extends OnFileUnorderedKVOutput {
 
-    public OnFileUnorderedKVOutputForTest(TezOutputContext outputContext, int numPhysicalOutputs) {
+    public OnFileUnorderedKVOutputForTest(OutputContext outputContext, int numPhysicalOutputs) {
       super(outputContext, numPhysicalOutputs);
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/shuffle/common/impl/TestShuffleInputEventHandlerImpl.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/shuffle/common/impl/TestShuffleInputEventHandlerImpl.java b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/shuffle/common/impl/TestShuffleInputEventHandlerImpl.java
index 1ca9aad..2bfe77f 100644
--- a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/shuffle/common/impl/TestShuffleInputEventHandlerImpl.java
+++ b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/shuffle/common/impl/TestShuffleInputEventHandlerImpl.java
@@ -31,7 +31,7 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.tez.common.TezCommonUtils;
 import org.apache.tez.common.TezUtils;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.library.common.InputAttemptIdentifier;
 import org.apache.tez.runtime.library.shuffle.common.FetchedInputAllocator;
@@ -48,7 +48,7 @@ public class TestShuffleInputEventHandlerImpl {
 
   @Test
   public void testSimple() throws IOException {
-    TezInputContext inputContext = mock(TezInputContext.class);
+    InputContext inputContext = mock(InputContext.class);
     ShuffleManager shuffleManager = mock(ShuffleManager.class);
     Configuration conf = mock(Configuration.class);
     FetchedInputAllocator inputAllocator = mock(FetchedInputAllocator.class);
@@ -71,7 +71,7 @@ public class TestShuffleInputEventHandlerImpl {
 
   @Test
   public void testCurrentPartitionEmpty() throws IOException {
-    TezInputContext inputContext = mock(TezInputContext.class);
+    InputContext inputContext = mock(InputContext.class);
     ShuffleManager shuffleManager = mock(ShuffleManager.class);
     Configuration conf = mock(Configuration.class);
     FetchedInputAllocator inputAllocator = mock(FetchedInputAllocator.class);
@@ -93,7 +93,7 @@ public class TestShuffleInputEventHandlerImpl {
 
   @Test
   public void testOtherPartitionEmpty() throws IOException {
-    TezInputContext inputContext = mock(TezInputContext.class);
+    InputContext inputContext = mock(InputContext.class);
     ShuffleManager shuffleManager = mock(ShuffleManager.class);
     Configuration conf = mock(Configuration.class);
     FetchedInputAllocator inputAllocator = mock(FetchedInputAllocator.class);
@@ -114,7 +114,7 @@ public class TestShuffleInputEventHandlerImpl {
 
   @Test
   public void testMultipleEvents1() throws IOException {
-    TezInputContext inputContext = mock(TezInputContext.class);
+    InputContext inputContext = mock(InputContext.class);
     ShuffleManager shuffleManager = mock(ShuffleManager.class);
     Configuration conf = mock(Configuration.class);
     FetchedInputAllocator inputAllocator = mock(FetchedInputAllocator.class);

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java b/tez-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
index 4228382..c14e678 100644
--- a/tez-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
+++ b/tez-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java
@@ -112,8 +112,8 @@ import org.apache.tez.mapreduce.processor.map.MapProcessor;
 import org.apache.tez.mapreduce.processor.reduce.ReduceProcessor;
 import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRInputUserPayloadProto;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezRootInputInitializer;
-import org.apache.tez.runtime.api.TezRootInputInitializerContext;
+import org.apache.tez.runtime.api.InputInitializer;
+import org.apache.tez.runtime.api.InputInitializerContext;
 import org.apache.tez.runtime.library.input.ShuffledMergedInputLegacy;
 import org.apache.tez.runtime.library.output.OnFileSortedOutput;
 import org.apache.tez.runtime.library.processor.SleepProcessor;
@@ -594,7 +594,7 @@ public class TestMRRJobsDAGApi {
       boolean closeSessionBeforeSubmit,
       TezClient reUseTezSession,
       boolean genSplitsInAM,
-      Class<? extends TezRootInputInitializer> initializerClass,
+      Class<? extends InputInitializer> initializerClass,
       Map<String, LocalResource> additionalLocalResources) throws IOException,
       InterruptedException, TezException, ClassNotFoundException,
       YarnException {
@@ -664,7 +664,7 @@ public class TestMRRJobsDAGApi {
     
     DAG dag = new DAG("testMRRSleepJobDagSubmit-" + random.nextInt(1000));
     int stage1NumTasks = genSplitsInAM ? -1 : inputSplitInfo.getNumTasks();
-    Class<? extends TezRootInputInitializer> inputInitializerClazz =
+    Class<? extends InputInitializer> inputInitializerClazz =
         genSplitsInAM ? (initializerClass == null ? MRInputAMSplitGenerator.class : initializerClass)
         : null;
     LOG.info("Using initializer class: " + initializerClass);
@@ -867,7 +867,7 @@ public class TestMRRJobsDAGApi {
   public static class MRInputAMSplitGeneratorRelocalizationTest extends MRInputAMSplitGenerator {
 
     public MRInputAMSplitGeneratorRelocalizationTest(
-        TezRootInputInitializerContext initializerContext) {
+        InputInitializerContext initializerContext) {
       super(initializerContext);
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-tests/src/test/java/org/apache/tez/test/TestInput.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/TestInput.java b/tez-tests/src/test/java/org/apache/tez/test/TestInput.java
index 51d24bc..525db69 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/TestInput.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/TestInput.java
@@ -32,7 +32,7 @@ import org.apache.tez.dag.api.InputDescriptor;
 import org.apache.tez.runtime.api.AbstractLogicalInput;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.Reader;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.api.events.InputFailedEvent;
 import org.apache.tez.runtime.api.events.InputReadErrorEvent;
@@ -110,7 +110,7 @@ public class TestInput extends AbstractLogicalInput {
   public static String TEZ_FAILING_INPUT_FAILING_TASK_ATTEMPT =
       "tez.failing-input.failing-task-attempt";
 
-  public TestInput(TezInputContext inputContext, int numPhysicalInputs) {
+  public TestInput(InputContext inputContext, int numPhysicalInputs) {
     super(inputContext, numPhysicalInputs);
     this.completedInputVersion = new int[numPhysicalInputs];
     this.inputValues = new int[numPhysicalInputs];

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-tests/src/test/java/org/apache/tez/test/TestOutput.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/TestOutput.java b/tez-tests/src/test/java/org/apache/tez/test/TestOutput.java
index 064119f..bbc909c 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/TestOutput.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/TestOutput.java
@@ -27,7 +27,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.tez.dag.api.OutputDescriptor;
 import org.apache.tez.runtime.api.AbstractLogicalOutput;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.api.Writer;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 
@@ -36,7 +36,7 @@ import com.google.common.collect.Lists;
 public class TestOutput extends AbstractLogicalOutput {
   private static final Log LOG = LogFactory.getLog(TestOutput.class);
 
-  public TestOutput(TezOutputContext outputContext, int numPhysicalOutputs) {
+  public TestOutput(OutputContext outputContext, int numPhysicalOutputs) {
     super(outputContext, numPhysicalOutputs);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-tests/src/test/java/org/apache/tez/test/TestProcessor.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/TestProcessor.java b/tez-tests/src/test/java/org/apache/tez/test/TestProcessor.java
index 9231d37..c807b27 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/TestProcessor.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/TestProcessor.java
@@ -31,7 +31,7 @@ import org.apache.tez.runtime.api.AbstractLogicalIOProcessor;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.LogicalOutput;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 
 import com.google.common.collect.Sets;
 
@@ -92,10 +92,10 @@ public class TestProcessor extends AbstractLogicalIOProcessor {
    * LogicalProcessor, must provide the same constructor so that Tez can create an instance of the
    * class at runtime.
    *
-   * @param context the {@link org.apache.tez.runtime.api.TezProcessorContext} which provides
+   * @param context the {@link org.apache.tez.runtime.api.ProcessorContext} which provides
    *                the Processor with context information within the running task.
    */
-  public TestProcessor(TezProcessorContext context) {
+  public TestProcessor(ProcessorContext context) {
     super(context);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-tests/src/test/java/org/apache/tez/test/dag/MultiAttemptDAG.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/dag/MultiAttemptDAG.java b/tez-tests/src/test/java/org/apache/tez/test/dag/MultiAttemptDAG.java
index 76e2bc6..38c5c2e 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/dag/MultiAttemptDAG.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/dag/MultiAttemptDAG.java
@@ -45,12 +45,12 @@ import org.apache.tez.runtime.api.MemoryUpdateCallback;
 import org.apache.tez.runtime.api.OutputCommitter;
 import org.apache.tez.runtime.api.OutputCommitterContext;
 import org.apache.tez.runtime.api.Reader;
-import org.apache.tez.runtime.api.TezInputContext;
-import org.apache.tez.runtime.api.TezOutputContext;
-import org.apache.tez.runtime.api.TezRootInputInitializer;
-import org.apache.tez.runtime.api.TezRootInputInitializerContext;
+import org.apache.tez.runtime.api.InputContext;
+import org.apache.tez.runtime.api.OutputContext;
+import org.apache.tez.runtime.api.InputInitializer;
+import org.apache.tez.runtime.api.InputInitializerContext;
 import org.apache.tez.runtime.api.Writer;
-import org.apache.tez.runtime.api.events.RootInputInitializerEvent;
+import org.apache.tez.runtime.api.events.InputInitializerEvent;
 import org.apache.tez.runtime.api.events.VertexManagerEvent;
 import org.apache.tez.test.TestInput;
 import org.apache.tez.test.TestOutput;
@@ -210,9 +210,9 @@ public class MultiAttemptDAG {
     }
   }
 
-  public static class FailingInputInitializer extends TezRootInputInitializer {
+  public static class FailingInputInitializer extends InputInitializer {
 
-    public FailingInputInitializer(TezRootInputInitializerContext initializerContext) {
+    public FailingInputInitializer(InputInitializerContext initializerContext) {
       super(initializerContext);
     }
 
@@ -231,7 +231,7 @@ public class MultiAttemptDAG {
     }
 
     @Override
-    public void handleInputInitializerEvent(List<RootInputInitializerEvent> events) throws
+    public void handleInputInitializerEvent(List<InputInitializerEvent> events) throws
         Exception {
       throw new UnsupportedOperationException("Not supported");
     }
@@ -239,7 +239,7 @@ public class MultiAttemptDAG {
 
   public static class NoOpInput extends AbstractLogicalInput {
 
-    public NoOpInput(TezInputContext inputContext, int numPhysicalInputs) {
+    public NoOpInput(InputContext inputContext, int numPhysicalInputs) {
       super(inputContext, numPhysicalInputs);
     }
 
@@ -275,7 +275,7 @@ public class MultiAttemptDAG {
 
   public static class NoOpOutput extends AbstractLogicalOutput {
 
-    public NoOpOutput(TezOutputContext outputContext,
+    public NoOpOutput(OutputContext outputContext,
                       int numPhysicalOutputs) {
       super(outputContext, numPhysicalOutputs);
     }


[5/5] git commit: TEZ-1237. Consolidate naming of API classes (bikas)

Posted by bi...@apache.org.
TEZ-1237. Consolidate naming of API classes (bikas)


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

Branch: refs/heads/master
Commit: 27e5b6c686870a72d30c1613376ea908761ea40f
Parents: c171220
Author: Bikas Saha <bi...@apache.org>
Authored: Mon Aug 11 10:58:55 2014 -0700
Committer: Bikas Saha <bi...@apache.org>
Committed: Mon Aug 11 10:58:55 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                     |   1 +
 .../apache/tez/dag/api/DagTypeConverters.java   |   4 +-
 .../tez/dag/api/DataSourceDescriptor.java       |  12 +-
 .../org/apache/tez/dag/api/EdgeManager.java     | 148 ---------------
 .../apache/tez/dag/api/EdgeManagerContext.java  |  55 ------
 .../tez/dag/api/EdgeManagerDescriptor.java      |  27 ---
 .../apache/tez/dag/api/EdgeManagerPlugin.java   | 147 +++++++++++++++
 .../tez/dag/api/EdgeManagerPluginContext.java   |  56 ++++++
 .../dag/api/EdgeManagerPluginDescriptor.java    |  27 +++
 .../org/apache/tez/dag/api/EdgeProperty.java    |   8 +-
 .../apache/tez/dag/api/VertexManagerPlugin.java |  14 +-
 .../tez/dag/api/VertexManagerPluginContext.java |  10 +-
 .../runtime/api/AbstractLogicalIOProcessor.java |   8 +-
 .../tez/runtime/api/AbstractLogicalInput.java   |  14 +-
 .../tez/runtime/api/AbstractLogicalOutput.java  |  12 +-
 .../apache/tez/runtime/api/InputContext.java    |  46 +++++
 .../runtime/api/InputFrameworkInterface.java    |   4 +-
 .../tez/runtime/api/InputInitializer.java       |  87 +++++++++
 .../runtime/api/InputInitializerContext.java    | 102 +++++++++++
 .../apache/tez/runtime/api/InputSpecUpdate.java | 103 +++++++++++
 .../tez/runtime/api/MergedInputContext.java     |  44 +++++
 .../tez/runtime/api/MergedLogicalInput.java     |  10 +-
 .../apache/tez/runtime/api/OutputCommitter.java |   8 +-
 .../tez/runtime/api/OutputCommitterContext.java |   8 +-
 .../apache/tez/runtime/api/OutputContext.java   |  41 +++++
 .../runtime/api/OutputFrameworkInterface.java   |   2 +-
 .../tez/runtime/api/ProcessorContext.java       |  74 ++++++++
 .../tez/runtime/api/RootInputSpecUpdate.java    | 101 -----------
 .../org/apache/tez/runtime/api/TaskContext.java | 180 ++++++++++++++++++
 .../apache/tez/runtime/api/TezInputContext.java |  45 -----
 .../tez/runtime/api/TezMergedInputContext.java  |  40 ----
 .../tez/runtime/api/TezOutputContext.java       |  40 ----
 .../tez/runtime/api/TezProcessorContext.java    |  74 --------
 .../runtime/api/TezRootInputInitializer.java    |  83 ---------
 .../api/TezRootInputInitializerContext.java     |  97 ----------
 .../apache/tez/runtime/api/TezTaskContext.java  | 181 -------------------
 .../events/InputConfigureVertexTasksEvent.java  |  54 ++++++
 .../api/events/InputDataInformationEvent.java   |  94 ++++++++++
 .../api/events/InputInitializerEvent.java       |  86 +++++++++
 .../api/events/InputUpdatePayloadEvent.java     |  46 +++++
 .../RootInputConfigureVertexTasksEvent.java     |  52 ------
 .../events/RootInputDataInformationEvent.java   |  92 ----------
 .../api/events/RootInputInitializerEvent.java   |  83 ---------
 .../api/events/RootInputUpdatePayloadEvent.java |  44 -----
 .../runtime/api/events/VertexManagerEvent.java  |   2 +
 .../org/apache/tez/dag/api/TestDAGPlan.java     |   4 +-
 .../org/apache/tez/dag/api/TestDAGVerify.java   |   2 +-
 .../app/dag/RootInputInitializerManager.java    |  28 +--
 .../java/org/apache/tez/dag/app/dag/Vertex.java |   8 +-
 .../dag/app/dag/impl/BroadcastEdgeManager.java  |   8 +-
 .../org/apache/tez/dag/app/dag/impl/Edge.java   |  18 +-
 .../dag/app/dag/impl/OneToOneEdgeManager.java   |   8 +-
 .../app/dag/impl/RootInputVertexManager.java    |  28 +--
 .../app/dag/impl/ScatterGatherEdgeManager.java  |   8 +-
 .../TezRootInputInitializerContextImpl.java     |   4 +-
 .../apache/tez/dag/app/dag/impl/VertexImpl.java |  40 ++--
 .../tez/dag/app/dag/impl/VertexManager.java     |  16 +-
 .../VertexDataMovementEventsGeneratedEvent.java |   4 +-
 .../events/VertexParallelismUpdatedEvent.java   |  34 ++--
 .../dag/impl/TestRootInputVertexManager.java    |  12 +-
 .../tez/dag/app/dag/impl/TestVertexImpl.java    |  96 +++++-----
 .../TestHistoryEventsProtoConversion.java       |  26 +--
 .../tez/runtime/task/TestTaskExecution.java     |   4 +-
 .../org/apache/tez/test/EdgeManagerForTest.java |  10 +-
 .../apache/tez/examples/OrderedWordCount.java   |   6 +-
 .../examples/BroadcastAndOneToOneExample.java   |   6 +-
 .../mapreduce/examples/FilterLinesByWord.java   |   4 +-
 .../examples/FilterLinesByWordOneToOne.java     |   4 +-
 .../mapreduce/examples/IntersectDataGen.java    |   4 +-
 .../mapreduce/examples/IntersectExample.java    |   6 +-
 .../mapreduce/examples/IntersectValidate.java   |   4 +-
 .../examples/TestOrderedWordCount.java          |   4 +-
 .../tez/mapreduce/examples/UnionExample.java    |   6 +-
 .../tez/mapreduce/examples/WordCount.java       |   6 +-
 .../processor/FilterByWordInputProcessor.java   |   4 +-
 .../processor/FilterByWordOutputProcessor.java  |   4 +-
 .../tez/mapreduce/combine/MRCombiner.java       |  16 +-
 .../common/MRInputAMSplitGenerator.java         |  28 +--
 .../common/MRInputSplitDistributor.java         |  26 +--
 .../hadoop/mapreduce/MapContextImpl.java        |   4 +-
 .../mapreduce/TaskInputOutputContextImpl.java   |   4 +-
 .../org/apache/tez/mapreduce/input/MRInput.java |  18 +-
 .../tez/mapreduce/input/MRInputLegacy.java      |  10 +-
 .../tez/mapreduce/input/MultiMRInput.java       |  10 +-
 .../tez/mapreduce/input/base/MRInputBase.java   |   4 +-
 .../apache/tez/mapreduce/output/MROutput.java   |   4 +-
 .../tez/mapreduce/output/MROutputLegacy.java    |   4 +-
 .../apache/tez/mapreduce/processor/MRTask.java  |   8 +-
 .../tez/mapreduce/processor/MRTaskReporter.java |  18 +-
 .../mapreduce/processor/SimpleMRProcessor.java  |   4 +-
 .../mapreduce/processor/map/MapProcessor.java   |   4 +-
 .../processor/reduce/ReduceProcessor.java       |   4 +-
 .../common/TestMRInputSplitDistributor.java     |  32 ++--
 .../tez/mapreduce/input/TestMultiMRInput.java   |  24 +--
 .../processor/map/TestMapProcessor.java         |   4 +-
 .../org/apache/tez/common/ProtoConverters.java  |  18 +-
 .../runtime/LogicalIOProcessorRuntimeTask.java  |  58 +++---
 .../apache/tez/runtime/api/impl/TezEvent.java   |  12 +-
 .../runtime/api/impl/TezInputContextImpl.java   |   4 +-
 .../api/impl/TezMergedInputContextImpl.java     |   4 +-
 .../runtime/api/impl/TezOutputContextImpl.java  |   4 +-
 .../api/impl/TezProcessorContextImpl.java       |   4 +-
 .../runtime/api/impl/TezTaskContextImpl.java    |   4 +-
 .../common/resources/MemoryDistributor.java     |  30 +--
 .../tez/runtime/TestInputReadyTracker.java      |  10 +-
 .../TestLogicalIOProcessorRuntimeTask.java      |  12 +-
 .../common/resources/TestMemoryDistributor.java |  46 ++---
 .../vertexmanager/ShuffleVertexManager.java     |  18 +-
 .../broadcast/output/FileBasedKVWriter.java     |   4 +-
 .../runtime/library/common/TezRuntimeUtils.java |  10 +-
 .../common/localshuffle/LocalShuffle.java       |   6 +-
 .../library/common/shuffle/impl/Fetcher.java    |   4 +-
 .../common/shuffle/impl/MergeManager.java       |   6 +-
 .../library/common/shuffle/impl/Shuffle.java    |   6 +-
 .../shuffle/impl/ShuffleInputEventHandler.java  |   6 +-
 .../common/shuffle/impl/ShuffleScheduler.java   |   6 +-
 .../common/sort/impl/ExternalSorter.java        |   6 +-
 .../common/sort/impl/PipelinedSorter.java       |   4 +-
 .../common/sort/impl/dflt/DefaultSorter.java    |   4 +-
 .../BaseUnorderedPartitionedKVWriter.java       |   6 +-
 .../writers/UnorderedPartitionedKVWriter.java   |   4 +-
 .../OrderedPartitionedKVEdgeConfigurer.java     |   4 +-
 .../UnorderedPartitionedKVEdgeConfigurer.java   |   4 +-
 .../UnorderedUnpartitionedKVEdgeConfigurer.java |   4 +-
 .../input/ConcatenatedMergedKeyValueInput.java  |   4 +-
 .../input/ConcatenatedMergedKeyValuesInput.java |   4 +-
 .../runtime/library/input/LocalMergedInput.java |   4 +-
 .../library/input/ShuffledMergedInput.java      |   4 +-
 .../input/ShuffledMergedInputLegacy.java        |   4 +-
 .../library/input/ShuffledUnorderedKVInput.java |   4 +-
 .../library/input/SortedGroupedMergedInput.java |   4 +-
 .../library/output/LocalOnFileSorterOutput.java |   4 +-
 .../library/output/OnFileSortedOutput.java      |   4 +-
 .../library/output/OnFileUnorderedKVOutput.java |   4 +-
 .../OnFileUnorderedPartitionedKVOutput.java     |   4 +-
 .../library/processor/PreWarmProcessor.java     |   4 +-
 .../library/processor/SimpleProcessor.java      |   4 +-
 .../library/processor/SleepProcessor.java       |   4 +-
 .../impl/ShuffleInputEventHandlerImpl.java      |   4 +-
 .../shuffle/common/impl/ShuffleManager.java     |   6 +-
 .../vertexmanager/TestShuffleVertexManager.java |  22 +--
 .../TestWeightedScalingMemoryDistributor.java   |  20 +-
 .../library/common/TestValuesIterator.java      |   8 +-
 .../impl/TestShuffleInputEventHandler.java      |   8 +-
 .../TestUnorderedPartitionedKVWriter.java       |  18 +-
 .../input/TestSortedGroupedMergedInput.java     |   4 +-
 .../library/output/TestOnFileSortedOutput.java  |   8 +-
 .../output/TestOnFileUnorderedKVOutput.java     |   6 +-
 .../impl/TestShuffleInputEventHandlerImpl.java  |  10 +-
 .../apache/tez/mapreduce/TestMRRJobsDAGApi.java |  10 +-
 .../java/org/apache/tez/test/TestInput.java     |   4 +-
 .../java/org/apache/tez/test/TestOutput.java    |   4 +-
 .../java/org/apache/tez/test/TestProcessor.java |   6 +-
 .../apache/tez/test/dag/MultiAttemptDAG.java    |  20 +-
 154 files changed, 1828 insertions(+), 1802 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5faca2f..99d25c1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -51,6 +51,7 @@ INCOMPATIBLE CHANGES
   TEZ-1386. TezGroupedSplitsInputFormat should not need to be setup to enable grouping.
   TEZ-1394. Create example code for OrderedWordCount
   TEZ-1372. Fix preWarm to work after recent API changes
+  TEZ-1237. Consolidate naming of API classes
 
 Release 0.4.0-incubating: 2014-04-05
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java b/tez-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java
index c81fcb6..b56b2da 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java
@@ -361,14 +361,14 @@ public class DagTypeConverters {
     return new VertexManagerPluginDescriptor(className).setUserPayload(bb);
   }
 
-  public static EdgeManagerDescriptor convertEdgeManagerDescriptorFromDAGPlan(
+  public static EdgeManagerPluginDescriptor convertEdgeManagerDescriptorFromDAGPlan(
       TezEntityDescriptorProto proto) {
     String className = proto.getClassName();
     byte[] bb = null;
     if (proto.hasUserPayload()) {
       bb = proto.getUserPayload().toByteArray();
     }
-    return new EdgeManagerDescriptor(className).setUserPayload(bb);
+    return new EdgeManagerPluginDescriptor(className).setUserPayload(bb);
   }
 
   public static ProcessorDescriptor convertProcessorDescriptorFromDAGPlan(

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/dag/api/DataSourceDescriptor.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/DataSourceDescriptor.java b/tez-api/src/main/java/org/apache/tez/dag/api/DataSourceDescriptor.java
index 51d85ae..88304c4 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/DataSourceDescriptor.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/DataSourceDescriptor.java
@@ -22,8 +22,8 @@ import javax.annotation.Nullable;
 
 import org.apache.hadoop.security.Credentials;
 import org.apache.tez.dag.api.VertexLocationHint.TaskLocationHint;
-import org.apache.tez.runtime.api.TezRootInputInitializer;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
+import org.apache.tez.runtime.api.InputInitializer;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
 
 /**
  * Defines the input and input initializer for a data source 
@@ -46,10 +46,10 @@ public class DataSourceDescriptor {
    * @param inputInitializerDescriptor
    *          An initializer for this Input which may run within the AM. This
    *          can be used to set the parallelism for this vertex and generate
-   *          {@link RootInputDataInformationEvent}s for the actual Input.</p>
+   *          {@link InputDataInformationEvent}s for the actual Input.</p>
    *          If this is not specified, the parallelism must be set for the
    *          vertex. In addition, the Input should know how to access data for
-   *          each of it's tasks. </p> If a {@link TezRootInputInitializer} is
+   *          each of it's tasks. </p> If a {@link InputInitializer} is
    *          meant to determine the parallelism of the vertex, the initial
    *          vertex parallelism should be set to -1. Can be null.
    */
@@ -67,10 +67,10 @@ public class DataSourceDescriptor {
    * @param inputInitializerDescriptor
    *          An initializer for this Input which may run within the AM. This
    *          can be used to set the parallelism for this vertex and generate
-   *          {@link RootInputDataInformationEvent}s for the actual Input.</p>
+   *          {@link InputDataInformationEvent}s for the actual Input.</p>
    *          If this is not specified, the parallelism must be set for the
    *          vertex. In addition, the Input should know how to access data for
-   *          each of it's tasks. </p> If a {@link TezRootInputInitializer} is
+   *          each of it's tasks. </p> If a {@link InputInitializer} is
    *          meant to determine the parallelism of the vertex, the initial
    *          vertex parallelism should be set to -1. Can be null.
    * @param numShards Number of shards of data

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManager.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManager.java b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManager.java
deleted file mode 100644
index c447ca5..0000000
--- a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManager.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package org.apache.tez.dag.api;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.hadoop.classification.InterfaceStability;
-import org.apache.tez.runtime.api.events.DataMovementEvent;
-import org.apache.tez.runtime.api.events.InputReadErrorEvent;
-
-/**
- * This interface defines the routing of the event between tasks of producer and 
- * consumer vertices. The routing is bi-directional. Users can customize the 
- * routing by providing an implementation of this interface.
- * 
- * Implementations must provide a 0 argument public constructor.
- */
-@InterfaceStability.Unstable
-public abstract class EdgeManager {
-
-  private final EdgeManagerContext context;
-
-  /**
-   * Crete an instance of the VertexManagerPlugin. Classes extending this one to create a
-   * VertexManagerPlugin, must provide the same constructor so that Tez can create an instance of
-   * the class at runtime.
-   *
-   * @param context the context within which this EdgeManager will run. Includes
-   *                  information like configuration which the user may have specified
-   *                  while setting up the edge.
-   */
-  public EdgeManager(EdgeManagerContext context) {
-    this.context = context;
-  }
-
-  /**
-   * Initializes the EdgeManager. This method is called in the following
-   * circumstances </p> 1. when initializing an Edge Manager for the first time.
-   * </p> 2. When an EdgeManager is replaced at runtime. At this point, an
-   * EdgeManager instance is created and setup by the user. The initialize
-   * method will be called with the original {@link EdgeManagerContext} when the
-   * edgeManager is replaced.
-   *
-   */
-  public abstract void initialize();
-  
-  /**
-   * Get the number of physical inputs on the destination task
-   * @param destinationTaskIndex Index of destination task for which number of 
-   * inputs is needed
-   * @return Number of physical inputs on the destination task
-   */
-  public abstract int getNumDestinationTaskPhysicalInputs(int destinationTaskIndex);
-
-  /**
-   * Get the number of physical outputs on the source task
-   * @param sourceTaskIndex Index of the source task for which number of outputs 
-   * is needed
-   * @return Number of physical outputs on the source task
-   */
-  public abstract int getNumSourceTaskPhysicalOutputs(int sourceTaskIndex);
-  
-  /**
-   * Return the routing information to inform consumers about the source task
-   * output that is now available. The return map has the routing information.
-   * The event will be routed to every destination task index in the key of the
-   * map. Every physical input in the value for that task key will receive the
-   * input.
-   * 
-   * @param event
-   *          Data movement event that contains the output information
-   * @param sourceTaskIndex
-   *          Source task that produced the event
-   * @param sourceOutputIndex
-   *          Index of the physical output on the source task that produced the
-   *          event
-   * @param destinationTaskAndInputIndices
-   *          Map via which the routing information is returned
-   */
-  public abstract void routeDataMovementEventToDestination(DataMovementEvent event,
-      int sourceTaskIndex, int sourceOutputIndex,
-      Map<Integer, List<Integer>> destinationTaskAndInputIndices);
-  
-  /**
-   * Return the routing information to inform consumers about the failure of a
-   * source task whose outputs have been potentially lost. The return map has
-   * the routing information. The failure notification event will be sent to
-   * every task index in the key of the map. Every physical input in the value
-   * for that task key will receive the failure notification. This method will
-   * be called once for every source task failure and information for all
-   * affected destinations must be provided in that invocation.
-   * 
-   * @param sourceTaskIndex
-   *          Source task
-   * @param destinationTaskAndInputIndices
-   *          Map via which the routing information is returned
-   */
-  public abstract void routeInputSourceTaskFailedEventToDestination(int sourceTaskIndex,
-      Map<Integer, List<Integer>> destinationTaskAndInputIndices);
-
-  /**
-   * Get the number of destination tasks that consume data from the source task
-   * @param sourceTaskIndex Source task index
-   */
-  public abstract int getNumDestinationConsumerTasks(int sourceTaskIndex);
-  
-  /**
-   * Return the source task index to which to send the input error event
-   * 
-   * @param event
-   *          Input read error event. Has more information about the error
-   * @param destinationTaskIndex
-   *          Destination task that reported the error
-   * @param destinationFailedInputIndex
-   *          Index of the physical input on the destination task that reported 
-   *          the error
-   * @return Index of the source task that created the unavailable input
-   */
-  public abstract int routeInputErrorEventToSource(InputReadErrorEvent event,
-      int destinationTaskIndex, int destinationFailedInputIndex);
-
-  /**
-   * Return ahe {@link org.apache.tez.dag.api.EdgeManagerContext} for this specific instance of
-   * the vertex manager.
-   *
-   * @return the {@link org.apache.tez.dag.api.EdgeManagerContext} for the input
-   */
-  public EdgeManagerContext getContext() {
-    return this.context;
-  }
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerContext.java b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerContext.java
deleted file mode 100644
index 4158647..0000000
--- a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerContext.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.dag.api;
-
-/**
- * Context information provided to Edge plugins on initialization.
- *
- */
-public interface EdgeManagerContext {
-  
-  /**
-   * Returns the byte payload specified by the user for the edge.
-   * @return the byte payload specified by the user
-   */
-  public byte[] getUserPayload();
-  
-  /**
-   * Returns the source vertex name 
-   * @return the source vertex name
-   */
-  public String getSourceVertexName();
-  
-  /**
-   * Returns the destination vertex name
-   * @return the destination vertex name
-   */
-  public String getDestinationVertexName();
-
-  /**
-   * Returns the number of tasks in the source vertex
-   */
-  public int getSourceVertexNumTasks();
-
-  /**
-   * Returns the number of tasks in the destination vertex
-   */
-  public int getDestinationVertexNumTasks();
-
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerDescriptor.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerDescriptor.java b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerDescriptor.java
deleted file mode 100644
index 058e8e8..0000000
--- a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerDescriptor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.dag.api;
-
-public class EdgeManagerDescriptor extends TezEntityDescriptor<EdgeManagerDescriptor> {
-
-  public EdgeManagerDescriptor(String edgeManagerClassName) {
-    super(edgeManagerClassName);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPlugin.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPlugin.java b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPlugin.java
new file mode 100644
index 0000000..07bf3fe
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPlugin.java
@@ -0,0 +1,147 @@
+/**
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package org.apache.tez.dag.api;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.tez.runtime.api.events.DataMovementEvent;
+import org.apache.tez.runtime.api.events.InputReadErrorEvent;
+
+/**
+ * This interface defines the routing of the event between tasks of producer and 
+ * consumer vertices. The routing is bi-directional. Users can customize the 
+ * routing by providing an implementation of this interface.
+ */
+@InterfaceStability.Unstable
+public abstract class EdgeManagerPlugin {
+
+  private final EdgeManagerPluginContext context;
+
+  /**
+   * Create an instance of the EdgeManagerPlugin. Classes extending this to
+   * create a EdgeManagerPlugin, must provide the same constructor so that Tez
+   * can create an instance of the class at runtime.
+   * 
+   * @param context
+   *          the context within which this EdgeManagerPlugin will run. Includes
+   *          information like configuration which the user may have specified
+   *          while setting up the edge.
+   */
+  public EdgeManagerPlugin(EdgeManagerPluginContext context) {
+    this.context = context;
+  }
+
+  /**
+   * Initializes the EdgeManagerPlugin. This method is called in the following
+   * circumstances </p> 1. when initializing an EdgeManagerPlugin for the first time.
+   * </p> 2. When an EdgeManagerPlugin is replaced at runtime. At this point, an
+   * EdgeManagerPlugin instance is created and setup by the user. The initialize
+   * method will be called with the original {@link EdgeManagerPluginContext} when the
+   * EdgeManagerPlugin is replaced.
+   *
+   */
+  public abstract void initialize();
+  
+  /**
+   * Get the number of physical inputs on the destination task
+   * @param destinationTaskIndex Index of destination task for which number of 
+   * inputs is needed
+   * @return Number of physical inputs on the destination task
+   */
+  public abstract int getNumDestinationTaskPhysicalInputs(int destinationTaskIndex);
+
+  /**
+   * Get the number of physical outputs on the source task
+   * @param sourceTaskIndex Index of the source task for which number of outputs 
+   * is needed
+   * @return Number of physical outputs on the source task
+   */
+  public abstract int getNumSourceTaskPhysicalOutputs(int sourceTaskIndex);
+  
+  /**
+   * Return the routing information to inform consumers about the source task
+   * output that is now available. The return map has the routing information.
+   * The event will be routed to every destination task index in the key of the
+   * map. Every physical input in the value for that task key will receive the
+   * input.
+   * 
+   * @param event
+   *          Data movement event that contains the output information
+   * @param sourceTaskIndex
+   *          Source task that produced the event
+   * @param sourceOutputIndex
+   *          Index of the physical output on the source task that produced the
+   *          event
+   * @param destinationTaskAndInputIndices
+   *          Map via which the routing information is returned
+   */
+  public abstract void routeDataMovementEventToDestination(DataMovementEvent event,
+      int sourceTaskIndex, int sourceOutputIndex,
+      Map<Integer, List<Integer>> destinationTaskAndInputIndices);
+  
+  /**
+   * Return the routing information to inform consumers about the failure of a
+   * source task whose outputs have been potentially lost. The return map has
+   * the routing information. The failure notification event will be sent to
+   * every task index in the key of the map. Every physical input in the value
+   * for that task key will receive the failure notification. This method will
+   * be called once for every source task failure and information for all
+   * affected destinations must be provided in that invocation.
+   * 
+   * @param sourceTaskIndex
+   *          Source task
+   * @param destinationTaskAndInputIndices
+   *          Map via which the routing information is returned
+   */
+  public abstract void routeInputSourceTaskFailedEventToDestination(int sourceTaskIndex,
+      Map<Integer, List<Integer>> destinationTaskAndInputIndices);
+
+  /**
+   * Get the number of destination tasks that consume data from the source task
+   * @param sourceTaskIndex Source task index
+   */
+  public abstract int getNumDestinationConsumerTasks(int sourceTaskIndex);
+  
+  /**
+   * Return the source task index to which to send the input error event
+   * 
+   * @param event
+   *          Input read error event. Has more information about the error
+   * @param destinationTaskIndex
+   *          Destination task that reported the error
+   * @param destinationFailedInputIndex
+   *          Index of the physical input on the destination task that reported 
+   *          the error
+   * @return Index of the source task that created the unavailable input
+   */
+  public abstract int routeInputErrorEventToSource(InputReadErrorEvent event,
+      int destinationTaskIndex, int destinationFailedInputIndex);
+
+  /**
+   * Return ahe {@link org.apache.tez.dag.api.EdgeManagerPluginContext} for this specific instance of
+   * the vertex manager.
+   *
+   * @return the {@link org.apache.tez.dag.api.EdgeManagerPluginContext} for the input
+   */
+  public EdgeManagerPluginContext getContext() {
+    return this.context;
+  }
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPluginContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPluginContext.java b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPluginContext.java
new file mode 100644
index 0000000..d55ea6d
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPluginContext.java
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.dag.api;
+
+/**
+ * Context information provided to {@link EdgeManagerPlugin}s
+ * This interface is not supposed to be implemented by users
+ *
+ */
+public interface EdgeManagerPluginContext {
+  
+  /**
+   * Returns the payload specified by the user for the edge.
+   * @return the payload specified by the user
+   */
+  public byte[] getUserPayload();
+  
+  /**
+   * Returns the source vertex name 
+   * @return the source vertex name
+   */
+  public String getSourceVertexName();
+  
+  /**
+   * Returns the destination vertex name
+   * @return the destination vertex name
+   */
+  public String getDestinationVertexName();
+
+  /**
+   * Returns the number of tasks in the source vertex
+   */
+  public int getSourceVertexNumTasks();
+
+  /**
+   * Returns the number of tasks in the destination vertex
+   */
+  public int getDestinationVertexNumTasks();
+
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPluginDescriptor.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPluginDescriptor.java b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPluginDescriptor.java
new file mode 100644
index 0000000..083326f
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPluginDescriptor.java
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.dag.api;
+
+public class EdgeManagerPluginDescriptor extends TezEntityDescriptor<EdgeManagerPluginDescriptor> {
+
+  public EdgeManagerPluginDescriptor(String edgeManagerPluginClassName) {
+    super(edgeManagerPluginClassName);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/dag/api/EdgeProperty.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeProperty.java b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeProperty.java
index 6f0c66d..6ed3c92 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeProperty.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeProperty.java
@@ -96,7 +96,7 @@ public class EdgeProperty {
   final SchedulingType schedulingType;
   final InputDescriptor inputDescriptor;
   final OutputDescriptor outputDescriptor;
-  final EdgeManagerDescriptor edgeManagerDescriptor;
+  final EdgeManagerPluginDescriptor edgeManagerDescriptor;
   
   /**
    * @param dataMovementType
@@ -135,7 +135,7 @@ public class EdgeProperty {
    * @param edgeDestination
    *          The {@link InputDescriptor} which will consume data from the edge.
    */
-  public EdgeProperty(EdgeManagerDescriptor edgeManagerDescriptor,
+  public EdgeProperty(EdgeManagerPluginDescriptor edgeManagerDescriptor,
                       DataSourceType dataSourceType,
                       SchedulingType schedulingType,
                       OutputDescriptor edgeSource,
@@ -176,10 +176,10 @@ public class EdgeProperty {
   
   /**
    * Returns the Edge Manager specifications for this edge.  
-   * @return @link {@link EdgeManagerDescriptor} if a custom edge was setup, null otherwise.
+   * @return @link {@link EdgeManagerPluginDescriptor} if a custom edge was setup, null otherwise.
    */
   @Private
-  public EdgeManagerDescriptor getEdgeManagerDescriptor() {
+  public EdgeManagerPluginDescriptor getEdgeManagerDescriptor() {
     return edgeManagerDescriptor;
   }
   

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPlugin.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPlugin.java b/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPlugin.java
index 6aec78e..40e2cc0 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPlugin.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPlugin.java
@@ -37,13 +37,13 @@ public abstract class VertexManagerPlugin {
   private final VertexManagerPluginContext context;
 
   /**
-   * Crete an instance of the VertexManagerPlugin. Classes extending this one to create a
-   * VertexManagerPlugin, must provide the same constructor so that Tez can create an instance of
-   * the class at runtime.
-   *
-   * @param context vertex manager plugin context which can be used to access the payload,
-   *                        vertex
-   *                        properties, etc
+   * Crete an instance of the VertexManagerPlugin. Classes extending this to
+   * create a VertexManagerPlugin, must provide the same constructor so that Tez
+   * can create an instance of the class at runtime.
+   * 
+   * @param context
+   *          vertex manager plugin context which can be used to access the
+   *          payload, vertex properties, etc
    */
   public VertexManagerPlugin(VertexManagerPluginContext context) {
     this.context = context;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginContext.java b/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginContext.java
index 7c48adc..8a29691 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginContext.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginContext.java
@@ -30,8 +30,8 @@ import org.apache.hadoop.yarn.api.records.Container;
 
 import org.apache.hadoop.yarn.api.records.Resource;
 import org.apache.tez.dag.api.VertexLocationHint.TaskLocationHint;
-import org.apache.tez.runtime.api.RootInputSpecUpdate;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
+import org.apache.tez.runtime.api.InputSpecUpdate;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
 
 import com.google.common.base.Preconditions;
 
@@ -127,8 +127,8 @@ public interface VertexManagerPluginContext {
    */
   public boolean setVertexParallelism(int parallelism,
       @Nullable VertexLocationHint locationHint,
-      @Nullable Map<String, EdgeManagerDescriptor> sourceEdgeManagers,
-      @Nullable Map<String, RootInputSpecUpdate> rootInputSpecUpdate);
+      @Nullable Map<String, EdgeManagerPluginDescriptor> sourceEdgeManagers,
+      @Nullable Map<String, InputSpecUpdate> rootInputSpecUpdate);
   
   /**
    * Allows a VertexManagerPlugin to assign Events for Root Inputs
@@ -143,7 +143,7 @@ public interface VertexManagerPluginContext {
    *          the Vertex. The target index on individual events represents the
    *          task to which events need to be sent.
    */
-  public void addRootInputEvents(String inputName, Collection<RootInputDataInformationEvent> events);
+  public void addRootInputEvents(String inputName, Collection<InputDataInformationEvent> events);
   
   /**
    * Notify the vertex to start the given tasks

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalIOProcessor.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalIOProcessor.java b/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalIOProcessor.java
index 173952e..0af498d 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalIOProcessor.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalIOProcessor.java
@@ -27,24 +27,24 @@ import org.apache.hadoop.classification.InterfaceAudience;
 @InterfaceAudience.Public
 public abstract class AbstractLogicalIOProcessor implements LogicalIOProcessor,
     LogicalIOProcessorFrameworkInterface {
-  private final TezProcessorContext context;
+  private final ProcessorContext context;
 
   /**
    * Constructor an instance of the LogicalProcessor. Classes extending this one to create a
    * LogicalProcessor, must provide the same constructor so that Tez can create an instance of the
    * class at runtime.
    *
-   * @param context the {@link org.apache.tez.runtime.api.TezProcessorContext} which provides
+   * @param context the {@link org.apache.tez.runtime.api.ProcessorContext} which provides
    *                the Processor with context information within the running task.
    */
-  public AbstractLogicalIOProcessor(TezProcessorContext context) {
+  public AbstractLogicalIOProcessor(ProcessorContext context) {
     this.context = context;
   }
 
   @Override
   public abstract void initialize() throws Exception;
 
-  public final TezProcessorContext getContext() {
+  public final ProcessorContext getContext() {
     return context;
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalInput.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalInput.java b/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalInput.java
index 8b6edda..d1facc7 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalInput.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalInput.java
@@ -29,7 +29,7 @@ import java.util.List;
  *
  * <code>Input</code> classes must provide a 2 argument public constructor for Tez to create the
  * Input. The parameters to this constructor are 1) an instance of
- * {@link org.apache.tez.runtime.api.TezInputContext} and 2) an integer which is used to
+ * {@link org.apache.tez.runtime.api.InputContext} and 2) an integer which is used to
  * setup the number of physical inputs that the logical input will see.
  * Tez will take care of initializing and closing the Input after a {@link Processor} completes. </p>
  * <p/>
@@ -38,19 +38,19 @@ import java.util.List;
 public abstract class AbstractLogicalInput implements LogicalInput, LogicalInputFrameworkInterface {
 
   private final int numPhysicalInputs;
-  private final TezInputContext inputContext;
+  private final InputContext inputContext;
 
   /**
    * Constructor an instance of the LogicalInput. Classes extending this one to create a
    * LogicalInput, must provide the same constructor so that Tez can create an instance of the
    * class at runtime.
    *
-   * @param inputContext      the {@link org.apache.tez.runtime.api.TezInputContext} which provides
+   * @param inputContext      the {@link org.apache.tez.runtime.api.InputContext} which provides
    *                          the Input with context information within the running task.
    * @param numPhysicalInputs the number of physical inputs that the logical input will
    *                          receive. This is typically determined by Edge Routing.
    */
-  public AbstractLogicalInput(TezInputContext inputContext, int numPhysicalInputs) {
+  public AbstractLogicalInput(InputContext inputContext, int numPhysicalInputs) {
     this.inputContext = inputContext;
     this.numPhysicalInputs = numPhysicalInputs;
   }
@@ -69,12 +69,12 @@ public abstract class AbstractLogicalInput implements LogicalInput, LogicalInput
   }
 
   /**
-   * Return ahe {@link org.apache.tez.runtime.api.TezInputContext} for this specific instance of
+   * Return ahe {@link org.apache.tez.runtime.api.InputContext} for this specific instance of
    * the LogicalInput
    *
-   * @return the {@link org.apache.tez.runtime.api.TezInputContext} for the input
+   * @return the {@link org.apache.tez.runtime.api.InputContext} for the input
    */
-  public final TezInputContext getContext() {
+  public final InputContext getContext() {
     return inputContext;
   }
 }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalOutput.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalOutput.java b/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalOutput.java
index d88e57f..317390a 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalOutput.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalOutput.java
@@ -31,20 +31,20 @@ import java.util.List;
 public abstract class AbstractLogicalOutput implements LogicalOutput, LogicalOutputFrameworkInterface {
 
   private final int numPhysicalOutputs;
-  private final TezOutputContext outputContext;
+  private final OutputContext outputContext;
 
   /**
    * Constructor an instance of the LogicalOutput. Classes extending this one to create a
    * LogicalOutput, must provide the same constructor so that Tez can create an instance of the
    * class at runtime.
    *
-   * @param outputContext      the {@link org.apache.tez.runtime.api.TezOutputContext} which
+   * @param outputContext      the {@link org.apache.tez.runtime.api.OutputContext} which
    *                           provides
    *                           the Output with context information within the running task.
    * @param numPhysicalOutputs the number of physical outputs that the logical output will
    *                           generate. This is typically determined by Edge Routing.
    */
-  public AbstractLogicalOutput(TezOutputContext outputContext, int numPhysicalOutputs) {
+  public AbstractLogicalOutput(OutputContext outputContext, int numPhysicalOutputs) {
     this.outputContext = outputContext;
     this.numPhysicalOutputs = numPhysicalOutputs;
   }
@@ -62,12 +62,12 @@ public abstract class AbstractLogicalOutput implements LogicalOutput, LogicalOut
   }
 
   /**
-   * Return ahe {@link org.apache.tez.runtime.api.TezOutputContext} for this specific instance of
+   * Return ahe {@link org.apache.tez.runtime.api.OutputContext} for this specific instance of
    * the LogicalOutput
    *
-   * @return the {@link org.apache.tez.runtime.api.TezOutputContext} for the output
+   * @return the {@link org.apache.tez.runtime.api.OutputContext} for the output
    */
-  public final TezOutputContext getContext() {
+  public final OutputContext getContext() {
     return outputContext;
   }
 }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/InputContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/InputContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/InputContext.java
new file mode 100644
index 0000000..1961184
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/InputContext.java
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.runtime.api;
+
+/**
+ * Context handle for the Input to initialize itself.
+ * This interface is not supposed to be implemented by users
+ */
+public interface InputContext extends TaskContext {
+
+  /**
+   * Get the Vertex Name of the Source that generated data for this Input
+   * @return Name of the Source Vertex
+   */
+  public String getSourceVertexName();
+  
+  /**
+   * Get the index of the input in the set of all inputs for the task. The 
+   * index will be consistent and valid only among the tasks of this vertex.
+   * @return index
+   */
+  public int getInputIndex();
+  
+  /**
+   * Inform the framework that the specific Input is ready for consumption.
+   * 
+   * This method can be invoked multiple times.
+   */
+  public void inputIsReady();
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/InputFrameworkInterface.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/InputFrameworkInterface.java b/tez-api/src/main/java/org/apache/tez/runtime/api/InputFrameworkInterface.java
index 5192252..25b37b8 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/InputFrameworkInterface.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/InputFrameworkInterface.java
@@ -31,13 +31,13 @@ import java.util.List;
  * <p/>
  *
  * During initialization, Inputs must specify an initial memory requirement via
- * {@link TezInputContext}.requestInitialMemory
+ * {@link InputContext}.requestInitialMemory
  * <p/>
  *
  *
  * Inputs must also inform the framework once they are ready to be consumed.
  * This typically means that the Processor will not block when reading from the
- * corresponding Input. This is done via {@link TezInputContext}.inputIsReady.
+ * corresponding Input. This is done via {@link InputContext}.inputIsReady.
  * Inputs choose the policy on when they are ready.
  */
 public interface InputFrameworkInterface {

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializer.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializer.java b/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializer.java
new file mode 100644
index 0000000..a86dc22
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializer.java
@@ -0,0 +1,87 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.runtime.api;
+
+import java.util.List;
+
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.tez.runtime.api.events.InputInitializerEvent;
+
+/**
+ * <code>InputInitializer</code>s are typically used to initialize vertices
+ * connected to data sources. They run in the App Master and can be used to
+ * distribute data across the tasks for the vertex, determine the number of
+ * tasks at runtime, update the Input payload etc.
+ */
+@InterfaceStability.Unstable
+public abstract class InputInitializer {
+
+  private final InputInitializerContext initializerContext;
+
+  /**
+   * Constructor an instance of the InputInitializer. Classes extending this to create a
+   * InputInitializer, must provide the same constructor so that Tez can create an instance of
+   * the class at runtime.
+   *
+   * @param initializerContext initializer context which can be used to access the payload, vertex
+   *                           properties, etc
+   */
+  public InputInitializer(InputInitializerContext initializerContext) {
+    this.initializerContext = initializerContext;
+  }
+
+  /**
+   * Run the initializer. This is the main method where
+   * initialization takes place. If an Initializer is written to accept events,
+   * a notification mechanism should be setup, with the heavy lifting of
+   * processing the event being done via this method. The moment this method
+   * returns a list of events, input initialization is considered to be
+   * complete.
+   * 
+   * @return a list of events which are eventually routed to a
+   *         {@link org.apache.tez.dag.api.VertexManagerPlugin} for routing
+   * @throws Exception
+   */
+  public abstract List<Event> initialize()
+      throws Exception;
+
+  /**
+   * Handle events meant for the specific Initializer. This is a notification mechanism to inform
+   * the Initializer about events received. Extensive event processing should not be performed via
+   * this method call. Instead this should just be used as a notification method to the main
+   * initialization via the initialize method.
+   *
+   * @param events list of events
+   * @throws Exception
+   */
+  public abstract void handleInputInitializerEvent(List<InputInitializerEvent> events)
+      throws Exception;
+
+  /**
+   * Return ahe {@link org.apache.tez.runtime.api.InputInitializerContext}
+   * for this specific instance of the Initializer.
+   * 
+   * @return the {@link org.apache.tez.runtime.api.InputInitializerContext}
+   *         for the initializer
+   */
+  public final InputInitializerContext getContext() {
+    return this.initializerContext;
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializerContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializerContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializerContext.java
new file mode 100644
index 0000000..67b6732
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializerContext.java
@@ -0,0 +1,102 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.runtime.api;
+
+import javax.annotation.Nullable;
+
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.Resource;
+
+/**
+ * A context that provides information to the {@link InputInitializer}
+ */
+@Unstable
+public interface InputInitializerContext {
+
+  /**
+   * Get the YARN application id given to the Tez Application Master
+   * @return Application id
+   */
+  ApplicationId getApplicationId();
+  
+  /**
+   * Get the name of the DAG
+   * @return DAG name
+   */
+  String getDAGName();
+  
+  /**
+   * Get the name of the input
+   * @return Input name
+   */
+  String getInputName();
+
+  /**
+   * Get the user payload for the input
+   * @return User payload
+   */
+  @Nullable byte[] getInputUserPayload();
+  
+  /**
+   * Get the user payload for the initializer
+   * @return User payload
+   */
+  @Nullable byte[] getUserPayload();
+  
+  /**
+   * Get the number of tasks in this vertex. Maybe -1 if the vertex has not been
+   * initialized with a pre-determined number of tasks.
+   * @return number of tasks
+   */
+  int getNumTasks();
+  
+  /**
+   * Get the resource allocated to a task of this vertex
+   * @return Resource
+   */
+  Resource getVertexTaskResource();
+  
+  /**
+   * Get the total resource allocated to this vertex. If the DAG is running in 
+   * a busy cluster then it may have no resources available dedicated to it. The
+   * DAG may divide its resources among member vertices.
+   * @return Resource
+   */
+  Resource getTotalAvailableResource();
+  
+  /**
+   * Get the number of nodes in the cluster
+   * @return Number of nodes
+   */
+  int getNumClusterNodes();
+
+  /**
+   * @return DAG Attempt number
+   */
+  int getDAGAttemptNumber();
+
+  /**
+   * Get the number of tasks in the given vertex
+   * @param vertexName
+   * @return Total number of tasks in this vertex
+   */
+  public int getVertexNumTasks(String vertexName);
+
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/InputSpecUpdate.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/InputSpecUpdate.java b/tez-api/src/main/java/org/apache/tez/runtime/api/InputSpecUpdate.java
new file mode 100644
index 0000000..0b86ae9
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/InputSpecUpdate.java
@@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.runtime.api;
+
+import java.util.List;
+
+import org.apache.hadoop.classification.InterfaceAudience.Private;
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Update Input specs for Inputs running in a task. Allows setting the number of physical
+ * inputs for all work units if they have the same number of physical inputs, or individual
+ * numPhysicalInputs for each work unit.
+ * 
+ */
+@Unstable
+public class InputSpecUpdate {
+
+  private final boolean forAllWorkUnits;
+  private final List<Integer> numPhysicalInputs;
+
+  private final static InputSpecUpdate DEFAULT_SINGLE_PHYSICAL_INPUT_SPEC = createAllTaskInputSpecUpdate(1);
+  
+  /**
+   * Create an update instance where all work units (typically represented by
+   * {@link InputDataInformationEvent}) will have the same number of physical inputs.
+   * 
+   * @param numPhysicalInputs
+   *          the number of physical inputs for all work units which will use the LogicalInput
+   * @return
+   */
+  public static InputSpecUpdate createAllTaskInputSpecUpdate(int numPhysicalInputs) {
+    return new InputSpecUpdate(numPhysicalInputs);
+  }
+
+  /**
+   * Create an update instance where all work units (typically represented by
+   * {@link InputDataInformationEvent}) will have the same number of physical inputs.
+   * 
+   * @param perWorkUnitNumPhysicalInputs
+   *          A list containing one entry per work unit. The order in the list corresponds to task
+   *          index or equivalently the order of {@link InputDataInformationEvent}s being sent.
+   * @return
+   */
+  public static InputSpecUpdate createPerTaskInputSpecUpdate(
+      List<Integer> perWorkUnitNumPhysicalInputs) {
+    return new InputSpecUpdate(perWorkUnitNumPhysicalInputs);
+  }
+  
+  public static InputSpecUpdate getDefaultSinglePhysicalInputSpecUpdate() {
+    return DEFAULT_SINGLE_PHYSICAL_INPUT_SPEC;
+  }
+
+  private InputSpecUpdate(int numPhysicalInputs) {
+    this.forAllWorkUnits = true;
+    this.numPhysicalInputs = Lists.newArrayList(numPhysicalInputs);
+  }
+
+  private InputSpecUpdate(List<Integer> perWorkUnitNumPhysicalInputs) {
+    this.forAllWorkUnits = false;
+    this.numPhysicalInputs = Lists.newArrayList(perWorkUnitNumPhysicalInputs);
+  }
+
+  @Private
+  public int getNumPhysicalInputsForWorkUnit(int index) {
+    if (this.forAllWorkUnits) {
+      return numPhysicalInputs.get(0);
+    } else {
+      return numPhysicalInputs.get(index);
+    }
+  }
+  
+  @Private
+  /* Used for recovery serialization */
+  public boolean isForAllWorkUnits() {
+    return this.forAllWorkUnits;
+  }
+  
+  @Private
+  /* Used for recovery serialization */
+  public List<Integer> getAllNumPhysicalInputs() {
+    return numPhysicalInputs;
+  }
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/MergedInputContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/MergedInputContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/MergedInputContext.java
new file mode 100644
index 0000000..0d8ea61
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/MergedInputContext.java
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.runtime.api;
+
+import javax.annotation.Nullable;
+
+/**
+ * Context for {@link MergedLogicalInput}
+ * This interface is not supposed to be implemented by users
+ */
+public interface MergedInputContext {
+
+  @Nullable
+  public byte[] getUserPayload();
+  
+  /**
+   * Inform the framework that the specific Input is ready for consumption.
+   * 
+   * This method can be invoked multiple times.
+   */
+  public void inputIsReady();
+  
+  /**
+   * Get the work directories for the Input
+   * @return an array of work dirs
+   */
+  public String[] getWorkDirs();
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/MergedLogicalInput.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/MergedLogicalInput.java b/tez-api/src/main/java/org/apache/tez/runtime/api/MergedLogicalInput.java
index 656bb2c..fd698bd 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/MergedLogicalInput.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/MergedLogicalInput.java
@@ -30,7 +30,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
  * <p/>
  * <code>MergedLogicalInput</code> implementations must provide a 2 argument public constructor for
  * Tez to create the Input. The parameters to this constructor are 1) an instance of {@link
- * org.apache.tez.runtime.api.TezMergedInputContext} and 2) a list of constituent inputs. Tez will
+ * org.apache.tez.runtime.api.MergedInputContext} and 2) a list of constituent inputs. Tez will
  * take care of initializing and closing the Input after a {@link Processor} completes. </p>
  * <p/>
  */
@@ -40,7 +40,7 @@ public abstract class MergedLogicalInput implements LogicalInput {
   private AtomicBoolean notifiedInputReady = new AtomicBoolean(false);
   private List<Input> inputs;
   private final AtomicBoolean isStarted = new AtomicBoolean(false);
-  private final TezMergedInputContext context;
+  private final MergedInputContext context;
 
   /**
    * Constructor an instance of the MergedLogicalInputs. Classes extending this one to create a
@@ -48,11 +48,11 @@ public abstract class MergedLogicalInput implements LogicalInput {
    * the
    * class at runtime.
    *
-   * @param context the {@link org.apache.tez.runtime.api.TezMergedInputContext} which provides
+   * @param context the {@link org.apache.tez.runtime.api.MergedInputContext} which provides
    *                the Input with context information within the running task.
    * @param inputs  the list of constituen Inputs.
    */
-  public MergedLogicalInput(TezMergedInputContext context, List<Input> inputs) {
+  public MergedLogicalInput(MergedInputContext context, List<Input> inputs) {
     this.inputs = Collections.unmodifiableList(inputs);
     this.context = context;
   }
@@ -61,7 +61,7 @@ public abstract class MergedLogicalInput implements LogicalInput {
     return inputs;
   }
   
-  public final TezMergedInputContext getContext() {
+  public final MergedInputContext getContext() {
     return context;
   }
   

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitter.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitter.java b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitter.java
index 7e21345..0b40695 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitter.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitter.java
@@ -28,10 +28,10 @@ import org.apache.tez.dag.api.client.VertexStatus;
 @InterfaceStability.Unstable
 public abstract class OutputCommitter {
 
-  private final OutputCommitterContext outputCommitterContext;
+  private final OutputCommitterContext committerContext;
 
   /**
-   * Constructor an instance of the OutputCommitter. Classes extending this one to create an
+   * Constructor an instance of the OutputCommitter. Classes extending this to create a
    * OutputCommitter, must provide the same constructor so that Tez can create an instance of
    * the class at runtime.
    *
@@ -39,7 +39,7 @@ public abstract class OutputCommitter {
    *                         properties, etc
    */
   public OutputCommitter(OutputCommitterContext committerContext) {
-    this.outputCommitterContext = committerContext;
+    this.committerContext = committerContext;
   }
 
   /**
@@ -108,7 +108,7 @@ public abstract class OutputCommitter {
    * @return the {@link org.apache.tez.runtime.api.OutputCommitterContext} for the input
    */
   public final OutputCommitterContext getContext() {
-    return this.outputCommitterContext;
+    return this.committerContext;
   }
 
 }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitterContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitterContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitterContext.java
index 7189c2e..05c2fd7 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitterContext.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitterContext.java
@@ -20,15 +20,15 @@ package org.apache.tez.runtime.api;
 
 import javax.annotation.Nullable;
 
-import org.apache.hadoop.classification.InterfaceStability.Evolving;
 import org.apache.hadoop.classification.InterfaceStability.Unstable;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 
 /**
  * Context through which the OutputCommitter can access all the relevant
- * information that it needs.
+ * information that it needs. This interface is not supposed to be implemented
+ * by users
  */
-
+@Unstable
 public interface OutputCommitterContext {
 
   /**
@@ -77,8 +77,6 @@ public interface OutputCommitterContext {
    * Get Vertex Index in the DAG
    * @return Vertex index
    */
-  @Unstable
-  @Evolving
   public int getVertexIndex();
 
 }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/OutputContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputContext.java
new file mode 100644
index 0000000..d5796e2
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputContext.java
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.runtime.api;
+
+/**
+ * Context handle for the Output to initialize itself.
+ * This interface is not supposed to be implemented by users
+ */
+public interface OutputContext extends TaskContext {
+
+  /**
+   * Get the Vertex Name of the Destination that is the recipient of this
+   * Output's data
+   * @return Name of the Destination Vertex
+   */
+  public String getDestinationVertexName();
+  
+  /**
+   * Get the index of the output in the set of all outputs for the task. The 
+   * index will be consistent and valid only among the tasks of this vertex.
+   * @return index
+   */
+  public int getOutputIndex();
+
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/OutputFrameworkInterface.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputFrameworkInterface.java b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputFrameworkInterface.java
index 873fa0c..7f64f3e 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputFrameworkInterface.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputFrameworkInterface.java
@@ -30,7 +30,7 @@ import java.util.List;
  * <p/>
  *
  * During initialization, Outputs must specify an initial memory requirement via
- * {@link TezOutputContext}.requestInitialMemory
+ * {@link OutputContext}.requestInitialMemory
  * <p/>
  *
  */

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/ProcessorContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/ProcessorContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/ProcessorContext.java
new file mode 100644
index 0000000..6a28e1d
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/ProcessorContext.java
@@ -0,0 +1,74 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.runtime.api;
+
+import java.io.IOException;
+import java.util.Collection;
+
+/**
+ * Context handle for the Processor to initialize itself.
+ * This interface is not supposed to be implemented by users
+ */
+public interface ProcessorContext extends TaskContext {
+
+  /**
+   * Set the overall progress of this Task Attempt
+   * @param progress Progress in the range from [0.0 - 1.0f]
+   */
+  public void setProgress(float progress);
+
+  /**
+   * Check whether this attempt can commit its output
+   * @return true if commit allowed
+   * @throws IOException
+   */
+  public boolean canCommit() throws IOException;
+
+  /**
+   * Blocking call which returns when any of the specified Inputs is ready for
+   * consumption.
+   * 
+   * There can be multiple parallel invocations of this function - where each
+   * invocation blocks on the Inputs that it specifies.
+   * 
+   * If multiple Inputs are ready, any one of them may be returned by this
+   * method - including an Input which may have been returned in a previous
+   * call. If invoking this method multiple times, it's recommended to remove
+   * previously completed Inputs from the invocation list.
+   * 
+   * @param inputs
+   *          the list of Inputs to monitor
+   * @return the Input which is ready for consumption
+   * @throws InterruptedException
+   */
+  public Input waitForAnyInputReady(Collection<Input> inputs) throws InterruptedException;
+  
+  /**
+   * Blocking call which returns only after all of the specified Inputs are
+   * ready for consumption.
+   * 
+   * There can be multiple parallel invocations of this function - where each
+   * invocation blocks on the Inputs that it specifies.
+   * 
+   * @param inputs
+   *          the list of Inputs to monitor
+   * @throws InterruptedException
+   */
+  public void waitForAllInputsReady(Collection<Input> inputs) throws InterruptedException;
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/RootInputSpecUpdate.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/RootInputSpecUpdate.java b/tez-api/src/main/java/org/apache/tez/runtime/api/RootInputSpecUpdate.java
deleted file mode 100644
index 72adf78..0000000
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/RootInputSpecUpdate.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.runtime.api;
-
-import java.util.List;
-
-import org.apache.hadoop.classification.InterfaceAudience.Private;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
-
-import com.google.common.collect.Lists;
-
-/**
- * Update Input specs for Root Inputs running in a task. Allows setting the number of physical
- * inputs for all work units if they have the same number of physical inputs, or individual
- * numPhysicalInputs for each work unit.
- * 
- */
-public class RootInputSpecUpdate {
-
-  private final boolean forAllWorkUnits;
-  private final List<Integer> numPhysicalInputs;
-
-  private final static RootInputSpecUpdate DEFAULT_SINGLE_PHYSICAL_INPUT_SPEC = createAllTaskRootInputSpecUpdate(1);
-  
-  /**
-   * Create an update instance where all work units (typically represented by
-   * {@link RootInputDataInformationEvent}) will have the same number of physical inputs.
-   * 
-   * @param numPhysicalInputs
-   *          the number of physical inputs for all work units which will use the LogicalInput
-   * @return
-   */
-  public static RootInputSpecUpdate createAllTaskRootInputSpecUpdate(int numPhysicalInputs) {
-    return new RootInputSpecUpdate(numPhysicalInputs);
-  }
-
-  /**
-   * Create an update instance where all work units (typically represented by
-   * {@link RootInputDataInformationEvent}) will have the same number of physical inputs.
-   * 
-   * @param perWorkUnitNumPhysicalInputs
-   *          A list containing one entry per work unit. The order in the list corresponds to task
-   *          index or equivalently the order of RootInputDataInformationEvents being sent.
-   * @return
-   */
-  public static RootInputSpecUpdate createPerTaskRootInputSpecUpdate(
-      List<Integer> perWorkUnitNumPhysicalInputs) {
-    return new RootInputSpecUpdate(perWorkUnitNumPhysicalInputs);
-  }
-  
-  public static RootInputSpecUpdate getDefaultSinglePhysicalInputSpecUpdate() {
-    return DEFAULT_SINGLE_PHYSICAL_INPUT_SPEC;
-  }
-
-  private RootInputSpecUpdate(int numPhysicalInputs) {
-    this.forAllWorkUnits = true;
-    this.numPhysicalInputs = Lists.newArrayList(numPhysicalInputs);
-  }
-
-  private RootInputSpecUpdate(List<Integer> perWorkUnitNumPhysicalInputs) {
-    this.forAllWorkUnits = false;
-    this.numPhysicalInputs = Lists.newArrayList(perWorkUnitNumPhysicalInputs);
-  }
-
-  @Private
-  public int getNumPhysicalInputsForWorkUnit(int index) {
-    if (this.forAllWorkUnits) {
-      return numPhysicalInputs.get(0);
-    } else {
-      return numPhysicalInputs.get(index);
-    }
-  }
-  
-  @Private
-  /* Used for recovery serialization */
-  public boolean isForAllWorkUnits() {
-    return this.forAllWorkUnits;
-  }
-  
-  @Private
-  /* Used for recovery serialization */
-  public List<Integer> getAllNumPhysicalInputs() {
-    return numPhysicalInputs;
-  }
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/TaskContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/TaskContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/TaskContext.java
new file mode 100644
index 0000000..56c5cfd
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/TaskContext.java
@@ -0,0 +1,180 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.runtime.api;
+
+import java.nio.ByteBuffer;
+import java.util.List;
+
+import javax.annotation.Nullable;
+
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.tez.common.counters.TezCounters;
+import org.apache.tez.runtime.common.objectregistry.ObjectRegistry;
+
+/**
+ * Base interface for Context classes used to initialize the Input, Output
+ * and Processor instances.
+ * This interface is not supposed to be implemented by users
+ */
+public interface TaskContext {
+  // Scale the maximum events we fetch per RPC call to mitigate OOM issues
+  // on the ApplicationMaster when a thundering herd of reducers fetch events
+  // This should not be necessary after HADOOP-8942. TEZ-1398
+
+  /**
+   * Get the {@link ApplicationId} for the running app
+   * @return the {@link ApplicationId}
+   */
+  public ApplicationId getApplicationId();
+
+  /**
+   * Get the current DAG Attempt Number
+   * @return DAG Attempt Number
+   */
+  public int getDAGAttemptNumber();
+
+  /**
+   * Get the index of this Task among the tasks of this vertex
+   * @return Task Index
+   */
+  public int getTaskIndex();
+
+  /**
+   * Get the current Task Attempt Number
+   * @return Task Attempt Number
+   */
+  public int getTaskAttemptNumber();
+
+  /**
+   * Get the name of the DAG
+   * @return the DAG name
+   */
+  public String getDAGName();
+
+  /**
+   * Get the name of the Vertex in which the task is running
+   * @return Vertex Name
+   */
+  public String getTaskVertexName();
+  
+  /**
+   * Get the index of this task's vertex in the set of vertices in the DAG. This 
+   * is consistent and valid across all tasks/vertices in the same DAG.
+   * @return index
+   */
+  public int getTaskVertexIndex();
+
+  public TezCounters getCounters();
+
+  /**
+   * Send Events to the AM and/or dependent Vertices
+   * @param events Events to be sent
+   */
+  public void sendEvents(List<Event> events);
+
+  /**
+   * Get the User Payload for the Input/Output/Processor
+   * @return User Payload
+   */
+  @Nullable
+  public byte[] getUserPayload();
+
+  /**
+   * Get the work directories for the Input/Output/Processor
+   * @return an array of work dirs
+   */
+  public String[] getWorkDirs();
+
+  /**
+   * Returns an identifier which is unique to the specific Input, Processor or
+   * Output
+   *
+   * @return a unique identifier
+   */
+  public String getUniqueIdentifier();
+  
+  /**
+   * Returns a shared {@link ObjectRegistry} to hold user objects in memory 
+   * between tasks. 
+   * @return {@link ObjectRegistry}
+   */
+  public ObjectRegistry getObjectRegistry();
+
+  /**
+   * Report a fatal error to the framework. This will cause the entire task to
+   * fail and should not be used for reporting temporary or recoverable errors
+   *
+   * @param exception an exception representing the error
+   */
+  public void fatalError(@Nullable Throwable exception, @Nullable String message);
+
+  /**
+   * Returns meta-data for the specified service. As an example, when the MR
+   * ShuffleHandler is used - this would return the jobToken serialized as bytes
+   *
+   * @param serviceName
+   *          the name of the service for which meta-data is required
+   * @return a ByteBuffer representing the meta-data
+   */
+  public ByteBuffer getServiceConsumerMetaData(String serviceName);
+
+  /**
+   * Return Provider meta-data for the specified service As an example, when the
+   * MR ShuffleHandler is used - this would return the shuffle port serialized
+   * as bytes
+   *
+   * @param serviceName
+   *          the name of the service for which provider meta-data is required
+   * @return a ByteBuffer representing the meta-data
+   */
+  @Nullable
+  public ByteBuffer getServiceProviderMetaData(String serviceName);
+  
+  /**
+   * Request a specific amount of memory during initialization
+   * (initialize(..*Context)) The requester is notified of allocation via the
+   * provided callback handler.
+   * 
+   * Currently, (post TEZ-668) the caller will be informed about the available
+   * memory after initialization (I/P/O initialize(...)), and before the
+   * start/run invocation. There will be no other invocations on the callback.
+   * 
+   * This method can be called only once by any component. Calling it multiple
+   * times from within the same component will result in an error.
+   * 
+   * Each Input / Output must request memory. For Inputs / Outputs which do not
+   * have a specific ask, a null callback handler can be specified with a
+   * request size of 0.
+   * 
+   * @param size
+   *          request size in bytes.
+   * @param callbackHandler
+   *          the callback handler to be invoked once memory is assigned
+   */
+  public void requestInitialMemory(long size, MemoryUpdateCallback callbackHandler);
+  
+  /**
+   * Gets the total memory available to all components of the running task. This
+   * values will always be constant, and does not factor in any allocations.
+   * 
+   * @return the total available memory for all components of the task
+   */
+  public long getTotalMemoryAvailableToTask();
+    
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/TezInputContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/TezInputContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/TezInputContext.java
deleted file mode 100644
index 1f40ed9..0000000
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/TezInputContext.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.runtime.api;
-
-/**
- * Context handle for the Input to initialize itself.
- */
-public interface TezInputContext extends TezTaskContext {
-
-  /**
-   * Get the Vertex Name of the Source that generated data for this Input
-   * @return Name of the Source Vertex
-   */
-  public String getSourceVertexName();
-  
-  /**
-   * Get the index of the input in the set of all inputs for the task. The 
-   * index will be consistent and valid only among the tasks of this vertex.
-   * @return index
-   */
-  public int getInputIndex();
-  
-  /**
-   * Inform the framework that the specific Input is ready for consumption.
-   * 
-   * This method can be invoked multiple times.
-   */
-  public void inputIsReady();
-}


[3/5] TEZ-1237. Consolidate naming of API classes (bikas)

Posted by bi...@apache.org.
http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestRootInputVertexManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestRootInputVertexManager.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestRootInputVertexManager.java
index e55351e..b7907d6 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestRootInputVertexManager.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestRootInputVertexManager.java
@@ -30,8 +30,8 @@ import java.util.List;
 import org.apache.tez.dag.api.InputDescriptor;
 import org.apache.tez.dag.api.VertexManagerPluginContext;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.events.RootInputConfigureVertexTasksEvent;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
+import org.apache.tez.runtime.api.events.InputConfigureVertexTasksEvent;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
 import org.junit.Test;
 
 public class TestRootInputVertexManager {
@@ -48,14 +48,14 @@ public class TestRootInputVertexManager {
 
     InputDescriptor id1 = mock(InputDescriptor.class);
     List<Event> events1 = new LinkedList<Event>();
-    RootInputDataInformationEvent diEvent11 = new RootInputDataInformationEvent(0, null);
+    InputDataInformationEvent diEvent11 = new InputDataInformationEvent(0, null);
     events1.add(diEvent11);
     rootInputVertexManager.onRootVertexInitialized("input1", id1, events1);
     // All good so far, single input only.
 
     InputDescriptor id2 = mock(InputDescriptor.class);
     List<Event> events2 = new LinkedList<Event>();
-    RootInputDataInformationEvent diEvent21 = new RootInputDataInformationEvent(0, null);
+    InputDataInformationEvent diEvent21 = new InputDataInformationEvent(0, null);
     events2.add(diEvent21);
     try {
       // Should fail due to second input
@@ -79,7 +79,7 @@ public class TestRootInputVertexManager {
 
     InputDescriptor id1 = mock(InputDescriptor.class);
     List<Event> events1 = new LinkedList<Event>();
-    RootInputConfigureVertexTasksEvent diEvent11 = new RootInputConfigureVertexTasksEvent(1, null,
+    InputConfigureVertexTasksEvent diEvent11 = new InputConfigureVertexTasksEvent(1, null,
         null);
     events1.add(diEvent11);
     rootInputVertexManager.onRootVertexInitialized("input1", id1, events1);
@@ -87,7 +87,7 @@ public class TestRootInputVertexManager {
 
     InputDescriptor id2 = mock(InputDescriptor.class);
     List<Event> events2 = new LinkedList<Event>();
-    RootInputConfigureVertexTasksEvent diEvent21 = new RootInputConfigureVertexTasksEvent(1, null,
+    InputConfigureVertexTasksEvent diEvent21 = new InputConfigureVertexTasksEvent(1, null,
         null);
     events2.add(diEvent21);
     try {

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/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 f2adae8..4fec387 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
@@ -62,8 +62,8 @@ import org.apache.hadoop.yarn.event.EventHandler;
 import org.apache.hadoop.yarn.util.Clock;
 import org.apache.hadoop.yarn.util.SystemClock;
 import org.apache.tez.dag.api.DagTypeConverters;
-import org.apache.tez.dag.api.EdgeManager;
-import org.apache.tez.dag.api.EdgeManagerDescriptor;
+import org.apache.tez.dag.api.EdgeManagerPlugin;
+import org.apache.tez.dag.api.EdgeManagerPluginDescriptor;
 import org.apache.tez.dag.api.EdgeProperty;
 import org.apache.tez.dag.api.EdgeProperty.DataSourceType;
 import org.apache.tez.dag.api.EdgeProperty.SchedulingType;
@@ -134,15 +134,15 @@ import org.apache.tez.dag.utils.JavaProfilerOptions;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.OutputCommitter;
 import org.apache.tez.runtime.api.OutputCommitterContext;
-import org.apache.tez.runtime.api.RootInputSpecUpdate;
-import org.apache.tez.runtime.api.TezRootInputInitializer;
-import org.apache.tez.runtime.api.TezRootInputInitializerContext;
+import org.apache.tez.runtime.api.InputSpecUpdate;
+import org.apache.tez.runtime.api.InputInitializer;
+import org.apache.tez.runtime.api.InputInitializerContext;
 import org.apache.tez.runtime.api.events.CompositeDataMovementEvent;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
-import org.apache.tez.runtime.api.events.RootInputConfigureVertexTasksEvent;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
-import org.apache.tez.runtime.api.events.RootInputInitializerEvent;
-import org.apache.tez.runtime.api.events.RootInputUpdatePayloadEvent;
+import org.apache.tez.runtime.api.events.InputConfigureVertexTasksEvent;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
+import org.apache.tez.runtime.api.events.InputInitializerEvent;
+import org.apache.tez.runtime.api.events.InputUpdatePayloadEvent;
 import org.apache.tez.runtime.api.events.VertexManagerEvent;
 import org.apache.tez.test.EdgeManagerForTest;
 import org.apache.tez.test.VertexManagerPluginForTest;
@@ -169,7 +169,7 @@ public class TestVertexImpl {
   private static final Log LOG = LogFactory.getLog(TestVertexImpl.class);
 
   private boolean useCustomInitializer = false;
-  private TezRootInputInitializer customInitializer = null;
+  private InputInitializer customInitializer = null;
   
   private TezDAGID dagId;
   private ApplicationAttemptId appAttemptId;
@@ -1859,10 +1859,10 @@ public class TestVertexImpl {
     VertexImpl v1 = vertices.get("vertex1");
     startVertex(vertices.get("vertex2"));
     startVertex(v1);
-    EdgeManagerDescriptor mockEdgeManagerDescriptor =
-        new EdgeManagerDescriptor(EdgeManagerForTest.class.getName());
+    EdgeManagerPluginDescriptor mockEdgeManagerDescriptor =
+        new EdgeManagerPluginDescriptor(EdgeManagerForTest.class.getName());
 
-    Map<String, EdgeManagerDescriptor> edgeManagerDescriptors =
+    Map<String, EdgeManagerPluginDescriptor> edgeManagerDescriptors =
         Collections.singletonMap(
        v1.getName(), mockEdgeManagerDescriptor);
     Assert.assertTrue(v3.setParallelism(1, null, edgeManagerDescriptors, null));
@@ -1916,28 +1916,28 @@ public class TestVertexImpl {
   public void testSetCustomEdgeManager() throws UnsupportedEncodingException {
     initAllVertices(VertexState.INITED);
     Edge edge = edges.get("e4");
-    EdgeManager em = edge.getEdgeManager();
+    EdgeManagerPlugin em = edge.getEdgeManager();
     EdgeManagerForTest originalEm = (EdgeManagerForTest) em;
     Assert.assertTrue(Arrays.equals(edgePayload, originalEm.getEdgeManagerContext()
         .getUserPayload()));
 
     byte[] userPayload = new String("foo").getBytes();
-    EdgeManagerDescriptor edgeManagerDescriptor =
-        new EdgeManagerDescriptor(EdgeManagerForTest.class.getName());
+    EdgeManagerPluginDescriptor edgeManagerDescriptor =
+        new EdgeManagerPluginDescriptor(EdgeManagerForTest.class.getName());
     edgeManagerDescriptor.setUserPayload(userPayload);
 
     Vertex v3 = vertices.get("vertex3");
     Vertex v5 = vertices.get("vertex5"); // Vertex5 linked to v3 (v3 src, v5
                                          // dest)
 
-    Map<String, EdgeManagerDescriptor> edgeManagerDescriptors =
+    Map<String, EdgeManagerPluginDescriptor> edgeManagerDescriptors =
         Collections.singletonMap(v3.getName(), edgeManagerDescriptor);
     Assert.assertTrue(v5.setParallelism(v5.getTotalTasks() - 1, null,
         edgeManagerDescriptors, null)); // Must decrease.
 
     VertexImpl v5Impl = (VertexImpl) v5;
 
-    EdgeManager modifiedEdgeManager = v5Impl.sourceVertices.get(v3)
+    EdgeManagerPlugin modifiedEdgeManager = v5Impl.sourceVertices.get(v3)
         .getEdgeManager();
     Assert.assertNotNull(modifiedEdgeManager);
     Assert.assertTrue(modifiedEdgeManager instanceof EdgeManagerForTest);
@@ -2635,8 +2635,8 @@ public class TestVertexImpl {
     
     // setting the edge manager should vertex1 should not INIT/START it since
     // input initialization is not complete. v5 should be inited
-    EdgeManagerDescriptor mockEdgeManagerDescriptor =
-        new EdgeManagerDescriptor(EdgeManagerForTest.class.getName());
+    EdgeManagerPluginDescriptor mockEdgeManagerDescriptor =
+        new EdgeManagerPluginDescriptor(EdgeManagerForTest.class.getName());
     Edge e = v5.sourceVertices.get(v1);
     Assert.assertNull(e.getEdgeManager());
     e.setCustomEdgeManager(mockEdgeManagerDescriptor);
@@ -2677,7 +2677,7 @@ public class TestVertexImpl {
     Assert.assertEquals(VertexState.INITIALIZING, vertices.get("vertex4").getState());
     
     mockEdgeManagerDescriptor =
-        new EdgeManagerDescriptor(EdgeManagerForTest.class.getName());
+        new EdgeManagerPluginDescriptor(EdgeManagerForTest.class.getName());
     e = vertices.get("vertex6").sourceVertices.get(vertices.get("vertex4"));
     Assert.assertNull(e.getEdgeManager());
     e.setCustomEdgeManager(mockEdgeManagerDescriptor);
@@ -2843,7 +2843,7 @@ public class TestVertexImpl {
     Assert.assertFalse(initializer.initComplete.get());
 
     // Signal the initializer by sending an event - via vertex1
-    RootInputInitializerEvent event = new RootInputInitializerEvent("vertex2", "input1", null, 0);
+    InputInitializerEvent event = new InputInitializerEvent("vertex2", "input1", null, 0);
     TezEvent tezEvent = new TezEvent(event,
         new EventMetaData(EventProducerConsumerType.OUTPUT, "vertex1", null, null));
 
@@ -2910,7 +2910,7 @@ public class TestVertexImpl {
         new VertexManagerEvent("vertex2", new byte[0]), new EventMetaData(
             EventProducerConsumerType.PROCESSOR, "vertex1", "vertex2",
             ta0_t0_v1)));
-    events.add(new TezEvent(new RootInputDataInformationEvent(0, new byte[0]),
+    events.add(new TezEvent(new InputDataInformationEvent(0, new byte[0]),
         new EventMetaData(EventProducerConsumerType.INPUT, "vertex2",
             "NULL_VERTEX", null)));
     dispatcher.getEventHandler().handle(
@@ -2963,8 +2963,8 @@ public class TestVertexImpl {
     Assert.assertEquals(true, initializerManager1.hasShutDown);
     Assert.assertEquals(2, v1.getTotalTasks());
     Assert.assertEquals(payload, v1.getInputSpecList(0).get(0).getInputDescriptor().getUserPayload());
-    EdgeManagerDescriptor mockEdgeManagerDescriptor =
-        new EdgeManagerDescriptor(EdgeManagerForTest.class.getName());
+    EdgeManagerPluginDescriptor mockEdgeManagerDescriptor =
+        new EdgeManagerPluginDescriptor(EdgeManagerForTest.class.getName());
     Edge e = v2.sourceVertices.get(v1);
     Assert.assertNull(e.getEdgeManager());
     e.setCustomEdgeManager(mockEdgeManagerDescriptor);
@@ -3076,7 +3076,7 @@ public class TestVertexImpl {
   private static class VertexImplWithRunningInputInitializer extends VertexImpl {
 
     private RootInputInitializerManagerWithRunningInitializer rootInputInitializerManager;
-    private final TezRootInputInitializer presetInitializer;
+    private final InputInitializer presetInitializer;
 
     public VertexImplWithRunningInputInitializer(TezVertexID vertexId,
                                                  VertexPlan vertexPlan, String vertexName,
@@ -3087,7 +3087,7 @@ public class TestVertexImpl {
                                                  AppContext appContext,
                                                  VertexLocationHint vertexLocationHint,
                                                  DrainDispatcher dispatcher,
-                                                 TezRootInputInitializer presetInitializer) {
+                                                 InputInitializer presetInitializer) {
       super(vertexId, vertexPlan, vertexName, conf, eventHandler,
           taskAttemptListener, clock, thh, true,
           appContext, vertexLocationHint, null, javaProfilerOptions);
@@ -3155,10 +3155,10 @@ public class TestVertexImpl {
   private static class RootInputInitializerManagerWithRunningInitializer
       extends RootInputInitializerManager {
 
-    private final TezRootInputInitializer presetInitializer;
+    private final InputInitializer presetInitializer;
 
     public RootInputInitializerManagerWithRunningInitializer(Vertex vertex, AppContext appContext,
-                                                             TezRootInputInitializer presetInitializer) throws
+                                                             InputInitializer presetInitializer) throws
         IOException {
       super(vertex, appContext, UserGroupInformation.getCurrentUser());
       this.presetInitializer = presetInitializer;
@@ -3166,9 +3166,9 @@ public class TestVertexImpl {
 
 
     @Override
-    protected TezRootInputInitializer createInitializer(
+    protected InputInitializer createInitializer(
         RootInputLeafOutput<InputDescriptor, InputInitializerDescriptor> input,
-        TezRootInputInitializerContext context) {
+        InputInitializerContext context) {
       return presetInitializer;
     }
   }
@@ -3200,11 +3200,11 @@ public class TestVertexImpl {
     }
 
     @Override
-    protected TezRootInputInitializer createInitializer(
+    protected InputInitializer createInitializer(
         RootInputLeafOutput<InputDescriptor, InputInitializerDescriptor> input,
-        TezRootInputInitializerContext context) {
+        InputInitializerContext context) {
 
-      return new TezRootInputInitializer(context) {
+      return new InputInitializer(context) {
         @Override
         public List<Event> initialize() throws
             Exception {
@@ -3212,7 +3212,7 @@ public class TestVertexImpl {
         }
 
         @Override
-        public void handleInputInitializerEvent(List<RootInputInitializerEvent> events) throws
+        public void handleInputInitializerEvent(List<InputInitializerEvent> events) throws
             Exception {
         }
       };
@@ -3239,7 +3239,7 @@ public class TestVertexImpl {
 
     public void completeInputDistribution(byte[] payload) {
       List<Event> events = Lists.newArrayListWithCapacity(1);
-      RootInputUpdatePayloadEvent event = new RootInputUpdatePayloadEvent(payload);
+      InputUpdatePayloadEvent event = new InputUpdatePayloadEvent(payload);
       events.add(event);
       eventHandler.handle(new VertexEventRootInputInitialized(vertexID, inputs
           .get(0).getName(), events));
@@ -3250,11 +3250,11 @@ public class TestVertexImpl {
         List<TaskLocationHint> locationHints) {
       List<Event> events = Lists.newArrayListWithCapacity(targetTasks + 1);
 
-      RootInputConfigureVertexTasksEvent configEvent = new RootInputConfigureVertexTasksEvent(
+      InputConfigureVertexTasksEvent configEvent = new InputConfigureVertexTasksEvent(
           targetTasks, locationHints, null);
       events.add(configEvent);
       for (int i = 0; i < targetTasks; i++) {
-        RootInputDataInformationEvent diEvent = new RootInputDataInformationEvent(
+        InputDataInformationEvent diEvent = new InputDataInformationEvent(
             i, null);
         events.add(diEvent);
       }
@@ -3316,8 +3316,8 @@ public class TestVertexImpl {
     Assert.assertEquals(VertexState.INITIALIZING, vC.getState());
     
     // setting the edge manager should vA to start
-    EdgeManagerDescriptor mockEdgeManagerDescriptor =
-        new EdgeManagerDescriptor(EdgeManagerForTest.class.getName());
+    EdgeManagerPluginDescriptor mockEdgeManagerDescriptor =
+        new EdgeManagerPluginDescriptor(EdgeManagerForTest.class.getName());
     Edge e = vC.sourceVertices.get(vA);
     Assert.assertNull(e.getEdgeManager());
     e.setCustomEdgeManager(mockEdgeManagerDescriptor);
@@ -3326,7 +3326,7 @@ public class TestVertexImpl {
     Assert.assertEquals(VertexState.INITIALIZING, vB.getState());
     Assert.assertEquals(VertexState.INITIALIZING, vC.getState());
     
-    Map<String, EdgeManagerDescriptor> edges = Maps.newHashMap();
+    Map<String, EdgeManagerPluginDescriptor> edges = Maps.newHashMap();
     edges.put("B", mockEdgeManagerDescriptor);
     vC.setParallelism(2, vertexLocationHint, edges, null);
 
@@ -3419,22 +3419,22 @@ public class TestVertexImpl {
     @Override
     public void onRootVertexInitialized(String inputName, InputDescriptor inputDescriptor,
         List<Event> events) {
-      Map<String, RootInputSpecUpdate> map = new HashMap<String, RootInputSpecUpdate>();
+      Map<String, InputSpecUpdate> map = new HashMap<String, InputSpecUpdate>();
       if (getContext().getUserPayload()[0] == 0) {
-        map.put("input3", RootInputSpecUpdate.createAllTaskRootInputSpecUpdate(4));
+        map.put("input3", InputSpecUpdate.createAllTaskInputSpecUpdate(4));
       } else {
         List<Integer> pInputList = new LinkedList<Integer>();
         for (int i = 1; i <= NUM_TASKS; i++) {
           pInputList.add(i);
         }
-        map.put("input4", RootInputSpecUpdate.createPerTaskRootInputSpecUpdate(pInputList));
+        map.put("input4", InputSpecUpdate.createPerTaskInputSpecUpdate(pInputList));
       }
       getContext().setVertexParallelism(NUM_TASKS, null, null, map);
     }
   }
 
   @InterfaceAudience.Private
-  public static class EventHandlingRootInputInitializer extends TezRootInputInitializer {
+  public static class EventHandlingRootInputInitializer extends InputInitializer {
 
     final AtomicBoolean initStarted = new AtomicBoolean(false);
     final AtomicBoolean eventReceived = new AtomicBoolean(false);
@@ -3444,7 +3444,7 @@ public class TestVertexImpl {
     private final Condition eventCondition = lock.newCondition();
 
     public EventHandlingRootInputInitializer(
-        TezRootInputInitializerContext initializerContext) {
+        InputInitializerContext initializerContext) {
       super(initializerContext);
     }
 
@@ -3458,14 +3458,14 @@ public class TestVertexImpl {
         lock.unlock();
       }
       initComplete.set(true);
-      RootInputDataInformationEvent diEvent = new RootInputDataInformationEvent(0, new byte[]{0});
+      InputDataInformationEvent diEvent = new InputDataInformationEvent(0, new byte[]{0});
       List<Event> eventList = new LinkedList<Event>();
       eventList.add(diEvent);
       return eventList;
     }
 
     @Override
-    public void handleInputInitializerEvent(List<RootInputInitializerEvent> events) throws
+    public void handleInputInitializerEvent(List<InputInitializerEvent> events) throws
         Exception {
       eventReceived.set(true);
       lock.lock();

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java b/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java
index 5c79f22..6aa5b99 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java
@@ -27,7 +27,7 @@ import org.apache.hadoop.yarn.api.records.ContainerId;
 import org.apache.hadoop.yarn.api.records.NodeId;
 import org.apache.tez.common.ReflectionUtils;
 import org.apache.tez.common.counters.TezCounters;
-import org.apache.tez.dag.api.EdgeManagerDescriptor;
+import org.apache.tez.dag.api.EdgeManagerPluginDescriptor;
 import org.apache.tez.dag.api.VertexLocationHint;
 import org.apache.tez.dag.api.VertexLocationHint.TaskLocationHint;
 import org.apache.tez.dag.api.oldrecords.TaskAttemptState;
@@ -44,7 +44,7 @@ import org.apache.tez.dag.records.TezTaskAttemptID;
 import org.apache.tez.dag.records.TezTaskID;
 import org.apache.tez.dag.records.TezVertexID;
 import org.apache.tez.dag.recovery.records.RecoveryProtos.SummaryEventProto;
-import org.apache.tez.runtime.api.RootInputSpecUpdate;
+import org.apache.tez.runtime.api.InputSpecUpdate;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.api.impl.EventMetaData;
 import org.apache.tez.runtime.api.impl.EventMetaData.EventProducerConsumerType;
@@ -265,11 +265,11 @@ public class TestHistoryEventsProtoConversion {
 
   private void testVertexParallelismUpdatedEvent() throws Exception {
     {
-      RootInputSpecUpdate rootInputSpecUpdateBulk = RootInputSpecUpdate
-          .createAllTaskRootInputSpecUpdate(2);
-      RootInputSpecUpdate rootInputSpecUpdatePerTask = RootInputSpecUpdate
-          .createPerTaskRootInputSpecUpdate(Lists.newArrayList(1, 2, 3));
-      Map<String, RootInputSpecUpdate> rootInputSpecUpdates = new HashMap<String, RootInputSpecUpdate>();
+      InputSpecUpdate rootInputSpecUpdateBulk = InputSpecUpdate
+          .createAllTaskInputSpecUpdate(2);
+      InputSpecUpdate rootInputSpecUpdatePerTask = InputSpecUpdate
+          .createPerTaskInputSpecUpdate(Lists.newArrayList(1, 2, 3));
+      Map<String, InputSpecUpdate> rootInputSpecUpdates = new HashMap<String, InputSpecUpdate>();
       rootInputSpecUpdates.put("input1", rootInputSpecUpdateBulk);
       rootInputSpecUpdates.put("input2", rootInputSpecUpdatePerTask);
       VertexParallelismUpdatedEvent event =
@@ -287,8 +287,8 @@ public class TestHistoryEventsProtoConversion {
           deserializedEvent.getVertexLocationHint());
       Assert.assertEquals(event.getRootInputSpecUpdates().size(), deserializedEvent
           .getRootInputSpecUpdates().size());
-      RootInputSpecUpdate deserializedBulk = deserializedEvent.getRootInputSpecUpdates().get("input1");
-      RootInputSpecUpdate deserializedPerTask = deserializedEvent.getRootInputSpecUpdates().get("input2");
+      InputSpecUpdate deserializedBulk = deserializedEvent.getRootInputSpecUpdates().get("input1");
+      InputSpecUpdate deserializedPerTask = deserializedEvent.getRootInputSpecUpdates().get("input2");
       Assert.assertEquals(rootInputSpecUpdateBulk.isForAllWorkUnits(),
           deserializedBulk.isForAllWorkUnits());
       Assert.assertEquals(rootInputSpecUpdateBulk.getAllNumPhysicalInputs(),
@@ -300,10 +300,10 @@ public class TestHistoryEventsProtoConversion {
       logEvents(event, deserializedEvent);
     }
     {
-      Map<String,EdgeManagerDescriptor> sourceEdgeManagers
-          = new LinkedHashMap<String, EdgeManagerDescriptor>();
-      sourceEdgeManagers.put("foo", new EdgeManagerDescriptor("bar"));
-      sourceEdgeManagers.put("foo1", new EdgeManagerDescriptor("bar1").setUserPayload(
+      Map<String,EdgeManagerPluginDescriptor> sourceEdgeManagers
+          = new LinkedHashMap<String, EdgeManagerPluginDescriptor>();
+      sourceEdgeManagers.put("foo", new EdgeManagerPluginDescriptor("bar"));
+      sourceEdgeManagers.put("foo1", new EdgeManagerPluginDescriptor("bar1").setUserPayload(
           new String("payload").getBytes()));
       VertexParallelismUpdatedEvent event =
           new VertexParallelismUpdatedEvent(

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/test/java/org/apache/tez/runtime/task/TestTaskExecution.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/runtime/task/TestTaskExecution.java b/tez-dag/src/test/java/org/apache/tez/runtime/task/TestTaskExecution.java
index b733682..f4723d2 100644
--- a/tez-dag/src/test/java/org/apache/tez/runtime/task/TestTaskExecution.java
+++ b/tez-dag/src/test/java/org/apache/tez/runtime/task/TestTaskExecution.java
@@ -60,7 +60,7 @@ import org.apache.tez.dag.records.TezDAGID;
 import org.apache.tez.dag.records.TezTaskAttemptID;
 import org.apache.tez.dag.records.TezTaskID;
 import org.apache.tez.dag.records.TezVertexID;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.api.events.TaskAttemptCompletedEvent;
 import org.apache.tez.runtime.api.events.TaskAttemptFailedEvent;
 import org.apache.tez.runtime.api.impl.InputSpec;
@@ -389,7 +389,7 @@ public class TestTaskExecution {
     private boolean signalFatalAndLoop = false;
     private boolean signalFatalAndComplete = false;
 
-    public TestProcessor(TezProcessorContext context) {
+    public TestProcessor(ProcessorContext context) {
       super(context);
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/test/java/org/apache/tez/test/EdgeManagerForTest.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/test/EdgeManagerForTest.java b/tez-dag/src/test/java/org/apache/tez/test/EdgeManagerForTest.java
index a777022..ab227a8 100644
--- a/tez-dag/src/test/java/org/apache/tez/test/EdgeManagerForTest.java
+++ b/tez-dag/src/test/java/org/apache/tez/test/EdgeManagerForTest.java
@@ -21,20 +21,20 @@ package org.apache.tez.test;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.tez.dag.api.EdgeManager;
-import org.apache.tez.dag.api.EdgeManagerContext;
+import org.apache.tez.dag.api.EdgeManagerPlugin;
+import org.apache.tez.dag.api.EdgeManagerPluginContext;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.api.events.InputReadErrorEvent;
 
-public class EdgeManagerForTest extends EdgeManager {
+public class EdgeManagerForTest extends EdgeManagerPlugin {
 
   private byte[] userPayload;
 
-  public EdgeManagerForTest(EdgeManagerContext context) {
+  public EdgeManagerForTest(EdgeManagerPluginContext context) {
     super(context);
   }
 
-  public EdgeManagerContext getEdgeManagerContext() {
+  public EdgeManagerPluginContext getEdgeManagerContext() {
     return getContext();
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce-examples/src/main/java/org/apache/tez/examples/OrderedWordCount.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/examples/OrderedWordCount.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/examples/OrderedWordCount.java
index 217d0b7..6f4c40d 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/examples/OrderedWordCount.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/examples/OrderedWordCount.java
@@ -46,7 +46,7 @@ import org.apache.tez.mapreduce.examples.WordCount.TokenProcessor;
 import org.apache.tez.mapreduce.input.MRInput;
 import org.apache.tez.mapreduce.output.MROutput;
 import org.apache.tez.mapreduce.processor.SimpleMRProcessor;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.api.KeyValueWriter;
 import org.apache.tez.runtime.library.api.KeyValuesReader;
 import org.apache.tez.runtime.library.conf.OrderedPartitionedKVEdgeConfigurer;
@@ -58,7 +58,7 @@ import com.google.common.base.Preconditions;
 public class OrderedWordCount extends Configured implements Tool  {
   
   public static class SumProcessor extends SimpleProcessor {
-    public SumProcessor(TezProcessorContext context) {
+    public SumProcessor(ProcessorContext context) {
       super(context);
     }
 
@@ -86,7 +86,7 @@ public class OrderedWordCount extends Configured implements Tool  {
    */
   public static class NoOpSorter extends SimpleMRProcessor {
 
-    public NoOpSorter(TezProcessorContext context) {
+    public NoOpSorter(ProcessorContext context) {
       super(context);
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/BroadcastAndOneToOneExample.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/BroadcastAndOneToOneExample.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/BroadcastAndOneToOneExample.java
index 74b2cb9..e34001e 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/BroadcastAndOneToOneExample.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/BroadcastAndOneToOneExample.java
@@ -44,7 +44,7 @@ import org.apache.tez.dag.api.VertexManagerPluginDescriptor;
 import org.apache.tez.dag.api.client.DAGClient;
 import org.apache.tez.dag.api.client.DAGStatus;
 import org.apache.tez.dag.library.vertexmanager.InputReadyVertexManager;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.common.objectregistry.ObjectRegistry;
 import org.apache.tez.runtime.library.api.KeyValueReader;
 import org.apache.tez.runtime.library.api.KeyValueWriter;
@@ -58,7 +58,7 @@ public class BroadcastAndOneToOneExample extends Configured implements Tool {
   public static class InputProcessor extends SimpleProcessor {
     Text word = new Text();
 
-    public InputProcessor(TezProcessorContext context) {
+    public InputProcessor(ProcessorContext context) {
       super(context);
     }
 
@@ -84,7 +84,7 @@ public class BroadcastAndOneToOneExample extends Configured implements Tool {
   public static class OneToOneProcessor extends SimpleProcessor {
     Text word = new Text();
 
-    public OneToOneProcessor(TezProcessorContext context) {
+    public OneToOneProcessor(ProcessorContext context) {
       super(context);
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWord.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWord.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWord.java
index 817fff5..ff9f317 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWord.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWord.java
@@ -78,7 +78,7 @@ import org.apache.tez.mapreduce.input.MRInputLegacy;
 import org.apache.tez.mapreduce.output.MROutput;
 import org.apache.tez.processor.FilterByWordInputProcessor;
 import org.apache.tez.processor.FilterByWordOutputProcessor;
-import org.apache.tez.runtime.api.TezRootInputInitializer;
+import org.apache.tez.runtime.api.InputInitializer;
 import org.apache.tez.runtime.library.conf.UnorderedUnpartitionedKVEdgeConfigurer;
 
 import com.google.common.collect.Sets;
@@ -198,7 +198,7 @@ public class FilterLinesByWord extends Configured implements Tool {
     }
 
     // Configure the Input for stage1
-    Class<? extends TezRootInputInitializer> initializerClazz = generateSplitsInClient ? null
+    Class<? extends InputInitializer> initializerClazz = generateSplitsInClient ? null
         : MRInputAMSplitGenerator.class;
     stage1Vertex.addDataSource(
         "MRInput",

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWordOneToOne.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWordOneToOne.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWordOneToOne.java
index 43309b1..6047af9 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWordOneToOne.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/FilterLinesByWordOneToOne.java
@@ -71,7 +71,7 @@ import org.apache.tez.mapreduce.input.MRInputLegacy;
 import org.apache.tez.mapreduce.output.MROutput;
 import org.apache.tez.processor.FilterByWordInputProcessor;
 import org.apache.tez.processor.FilterByWordOutputProcessor;
-import org.apache.tez.runtime.api.TezRootInputInitializer;
+import org.apache.tez.runtime.api.InputInitializer;
 import org.apache.tez.runtime.library.conf.UnorderedUnpartitionedKVEdgeConfigurer;
 
 public class FilterLinesByWordOneToOne extends Configured implements Tool {
@@ -186,7 +186,7 @@ public class FilterLinesByWordOneToOne extends Configured implements Tool {
     }
 
     // Configure the Input for stage1
-    Class<? extends TezRootInputInitializer> initializerClazz = generateSplitsInClient ? null
+    Class<? extends InputInitializer> initializerClazz = generateSplitsInClient ? null
         : MRInputAMSplitGenerator.class;
     stage1Vertex.addDataSource(
         "MRInput",

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectDataGen.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectDataGen.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectDataGen.java
index 3e11870..a6a5dbd 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectDataGen.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectDataGen.java
@@ -48,7 +48,7 @@ import org.apache.tez.dag.api.client.DAGClient;
 import org.apache.tez.dag.api.client.DAGStatus;
 import org.apache.tez.mapreduce.output.MROutput;
 import org.apache.tez.mapreduce.processor.SimpleMRProcessor;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.api.KeyValueWriter;
 
 import com.google.common.base.Preconditions;
@@ -224,7 +224,7 @@ public class IntersectDataGen extends Configured implements Tool {
     long hashOutputFileSize;
     float overlapApprox = 0.2f;
 
-    public GenDataProcessor(TezProcessorContext context) {
+    public GenDataProcessor(ProcessorContext context) {
       super(context);
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectExample.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectExample.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectExample.java
index b226d9c..6caafce 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectExample.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectExample.java
@@ -52,7 +52,7 @@ import org.apache.tez.mapreduce.processor.SimpleMRProcessor;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.LogicalOutput;
 import org.apache.tez.runtime.api.Reader;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.api.KeyValueReader;
 import org.apache.tez.runtime.library.api.KeyValueWriter;
 import org.apache.tez.runtime.library.conf.UnorderedPartitionedKVEdgeConfigurer;
@@ -219,7 +219,7 @@ public class IntersectExample extends Configured implements Tool {
    * Reads key-values from the source and forwards the value as the key for the output
    */
   public static class ForwardingProcessor extends SimpleProcessor {
-    public ForwardingProcessor(TezProcessorContext context) {
+    public ForwardingProcessor(ProcessorContext context) {
       super(context);
     }
 
@@ -244,7 +244,7 @@ public class IntersectExample extends Configured implements Tool {
 
   public static class IntersectProcessor extends SimpleMRProcessor {
 
-    public IntersectProcessor(TezProcessorContext context) {
+    public IntersectProcessor(ProcessorContext context) {
       super(context);
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectValidate.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectValidate.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectValidate.java
index 5dd7d99..02a7563 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectValidate.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/IntersectValidate.java
@@ -47,7 +47,7 @@ import org.apache.tez.mapreduce.examples.IntersectExample.ForwardingProcessor;
 import org.apache.tez.mapreduce.input.MRInput;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.Reader;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.api.KeyValuesReader;
 import org.apache.tez.runtime.library.conf.OrderedPartitionedKVEdgeConfigurer;
 import org.apache.tez.runtime.library.partitioner.HashPartitioner;
@@ -215,7 +215,7 @@ public class IntersectValidate extends Configured implements Tool {
 
     private static final Log LOG = LogFactory.getLog(IntersectValidateProcessor.class);
 
-    public IntersectValidateProcessor(TezProcessorContext context) {
+    public IntersectValidateProcessor(ProcessorContext context) {
       super(context);
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
index ccf55af..583c360 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
@@ -74,7 +74,7 @@ import org.apache.tez.mapreduce.hadoop.MRHelpers;
 import org.apache.tez.mapreduce.hadoop.MRJobConfig;
 import org.apache.tez.mapreduce.processor.map.MapProcessor;
 import org.apache.tez.mapreduce.processor.reduce.ReduceProcessor;
-import org.apache.tez.runtime.api.TezRootInputInitializer;
+import org.apache.tez.runtime.api.InputInitializer;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.conf.OrderedPartitionedKVEdgeConfigurer;
 import org.apache.tez.runtime.library.partitioner.HashPartitioner;
@@ -223,7 +223,7 @@ public class TestOrderedWordCount extends Configured implements Tool {
       mapVertex.setTaskLocalFiles(commonLocalResources);
     }
 
-    Class<? extends TezRootInputInitializer> initializerClazz = generateSplitsInClient ? null
+    Class<? extends InputInitializer> initializerClazz = generateSplitsInClient ? null
         : MRInputAMSplitGenerator.class;
     MRHelpers.addMRInput(mapVertex, mapInputPayload,
         (initializerClazz==null) ? null :

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/UnionExample.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/UnionExample.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/UnionExample.java
index 90d3090..487d6ee 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/UnionExample.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/UnionExample.java
@@ -55,7 +55,7 @@ import org.apache.tez.mapreduce.output.MROutput;
 import org.apache.tez.mapreduce.processor.SimpleMRProcessor;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.Output;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.api.KeyValueReader;
 import org.apache.tez.runtime.library.api.KeyValueWriter;
 import org.apache.tez.runtime.library.api.KeyValuesReader;
@@ -72,7 +72,7 @@ public class UnionExample {
     IntWritable one = new IntWritable(1);
     Text word = new Text();
 
-    public TokenProcessor(TezProcessorContext context) {
+    public TokenProcessor(ProcessorContext context) {
       super(context);
     }
 
@@ -112,7 +112,7 @@ public class UnionExample {
   public static class UnionProcessor extends SimpleMRProcessor {
     IntWritable one = new IntWritable(1);
 
-    public UnionProcessor(TezProcessorContext context) {
+    public UnionProcessor(ProcessorContext context) {
       super(context);
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/WordCount.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/WordCount.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/WordCount.java
index d408146..1766b9e 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/WordCount.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/WordCount.java
@@ -43,7 +43,7 @@ import org.apache.tez.mapreduce.input.MRInput;
 import org.apache.tez.mapreduce.output.MROutput;
 import org.apache.tez.mapreduce.processor.SimpleMRProcessor;
 import org.apache.tez.runtime.api.Output;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.api.KeyValueReader;
 import org.apache.tez.runtime.library.api.KeyValueWriter;
 import org.apache.tez.runtime.library.api.KeyValuesReader;
@@ -60,7 +60,7 @@ public class WordCount extends Configured implements Tool {
     IntWritable one = new IntWritable(1);
     Text word = new Text();
 
-    public TokenProcessor(TezProcessorContext context) {
+    public TokenProcessor(ProcessorContext context) {
       super(context);
     }
 
@@ -84,7 +84,7 @@ public class WordCount extends Configured implements Tool {
   }
 
   public static class SumProcessor extends SimpleMRProcessor {
-    public SumProcessor(TezProcessorContext context) {
+    public SumProcessor(ProcessorContext context) {
       super(context);
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce-examples/src/main/java/org/apache/tez/processor/FilterByWordInputProcessor.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/processor/FilterByWordInputProcessor.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/processor/FilterByWordInputProcessor.java
index e88ed2f..aa7b836 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/processor/FilterByWordInputProcessor.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/processor/FilterByWordInputProcessor.java
@@ -36,7 +36,7 @@ import org.apache.tez.runtime.api.AbstractLogicalIOProcessor;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.LogicalOutput;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.api.KeyValueReader;
 import org.apache.tez.runtime.library.api.KeyValueWriter;
 import org.apache.tez.runtime.library.output.OnFileUnorderedKVOutput;
@@ -47,7 +47,7 @@ public class FilterByWordInputProcessor extends AbstractLogicalIOProcessor {
 
   private String filterWord;
 
-  public FilterByWordInputProcessor(TezProcessorContext context) {
+  public FilterByWordInputProcessor(ProcessorContext context) {
     super(context);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce-examples/src/main/java/org/apache/tez/processor/FilterByWordOutputProcessor.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/processor/FilterByWordOutputProcessor.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/processor/FilterByWordOutputProcessor.java
index c9247f4..9eca13f 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/processor/FilterByWordOutputProcessor.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/processor/FilterByWordOutputProcessor.java
@@ -28,7 +28,7 @@ import org.apache.tez.mapreduce.processor.map.MapProcessor;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.LogicalOutput;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.api.KeyValueReader;
 import org.apache.tez.runtime.library.api.KeyValueWriter;
 import org.apache.tez.runtime.library.input.ShuffledUnorderedKVInput;
@@ -38,7 +38,7 @@ public class FilterByWordOutputProcessor extends SimpleMRProcessor {
 
   private static final Log LOG = LogFactory.getLog(MapProcessor.class);
 
-  public FilterByWordOutputProcessor(TezProcessorContext context) {
+  public FilterByWordOutputProcessor(ProcessorContext context) {
     super(context);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/combine/MRCombiner.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/combine/MRCombiner.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/combine/MRCombiner.java
index 3bc8da2..96c03c6 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/combine/MRCombiner.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/combine/MRCombiner.java
@@ -46,9 +46,9 @@ import org.apache.tez.mapreduce.hadoop.MRConfig;
 import org.apache.tez.mapreduce.hadoop.MRJobConfig;
 import org.apache.tez.mapreduce.hadoop.mapred.MRCounters;
 import org.apache.tez.mapreduce.processor.MRTaskReporter;
-import org.apache.tez.runtime.api.TezInputContext;
-import org.apache.tez.runtime.api.TezOutputContext;
-import org.apache.tez.runtime.api.TezTaskContext;
+import org.apache.tez.runtime.api.InputContext;
+import org.apache.tez.runtime.api.OutputContext;
+import org.apache.tez.runtime.api.TaskContext;
 import org.apache.tez.runtime.library.common.ConfigUtils;
 import org.apache.tez.runtime.library.common.ValuesIterator;
 import org.apache.tez.runtime.library.common.combine.Combiner;
@@ -72,20 +72,20 @@ public class MRCombiner implements Combiner {
   private final MRTaskReporter reporter;
   private final TaskAttemptID mrTaskAttemptID;
 
-  public MRCombiner(TezTaskContext taskContext) throws IOException {
+  public MRCombiner(TaskContext taskContext) throws IOException {
     this.conf = TezUtils.createConfFromUserPayload(taskContext.getUserPayload());
 
-    assert(taskContext instanceof TezInputContext || taskContext instanceof TezOutputContext);
-    if (taskContext instanceof TezOutputContext) {
+    assert(taskContext instanceof InputContext || taskContext instanceof OutputContext);
+    if (taskContext instanceof OutputContext) {
       this.keyClass = ConfigUtils.getIntermediateOutputKeyClass(conf);
       this.valClass = ConfigUtils.getIntermediateOutputValueClass(conf);
       this.comparator = ConfigUtils.getIntermediateOutputKeyComparator(conf);
-      this.reporter = new MRTaskReporter((TezOutputContext)taskContext);
+      this.reporter = new MRTaskReporter((OutputContext)taskContext);
     } else {
       this.keyClass = ConfigUtils.getIntermediateInputKeyClass(conf);
       this.valClass = ConfigUtils.getIntermediateInputValueClass(conf);
       this.comparator = ConfigUtils.getIntermediateInputKeyComparator(conf);
-      this.reporter = new MRTaskReporter((TezInputContext)taskContext);
+      this.reporter = new MRTaskReporter((InputContext)taskContext);
     }
 
     this.useNewApi = ConfigUtils.useNewApi(conf);

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/common/MRInputAMSplitGenerator.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/common/MRInputAMSplitGenerator.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/common/MRInputAMSplitGenerator.java
index 6420005..4fd134b 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/common/MRInputAMSplitGenerator.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/common/MRInputAMSplitGenerator.java
@@ -35,21 +35,21 @@ import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRInputUserPayloadProto;
 import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRSplitProto;
 import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRSplitsProto;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.RootInputSpecUpdate;
-import org.apache.tez.runtime.api.TezRootInputInitializer;
-import org.apache.tez.runtime.api.TezRootInputInitializerContext;
-import org.apache.tez.runtime.api.events.RootInputConfigureVertexTasksEvent;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
-import org.apache.tez.runtime.api.events.RootInputInitializerEvent;
+import org.apache.tez.runtime.api.InputSpecUpdate;
+import org.apache.tez.runtime.api.InputInitializer;
+import org.apache.tez.runtime.api.InputInitializerContext;
+import org.apache.tez.runtime.api.events.InputConfigureVertexTasksEvent;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
+import org.apache.tez.runtime.api.events.InputInitializerEvent;
 
-public class MRInputAMSplitGenerator extends TezRootInputInitializer {
+public class MRInputAMSplitGenerator extends InputInitializer {
 
   private boolean sendSerializedEvents;
   
   private static final Log LOG = LogFactory.getLog(MRInputAMSplitGenerator.class);
 
   public MRInputAMSplitGenerator(
-      TezRootInputInitializerContext initializerContext) {
+      InputInitializerContext initializerContext) {
     super(initializerContext);
   }
 
@@ -117,9 +117,9 @@ public class MRInputAMSplitGenerator extends TezRootInputInitializer {
     List<Event> events = Lists.newArrayListWithCapacity(inputSplitInfo
         .getNumTasks() + 1);
     
-    RootInputConfigureVertexTasksEvent configureVertexEvent = new RootInputConfigureVertexTasksEvent(
+    InputConfigureVertexTasksEvent configureVertexEvent = new InputConfigureVertexTasksEvent(
         inputSplitInfo.getNumTasks(), inputSplitInfo.getTaskLocationHints(),
-        RootInputSpecUpdate.getDefaultSinglePhysicalInputSpecUpdate());
+        InputSpecUpdate.getDefaultSinglePhysicalInputSpecUpdate());
     events.add(configureVertexEvent);
 
     if (sendSerializedEvents) {
@@ -127,7 +127,7 @@ public class MRInputAMSplitGenerator extends TezRootInputInitializer {
       int count = 0;
       for (MRSplitProto mrSplit : splitsProto.getSplitsList()) {
         // Unnecessary array copy, can be avoided by using ByteBuffer instead of a raw array.
-        RootInputDataInformationEvent diEvent = new RootInputDataInformationEvent(count++,
+        InputDataInformationEvent diEvent = new InputDataInformationEvent(count++,
             mrSplit.toByteArray());
         events.add(diEvent);
       }
@@ -135,12 +135,12 @@ public class MRInputAMSplitGenerator extends TezRootInputInitializer {
       int count = 0;
       if (inputSplitInfo.holdsNewFormatSplits()) {
         for (org.apache.hadoop.mapreduce.InputSplit split : inputSplitInfo.getNewFormatSplits()) {
-          RootInputDataInformationEvent diEvent = new RootInputDataInformationEvent(count++, split);
+          InputDataInformationEvent diEvent = new InputDataInformationEvent(count++, split);
           events.add(diEvent);
         }
       } else {
         for (org.apache.hadoop.mapred.InputSplit split : inputSplitInfo.getOldFormatSplits()) {
-          RootInputDataInformationEvent diEvent = new RootInputDataInformationEvent(count++, split);
+          InputDataInformationEvent diEvent = new InputDataInformationEvent(count++, split);
           events.add(diEvent);
         }
       }
@@ -150,7 +150,7 @@ public class MRInputAMSplitGenerator extends TezRootInputInitializer {
   }
 
   @Override
-  public void handleInputInitializerEvent(List<RootInputInitializerEvent> events) throws Exception {
+  public void handleInputInitializerEvent(List<InputInitializerEvent> events) throws Exception {
     throw new UnsupportedOperationException("Not expecting to handle any events");
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/common/MRInputSplitDistributor.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/common/MRInputSplitDistributor.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/common/MRInputSplitDistributor.java
index 68c3f05..4be903f 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/common/MRInputSplitDistributor.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/common/MRInputSplitDistributor.java
@@ -32,16 +32,16 @@ import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRInputUserPayloadProto;
 import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRSplitProto;
 import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRSplitsProto;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezRootInputInitializer;
-import org.apache.tez.runtime.api.TezRootInputInitializerContext;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
-import org.apache.tez.runtime.api.events.RootInputInitializerEvent;
-import org.apache.tez.runtime.api.events.RootInputUpdatePayloadEvent;
+import org.apache.tez.runtime.api.InputInitializer;
+import org.apache.tez.runtime.api.InputInitializerContext;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
+import org.apache.tez.runtime.api.events.InputInitializerEvent;
+import org.apache.tez.runtime.api.events.InputUpdatePayloadEvent;
 
 import com.google.common.base.Stopwatch;
 import com.google.common.collect.Lists;
 
-public class MRInputSplitDistributor extends TezRootInputInitializer {
+public class MRInputSplitDistributor extends InputInitializer {
 
   private static final Log LOG = LogFactory.getLog(MRInputSplitDistributor.class);
   
@@ -49,7 +49,7 @@ public class MRInputSplitDistributor extends TezRootInputInitializer {
 
   private MRSplitsProto splitsProto;
 
-  public MRInputSplitDistributor(TezRootInputInitializerContext initializerContext) {
+  public MRInputSplitDistributor(InputInitializerContext initializerContext) {
     super(initializerContext);
   }
 
@@ -80,7 +80,7 @@ public class MRInputSplitDistributor extends TezRootInputInitializer {
     updatedPayloadBuilder.clearSplits();
 
     List<Event> events = Lists.newArrayListWithCapacity(this.splitsProto.getSplitsCount() + 1);
-    RootInputUpdatePayloadEvent updatePayloadEvent = new RootInputUpdatePayloadEvent(
+    InputUpdatePayloadEvent updatePayloadEvent = new InputUpdatePayloadEvent(
         updatedPayloadBuilder.build().toByteArray());
 
     events.add(updatePayloadEvent);
@@ -88,21 +88,21 @@ public class MRInputSplitDistributor extends TezRootInputInitializer {
 
     for (MRSplitProto mrSplit : this.splitsProto.getSplitsList()) {
 
-      RootInputDataInformationEvent diEvent;
+      InputDataInformationEvent diEvent;
 
       if (sendSerializedEvents) {
         // Unnecessary array copy, can be avoided by using ByteBuffer instead of
         // a raw array.
-        diEvent = new RootInputDataInformationEvent(count++, mrSplit.toByteArray());
+        diEvent = new InputDataInformationEvent(count++, mrSplit.toByteArray());
       } else {
         if (useNewApi) {
           org.apache.hadoop.mapreduce.InputSplit newInputSplit = MRInputUtils
               .getNewSplitDetailsFromEvent(mrSplit, conf);
-          diEvent = new RootInputDataInformationEvent(count++, newInputSplit);
+          diEvent = new InputDataInformationEvent(count++, newInputSplit);
         } else {
           org.apache.hadoop.mapred.InputSplit oldInputSplit = MRInputUtils
               .getOldSplitDetailsFromEvent(mrSplit, conf);
-          diEvent = new RootInputDataInformationEvent(count++, oldInputSplit);
+          diEvent = new InputDataInformationEvent(count++, oldInputSplit);
         }
       }
       events.add(diEvent);
@@ -112,7 +112,7 @@ public class MRInputSplitDistributor extends TezRootInputInitializer {
   }
 
   @Override
-  public void handleInputInitializerEvent(List<RootInputInitializerEvent> events) throws Exception {
+  public void handleInputInitializerEvent(List<InputInitializerEvent> events) throws Exception {
     throw new UnsupportedOperationException("Not expecting to handle any events");
   }
 }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/mapreduce/MapContextImpl.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/mapreduce/MapContextImpl.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/mapreduce/MapContextImpl.java
index 0014b1d..87b0b31 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/mapreduce/MapContextImpl.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/mapreduce/MapContextImpl.java
@@ -31,7 +31,7 @@ import org.apache.hadoop.mapreduce.OutputCommitter;
 import org.apache.hadoop.mapreduce.RecordReader;
 import org.apache.hadoop.mapreduce.RecordWriter;
 import org.apache.hadoop.mapreduce.TaskAttemptID;
-import org.apache.tez.runtime.api.TezTaskContext;
+import org.apache.tez.runtime.api.TaskContext;
 
 /**
  * The context that is given to the {@link Mapper}.
@@ -52,7 +52,7 @@ public class MapContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
                         RecordReader<KEYIN,VALUEIN> reader,
                         RecordWriter<KEYOUT,VALUEOUT> writer,
                         OutputCommitter committer,
-                        TezTaskContext context,
+                        TaskContext context,
                         InputSplit split, Reporter reporter) {
     super(conf, taskid, writer, committer, context, reporter);
     this.reader = reader;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/mapreduce/TaskInputOutputContextImpl.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/mapreduce/TaskInputOutputContextImpl.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/mapreduce/TaskInputOutputContextImpl.java
index 44e30a8..cad73a8 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/mapreduce/TaskInputOutputContextImpl.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/hadoop/mapreduce/TaskInputOutputContextImpl.java
@@ -30,7 +30,7 @@ import org.apache.hadoop.mapreduce.RecordWriter;
 import org.apache.hadoop.mapreduce.Reducer;
 import org.apache.hadoop.mapreduce.TaskAttemptID;
 import org.apache.hadoop.mapreduce.TaskInputOutputContext;
-import org.apache.tez.runtime.api.TezTaskContext;
+import org.apache.tez.runtime.api.TaskContext;
 
 /**
  * A context object that allows input and output from the task. It is only
@@ -51,7 +51,7 @@ public abstract class TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
   public TaskInputOutputContextImpl(Configuration conf, TaskAttemptID taskid,
                                     RecordWriter<KEYOUT,VALUEOUT> output,
                                     OutputCommitter committer,
-                                    TezTaskContext context, Reporter reporter) {
+                                    TaskContext context, Reporter reporter) {
     super(conf, taskid, context.getCounters(), reporter);
     this.output = output;
     this.committer = committer;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MRInput.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MRInput.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MRInput.java
index 38c5d32..1f4ed8a 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MRInput.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MRInput.java
@@ -55,8 +55,8 @@ import org.apache.tez.mapreduce.lib.MRReaderMapred;
 import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRSplitProto;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.Input;
-import org.apache.tez.runtime.api.TezInputContext;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
+import org.apache.tez.runtime.api.InputContext;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
 import org.apache.tez.runtime.library.api.KeyValueReader;
 
 import com.google.common.base.Preconditions;
@@ -279,7 +279,7 @@ public class MRInput extends MRInputBase {
   @Private
   volatile boolean splitInfoViaEvents;
 
-  public MRInput(TezInputContext inputContext, int numPhysicalInputs) {
+  public MRInput(InputContext inputContext, int numPhysicalInputs) {
     super(inputContext, numPhysicalInputs);
   }
 
@@ -369,12 +369,12 @@ public class MRInput extends MRInputBase {
               + eventReceived);
     }
     Event event = inputEvents.iterator().next();
-    Preconditions.checkArgument(event instanceof RootInputDataInformationEvent,
+    Preconditions.checkArgument(event instanceof InputDataInformationEvent,
         getClass().getSimpleName()
             + " can only handle a single event of type: "
-            + RootInputDataInformationEvent.class.getSimpleName());
+            + InputDataInformationEvent.class.getSimpleName());
 
-    processSplitEvent((RootInputDataInformationEvent)event);
+    processSplitEvent((InputDataInformationEvent)event);
   }
 
   @Override
@@ -402,7 +402,7 @@ public class MRInput extends MRInputBase {
     return mrReader.getProgress();
   }
 
-  void processSplitEvent(RootInputDataInformationEvent event)
+  void processSplitEvent(InputDataInformationEvent event)
       throws IOException {
     rrLock.lock();
     try {
@@ -429,7 +429,7 @@ public class MRInput extends MRInputBase {
   }
 
   @Private
-  void initFromEvent(RootInputDataInformationEvent initEvent)
+  void initFromEvent(InputDataInformationEvent initEvent)
       throws IOException {
     rrLock.lock();
     try {
@@ -439,7 +439,7 @@ public class MRInput extends MRInputBase {
     }
   }
   
-  private void initFromEventInternal(RootInputDataInformationEvent initEvent) throws IOException {
+  private void initFromEventInternal(InputDataInformationEvent initEvent) throws IOException {
     LOG.info("Initializing RecordReader from event");
     Preconditions.checkState(initEvent != null, "InitEvent must be specified");
     MRSplitProto splitProto = MRSplitProto.parseFrom(initEvent.getUserPayload());

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MRInputLegacy.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MRInputLegacy.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MRInputLegacy.java
index c21485e..6915dde 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MRInputLegacy.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MRInputLegacy.java
@@ -31,15 +31,15 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.mapred.InputSplit;
 import org.apache.hadoop.mapred.RecordReader;
 import org.apache.tez.mapreduce.input.MRInput.MRInputConfigurer;
-import org.apache.tez.runtime.api.TezInputContext;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
+import org.apache.tez.runtime.api.InputContext;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
 
 @LimitedPrivate("Hive")
 public class MRInputLegacy extends MRInput {
 
   private static final Log LOG = LogFactory.getLog(MRInputLegacy.class);
   
-  private RootInputDataInformationEvent initEvent;
+  private InputDataInformationEvent initEvent;
   private volatile boolean inited = false;
   private ReentrantLock eventLock = new ReentrantLock();
   private Condition eventCondition = eventLock.newCondition();
@@ -68,7 +68,7 @@ public class MRInputLegacy extends MRInput {
         MRInputLegacy.class.getName());
   }
   
-  public MRInputLegacy(TezInputContext inputContext, int numPhysicalInputs) {
+  public MRInputLegacy(InputContext inputContext, int numPhysicalInputs) {
     super(inputContext, numPhysicalInputs);
   }
 
@@ -111,7 +111,7 @@ public class MRInputLegacy extends MRInput {
   }
   
   @Override
-  void processSplitEvent(RootInputDataInformationEvent event) {
+  void processSplitEvent(InputDataInformationEvent event) {
     eventLock.lock();
     try {
       initEvent = event;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MultiMRInput.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MultiMRInput.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MultiMRInput.java
index c6ef81f..f3e414c 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MultiMRInput.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/MultiMRInput.java
@@ -38,15 +38,15 @@ import org.apache.tez.mapreduce.lib.MRReaderMapred;
 import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRSplitProto;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.Reader;
-import org.apache.tez.runtime.api.TezInputContext;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
+import org.apache.tez.runtime.api.InputContext;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
 import org.apache.tez.runtime.library.api.KeyValueReader;
 
 public class MultiMRInput extends MRInputBase {
 
   private static final Log LOG = LogFactory.getLog(MultiMRInput.class);
 
-  public MultiMRInput(TezInputContext inputContext, int numPhysicalInputs) {
+  public MultiMRInput(InputContext inputContext, int numPhysicalInputs) {
     super(inputContext, numPhysicalInputs);
   }
 
@@ -94,7 +94,7 @@ public class MultiMRInput extends MRInputBase {
       Preconditions.checkState(eventCount.get() + inputEvents.size() <= getNumPhysicalInputs(),
           "Unexpected event. All physical sources already initialized");
       for (Event event : inputEvents) {
-        MRReader reader = initFromEvent((RootInputDataInformationEvent) event);
+        MRReader reader = initFromEvent((InputDataInformationEvent) event);
         readers.add(reader);
         if (eventCount.incrementAndGet() == getNumPhysicalInputs()) {
           getContext().inputIsReady();
@@ -106,7 +106,7 @@ public class MultiMRInput extends MRInputBase {
     }
   }
 
-  private MRReader initFromEvent(RootInputDataInformationEvent event) throws IOException {
+  private MRReader initFromEvent(InputDataInformationEvent event) throws IOException {
     Preconditions.checkState(event != null, "Event must be specified");
     LOG.info("Initializing Reader: " + eventCount.get());
     MRSplitProto splitProto = MRSplitProto.parseFrom(event.getUserPayload());

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/base/MRInputBase.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/base/MRInputBase.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/base/MRInputBase.java
index 190d439..32a3934 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/base/MRInputBase.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/input/base/MRInputBase.java
@@ -34,7 +34,7 @@ import org.apache.tez.mapreduce.protos.MRRuntimeProtos;
 import org.apache.tez.runtime.api.AbstractLogicalInput;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.Reader;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 
 import java.io.IOException;
 import java.util.List;
@@ -46,7 +46,7 @@ public abstract class MRInputBase extends AbstractLogicalInput {
   protected JobConf jobConf;
   protected TezCounter inputRecordCounter;
 
-  public MRInputBase(TezInputContext inputContext, int numPhysicalInputs) {
+  public MRInputBase(InputContext inputContext, int numPhysicalInputs) {
     super(inputContext, numPhysicalInputs);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/output/MROutput.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/output/MROutput.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/output/MROutput.java
index 709a2c4..34c5b9c 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/output/MROutput.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/output/MROutput.java
@@ -56,7 +56,7 @@ import org.apache.tez.mapreduce.hadoop.mapreduce.TaskAttemptContextImpl;
 import org.apache.tez.mapreduce.processor.MRTaskReporter;
 import org.apache.tez.runtime.api.AbstractLogicalOutput;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.library.api.KeyValueWriter;
 
 
@@ -217,7 +217,7 @@ public class MROutput extends AbstractLogicalOutput {
 
   protected OutputCommitter committer;
 
-  public MROutput(TezOutputContext outputContext, int numPhysicalOutputs) {
+  public MROutput(OutputContext outputContext, int numPhysicalOutputs) {
     super(outputContext, numPhysicalOutputs);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/output/MROutputLegacy.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/output/MROutputLegacy.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/output/MROutputLegacy.java
index f6ac07f..b2a853e 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/output/MROutputLegacy.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/output/MROutputLegacy.java
@@ -19,11 +19,11 @@
 package org.apache.tez.mapreduce.output;
 
 import org.apache.hadoop.mapreduce.OutputCommitter;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 
 public class MROutputLegacy extends MROutput {
 
-  public MROutputLegacy(TezOutputContext outputContext, int numPhysicalOutputs) {
+  public MROutputLegacy(OutputContext outputContext, int numPhysicalOutputs) {
     super(outputContext, numPhysicalOutputs);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/MRTask.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/MRTask.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/MRTask.java
index 05eea2b..4e22ca0 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/MRTask.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/MRTask.java
@@ -79,7 +79,7 @@ import org.apache.tez.mapreduce.output.MROutputLegacy;
 import org.apache.tez.runtime.api.AbstractLogicalIOProcessor;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.LogicalOutput;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.common.Constants;
 import org.apache.tez.runtime.library.common.sort.impl.TezRawKeyValueIterator;
 
@@ -95,7 +95,7 @@ public abstract class MRTask extends AbstractLogicalIOProcessor {
 
   // Current counters
   transient TezCounters counters;
-  protected TezProcessorContext processorContext;
+  protected ProcessorContext processorContext;
   protected TaskAttemptID taskAttemptId;
   protected Progress progress = new Progress();
   protected SecretKey jobTokenSecret;
@@ -119,7 +119,7 @@ public abstract class MRTask extends AbstractLogicalIOProcessor {
   protected MRTaskReporter mrReporter;
   protected boolean useNewApi;
 
-  public MRTask(TezProcessorContext processorContext, boolean isMap) {
+  public MRTask(ProcessorContext processorContext, boolean isMap) {
     super(processorContext);
     this.isMap = isMap;
   }
@@ -307,7 +307,7 @@ public abstract class MRTask extends AbstractLogicalIOProcessor {
     }
   }
 
-  public TezProcessorContext getUmbilical() {
+  public ProcessorContext getUmbilical() {
     return this.processorContext;
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/MRTaskReporter.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/MRTaskReporter.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/MRTaskReporter.java
index c3f7bc9..2fa75bf 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/MRTaskReporter.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/MRTaskReporter.java
@@ -26,10 +26,10 @@ import org.apache.hadoop.mapred.Reporter;
 import org.apache.tez.common.counters.TezCounter;
 import org.apache.tez.mapreduce.hadoop.mapred.MRCounters;
 import org.apache.tez.mapreduce.hadoop.mapred.MRReporter;
-import org.apache.tez.runtime.api.TezInputContext;
-import org.apache.tez.runtime.api.TezOutputContext;
-import org.apache.tez.runtime.api.TezProcessorContext;
-import org.apache.tez.runtime.api.TezTaskContext;
+import org.apache.tez.runtime.api.InputContext;
+import org.apache.tez.runtime.api.OutputContext;
+import org.apache.tez.runtime.api.ProcessorContext;
+import org.apache.tez.runtime.api.TaskContext;
 
 @InterfaceAudience.Private
 @InterfaceStability.Unstable
@@ -37,25 +37,25 @@ public class MRTaskReporter
     extends org.apache.hadoop.mapreduce.StatusReporter
     implements Reporter {
 
-  private final TezTaskContext context;
+  private final TaskContext context;
   private final boolean isProcessorContext;
   private final MRReporter reporter;
 
   private InputSplit split = null;
 
-  public MRTaskReporter(TezProcessorContext context) {
+  public MRTaskReporter(ProcessorContext context) {
     this.context = context;
     this.reporter = new MRReporter(context.getCounters());
     this.isProcessorContext = true;
   }
 
-  public MRTaskReporter(TezOutputContext context) {
+  public MRTaskReporter(OutputContext context) {
     this.context = context;
     this.reporter = new MRReporter(context.getCounters());
     this.isProcessorContext = false;
   }
   
-  public MRTaskReporter(TezInputContext context) {
+  public MRTaskReporter(InputContext context) {
     this.context= context;
     this.reporter = new MRReporter(context.getCounters());
     this.isProcessorContext = false;
@@ -64,7 +64,7 @@ public class MRTaskReporter
   public void setProgress(float progress) {
     reporter.setProgress(progress);
     if (isProcessorContext) {
-      ((TezProcessorContext)context).setProgress(progress);
+      ((ProcessorContext)context).setProgress(progress);
     } else {
       // TODO FIXME NEWTEZ - will MROutput's reporter use this api?
     }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/SimpleMRProcessor.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/SimpleMRProcessor.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/SimpleMRProcessor.java
index e2a900a..7be2407 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/SimpleMRProcessor.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/SimpleMRProcessor.java
@@ -24,7 +24,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.tez.mapreduce.output.MROutput;
 import org.apache.tez.runtime.api.LogicalOutput;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.processor.SimpleProcessor;
 
 import com.google.common.collect.Lists;
@@ -32,7 +32,7 @@ import com.google.common.collect.Lists;
 public abstract class SimpleMRProcessor extends SimpleProcessor {
   private static final Log LOG = LogFactory.getLog(SimpleMRProcessor.class);
 
-  public SimpleMRProcessor(TezProcessorContext context) {
+  public SimpleMRProcessor(ProcessorContext context) {
     super(context);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/map/MapProcessor.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/map/MapProcessor.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/map/MapProcessor.java
index 0b6dfc0..f0010a0 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/map/MapProcessor.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/map/MapProcessor.java
@@ -46,7 +46,7 @@ import org.apache.tez.mapreduce.processor.MRTaskReporter;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.LogicalOutput;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.api.KeyValueReader;
 import org.apache.tez.runtime.library.api.KeyValueWriter;
 import org.apache.tez.runtime.library.output.OnFileSortedOutput;
@@ -56,7 +56,7 @@ public class MapProcessor extends MRTask{
 
   private static final Log LOG = LogFactory.getLog(MapProcessor.class);
 
-  public MapProcessor(TezProcessorContext processorContext) {
+  public MapProcessor(ProcessorContext processorContext) {
     super(processorContext, true);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/reduce/ReduceProcessor.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/reduce/ReduceProcessor.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/reduce/ReduceProcessor.java
index 41954f5..e1a5b8a 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/reduce/ReduceProcessor.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/reduce/ReduceProcessor.java
@@ -44,7 +44,7 @@ import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.Input;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.LogicalOutput;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.api.KeyValueWriter;
 import org.apache.tez.runtime.library.api.KeyValuesReader;
 import org.apache.tez.runtime.library.common.ConfigUtils;
@@ -61,7 +61,7 @@ public class ReduceProcessor extends MRTask {
   private Counter reduceInputKeyCounter;
   private Counter reduceInputValueCounter;
 
-  public ReduceProcessor(TezProcessorContext processorContext) {
+  public ReduceProcessor(ProcessorContext processorContext) {
     super(processorContext, false);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/common/TestMRInputSplitDistributor.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/common/TestMRInputSplitDistributor.java b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/common/TestMRInputSplitDistributor.java
index 5573d77..68a5fa4 100644
--- a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/common/TestMRInputSplitDistributor.java
+++ b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/common/TestMRInputSplitDistributor.java
@@ -40,9 +40,9 @@ import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRInputUserPayloadProto;
 import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRSplitProto;
 import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRSplitsProto;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezRootInputInitializerContext;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
-import org.apache.tez.runtime.api.events.RootInputUpdatePayloadEvent;
+import org.apache.tez.runtime.api.InputInitializerContext;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
+import org.apache.tez.runtime.api.events.InputUpdatePayloadEvent;
 import org.junit.Test;
 
 import com.google.protobuf.ByteString;
@@ -67,18 +67,18 @@ public class TestMRInputSplitDistributor {
     payloadProto.setConfigurationBytes(confByteString);
     byte[] userPayload = payloadProto.build().toByteArray();
 
-    TezRootInputInitializerContext context = new TezRootInputInitializerContextForTest(userPayload);
+    InputInitializerContext context = new TezRootInputInitializerContextForTest(userPayload);
     MRInputSplitDistributor splitDist = new MRInputSplitDistributor(context);
 
     List<Event> events = splitDist.initialize();
 
     assertEquals(3, events.size());
-    assertTrue(events.get(0) instanceof RootInputUpdatePayloadEvent);
-    assertTrue(events.get(1) instanceof RootInputDataInformationEvent);
-    assertTrue(events.get(2) instanceof RootInputDataInformationEvent);
+    assertTrue(events.get(0) instanceof InputUpdatePayloadEvent);
+    assertTrue(events.get(1) instanceof InputDataInformationEvent);
+    assertTrue(events.get(2) instanceof InputDataInformationEvent);
 
-    RootInputDataInformationEvent diEvent1 = (RootInputDataInformationEvent) (events.get(1));
-    RootInputDataInformationEvent diEvent2 = (RootInputDataInformationEvent) (events.get(2));
+    InputDataInformationEvent diEvent1 = (InputDataInformationEvent) (events.get(1));
+    InputDataInformationEvent diEvent2 = (InputDataInformationEvent) (events.get(2));
 
     assertNull(diEvent1.getDeserializedUserPayload());
     assertNull(diEvent2.getDeserializedUserPayload());
@@ -115,18 +115,18 @@ public class TestMRInputSplitDistributor {
     payloadProto.setConfigurationBytes(confByteString);
     byte[] userPayload = payloadProto.build().toByteArray();
 
-    TezRootInputInitializerContext context = new TezRootInputInitializerContextForTest(userPayload);
+    InputInitializerContext context = new TezRootInputInitializerContextForTest(userPayload);
     MRInputSplitDistributor splitDist = new MRInputSplitDistributor(context);
 
     List<Event> events = splitDist.initialize();
 
     assertEquals(3, events.size());
-    assertTrue(events.get(0) instanceof RootInputUpdatePayloadEvent);
-    assertTrue(events.get(1) instanceof RootInputDataInformationEvent);
-    assertTrue(events.get(2) instanceof RootInputDataInformationEvent);
+    assertTrue(events.get(0) instanceof InputUpdatePayloadEvent);
+    assertTrue(events.get(1) instanceof InputDataInformationEvent);
+    assertTrue(events.get(2) instanceof InputDataInformationEvent);
 
-    RootInputDataInformationEvent diEvent1 = (RootInputDataInformationEvent) (events.get(1));
-    RootInputDataInformationEvent diEvent2 = (RootInputDataInformationEvent) (events.get(2));
+    InputDataInformationEvent diEvent1 = (InputDataInformationEvent) (events.get(1));
+    InputDataInformationEvent diEvent2 = (InputDataInformationEvent) (events.get(2));
 
     assertNull(diEvent1.getUserPayload());
     assertNull(diEvent2.getUserPayload());
@@ -142,7 +142,7 @@ public class TestMRInputSplitDistributor {
   }
 
   private static class TezRootInputInitializerContextForTest implements
-      TezRootInputInitializerContext {
+      InputInitializerContext {
 
     private final ApplicationId appId;
     private final byte[] payload;


[4/5] TEZ-1237. Consolidate naming of API classes (bikas)

Posted by bi...@apache.org.
http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/TezMergedInputContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/TezMergedInputContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/TezMergedInputContext.java
deleted file mode 100644
index 7d9d590..0000000
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/TezMergedInputContext.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.runtime.api;
-
-import javax.annotation.Nullable;
-
-public interface TezMergedInputContext {
-
-  @Nullable
-  public byte[] getUserPayload();
-  
-  /**
-   * Inform the framework that the specific Input is ready for consumption.
-   * 
-   * This method can be invoked multiple times.
-   */
-  public void inputIsReady();
-  
-  /**
-   * Get the work directories for the Input
-   * @return an array of work dirs
-   */
-  public String[] getWorkDirs();
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/TezOutputContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/TezOutputContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/TezOutputContext.java
deleted file mode 100644
index 31511d4..0000000
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/TezOutputContext.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.runtime.api;
-
-/**
- * Context handle for the Output to initialize itself.
- */
-public interface TezOutputContext extends TezTaskContext {
-
-  /**
-   * Get the Vertex Name of the Destination that is the recipient of this
-   * Output's data
-   * @return Name of the Destination Vertex
-   */
-  public String getDestinationVertexName();
-  
-  /**
-   * Get the index of the output in the set of all outputs for the task. The 
-   * index will be consistent and valid only among the tasks of this vertex.
-   * @return index
-   */
-  public int getOutputIndex();
-
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/TezProcessorContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/TezProcessorContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/TezProcessorContext.java
deleted file mode 100644
index 0e610d6..0000000
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/TezProcessorContext.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.runtime.api;
-
-import java.io.IOException;
-import java.util.Collection;
-import javax.annotation.Nullable;
-
-/**
- * Context handle for the Processor to initialize itself.
- */
-public interface TezProcessorContext extends TezTaskContext {
-
-  /**
-   * Set the overall progress of this Task Attempt
-   * @param progress Progress in the range from [0.0 - 1.0f]
-   */
-  public void setProgress(float progress);
-
-  /**
-   * Check whether this attempt can commit its output
-   * @return true if commit allowed
-   * @throws IOException
-   */
-  public boolean canCommit() throws IOException;
-
-  /**
-   * Blocking call which returns when any of the specified Inputs is ready for
-   * consumption.
-   * 
-   * There can be multiple parallel invocations of this function - where each
-   * invocation blocks on the Inputs that it specifies.
-   * 
-   * If multiple Inputs are ready, any one of them may be returned by this
-   * method - including an Input which may have been returned in a previous
-   * call. If invoking this method multiple times, it's recommended to remove
-   * previously completed Inputs from the invocation list.
-   * 
-   * @param inputs
-   *          the list of Inputs to monitor
-   * @return the Input which is ready for consumption
-   * @throws InterruptedException
-   */
-  public Input waitForAnyInputReady(Collection<Input> inputs) throws InterruptedException;
-  
-  /**
-   * Blocking call which returns only after all of the specified Inputs are
-   * ready for consumption.
-   * 
-   * There can be multiple parallel invocations of this function - where each
-   * invocation blocks on the Inputs that it specifies.
-   * 
-   * @param inputs
-   *          the list of Inputs to monitor
-   * @throws InterruptedException
-   */
-  public void waitForAllInputsReady(Collection<Input> inputs) throws InterruptedException;
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/TezRootInputInitializer.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/TezRootInputInitializer.java b/tez-api/src/main/java/org/apache/tez/runtime/api/TezRootInputInitializer.java
deleted file mode 100644
index cfd192e..0000000
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/TezRootInputInitializer.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.runtime.api;
-
-import java.util.List;
-
-import org.apache.hadoop.classification.InterfaceStability;
-import org.apache.tez.runtime.api.events.RootInputInitializerEvent;
-
-/**
- * <code>TezRootInputInitializer</code>s are used to initialize root vertices
- * within the AM. They can be used to distribute data across the tasks for the
- * vertex, determine the number of tasks at runtime, update the Input payload
- * etc.
- */
-@InterfaceStability.Unstable
-public abstract class TezRootInputInitializer {
-
-  private final TezRootInputInitializerContext initializerContext;
-
-  /**
-   * Constructor an instance of the RootInputInitializer. Classes extending this one to create a
-   * RootInputInitializer, must provide the same constructor so that Tez can create an instance of
-   * the class at runtime.
-   *
-   * @param initializerContext initializer context which can be used to access the payload, vertex
-   *                           properties, etc
-   */
-  public TezRootInputInitializer(TezRootInputInitializerContext initializerContext) {
-    this.initializerContext = initializerContext;
-  }
-
-  /**
-   * Run the root input initializer. This is the main method where initialization takes place. If an
-   * Initializer is written to accept events, a notification mechanism should be setup, with the
-   * heavy lifting of processing the event being done via this method. The moment this method
-   * returns a list of events, RootInputInitialization is considered to be complete.
-   *
-   * @return a list of events which are eventually routed to a {@link org.apache.tez.dag.api.VertexManagerPlugin}
-   * for routing
-   * @throws Exception
-   */
-  public abstract List<Event> initialize()
-      throws Exception;
-
-  /**
-   * Handle events meant for the specific Initializer. This is a notification mechanism to inform
-   * the Initializer about events received. Extensive event processing should not be performed via
-   * this method call. Instead this should just be used as a notification method to the main
-   * initialization via the initialize method.
-   *
-   * @param events list of events
-   * @throws Exception
-   */
-  public abstract void handleInputInitializerEvent(List<RootInputInitializerEvent> events) throws Exception;
-
-  /**
-   * Return ahe {@link org.apache.tez.runtime.api.TezRootInputInitializerContext} for this specific instance of
-   * the Initializer.
-   *
-   * @return the {@link org.apache.tez.runtime.api.TezRootInputInitializerContext} for the input
-   */
-  public final TezRootInputInitializerContext getContext() {
-    return this.initializerContext;
-  }
-  
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/TezRootInputInitializerContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/TezRootInputInitializerContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/TezRootInputInitializerContext.java
deleted file mode 100644
index 9513a80..0000000
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/TezRootInputInitializerContext.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.runtime.api;
-
-import javax.annotation.Nullable;
-
-import org.apache.hadoop.yarn.api.records.ApplicationId;
-import org.apache.hadoop.yarn.api.records.Resource;
-
-public interface TezRootInputInitializerContext {
-
-  /**
-   * Get the YARN application id given to the Tez Application Master
-   * @return Application id
-   */
-  ApplicationId getApplicationId();
-  
-  /**
-   * Get the name of the DAG
-   * @return DAG name
-   */
-  String getDAGName();
-  
-  /**
-   * Get the name of the input
-   * @return Input name
-   */
-  String getInputName();
-
-  /**
-   * Get the user payload for the input
-   * @return User payload
-   */
-  @Nullable byte[] getInputUserPayload();
-  
-  /**
-   * Get the user payload for the initializer
-   * @return User payload
-   */
-  @Nullable byte[] getUserPayload();
-  
-  /**
-   * Get the number of tasks in this vertex. Maybe -1 if the vertex has not been
-   * initialized with a pre-determined number of tasks.
-   * @return number of tasks
-   */
-  int getNumTasks();
-  
-  /**
-   * Get the resource allocated to a task of this vertex
-   * @return Resource
-   */
-  Resource getVertexTaskResource();
-  
-  /**
-   * Get the total resource allocated to this vertex. If the DAG is running in 
-   * a busy cluster then it may have no resources available dedicated to it. The
-   * DAG may divide its resources among member vertices.
-   * @return Resource
-   */
-  Resource getTotalAvailableResource();
-  
-  /**
-   * Get the number of nodes in the cluster
-   * @return Number of nodes
-   */
-  int getNumClusterNodes();
-
-  /**
-   * @return DAG Attempt number
-   */
-  int getDAGAttemptNumber();
-
-  /**
-   * Get the number of tasks in the given vertex
-   * @param vertexName
-   * @return Total number of tasks in this vertex
-   */
-  public int getVertexNumTasks(String vertexName);
-
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/TezTaskContext.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/TezTaskContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/TezTaskContext.java
deleted file mode 100644
index 7b93c65..0000000
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/TezTaskContext.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.runtime.api;
-
-import java.nio.ByteBuffer;
-import java.util.List;
-
-import javax.annotation.Nullable;
-
-import org.apache.hadoop.yarn.api.records.ApplicationId;
-import org.apache.tez.common.counters.TezCounters;
-import org.apache.tez.runtime.common.objectregistry.ObjectRegistry;
-
-/**
- * Base interface for Context classes used to initialize the Input, Output
- * and Processor instances.
- */
-public interface TezTaskContext {
-
-  // TODO NEWTEZ
-  // Scale the maximum events we fetch per RPC call to mitigate OOM issues
-  // on the ApplicationMaster when a thundering herd of reducers fetch events
-  // This should not be necessary after HADOOP-8942
-
-  /**
-   * Get the {@link ApplicationId} for the running app
-   * @return the {@link ApplicationId}
-   */
-  public ApplicationId getApplicationId();
-
-  /**
-   * Get the current DAG Attempt Number
-   * @return DAG Attempt Number
-   */
-  public int getDAGAttemptNumber();
-
-  /**
-   * Get the index of this Task among the tasks of this vertex
-   * @return Task Index
-   */
-  public int getTaskIndex();
-
-  /**
-   * Get the current Task Attempt Number
-   * @return Task Attempt Number
-   */
-  public int getTaskAttemptNumber();
-
-  /**
-   * Get the name of the DAG
-   * @return the DAG name
-   */
-  public String getDAGName();
-
-  /**
-   * Get the name of the Vertex in which the task is running
-   * @return Vertex Name
-   */
-  public String getTaskVertexName();
-  
-  /**
-   * Get the index of this task's vertex in the set of vertices in the DAG. This 
-   * is consistent and valid across all tasks/vertices in the same DAG.
-   * @return index
-   */
-  public int getTaskVertexIndex();
-
-  public TezCounters getCounters();
-
-  /**
-   * Send Events to the AM and/or dependent Vertices
-   * @param events Events to be sent
-   */
-  public void sendEvents(List<Event> events);
-
-  /**
-   * Get the User Payload for the Input/Output/Processor
-   * @return User Payload
-   */
-  @Nullable
-  public byte[] getUserPayload();
-
-  /**
-   * Get the work directories for the Input/Output/Processor
-   * @return an array of work dirs
-   */
-  public String[] getWorkDirs();
-
-  /**
-   * Returns an identifier which is unique to the specific Input, Processor or
-   * Output
-   *
-   * @return a unique identifier
-   */
-  public String getUniqueIdentifier();
-  
-  /**
-   * Returns a shared {@link ObjectRegistry} to hold user objects in memory 
-   * between tasks. 
-   * @return {@link ObjectRegistry}
-   */
-  public ObjectRegistry getObjectRegistry();
-
-  /**
-   * Report a fatal error to the framework. This will cause the entire task to
-   * fail and should not be used for reporting temporary or recoverable errors
-   *
-   * @param exception an exception representing the error
-   */
-  public void fatalError(@Nullable Throwable exception, @Nullable String message);
-
-  /**
-   * Returns meta-data for the specified service. As an example, when the MR
-   * ShuffleHandler is used - this would return the jobToken serialized as bytes
-   *
-   * @param serviceName
-   *          the name of the service for which meta-data is required
-   * @return a ByteBuffer representing the meta-data
-   */
-  public ByteBuffer getServiceConsumerMetaData(String serviceName);
-
-  /**
-   * Return Provider meta-data for the specified service As an example, when the
-   * MR ShuffleHandler is used - this would return the shuffle port serialized
-   * as bytes
-   *
-   * @param serviceName
-   *          the name of the service for which provider meta-data is required
-   * @return a ByteBuffer representing the meta-data
-   */
-  @Nullable
-  public ByteBuffer getServiceProviderMetaData(String serviceName);
-  
-  /**
-   * Request a specific amount of memory during initialization
-   * (initialize(..*Context)) The requester is notified of allocation via the
-   * provided callback handler.
-   * 
-   * Currently, (post TEZ-668) the caller will be informed about the available
-   * memory after initialization (I/P/O initialize(...)), and before the
-   * start/run invocation. There will be no other invocations on the callback.
-   * 
-   * This method can be called only once by any component. Calling it multiple
-   * times from within the same component will result in an error.
-   * 
-   * Each Input / Output must request memory. For Inputs / Outputs which do not
-   * have a specific ask, a null callback handler can be specified with a
-   * request size of 0.
-   * 
-   * @param size
-   *          request size in bytes.
-   * @param callbackHandler
-   *          the callback handler to be invoked once memory is assigned
-   */
-  public void requestInitialMemory(long size, MemoryUpdateCallback callbackHandler);
-  
-  /**
-   * Gets the total memory available to all components of the running task. This
-   * values will always be constant, and does not factor in any allocations.
-   * 
-   * @return the total available memory for all components of the task
-   */
-  public long getTotalMemoryAvailableToTask();
-    
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputConfigureVertexTasksEvent.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputConfigureVertexTasksEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputConfigureVertexTasksEvent.java
new file mode 100644
index 0000000..5d05e5d
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputConfigureVertexTasksEvent.java
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.runtime.api.events;
+
+import java.util.List;
+
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.tez.dag.api.VertexLocationHint.TaskLocationHint;
+import org.apache.tez.runtime.api.Event;
+import org.apache.tez.runtime.api.InputSpecUpdate;
+
+@Unstable
+public class InputConfigureVertexTasksEvent extends Event {
+
+  private final int numTasks;
+  private final List<TaskLocationHint> taskLocationHints;
+  private final InputSpecUpdate inputSpecUpdate;
+
+  public InputConfigureVertexTasksEvent(int numTasks, List<TaskLocationHint> locationHints,
+      InputSpecUpdate inputSpecUpdate) {
+    this.numTasks = numTasks;
+    this.taskLocationHints = locationHints;
+    this.inputSpecUpdate = inputSpecUpdate;
+  }
+
+  public int getNumTasks() {
+    return numTasks;
+  }
+
+  public List<TaskLocationHint> getTaskLocationHints() {
+    return taskLocationHints;
+  }
+
+  public InputSpecUpdate getInputSpecUpdate() {
+    return this.inputSpecUpdate;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputDataInformationEvent.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputDataInformationEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputDataInformationEvent.java
new file mode 100644
index 0000000..176e771
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputDataInformationEvent.java
@@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.runtime.api.events;
+
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.tez.common.TezUserPayload;
+import org.apache.tez.dag.api.DagTypeConverters;
+import org.apache.tez.dag.api.VertexManagerPlugin;
+import org.apache.tez.runtime.api.Event;
+import org.apache.tez.runtime.api.InputInitializer;
+
+/**
+ * Events used by {@link InputInitializer} implementations to provide the
+ * user payload for individual tasks running as part of the Vertex for which an
+ * Initial Input has been configured.
+ * 
+ * This event is used by InputInitialziers to configure tasks belonging to a
+ * Vertex. The event may be processed by a @link {@link VertexManagerPlugin}
+ * before being sent to tasks.
+ * 
+ * A {@link InputInitializer} may send Events with or without a
+ * serialized user payload.
+ * 
+ * Events, after being processed by a {@link VertexManagerPlugin}, must
+ * contain the payload in a serialized form.
+ */
+@Unstable
+public final class InputDataInformationEvent extends Event {
+
+  private final int sourceIndex;
+  private int targetIndex; // TODO Likely to be multiple at a later point.
+  private final TezUserPayload userPayload;
+  private final Object userPayloadObject;
+  
+  /**
+   * Provide a serialzied form of the payload
+   * @param srcIndex the src index
+   * @param userPayload the serizlied payload
+   */
+  public InputDataInformationEvent(int srcIndex, byte[] userPayload) {
+    this.sourceIndex = srcIndex;
+    this.userPayload = DagTypeConverters.convertToTezUserPayload(userPayload);
+    this.userPayloadObject = null;
+  }
+  
+  public InputDataInformationEvent(int srcIndex, Object userPayloadDeserialized) {
+    this.sourceIndex = srcIndex;
+    this.userPayloadObject = userPayloadDeserialized;
+    this.userPayload = DagTypeConverters.convertToTezUserPayload(null);
+  }
+
+  public int getSourceIndex() {
+    return this.sourceIndex;
+  }
+
+  public int getTargetIndex() {
+    return this.targetIndex;
+  }
+
+  public void setTargetIndex(int target) {
+    this.targetIndex = target;
+  }
+  
+  public byte[] getUserPayload() {
+    return userPayload.getPayload();
+  }
+  
+  public Object getDeserializedUserPayload() {
+    return this.userPayloadObject;
+  }
+
+  @Override
+  public String toString() {
+    return "InputDataInformationEvent [sourceIndex=" + sourceIndex + ", targetIndex="
+        + targetIndex + ", serializedUserPayloadExists=" + (userPayload != null)
+        + ", deserializedUserPayloadExists=" + (userPayloadObject != null) + "]";
+  } 
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputInitializerEvent.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputInitializerEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputInitializerEvent.java
new file mode 100644
index 0000000..62b947b
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputInitializerEvent.java
@@ -0,0 +1,86 @@
+/*
+ * *
+ *  * Licensed to the Apache Software Foundation (ASF) under one
+ *  * or more contributor license agreements.  See the NOTICE file
+ *  * distributed with this work for additional information
+ *  * regarding copyright ownership.  The ASF licenses this file
+ *  * to you under the Apache License, Version 2.0 (the
+ *  * "License"); you may not use this file except in compliance
+ *  * with the License.  You may obtain a copy of the License at
+ *  *
+ *  *     http://www.apache.org/licenses/LICENSE-2.0
+ *  *
+ *  * Unless required by applicable law or agreed to in writing, software
+ *  * distributed under the License is distributed on an "AS IS" BASIS,
+ *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  * See the License for the specific language governing permissions and
+ *  * limitations under the License.
+ *
+ */
+
+package org.apache.tez.runtime.api.events;
+
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.tez.common.TezUserPayload;
+import org.apache.tez.runtime.api.InputInitializer;
+import org.apache.tez.runtime.api.Event;
+
+/**
+ * An event that is routed to the specified {@link InputInitializer}.
+ */
+@Unstable
+public class InputInitializerEvent extends Event {
+
+  private String targetVertexName;
+  private String targetInputName;
+
+  private int version;
+  private TezUserPayload eventPayload;
+
+  /**
+   * @param targetVertexName the vertex on which the targeted Input exists
+   * @param targetInputName  the name of the input
+   * @param eventPayload     the payload for the event. It is advisable to limit the size of the
+   *                         payload to a few KB at max
+   * @param version          version of the event. Multiple versions may be generated in case of
+   *                         retries
+   */
+  public InputInitializerEvent(String targetVertexName, String targetInputName,
+                                   byte[] eventPayload, int version) {
+    this.targetVertexName = targetVertexName;
+    this.targetInputName = targetInputName;
+    this.version = version;
+    this.eventPayload = new TezUserPayload(eventPayload);
+  }
+
+  /**
+   * Get the vertex name on which the targeted Input exists
+   *
+   * @return the vertex name
+   */
+  public String getTargetVertexName() {
+    return this.targetVertexName;
+  }
+
+  /**
+   * Get the input name to which this event is targeted
+   *
+   * @return the input name
+   */
+  public String getTargetInputName() {
+    return this.targetInputName;
+  }
+
+  public int getVersion() {
+    return this.version;
+  }
+
+  /**
+   * Get the actual user payload
+   *
+   * @return a byte representation of the payload
+   */
+  public byte[] getUserPayload() {
+    return this.eventPayload.getPayload();
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputUpdatePayloadEvent.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputUpdatePayloadEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputUpdatePayloadEvent.java
new file mode 100644
index 0000000..d7f160b
--- /dev/null
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputUpdatePayloadEvent.java
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tez.runtime.api.events;
+
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
+import org.apache.tez.common.TezUserPayload;
+import org.apache.tez.dag.api.DagTypeConverters;
+import org.apache.tez.runtime.api.Event;
+import org.apache.tez.runtime.api.InputInitializer;
+
+/**
+ * Events used by {@link InputInitializer} implementations to update the
+ * shared user payload for the Input that is being initialized. </p>
+ *
+ * This event is specific to an Input, and should only be sent once - ideally
+ * before {@link InputDataInformationEvent}s
+ */
+@Unstable
+public class InputUpdatePayloadEvent extends Event {
+
+  private final TezUserPayload userPayload;
+
+  public InputUpdatePayloadEvent(byte[] userPayload) {
+    this.userPayload = DagTypeConverters.convertToTezUserPayload(userPayload);
+  }
+
+  public byte[] getUserPayload() {
+    return userPayload.getPayload();
+  }
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputConfigureVertexTasksEvent.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputConfigureVertexTasksEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputConfigureVertexTasksEvent.java
deleted file mode 100644
index d8c3cce..0000000
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputConfigureVertexTasksEvent.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.runtime.api.events;
-
-import java.util.List;
-
-import org.apache.tez.dag.api.VertexLocationHint.TaskLocationHint;
-import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.RootInputSpecUpdate;
-
-public class RootInputConfigureVertexTasksEvent extends Event {
-
-  private final int numTasks;
-  private final List<TaskLocationHint> taskLocationHints;
-  private final RootInputSpecUpdate rootInputSpecUpdate;
-
-  public RootInputConfigureVertexTasksEvent(int numTasks, List<TaskLocationHint> locationHints,
-      RootInputSpecUpdate rootInputSpecUpdate) {
-    this.numTasks = numTasks;
-    this.taskLocationHints = locationHints;
-    this.rootInputSpecUpdate = rootInputSpecUpdate;
-  }
-
-  public int getNumTasks() {
-    return numTasks;
-  }
-
-  public List<TaskLocationHint> getTaskLocationHints() {
-    return taskLocationHints;
-  }
-
-  public RootInputSpecUpdate getRootInputSpecUpdate() {
-    return this.rootInputSpecUpdate;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputDataInformationEvent.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputDataInformationEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputDataInformationEvent.java
deleted file mode 100644
index fcd968c..0000000
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputDataInformationEvent.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.runtime.api.events;
-
-import org.apache.tez.common.TezUserPayload;
-import org.apache.tez.dag.api.DagTypeConverters;
-import org.apache.tez.dag.api.VertexManagerPlugin;
-import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezRootInputInitializer;
-
-/**
- * Events used by {@link TezRootInputInitializer} implementations to provide the
- * user payload for individual tasks running as part of the Vertex for which an
- * Initial Input has been configured.
- * 
- * This event is used by InputInitialziers to configure tasks belonging to a
- * Vertex. The event may be processed by a @link {@link VertexManagerPlugin}
- * before being sent to tasks.
- * 
- * A {@link TezRootInputInitializer} may send Events with or without a
- * serialized user payload.
- * 
- * Events, after being processed by a {@link VertexManagerPlugin}, must
- * contain the payload in a serialized form.
- */
-public final class RootInputDataInformationEvent extends Event {
-
-  private final int sourceIndex;
-  private int targetIndex; // TODO Likely to be multiple at a later point.
-  private final TezUserPayload userPayload;
-  private final Object userPayloadObject;
-  
-  /**
-   * Provide a serialzied form of the payload
-   * @param srcIndex the src index
-   * @param userPayload the serizlied payload
-   */
-  public RootInputDataInformationEvent(int srcIndex, byte[] userPayload) {
-    this.sourceIndex = srcIndex;
-    this.userPayload = DagTypeConverters.convertToTezUserPayload(userPayload);
-    this.userPayloadObject = null;
-  }
-  
-  public RootInputDataInformationEvent(int srcIndex, Object userPayloadDeserialized) {
-    this.sourceIndex = srcIndex;
-    this.userPayloadObject = userPayloadDeserialized;
-    this.userPayload = DagTypeConverters.convertToTezUserPayload(null);
-  }
-
-  public int getSourceIndex() {
-    return this.sourceIndex;
-  }
-
-  public int getTargetIndex() {
-    return this.targetIndex;
-  }
-
-  public void setTargetIndex(int target) {
-    this.targetIndex = target;
-  }
-  
-  public byte[] getUserPayload() {
-    return userPayload.getPayload();
-  }
-  
-  public Object getDeserializedUserPayload() {
-    return this.userPayloadObject;
-  }
-
-  @Override
-  public String toString() {
-    return "RootInputDataInformationEvent [sourceIndex=" + sourceIndex + ", targetIndex="
-        + targetIndex + ", serializedUserPayloadExists=" + (userPayload != null)
-        + ", deserializedUserPayloadExists=" + (userPayloadObject != null) + "]";
-  } 
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputInitializerEvent.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputInitializerEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputInitializerEvent.java
deleted file mode 100644
index 6e78add..0000000
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputInitializerEvent.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * *
- *  * Licensed to the Apache Software Foundation (ASF) under one
- *  * or more contributor license agreements.  See the NOTICE file
- *  * distributed with this work for additional information
- *  * regarding copyright ownership.  The ASF licenses this file
- *  * to you under the Apache License, Version 2.0 (the
- *  * "License"); you may not use this file except in compliance
- *  * with the License.  You may obtain a copy of the License at
- *  *
- *  *     http://www.apache.org/licenses/LICENSE-2.0
- *  *
- *  * Unless required by applicable law or agreed to in writing, software
- *  * distributed under the License is distributed on an "AS IS" BASIS,
- *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  * See the License for the specific language governing permissions and
- *  * limitations under the License.
- *
- */
-
-package org.apache.tez.runtime.api.events;
-
-import org.apache.tez.common.TezUserPayload;
-import org.apache.tez.runtime.api.Event;
-
-/**
- * An event that is routed to the specified RootInputInitializer.
- */
-public class RootInputInitializerEvent extends Event {
-
-  private String targetVertexName;
-  private String targetInputName;
-
-  private int version;
-  private TezUserPayload eventPayload;
-
-  /**
-   * @param targetVertexName the vertex on which the targeted Input exists
-   * @param targetInputName  the name of the root input
-   * @param eventPayload     the payload for the event. It is advisable to limit the size of the
-   *                         payload to a few KB at max
-   * @param version          version of the event. Multiple versions may be generated in case of
-   *                         retries
-   */
-  public RootInputInitializerEvent(String targetVertexName, String targetInputName,
-                                   byte[] eventPayload, int version) {
-    this.targetVertexName = targetVertexName;
-    this.targetInputName = targetInputName;
-    this.version = version;
-    this.eventPayload = new TezUserPayload(eventPayload);
-  }
-
-  /**
-   * Get the vertex name on which the targeted Input exists
-   *
-   * @return the vertex name
-   */
-  public String getTargetVertexName() {
-    return this.targetVertexName;
-  }
-
-  /**
-   * Get the input name to which this event is targeted
-   *
-   * @return the input name
-   */
-  public String getTargetInputName() {
-    return this.targetInputName;
-  }
-
-  public int getVersion() {
-    return this.version;
-  }
-
-  /**
-   * Get the actual user payload
-   *
-   * @return a byte representation of the payload
-   */
-  public byte[] getUserPayload() {
-    return this.eventPayload.getPayload();
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputUpdatePayloadEvent.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputUpdatePayloadEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputUpdatePayloadEvent.java
deleted file mode 100644
index 4eb4c74..0000000
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/events/RootInputUpdatePayloadEvent.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tez.runtime.api.events;
-
-import org.apache.tez.common.TezUserPayload;
-import org.apache.tez.dag.api.DagTypeConverters;
-import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezRootInputInitializer;
-
-/**
- * Events used by {@link TezRootInputInitializer} implementations to update the
- * shared user payload for the Input that is being initialized. </p>
- *
- * This event is specific to an Input, and should only be sent once - ideally
- * before {@link RootInputDataInformationEvent}s
- */
-public class RootInputUpdatePayloadEvent extends Event {
-
-  private final TezUserPayload userPayload;
-
-  public RootInputUpdatePayloadEvent(byte[] userPayload) {
-    this.userPayload = DagTypeConverters.convertToTezUserPayload(userPayload);
-  }
-
-  public byte[] getUserPayload() {
-    return userPayload.getPayload();
-  }
-}

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/main/java/org/apache/tez/runtime/api/events/VertexManagerEvent.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/VertexManagerEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/VertexManagerEvent.java
index 3696d43..7f2ab17 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/events/VertexManagerEvent.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/events/VertexManagerEvent.java
@@ -18,6 +18,7 @@
 
 package org.apache.tez.runtime.api.events;
 
+import org.apache.hadoop.classification.InterfaceStability.Unstable;
 import org.apache.tez.common.TezUserPayload;
 import org.apache.tez.dag.api.DagTypeConverters;
 import org.apache.tez.runtime.api.Event;
@@ -29,6 +30,7 @@ import com.google.common.base.Preconditions;
  * This may be used to send statistics like samples etc to the VertexManager for
  * automatic plan recofigurations based on observed statistics
  */
+@Unstable
 public class VertexManagerEvent extends Event {
 
   /**

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java b/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
index 8f6b516..d631f90 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
@@ -116,7 +116,7 @@ public class TestDAGPlan {
     OutputDescriptor outputDescriptor = new OutputDescriptor("output").setUserPayload("outputBytes"
         .getBytes());
     Edge edge = new Edge(v1, v2, new EdgeProperty(
-        new EdgeManagerDescriptor("emClass").setUserPayload("emPayload".getBytes()),
+        new EdgeManagerPluginDescriptor("emClass").setUserPayload("emPayload".getBytes()),
         DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL, outputDescriptor, inputDescriptor));
 
     dag.addVertex(v1).addVertex(v2).addEdge(edge);
@@ -126,7 +126,7 @@ public class TestDAGPlan {
     EdgeProperty edgeProperty = DagTypeConverters.createEdgePropertyMapFromDAGPlan(dagProto
         .getEdgeList().get(0));
 
-    EdgeManagerDescriptor emDesc = edgeProperty.getEdgeManagerDescriptor();
+    EdgeManagerPluginDescriptor emDesc = edgeProperty.getEdgeManagerDescriptor();
     Assert.assertNotNull(emDesc);
     Assert.assertEquals("emClass", emDesc.getClassName());
     Assert.assertTrue(Arrays.equals("emPayload".getBytes(), emDesc.getUserPayload()));

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java b/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java
index b03a23b..d1c5bf7 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGVerify.java
@@ -65,7 +65,7 @@ public class TestDAGVerify {
         new ProcessorDescriptor("MapProcessor"),
         dummyTaskCount, dummyTaskResource);
     Edge e1 = new Edge(v1, v2,
-        new EdgeProperty(new EdgeManagerDescriptor("emClass"),
+        new EdgeProperty(new EdgeManagerPluginDescriptor("emClass"),
             DataSourceType.PERSISTED,
             SchedulingType.SEQUENTIAL, 
             new OutputDescriptor(dummyOutputClassName),

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/main/java/org/apache/tez/dag/app/dag/RootInputInitializerManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/RootInputInitializerManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/RootInputInitializerManager.java
index a1ae243..f8e68bd 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/RootInputInitializerManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/RootInputInitializerManager.java
@@ -45,8 +45,8 @@ import org.apache.tez.dag.app.dag.event.VertexEventRootInputInitialized;
 import org.apache.tez.dag.app.dag.impl.TezRootInputInitializerContextImpl;
 import org.apache.tez.dag.records.TezVertexID;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezRootInputInitializer;
-import org.apache.tez.runtime.api.TezRootInputInitializerContext;
+import org.apache.tez.runtime.api.InputInitializer;
+import org.apache.tez.runtime.api.InputInitializerContext;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.util.concurrent.FutureCallback;
@@ -56,7 +56,7 @@ import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 
-import org.apache.tez.runtime.api.events.RootInputInitializerEvent;
+import org.apache.tez.runtime.api.events.InputInitializerEvent;
 
 public class RootInputInitializerManager {
 
@@ -89,9 +89,9 @@ public class RootInputInitializerManager {
       inputs) {
     for (RootInputLeafOutput<InputDescriptor, InputInitializerDescriptor> input : inputs) {
 
-      TezRootInputInitializerContext context =
+      InputInitializerContext context =
           new TezRootInputInitializerContextImpl(input, vertex, appContext);
-      TezRootInputInitializer initializer = createInitializer(input, context);
+      InputInitializer initializer = createInitializer(input, context);
 
       InitializerWrapper initializerWrapper = new InitializerWrapper(input, initializer, context, vertex);
       initializerMap.put(input.getName(), initializerWrapper);
@@ -103,15 +103,15 @@ public class RootInputInitializerManager {
 
 
   @VisibleForTesting
-  protected TezRootInputInitializer createInitializer(RootInputLeafOutput<InputDescriptor, InputInitializerDescriptor>
-      input, TezRootInputInitializerContext context) {
-    TezRootInputInitializer initializer = ReflectionUtils
+  protected InputInitializer createInitializer(RootInputLeafOutput<InputDescriptor, InputInitializerDescriptor>
+      input, InputInitializerContext context) {
+    InputInitializer initializer = ReflectionUtils
         .createClazzInstance(input.getControllerDescriptor().getClassName(),
-            new Class[]{TezRootInputInitializerContext.class}, new Object[]{context});
+            new Class[]{InputInitializerContext.class}, new Object[]{context});
     return initializer;
   }
 
-  public void handleInitializerEvent(RootInputInitializerEvent event) {
+  public void handleInitializerEvent(InputInitializerEvent event) {
     Preconditions.checkState(vertex.getName().equals(event.getTargetVertexName()),
         "Received event for incorrect vertex");
     Preconditions.checkNotNull(event.getTargetInputName(), "target input name must be set");
@@ -222,13 +222,13 @@ public class RootInputInitializerManager {
 
 
     private final RootInputLeafOutput<InputDescriptor, InputInitializerDescriptor> input;
-    private final TezRootInputInitializer initializer;
-    private final TezRootInputInitializerContext context;
+    private final InputInitializer initializer;
+    private final InputInitializerContext context;
     private final AtomicBoolean isComplete = new AtomicBoolean(false);
     private final String vertexLogIdentifier;
 
     InitializerWrapper(RootInputLeafOutput<InputDescriptor, InputInitializerDescriptor> input,
-                       TezRootInputInitializer initializer, TezRootInputInitializerContext context,
+                       InputInitializer initializer, InputInitializerContext context,
                        Vertex vertex) {
       this.input = input;
       this.initializer = initializer;
@@ -240,7 +240,7 @@ public class RootInputInitializerManager {
       return input;
     }
 
-    public TezRootInputInitializer getInitializer() {
+    public InputInitializer getInitializer() {
       return initializer;
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Vertex.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Vertex.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Vertex.java
index 5f97d6b..6c48a93 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Vertex.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Vertex.java
@@ -26,7 +26,7 @@ import javax.annotation.Nullable;
 
 import org.apache.hadoop.yarn.api.records.Resource;
 import org.apache.tez.common.counters.TezCounters;
-import org.apache.tez.dag.api.EdgeManagerDescriptor;
+import org.apache.tez.dag.api.EdgeManagerPluginDescriptor;
 import org.apache.tez.dag.api.InputDescriptor;
 import org.apache.tez.dag.api.InputInitializerDescriptor;
 import org.apache.tez.dag.api.OutputCommitterDescriptor;
@@ -47,7 +47,7 @@ import org.apache.tez.dag.history.HistoryEvent;
 import org.apache.tez.dag.records.TezTaskID;
 import org.apache.tez.dag.records.TezVertexID;
 import org.apache.tez.runtime.api.OutputCommitter;
-import org.apache.tez.runtime.api.RootInputSpecUpdate;
+import org.apache.tez.runtime.api.InputSpecUpdate;
 import org.apache.tez.runtime.api.impl.GroupInputSpec;
 import org.apache.tez.runtime.api.impl.InputSpec;
 import org.apache.tez.runtime.api.impl.OutputSpec;
@@ -87,8 +87,8 @@ public interface Vertex extends Comparable<Vertex> {
   TaskLocationHint getTaskLocationHint(TezTaskID taskID);
 
   boolean setParallelism(int parallelism, VertexLocationHint vertexLocationHint,
-      Map<String, EdgeManagerDescriptor> sourceEdgeManagers,
-      Map<String, RootInputSpecUpdate> rootInputSpecUpdate);
+      Map<String, EdgeManagerPluginDescriptor> sourceEdgeManagers,
+      Map<String, InputSpecUpdate> rootInputSpecUpdate);
   void setVertexLocationHint(VertexLocationHint vertexLocationHint);
 
   // CHANGE THESE TO LISTS AND MAINTAIN ORDER?

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BroadcastEdgeManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BroadcastEdgeManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BroadcastEdgeManager.java
index 074b1bc..db57227 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BroadcastEdgeManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BroadcastEdgeManager.java
@@ -22,14 +22,14 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.tez.dag.api.EdgeManager;
-import org.apache.tez.dag.api.EdgeManagerContext;
+import org.apache.tez.dag.api.EdgeManagerPlugin;
+import org.apache.tez.dag.api.EdgeManagerPluginContext;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.api.events.InputReadErrorEvent;
 
-public class BroadcastEdgeManager extends EdgeManager {
+public class BroadcastEdgeManager extends EdgeManagerPlugin {
 
-  public BroadcastEdgeManager(EdgeManagerContext context) {
+  public BroadcastEdgeManager(EdgeManagerPluginContext context) {
     super(context);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/Edge.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/Edge.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/Edge.java
index 0907b28..2b629b3 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/Edge.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/Edge.java
@@ -28,9 +28,9 @@ import org.apache.hadoop.yarn.event.EventHandler;
 import org.apache.tez.common.ReflectionUtils;
 import org.apache.tez.common.TezUserPayload;
 import org.apache.tez.dag.api.DagTypeConverters;
-import org.apache.tez.dag.api.EdgeManager;
-import org.apache.tez.dag.api.EdgeManagerContext;
-import org.apache.tez.dag.api.EdgeManagerDescriptor;
+import org.apache.tez.dag.api.EdgeManagerPlugin;
+import org.apache.tez.dag.api.EdgeManagerPluginContext;
+import org.apache.tez.dag.api.EdgeManagerPluginDescriptor;
 import org.apache.tez.dag.api.EdgeProperty;
 import org.apache.tez.dag.api.TezUncheckedException;
 import org.apache.tez.dag.app.dag.Task;
@@ -56,7 +56,7 @@ import com.google.common.collect.Maps;
 
 public class Edge {
 
-  class EdgeManagerContextImpl implements EdgeManagerContext {
+  class EdgeManagerContextImpl implements EdgeManagerPluginContext {
 
     private final TezUserPayload userPayload;
 
@@ -92,8 +92,8 @@ public class Edge {
   }
 
   private EdgeProperty edgeProperty;
-  private EdgeManagerContext edgeManagerContext;
-  private EdgeManager edgeManager;
+  private EdgeManagerPluginContext edgeManagerContext;
+  private EdgeManagerPlugin edgeManager;
   @SuppressWarnings("rawtypes")
   private EventHandler eventHandler;
   private AtomicBoolean bufferEvents = new AtomicBoolean(false);
@@ -133,7 +133,7 @@ public class Edge {
           edgeManagerContext = new EdgeManagerContextImpl(bb);
           String edgeManagerClassName = edgeProperty.getEdgeManagerDescriptor().getClassName();
           edgeManager = ReflectionUtils
-              .createClazzInstance(edgeManagerClassName, new Class[]{EdgeManagerContext.class},
+              .createClazzInstance(edgeManagerClassName, new Class[]{EdgeManagerPluginContext.class},
                   new Object[]{edgeManagerContext});
         }
         break;
@@ -154,7 +154,7 @@ public class Edge {
         null);
   }
 
-  public synchronized void setCustomEdgeManager(EdgeManagerDescriptor descriptor) {
+  public synchronized void setCustomEdgeManager(EdgeManagerPluginDescriptor descriptor) {
     EdgeProperty modifiedEdgeProperty =
         new EdgeProperty(descriptor,
             edgeProperty.getDataSourceType(),
@@ -175,7 +175,7 @@ public class Edge {
     return this.edgeProperty;
   }
   
-  public EdgeManager getEdgeManager() {
+  public EdgeManagerPlugin getEdgeManager() {
     return this.edgeManager;
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManager.java
index db2804c..ced481d 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManager.java
@@ -22,17 +22,17 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.tez.dag.api.EdgeManager;
-import org.apache.tez.dag.api.EdgeManagerContext;
+import org.apache.tez.dag.api.EdgeManagerPlugin;
+import org.apache.tez.dag.api.EdgeManagerPluginContext;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.api.events.InputReadErrorEvent;
 
-public class OneToOneEdgeManager extends EdgeManager {
+public class OneToOneEdgeManager extends EdgeManagerPlugin {
 
   List<Integer> destinationInputIndices = 
       Collections.unmodifiableList(Collections.singletonList(0));
 
-  public OneToOneEdgeManager(EdgeManagerContext context) {
+  public OneToOneEdgeManager(EdgeManagerPluginContext context) {
     super(context);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/RootInputVertexManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/RootInputVertexManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/RootInputVertexManager.java
index 5b773ba..d4c80b4 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/RootInputVertexManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/RootInputVertexManager.java
@@ -28,10 +28,10 @@ import org.apache.tez.dag.api.VertexManagerPlugin;
 import org.apache.tez.dag.api.VertexManagerPluginContext;
 import org.apache.tez.dag.api.VertexManagerPluginContext.TaskWithLocationHint;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.RootInputSpecUpdate;
-import org.apache.tez.runtime.api.events.RootInputConfigureVertexTasksEvent;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
-import org.apache.tez.runtime.api.events.RootInputUpdatePayloadEvent;
+import org.apache.tez.runtime.api.InputSpecUpdate;
+import org.apache.tez.runtime.api.events.InputConfigureVertexTasksEvent;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
+import org.apache.tez.runtime.api.events.InputUpdatePayloadEvent;
 import org.apache.tez.runtime.api.events.VertexManagerEvent;
 
 import com.google.common.base.Preconditions;
@@ -70,10 +70,10 @@ public class RootInputVertexManager extends VertexManagerPlugin {
   @Override
   public void onRootVertexInitialized(String inputName, InputDescriptor inputDescriptor,
       List<Event> events) {
-    List<RootInputDataInformationEvent> riEvents = Lists.newLinkedList();
+    List<InputDataInformationEvent> riEvents = Lists.newLinkedList();
     boolean dataInformationEventSeen = false;
     for (Event event : events) {
-      if (event instanceof RootInputConfigureVertexTasksEvent) {
+      if (event instanceof InputConfigureVertexTasksEvent) {
         // No tasks should have been started yet. Checked by initial state check.
         Preconditions.checkState(dataInformationEventSeen == false);
         Preconditions.checkState(getContext().getVertexNumTasks(getContext().getVertexName()) == -1,
@@ -84,21 +84,21 @@ public class RootInputVertexManager extends VertexManagerPlugin {
                 + ", VertexName: " + getContext().getVertexName() + ", ConfiguredInput: "
                 + configuredInputName + ", CurrentInput: " + inputName);
         configuredInputName = inputName;
-        RootInputConfigureVertexTasksEvent cEvent = (RootInputConfigureVertexTasksEvent) event;
-        Map<String, RootInputSpecUpdate> rootInputSpecUpdate = new HashMap<String, RootInputSpecUpdate>();
+        InputConfigureVertexTasksEvent cEvent = (InputConfigureVertexTasksEvent) event;
+        Map<String, InputSpecUpdate> rootInputSpecUpdate = new HashMap<String, InputSpecUpdate>();
         rootInputSpecUpdate.put(
             inputName,
-            cEvent.getRootInputSpecUpdate() == null ? RootInputSpecUpdate
-                .getDefaultSinglePhysicalInputSpecUpdate() : cEvent.getRootInputSpecUpdate());
+            cEvent.getInputSpecUpdate() == null ? InputSpecUpdate
+                .getDefaultSinglePhysicalInputSpecUpdate() : cEvent.getInputSpecUpdate());
         getContext().setVertexParallelism(cEvent.getNumTasks(),
             new VertexLocationHint(cEvent.getTaskLocationHints()), null, rootInputSpecUpdate);
       }
-      if (event instanceof RootInputUpdatePayloadEvent) {
+      if (event instanceof InputUpdatePayloadEvent) {
         // No tasks should have been started yet. Checked by initial state check.
         Preconditions.checkState(dataInformationEventSeen == false);
-        inputDescriptor.setUserPayload(((RootInputUpdatePayloadEvent) event)
+        inputDescriptor.setUserPayload(((InputUpdatePayloadEvent) event)
             .getUserPayload());
-      } else if (event instanceof RootInputDataInformationEvent) {
+      } else if (event instanceof InputDataInformationEvent) {
         dataInformationEventSeen = true;
         // # Tasks should have been set by this point.
         Preconditions.checkState(getContext().getVertexNumTasks(getContext().getVertexName()) != 0);
@@ -109,7 +109,7 @@ public class RootInputVertexManager extends VertexManagerPlugin {
                 + configuredInputName + ", CurrentInput: " + inputName);
         configuredInputName = inputName;
         
-        RootInputDataInformationEvent rEvent = (RootInputDataInformationEvent)event;
+        InputDataInformationEvent rEvent = (InputDataInformationEvent)event;
         rEvent.setTargetIndex(rEvent.getSourceIndex()); // 1:1 routing
         riEvents.add(rEvent);
       }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/ScatterGatherEdgeManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/ScatterGatherEdgeManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/ScatterGatherEdgeManager.java
index e5e620c..a8ee795 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/ScatterGatherEdgeManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/ScatterGatherEdgeManager.java
@@ -22,14 +22,14 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.tez.dag.api.EdgeManager;
-import org.apache.tez.dag.api.EdgeManagerContext;
+import org.apache.tez.dag.api.EdgeManagerPlugin;
+import org.apache.tez.dag.api.EdgeManagerPluginContext;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.api.events.InputReadErrorEvent;
 
-public class ScatterGatherEdgeManager extends EdgeManager {
+public class ScatterGatherEdgeManager extends EdgeManagerPlugin {
 
-  public ScatterGatherEdgeManager(EdgeManagerContext context) {
+  public ScatterGatherEdgeManager(EdgeManagerPluginContext context) {
     super(context);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TezRootInputInitializerContextImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TezRootInputInitializerContextImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TezRootInputInitializerContextImpl.java
index cbc6cf3..e8bc935 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TezRootInputInitializerContextImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TezRootInputInitializerContextImpl.java
@@ -27,10 +27,10 @@ import org.apache.tez.dag.api.InputInitializerDescriptor;
 import org.apache.tez.dag.api.RootInputLeafOutput;
 import org.apache.tez.dag.app.AppContext;
 import org.apache.tez.dag.app.dag.Vertex;
-import org.apache.tez.runtime.api.TezRootInputInitializerContext;
+import org.apache.tez.runtime.api.InputInitializerContext;
 
 public class TezRootInputInitializerContextImpl implements
-    TezRootInputInitializerContext {
+    InputInitializerContext {
 
   private RootInputLeafOutput<InputDescriptor, InputInitializerDescriptor> input;
   private final Vertex vertex;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/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 e520c2f..bc04083 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
@@ -57,7 +57,7 @@ import org.apache.hadoop.yarn.util.Clock;
 import org.apache.tez.common.ReflectionUtils;
 import org.apache.tez.common.counters.TezCounters;
 import org.apache.tez.dag.api.DagTypeConverters;
-import org.apache.tez.dag.api.EdgeManagerDescriptor;
+import org.apache.tez.dag.api.EdgeManagerPluginDescriptor;
 import org.apache.tez.dag.api.EdgeProperty.DataMovementType;
 import org.apache.tez.dag.api.InputDescriptor;
 import org.apache.tez.dag.api.InputInitializerDescriptor;
@@ -137,12 +137,12 @@ import org.apache.tez.dag.records.TezVertexID;
 import org.apache.tez.dag.utils.JavaProfilerOptions;
 import org.apache.tez.runtime.api.OutputCommitter;
 import org.apache.tez.runtime.api.OutputCommitterContext;
-import org.apache.tez.runtime.api.RootInputSpecUpdate;
+import org.apache.tez.runtime.api.InputSpecUpdate;
 import org.apache.tez.runtime.api.events.CompositeDataMovementEvent;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.api.events.InputFailedEvent;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
-import org.apache.tez.runtime.api.events.RootInputInitializerEvent;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
+import org.apache.tez.runtime.api.events.InputInitializerEvent;
 import org.apache.tez.runtime.api.events.TaskAttemptFailedEvent;
 import org.apache.tez.runtime.api.events.TaskStatusUpdateEvent;
 import org.apache.tez.runtime.api.events.VertexManagerEvent;
@@ -560,8 +560,8 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex,
   private Map<String, RootInputLeafOutput<OutputDescriptor, OutputCommitterDescriptor>> 
     additionalOutputs;
   private Map<String, OutputCommitter> outputCommitters;
-  private Map<String, RootInputSpecUpdate> rootInputSpecs = new HashMap<String, RootInputSpecUpdate>();
-  private static final RootInputSpecUpdate DEFAULT_ROOT_INPUT_SPECS = RootInputSpecUpdate
+  private Map<String, InputSpecUpdate> rootInputSpecs = new HashMap<String, InputSpecUpdate>();
+  private static final InputSpecUpdate DEFAULT_ROOT_INPUT_SPECS = InputSpecUpdate
       .getDefaultSinglePhysicalInputSpecUpdate(); 
   private final List<OutputSpec> additionalOutputSpecs = new ArrayList<OutputSpec>();
   private Set<String> inputsWithInitializers;
@@ -601,8 +601,8 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex,
   private boolean summaryCompleteSeen = false;
   private boolean hasCommitter = false;
   private boolean vertexCompleteSeen = false;
-  private Map<String,EdgeManagerDescriptor> recoveredSourceEdgeManagers = null;
-  private Map<String, RootInputSpecUpdate> recoveredRootInputSpecUpdates = null;
+  private Map<String,EdgeManagerPluginDescriptor> recoveredSourceEdgeManagers = null;
+  private Map<String, InputSpecUpdate> recoveredRootInputSpecUpdates = null;
 
   // Recovery related flags
   boolean recoveryInitEventSeen = false;
@@ -967,8 +967,8 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex,
   }
 
   private void handleParallelismUpdate(int newParallelism,
-      Map<String, EdgeManagerDescriptor> sourceEdgeManagers,
-      Map<String, RootInputSpecUpdate> rootInputSpecUpdates) {
+      Map<String, EdgeManagerPluginDescriptor> sourceEdgeManagers,
+      Map<String, InputSpecUpdate> rootInputSpecUpdates) {
     LinkedHashMap<TezTaskID, Task> currentTasks = this.tasks;
     Iterator<Map.Entry<TezTaskID, Task>> iter = currentTasks.entrySet()
         .iterator();
@@ -1111,21 +1111,21 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex,
 
   @Override
   public boolean setParallelism(int parallelism, VertexLocationHint vertexLocationHint,
-      Map<String, EdgeManagerDescriptor> sourceEdgeManagers,
-      Map<String, RootInputSpecUpdate> rootInputSpecUpdates) {
+      Map<String, EdgeManagerPluginDescriptor> sourceEdgeManagers,
+      Map<String, InputSpecUpdate> rootInputSpecUpdates) {
     return setParallelism(parallelism, vertexLocationHint, sourceEdgeManagers, rootInputSpecUpdates,
         false);
   }
 
   private boolean setParallelism(int parallelism, VertexLocationHint vertexLocationHint,
-      Map<String, EdgeManagerDescriptor> sourceEdgeManagers,
-      Map<String, RootInputSpecUpdate> rootInputSpecUpdates,
+      Map<String, EdgeManagerPluginDescriptor> sourceEdgeManagers,
+      Map<String, InputSpecUpdate> rootInputSpecUpdates,
       boolean recovering) {
     if (recovering) {
       writeLock.lock();
       try {
         if (sourceEdgeManagers != null) {
-          for(Map.Entry<String, EdgeManagerDescriptor> entry :
+          for(Map.Entry<String, EdgeManagerPluginDescriptor> entry :
               sourceEdgeManagers.entrySet()) {
             LOG.info("Recovering edge manager for source:"
                 + entry.getKey() + " destination: " + getVertexId());
@@ -1175,7 +1175,7 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex,
         }
         
         if(sourceEdgeManagers != null) {
-          for(Map.Entry<String, EdgeManagerDescriptor> entry : sourceEdgeManagers.entrySet()) {
+          for(Map.Entry<String, EdgeManagerPluginDescriptor> entry : sourceEdgeManagers.entrySet()) {
             LOG.info("Replacing edge manager for source:"
                 + entry.getKey() + " destination: " + getVertexId());
             Vertex sourceVertex = appContext.getCurrentDAG().getVertex(entry.getKey());
@@ -1194,7 +1194,7 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex,
         if (rootInputSpecUpdates != null) {
           LOG.info("Got updated RootInputsSpecs: " + rootInputSpecUpdates.toString());
           // Sanity check for correct number of updates.
-          for (Entry<String, RootInputSpecUpdate> rootInputSpecUpdateEntry : rootInputSpecUpdates
+          for (Entry<String, InputSpecUpdate> rootInputSpecUpdateEntry : rootInputSpecUpdates
               .entrySet()) {
             Preconditions
                 .checkState(
@@ -1273,7 +1273,7 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex,
   
         // set new edge managers
         if(sourceEdgeManagers != null) {
-          for(Map.Entry<String, EdgeManagerDescriptor> entry : sourceEdgeManagers.entrySet()) {
+          for(Map.Entry<String, EdgeManagerPluginDescriptor> entry : sourceEdgeManagers.entrySet()) {
             LOG.info("Replacing edge manager for source:"
                 + entry.getKey() + " destination: " + getVertexId());
             Vertex sourceVertex = appContext.getCurrentDAG().getVertex(entry.getKey());
@@ -3375,7 +3375,7 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex,
             vertex.pendingTaskEvents.add(tezEvent);
           } else {
             checkEventSourceMetadata(vertex, sourceMeta);
-            RootInputDataInformationEvent riEvent = (RootInputDataInformationEvent) tezEvent
+            InputDataInformationEvent riEvent = (InputDataInformationEvent) tezEvent
                 .getEvent();
             TezTaskID targetTaskID = TezTaskID.getInstance(vertex.getVertexId(),
                 riEvent.getTargetIndex());
@@ -3399,7 +3399,7 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex,
           break;
         case ROOT_INPUT_INITIALIZER_EVENT:
         {
-          RootInputInitializerEvent riEvent = (RootInputInitializerEvent) tezEvent.getEvent();
+          InputInitializerEvent riEvent = (InputInitializerEvent) tezEvent.getEvent();
           Vertex target = vertex.getDAG().getVertex(riEvent.getTargetVertexName());
           Preconditions.checkArgument(target != null,
               "Event sent to unkown vertex: " + riEvent.getTargetVertexName());

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java
index 645f440..214dae7 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java
@@ -34,7 +34,7 @@ import org.apache.tez.common.ReflectionUtils;
 import org.apache.tez.common.TezUserPayload;
 import org.apache.tez.common.TezUtils;
 import org.apache.tez.dag.api.DagTypeConverters;
-import org.apache.tez.dag.api.EdgeManagerDescriptor;
+import org.apache.tez.dag.api.EdgeManagerPluginDescriptor;
 import org.apache.tez.dag.api.EdgeProperty;
 import org.apache.tez.dag.api.InputDescriptor;
 import org.apache.tez.dag.api.InputInitializerDescriptor;
@@ -52,8 +52,8 @@ import org.apache.tez.dag.app.dag.event.VertexEventRouteEvent;
 import org.apache.tez.dag.records.TezTaskAttemptID;
 import org.apache.tez.dag.records.TezTaskID;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.RootInputSpecUpdate;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
+import org.apache.tez.runtime.api.InputSpecUpdate;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
 import org.apache.tez.runtime.api.events.VertexManagerEvent;
 import org.apache.tez.runtime.api.impl.EventMetaData;
 import org.apache.tez.runtime.api.impl.TezEvent;
@@ -104,8 +104,8 @@ public class VertexManager {
 
     @Override
     public boolean setVertexParallelism(int parallelism, VertexLocationHint vertexLocationHint,
-        Map<String, EdgeManagerDescriptor> sourceEdgeManagers,
-        Map<String, RootInputSpecUpdate> rootInputSpecUpdate) {
+        Map<String, EdgeManagerPluginDescriptor> sourceEdgeManagers,
+        Map<String, InputSpecUpdate> rootInputSpecUpdate) {
       return managedVertex.setParallelism(parallelism, vertexLocationHint, sourceEdgeManagers,
           rootInputSpecUpdate);
     }
@@ -136,12 +136,12 @@ public class VertexManager {
     @SuppressWarnings("unchecked")
     @Override
     public void addRootInputEvents(final String inputName,
-        Collection<RootInputDataInformationEvent> events) {
+        Collection<InputDataInformationEvent> events) {
       verifyIsRootInput(inputName);
       Iterable<TezEvent> tezEvents = Iterables.transform(events,
-          new Function<RootInputDataInformationEvent, TezEvent>() {
+          new Function<InputDataInformationEvent, TezEvent>() {
             @Override
-            public TezEvent apply(RootInputDataInformationEvent riEvent) {
+            public TezEvent apply(InputDataInformationEvent riEvent) {
               TezEvent tezEvent = new TezEvent(riEvent, rootEventSourceMetadata);
               tezEvent.setDestinationInfo(getDestinationMetaData(inputName));
               return tezEvent;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexDataMovementEventsGeneratedEvent.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexDataMovementEventsGeneratedEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexDataMovementEventsGeneratedEvent.java
index 778d4dd..7ae73be 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexDataMovementEventsGeneratedEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexDataMovementEventsGeneratedEvent.java
@@ -37,7 +37,7 @@ import org.apache.tez.dag.recovery.records.RecoveryProtos.VertexDataMovementEven
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.events.CompositeDataMovementEvent;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
 import org.apache.tez.runtime.api.impl.EventMetaData;
 import org.apache.tez.runtime.api.impl.EventType;
 import org.apache.tez.runtime.api.impl.TezEvent;
@@ -131,7 +131,7 @@ public class VertexDataMovementEventsGeneratedEvent implements HistoryEvent {
         } else if (event.getEventType().equals(EventType.ROOT_INPUT_DATA_INFORMATION_EVENT)) {
           evtBuilder.setRootInputDataInformationEvent(
               ProtoConverters.convertRootInputDataInformationEventToProto(
-                  (RootInputDataInformationEvent) event.getEvent()));
+                  (InputDataInformationEvent) event.getEvent()));
         }
         if (event.getSourceInfo() != null) {
           evtBuilder.setSourceInfo(convertEventMetaDataToProto(event.getSourceInfo()));

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexParallelismUpdatedEvent.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexParallelismUpdatedEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexParallelismUpdatedEvent.java
index 15da86d..f509dba 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexParallelismUpdatedEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexParallelismUpdatedEvent.java
@@ -26,7 +26,7 @@ import java.util.Map;
 import java.util.Map.Entry;
 
 import org.apache.tez.dag.api.DagTypeConverters;
-import org.apache.tez.dag.api.EdgeManagerDescriptor;
+import org.apache.tez.dag.api.EdgeManagerPluginDescriptor;
 import org.apache.tez.dag.api.VertexLocationHint;
 import org.apache.tez.dag.history.HistoryEvent;
 import org.apache.tez.dag.history.HistoryEventType;
@@ -34,7 +34,7 @@ import org.apache.tez.dag.records.TezVertexID;
 import org.apache.tez.dag.recovery.records.RecoveryProtos.EdgeManagerDescriptorProto;
 import org.apache.tez.dag.recovery.records.RecoveryProtos.RootInputSpecUpdateProto;
 import org.apache.tez.dag.recovery.records.RecoveryProtos.VertexParallelismUpdatedProto;
-import org.apache.tez.runtime.api.RootInputSpecUpdate;
+import org.apache.tez.runtime.api.InputSpecUpdate;
 
 import com.google.common.collect.Maps;
 
@@ -43,16 +43,16 @@ public class VertexParallelismUpdatedEvent implements HistoryEvent {
   private TezVertexID vertexID;
   private int numTasks;
   private VertexLocationHint vertexLocationHint;
-  private Map<String, EdgeManagerDescriptor> sourceEdgeManagers;
-  private Map<String, RootInputSpecUpdate> rootInputSpecUpdates;
+  private Map<String, EdgeManagerPluginDescriptor> sourceEdgeManagers;
+  private Map<String, InputSpecUpdate> rootInputSpecUpdates;
 
   public VertexParallelismUpdatedEvent() {
   }
 
   public VertexParallelismUpdatedEvent(TezVertexID vertexID,
       int numTasks, VertexLocationHint vertexLocationHint,
-      Map<String, EdgeManagerDescriptor> sourceEdgeManagers,
-      Map<String, RootInputSpecUpdate> rootInputSpecUpdates) {
+      Map<String, EdgeManagerPluginDescriptor> sourceEdgeManagers,
+      Map<String, InputSpecUpdate> rootInputSpecUpdates) {
     this.vertexID = vertexID;
     this.numTasks = numTasks;
     this.vertexLocationHint = vertexLocationHint;
@@ -85,7 +85,7 @@ public class VertexParallelismUpdatedEvent implements HistoryEvent {
             this.vertexLocationHint));
     }
     if (sourceEdgeManagers != null) {
-      for (Entry<String, EdgeManagerDescriptor> entry :
+      for (Entry<String, EdgeManagerPluginDescriptor> entry :
           sourceEdgeManagers.entrySet()) {
         EdgeManagerDescriptorProto.Builder edgeMgrBuilder =
             EdgeManagerDescriptorProto.newBuilder();
@@ -96,7 +96,7 @@ public class VertexParallelismUpdatedEvent implements HistoryEvent {
       }
     }
     if (rootInputSpecUpdates != null) {
-      for (Entry<String, RootInputSpecUpdate> entry : rootInputSpecUpdates.entrySet()) {
+      for (Entry<String, InputSpecUpdate> entry : rootInputSpecUpdates.entrySet()) {
         RootInputSpecUpdateProto.Builder rootInputSpecUpdateBuilder = RootInputSpecUpdateProto
             .newBuilder();
         rootInputSpecUpdateBuilder.setInputName(entry.getKey());
@@ -117,11 +117,11 @@ public class VertexParallelismUpdatedEvent implements HistoryEvent {
           proto.getVertexLocationHint());
     }
     if (proto.getEdgeManagerDescriptorsCount() > 0) {
-      this.sourceEdgeManagers = new HashMap<String, EdgeManagerDescriptor>(
+      this.sourceEdgeManagers = new HashMap<String, EdgeManagerPluginDescriptor>(
           proto.getEdgeManagerDescriptorsCount());
       for (EdgeManagerDescriptorProto edgeManagerProto :
         proto.getEdgeManagerDescriptorsList()) {
-        EdgeManagerDescriptor edgeManagerDescriptor =
+        EdgeManagerPluginDescriptor edgeManagerDescriptor =
             DagTypeConverters.convertEdgeManagerDescriptorFromDAGPlan(
                 edgeManagerProto.getEntityDescriptor());
         sourceEdgeManagers.put(edgeManagerProto.getEdgeName(),
@@ -131,13 +131,13 @@ public class VertexParallelismUpdatedEvent implements HistoryEvent {
     if (proto.getRootInputSpecUpdatesCount() > 0) {
       this.rootInputSpecUpdates = Maps.newHashMap();
       for (RootInputSpecUpdateProto rootInputSpecUpdateProto : proto.getRootInputSpecUpdatesList()) {
-        RootInputSpecUpdate specUpdate;
+        InputSpecUpdate specUpdate;
         if (rootInputSpecUpdateProto.getForAllWorkUnits()) {
-          specUpdate = RootInputSpecUpdate
-              .createAllTaskRootInputSpecUpdate(rootInputSpecUpdateProto.getNumPhysicalInputs(0));
+          specUpdate = InputSpecUpdate
+              .createAllTaskInputSpecUpdate(rootInputSpecUpdateProto.getNumPhysicalInputs(0));
         } else {
-          specUpdate = RootInputSpecUpdate
-              .createPerTaskRootInputSpecUpdate(rootInputSpecUpdateProto.getNumPhysicalInputsList());
+          specUpdate = InputSpecUpdate
+              .createPerTaskInputSpecUpdate(rootInputSpecUpdateProto.getNumPhysicalInputsList());
         }
         this.rootInputSpecUpdates.put(rootInputSpecUpdateProto.getInputName(), specUpdate);
       }
@@ -182,11 +182,11 @@ public class VertexParallelismUpdatedEvent implements HistoryEvent {
     return vertexLocationHint;
   }
 
-  public Map<String, EdgeManagerDescriptor> getSourceEdgeManagers() {
+  public Map<String, EdgeManagerPluginDescriptor> getSourceEdgeManagers() {
     return sourceEdgeManagers;
   }
   
-  public Map<String, RootInputSpecUpdate> getRootInputSpecUpdates() {
+  public Map<String, InputSpecUpdate> getRootInputSpecUpdates() {
     return rootInputSpecUpdates;
   }
 }


[2/5] TEZ-1237. Consolidate naming of API classes (bikas)

Posted by bi...@apache.org.
http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/input/TestMultiMRInput.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/input/TestMultiMRInput.java b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/input/TestMultiMRInput.java
index 12c0a88..9af5a74 100644
--- a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/input/TestMultiMRInput.java
+++ b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/input/TestMultiMRInput.java
@@ -48,8 +48,8 @@ import org.apache.tez.mapreduce.hadoop.MRHelpers;
 import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRInputUserPayloadProto;
 import org.apache.tez.mapreduce.protos.MRRuntimeProtos.MRSplitProto;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezInputContext;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
+import org.apache.tez.runtime.api.InputContext;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
 import org.apache.tez.runtime.library.api.KeyValueReader;
 import org.junit.Before;
 import org.junit.Test;
@@ -94,7 +94,7 @@ public class TestMultiMRInput {
     builder.setConfigurationBytes(TezUtils.createByteStringFromConf(jobConf));
     byte[] payload = builder.build().toByteArray();
 
-    TezInputContext inputContext = createTezInputContext(payload);
+    InputContext inputContext = createTezInputContext(payload);
 
     MultiMRInput input = new MultiMRInput(inputContext, 1);
     input.initialize();
@@ -109,7 +109,7 @@ public class TestMultiMRInput {
     assertEquals(1, splits.length);
 
     MRSplitProto splitProto = MRHelpers.createSplitProto(splits[0]);
-    RootInputDataInformationEvent event = new RootInputDataInformationEvent(0,
+    InputDataInformationEvent event = new InputDataInformationEvent(0,
         splitProto.toByteArray());
 
     eventList.clear();
@@ -144,7 +144,7 @@ public class TestMultiMRInput {
     builder.setConfigurationBytes(TezUtils.createByteStringFromConf(jobConf));
     byte[] payload = builder.build().toByteArray();
 
-    TezInputContext inputContext = createTezInputContext(payload);
+    InputContext inputContext = createTezInputContext(payload);
 
     MultiMRInput input = new MultiMRInput(inputContext, 2);
     input.initialize();
@@ -169,11 +169,11 @@ public class TestMultiMRInput {
     assertEquals(2, splits.length);
 
     MRSplitProto splitProto1 = MRHelpers.createSplitProto(splits[0]);
-    RootInputDataInformationEvent event1 = new RootInputDataInformationEvent(0,
+    InputDataInformationEvent event1 = new InputDataInformationEvent(0,
         splitProto1.toByteArray());
 
     MRSplitProto splitProto2 = MRHelpers.createSplitProto(splits[1]);
-    RootInputDataInformationEvent event2 = new RootInputDataInformationEvent(0,
+    InputDataInformationEvent event2 = new InputDataInformationEvent(0,
         splitProto2.toByteArray());
 
     eventList.clear();
@@ -208,7 +208,7 @@ public class TestMultiMRInput {
     builder.setConfigurationBytes(TezUtils.createByteStringFromConf(jobConf));
     byte[] payload = builder.build().toByteArray();
 
-    TezInputContext inputContext = createTezInputContext(payload);
+    InputContext inputContext = createTezInputContext(payload);
 
     MultiMRInput input = new MultiMRInput(inputContext, 1);
     input.initialize();
@@ -222,9 +222,9 @@ public class TestMultiMRInput {
     assertEquals(1, splits.length);
 
     MRSplitProto splitProto = MRHelpers.createSplitProto(splits[0]);
-    RootInputDataInformationEvent event1 = new RootInputDataInformationEvent(0,
+    InputDataInformationEvent event1 = new InputDataInformationEvent(0,
         splitProto.toByteArray());
-    RootInputDataInformationEvent event2 = new RootInputDataInformationEvent(1,
+    InputDataInformationEvent event2 = new InputDataInformationEvent(1,
         splitProto.toByteArray());
 
     eventList.clear();
@@ -239,11 +239,11 @@ public class TestMultiMRInput {
     }
   }
 
-  private TezInputContext createTezInputContext(byte[] payload) {
+  private InputContext createTezInputContext(byte[] payload) {
     ApplicationId applicationId = ApplicationId.newInstance(10000, 1);
     TezCounters counters = new TezCounters();
 
-    TezInputContext inputContext = mock(TezInputContext.class);
+    InputContext inputContext = mock(InputContext.class);
     doReturn(applicationId).when(inputContext).getApplicationId();
     doReturn(counters).when(inputContext).getCounters();
     doReturn(1).when(inputContext).getDAGAttemptNumber();

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/map/TestMapProcessor.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/map/TestMapProcessor.java b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/map/TestMapProcessor.java
index f017436..41a2c81 100644
--- a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/map/TestMapProcessor.java
+++ b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/map/TestMapProcessor.java
@@ -43,7 +43,7 @@ import org.apache.tez.mapreduce.input.MRInputLegacy;
 import org.apache.tez.mapreduce.partition.MRPartitioner;
 import org.apache.tez.mapreduce.processor.MapUtils;
 import org.apache.tez.runtime.LogicalIOProcessorRuntimeTask;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.api.impl.InputSpec;
 import org.apache.tez.runtime.api.impl.OutputSpec;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
@@ -137,7 +137,7 @@ public class TestMapProcessor {
     task.run();
     task.close();
     
-    TezInputContext inputContext = task.getInputContexts().iterator().next();
+    InputContext inputContext = task.getInputContexts().iterator().next();
     TezTaskOutput mapOutputs = new TezLocalTaskOutputFiles(jobConf, inputContext.getUniqueIdentifier());
     
     

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-internals/src/main/java/org/apache/tez/common/ProtoConverters.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/main/java/org/apache/tez/common/ProtoConverters.java b/tez-runtime-internals/src/main/java/org/apache/tez/common/ProtoConverters.java
index 33dd1ee..803d9e2 100644
--- a/tez-runtime-internals/src/main/java/org/apache/tez/common/ProtoConverters.java
+++ b/tez-runtime-internals/src/main/java/org/apache/tez/common/ProtoConverters.java
@@ -22,8 +22,8 @@ import com.google.protobuf.ByteString;
 import org.apache.tez.runtime.api.events.CompositeDataMovementEvent;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.api.events.EventProtos;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
-import org.apache.tez.runtime.api.events.RootInputInitializerEvent;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
+import org.apache.tez.runtime.api.events.InputInitializerEvent;
 
 public class ProtoConverters {
 
@@ -69,7 +69,7 @@ public class ProtoConverters {
   }
 
   public static EventProtos.RootInputDataInformationEventProto
-      convertRootInputDataInformationEventToProto(RootInputDataInformationEvent event) {
+      convertRootInputDataInformationEventToProto(InputDataInformationEvent event) {
     EventProtos.RootInputDataInformationEventProto.Builder builder =
         EventProtos.RootInputDataInformationEventProto.newBuilder();
     builder.setSourceIndex(event.getSourceIndex());
@@ -80,10 +80,10 @@ public class ProtoConverters {
     return builder.build();
   }
 
-  public static RootInputDataInformationEvent
+  public static InputDataInformationEvent
       convertRootInputDataInformationEventFromProto(
       EventProtos.RootInputDataInformationEventProto proto) {
-    RootInputDataInformationEvent diEvent = new RootInputDataInformationEvent(
+    InputDataInformationEvent diEvent = new InputDataInformationEvent(
         proto.getSourceIndex(), proto.getUserPayload() != null ? proto.getUserPayload()
             .toByteArray() : null);
     diEvent.setTargetIndex(proto.getTargetIndex());
@@ -91,7 +91,7 @@ public class ProtoConverters {
   }
 
   public static EventProtos.RootInputInitializerEventProto convertRootInputInitializerEventToProto(
-      RootInputInitializerEvent event) {
+      InputInitializerEvent event) {
     EventProtos.RootInputInitializerEventProto.Builder builder =
         EventProtos.RootInputInitializerEventProto.newBuilder();
     builder.setTargetVertexName(event.getTargetVertexName());
@@ -103,10 +103,10 @@ public class ProtoConverters {
     return builder.build();
   }
 
-  public static RootInputInitializerEvent convertRootInputInitializerEventFromProto(
+  public static InputInitializerEvent convertRootInputInitializerEventFromProto(
       EventProtos.RootInputInitializerEventProto proto) {
-    RootInputInitializerEvent event =
-        new RootInputInitializerEvent(proto.getTargetVertexName(), proto.getTargetInputName(),
+    InputInitializerEvent event =
+        new InputInitializerEvent(proto.getTargetVertexName(), proto.getTargetInputName(),
             (proto.hasUserPayload() ? proto.getUserPayload().toByteArray() : null),
             proto.getVersion());
     return event;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-internals/src/main/java/org/apache/tez/runtime/LogicalIOProcessorRuntimeTask.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/LogicalIOProcessorRuntimeTask.java b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/LogicalIOProcessorRuntimeTask.java
index 92a0f07..a11a7e1 100644
--- a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/LogicalIOProcessorRuntimeTask.java
+++ b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/LogicalIOProcessorRuntimeTask.java
@@ -60,10 +60,10 @@ import org.apache.tez.runtime.api.MergedLogicalInput;
 import org.apache.tez.runtime.api.Output;
 import org.apache.tez.runtime.api.OutputFrameworkInterface;
 import org.apache.tez.runtime.api.Processor;
-import org.apache.tez.runtime.api.TezInputContext;
-import org.apache.tez.runtime.api.TezMergedInputContext;
-import org.apache.tez.runtime.api.TezOutputContext;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.InputContext;
+import org.apache.tez.runtime.api.MergedInputContext;
+import org.apache.tez.runtime.api.OutputContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.api.impl.EventMetaData;
 import org.apache.tez.runtime.api.impl.EventMetaData.EventProducerConsumerType;
 import org.apache.tez.runtime.api.impl.GroupInputSpec;
@@ -96,18 +96,18 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
   /** Responsible for maintaining order of Inputs */
   private final List<InputSpec> inputSpecs;
   private final ConcurrentHashMap<String, LogicalInput> inputsMap;
-  private final ConcurrentHashMap<String, TezInputContext> inputContextMap;
+  private final ConcurrentHashMap<String, InputContext> inputContextMap;
   /** Responsible for maintaining order of Outputs */
   private final List<OutputSpec> outputSpecs;
   private final ConcurrentHashMap<String, LogicalOutput> outputsMap;
-  private final ConcurrentHashMap<String, TezOutputContext> outputContextMap;
+  private final ConcurrentHashMap<String, OutputContext> outputContextMap;
 
   private final List<GroupInputSpec> groupInputSpecs;
   private ConcurrentHashMap<String, MergedLogicalInput> groupInputsMap;
 
   private final ProcessorDescriptor processorDescriptor;
   private AbstractLogicalIOProcessor processor;
-  private TezProcessorContext processorContext;
+  private ProcessorContext processorContext;
 
   private final MemoryDistributor initialMemoryDistributor;
 
@@ -146,10 +146,10 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
     this.localDirs = localDirs;
     this.inputSpecs = taskSpec.getInputs();
     this.inputsMap = new ConcurrentHashMap<String, LogicalInput>(numInputs);
-    this.inputContextMap = new ConcurrentHashMap<String, TezInputContext>(numInputs);
+    this.inputContextMap = new ConcurrentHashMap<String, InputContext>(numInputs);
     this.outputSpecs = taskSpec.getOutputs();
     this.outputsMap = new ConcurrentHashMap<String, LogicalOutput>(numOutputs);
-    this.outputContextMap = new ConcurrentHashMap<String, TezOutputContext>(numOutputs);
+    this.outputContextMap = new ConcurrentHashMap<String, OutputContext>(numOutputs);
 
     this.runInputMap = new LinkedHashMap<String, LogicalInput>();
     this.runOutputMap = new LinkedHashMap<String, LogicalOutput>();
@@ -372,7 +372,7 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
     public Void call() throws Exception {
       LOG.info("Initializing Input using InputSpec: " + inputSpec);
       String edgeName = inputSpec.getSourceVertexName();
-      TezInputContext inputContext = createInputContext(inputsMap, inputSpec, inputIndex);
+      InputContext inputContext = createInputContext(inputsMap, inputSpec, inputIndex);
       LogicalInput input = createInput(inputSpec, inputContext);
 
       inputsMap.put(edgeName, input);
@@ -420,7 +420,7 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
     public Void call() throws Exception {
       LOG.info("Initializing Output using OutputSpec: " + outputSpec);
       String edgeName = outputSpec.getDestinationVertexName();
-      TezOutputContext outputContext = createOutputContext(outputSpec, outputIndex);
+      OutputContext outputContext = createOutputContext(outputSpec, outputIndex);
       LogicalOutput output = createOutput(outputSpec, outputContext);
 
       outputsMap.put(edgeName, output);
@@ -449,7 +449,7 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
      groupInputsMap = new ConcurrentHashMap<String, MergedLogicalInput>(groupInputSpecs.size());
      for (GroupInputSpec groupInputSpec : groupInputSpecs) {
         LOG.info("Initializing GroupInput using GroupInputSpec: " + groupInputSpec);
-       TezMergedInputContext mergedInputContext =
+       MergedInputContext mergedInputContext =
            new TezMergedInputContextImpl(groupInputSpec.getMergedInputDescriptor().getUserPayload(),
                groupInputSpec.getGroupName(), groupInputsMap, inputReadyTracker, localDirs);
        List<Input> inputs = Lists.newArrayListWithCapacity(groupInputSpec.getGroupVertices().size());
@@ -474,9 +474,9 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
         + processorDescriptor.getClassName());
   }
 
-  private TezInputContext createInputContext(Map<String, LogicalInput> inputMap,
+  private InputContext createInputContext(Map<String, LogicalInput> inputMap,
                                              InputSpec inputSpec, int inputIndex) {
-    TezInputContext inputContext = new TezInputContextImpl(tezConf, localDirs,
+    InputContext inputContext = new TezInputContextImpl(tezConf, localDirs,
         appAttemptNumber, tezUmbilical,
         taskSpec.getDAGName(), taskSpec.getVertexName(),
         inputSpec.getSourceVertexName(), taskSpec.getTaskAttemptID(),
@@ -487,8 +487,8 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
     return inputContext;
   }
 
-  private TezOutputContext createOutputContext(OutputSpec outputSpec, int outputIndex) {
-    TezOutputContext outputContext = new TezOutputContextImpl(tezConf, localDirs,
+  private OutputContext createOutputContext(OutputSpec outputSpec, int outputIndex) {
+    OutputContext outputContext = new TezOutputContextImpl(tezConf, localDirs,
         appAttemptNumber, tezUmbilical,
         taskSpec.getDAGName(), taskSpec.getVertexName(),
         outputSpec.getDestinationVertexName(), taskSpec.getTaskAttemptID(),
@@ -499,8 +499,8 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
     return outputContext;
   }
 
-  private TezProcessorContext createProcessorContext() {
-    TezProcessorContext processorContext = new TezProcessorContextImpl(tezConf, localDirs,
+  private ProcessorContext createProcessorContext() {
+    ProcessorContext processorContext = new TezProcessorContextImpl(tezConf, localDirs,
         appAttemptNumber, tezUmbilical,
         taskSpec.getDAGName(), taskSpec.getVertexName(),
         taskSpec.getTaskAttemptID(),
@@ -510,11 +510,11 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
     return processorContext;
   }
 
-  private LogicalInput createInput(InputSpec inputSpec, TezInputContext inputContext) {
+  private LogicalInput createInput(InputSpec inputSpec, InputContext inputContext) {
     LOG.info("Creating Input");
     InputDescriptor inputDesc = inputSpec.getInputDescriptor();
     Input input = ReflectionUtils.createClazzInstance(inputDesc.getClassName(),
-        new Class[]{TezInputContext.class, Integer.TYPE},
+        new Class[]{InputContext.class, Integer.TYPE},
         new Object[]{inputContext, inputSpec.getPhysicalEdgeCount()});
     if (!(input instanceof LogicalInput)) {
       throw new TezUncheckedException(inputDesc.getClass().getName()
@@ -525,10 +525,10 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
   }
 
   private LogicalInput createMergedInput(InputDescriptor inputDesc,
-                                         TezMergedInputContext mergedInputContext,
+                                         MergedInputContext mergedInputContext,
                                          List<Input> constituentInputs) {
     LogicalInput input = ReflectionUtils.createClazzInstance(inputDesc.getClassName(),
-        new Class[]{TezMergedInputContext.class, List.class},
+        new Class[]{MergedInputContext.class, List.class},
         new Object[]{mergedInputContext, constituentInputs});
     if (!(input instanceof LogicalInput)) {
       throw new TezUncheckedException(inputDesc.getClass().getName()
@@ -538,11 +538,11 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
     return input;
   }
 
-  private LogicalOutput createOutput(OutputSpec outputSpec, TezOutputContext outputContext) {
+  private LogicalOutput createOutput(OutputSpec outputSpec, OutputContext outputContext) {
     LOG.info("Creating Output");
     OutputDescriptor outputDesc = outputSpec.getOutputDescriptor();
     Output output = ReflectionUtils.createClazzInstance(outputDesc.getClassName(),
-        new Class[]{TezOutputContext.class, Integer.TYPE},
+        new Class[]{OutputContext.class, Integer.TYPE},
         new Object[]{outputContext, outputSpec.getPhysicalEdgeCount()});
 
     if (!(output instanceof LogicalOutput)) {
@@ -554,9 +554,9 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
   }
 
   private AbstractLogicalIOProcessor createProcessor(
-      String processorClassName, TezProcessorContext processorContext) {
+      String processorClassName, ProcessorContext processorContext) {
     Processor processor = ReflectionUtils.createClazzInstance(processorClassName,
-        new Class[]{TezProcessorContext.class}, new Object[]{processorContext});
+        new Class[]{ProcessorContext.class}, new Object[]{processorContext});
     if (!(processor instanceof AbstractLogicalIOProcessor)) {
       throw new TezUncheckedException(processor.getClass().getName()
           + " is not a sub-type of AbstractLogicalIOProcessor."
@@ -695,19 +695,19 @@ public class LogicalIOProcessorRuntimeTask extends RuntimeTask {
   
   @Private
   @VisibleForTesting
-  public Collection<TezInputContext> getInputContexts() {
+  public Collection<InputContext> getInputContexts() {
     return this.inputContextMap.values();
   }
   
   @Private
   @VisibleForTesting
-  public Collection<TezOutputContext> getOutputContexts() {
+  public Collection<OutputContext> getOutputContexts() {
     return this.outputContextMap.values();
   }
 
   @Private
   @VisibleForTesting
-  public TezProcessorContext getProcessorContext() {
+  public ProcessorContext getProcessorContext() {
     return this.processorContext;
   }
   

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezEvent.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezEvent.java b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezEvent.java
index 770fd89..fea1350 100644
--- a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezEvent.java
+++ b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezEvent.java
@@ -37,8 +37,8 @@ import org.apache.tez.runtime.api.events.EventProtos.RootInputDataInformationEve
 import org.apache.tez.runtime.api.events.EventProtos.VertexManagerEventProto;
 import org.apache.tez.runtime.api.events.InputFailedEvent;
 import org.apache.tez.runtime.api.events.InputReadErrorEvent;
-import org.apache.tez.runtime.api.events.RootInputDataInformationEvent;
-import org.apache.tez.runtime.api.events.RootInputInitializerEvent;
+import org.apache.tez.runtime.api.events.InputDataInformationEvent;
+import org.apache.tez.runtime.api.events.InputInitializerEvent;
 import org.apache.tez.runtime.api.events.TaskAttemptCompletedEvent;
 import org.apache.tez.runtime.api.events.TaskAttemptFailedEvent;
 import org.apache.tez.runtime.api.events.TaskStatusUpdateEvent;
@@ -80,9 +80,9 @@ public class TezEvent implements Writable {
       eventType = EventType.INPUT_FAILED_EVENT;
     } else if (event instanceof TaskStatusUpdateEvent) {
       eventType = EventType.TASK_STATUS_UPDATE_EVENT;
-    } else if (event instanceof RootInputDataInformationEvent) {
+    } else if (event instanceof InputDataInformationEvent) {
       eventType = EventType.ROOT_INPUT_DATA_INFORMATION_EVENT;
-    } else if (event instanceof RootInputInitializerEvent) {
+    } else if (event instanceof InputInitializerEvent) {
       eventType = EventType.ROOT_INPUT_INITIALIZER_EVENT;
     } else {
       throw new TezUncheckedException("Unknown event, event="
@@ -173,11 +173,11 @@ public class TezEvent implements Writable {
         break;
       case ROOT_INPUT_DATA_INFORMATION_EVENT:
         eventBytes = ProtoConverters.convertRootInputDataInformationEventToProto(
-            (RootInputDataInformationEvent) event).toByteArray();
+            (InputDataInformationEvent) event).toByteArray();
         break;
       case ROOT_INPUT_INITIALIZER_EVENT:
         eventBytes = ProtoConverters
-            .convertRootInputInitializerEventToProto((RootInputInitializerEvent) event)
+            .convertRootInputInitializerEventToProto((InputInitializerEvent) event)
             .toByteArray();
         break;
       default:

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezInputContextImpl.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezInputContextImpl.java b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezInputContextImpl.java
index 627e830..d39e5b3 100644
--- a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezInputContextImpl.java
+++ b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezInputContextImpl.java
@@ -41,13 +41,13 @@ import org.apache.tez.runtime.InputReadyTracker;
 import org.apache.tez.runtime.RuntimeTask;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.LogicalInput;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.api.impl.EventMetaData.EventProducerConsumerType;
 import org.apache.tez.runtime.common.objectregistry.ObjectRegistry;
 import org.apache.tez.runtime.common.resources.MemoryDistributor;
 
 public class TezInputContextImpl extends TezTaskContextImpl
-    implements TezInputContext {
+    implements InputContext {
 
   private final TezUserPayload userPayload;
   private final String sourceVertexName;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezMergedInputContextImpl.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezMergedInputContextImpl.java b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezMergedInputContextImpl.java
index cf55d39..f43282a 100644
--- a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezMergedInputContextImpl.java
+++ b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezMergedInputContextImpl.java
@@ -12,10 +12,10 @@ import org.apache.tez.dag.api.DagTypeConverters;
 import org.apache.tez.runtime.InputReadyTracker;
 import org.apache.tez.runtime.api.Input;
 import org.apache.tez.runtime.api.MergedLogicalInput;
-import org.apache.tez.runtime.api.TezMergedInputContext;
+import org.apache.tez.runtime.api.MergedInputContext;
 
 
-public class TezMergedInputContextImpl implements TezMergedInputContext {
+public class TezMergedInputContextImpl implements MergedInputContext {
 
   private final TezUserPayload userPayload;
   private final String groupInputName;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezOutputContextImpl.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezOutputContextImpl.java b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezOutputContextImpl.java
index cde4c0c..2d0d606 100644
--- a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezOutputContextImpl.java
+++ b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezOutputContextImpl.java
@@ -39,13 +39,13 @@ import org.apache.tez.dag.api.TezConfiguration;
 import org.apache.tez.dag.records.TezTaskAttemptID;
 import org.apache.tez.runtime.RuntimeTask;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.api.impl.EventMetaData.EventProducerConsumerType;
 import org.apache.tez.runtime.common.objectregistry.ObjectRegistry;
 import org.apache.tez.runtime.common.resources.MemoryDistributor;
 
 public class TezOutputContextImpl extends TezTaskContextImpl
-    implements TezOutputContext {
+    implements OutputContext {
 
   private final TezUserPayload userPayload;
   private final String destinationVertexName;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezProcessorContextImpl.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezProcessorContextImpl.java b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezProcessorContextImpl.java
index 9273cf3..a20036e 100644
--- a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezProcessorContextImpl.java
+++ b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezProcessorContextImpl.java
@@ -43,12 +43,12 @@ import org.apache.tez.runtime.InputReadyTracker;
 import org.apache.tez.runtime.RuntimeTask;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.Input;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.api.impl.EventMetaData.EventProducerConsumerType;
 import org.apache.tez.runtime.common.objectregistry.ObjectRegistry;
 import org.apache.tez.runtime.common.resources.MemoryDistributor;
 
-public class TezProcessorContextImpl extends TezTaskContextImpl implements TezProcessorContext {
+public class TezProcessorContextImpl extends TezTaskContextImpl implements ProcessorContext {
 
   private static final Log LOG = LogFactory.getLog(TezProcessorContextImpl.class);
   

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezTaskContextImpl.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezTaskContextImpl.java b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezTaskContextImpl.java
index b155cbc..45aba9c 100644
--- a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezTaskContextImpl.java
+++ b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/TezTaskContextImpl.java
@@ -36,13 +36,13 @@ import org.apache.tez.dag.api.TezEntityDescriptor;
 import org.apache.tez.dag.records.TezTaskAttemptID;
 import org.apache.tez.runtime.RuntimeTask;
 import org.apache.tez.runtime.api.MemoryUpdateCallback;
-import org.apache.tez.runtime.api.TezTaskContext;
+import org.apache.tez.runtime.api.TaskContext;
 import org.apache.tez.runtime.common.objectregistry.ObjectRegistry;
 import org.apache.tez.runtime.common.resources.MemoryDistributor;
 
 import com.google.common.base.Preconditions;
 
-public abstract class TezTaskContextImpl implements TezTaskContext {
+public abstract class TezTaskContextImpl implements TaskContext {
 
   private static final AtomicInteger ID_GEN = new AtomicInteger(10000);
   

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-internals/src/main/java/org/apache/tez/runtime/common/resources/MemoryDistributor.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/common/resources/MemoryDistributor.java b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/common/resources/MemoryDistributor.java
index 2efafab..6d58635 100644
--- a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/common/resources/MemoryDistributor.java
+++ b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/common/resources/MemoryDistributor.java
@@ -35,10 +35,10 @@ import org.apache.tez.dag.api.TezConfiguration;
 import org.apache.tez.dag.api.TezEntityDescriptor;
 import org.apache.tez.dag.api.TezUncheckedException;
 import org.apache.tez.runtime.api.MemoryUpdateCallback;
-import org.apache.tez.runtime.api.TezInputContext;
-import org.apache.tez.runtime.api.TezOutputContext;
-import org.apache.tez.runtime.api.TezProcessorContext;
-import org.apache.tez.runtime.api.TezTaskContext;
+import org.apache.tez.runtime.api.InputContext;
+import org.apache.tez.runtime.api.OutputContext;
+import org.apache.tez.runtime.api.ProcessorContext;
+import org.apache.tez.runtime.api.TaskContext;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Function;
@@ -60,8 +60,8 @@ public class MemoryDistributor {
 
   private long totalJvmMemory;
   private final boolean isEnabled;
-  private final Set<TezTaskContext> dupSet = Collections
-      .newSetFromMap(new ConcurrentHashMap<TezTaskContext, Boolean>());
+  private final Set<TaskContext> dupSet = Collections
+      .newSetFromMap(new ConcurrentHashMap<TaskContext, Boolean>());
   private final List<RequestorInfo> requestList;
 
   /**
@@ -93,7 +93,7 @@ public class MemoryDistributor {
    * Used by the Tez framework to request memory on behalf of user requests.
    */
   public void requestMemory(long requestSize, MemoryUpdateCallback callback,
-      TezTaskContext taskContext, TezEntityDescriptor<?> descriptor) {
+      TaskContext taskContext, TezEntityDescriptor<?> descriptor) {
     registerRequest(requestSize, callback, taskContext, descriptor);
   }
   
@@ -154,7 +154,7 @@ public class MemoryDistributor {
   }
 
   private long registerRequest(long requestSize, MemoryUpdateCallback callback,
-      TezTaskContext entityContext, TezEntityDescriptor<?> descriptor) {
+      TaskContext entityContext, TezEntityDescriptor<?> descriptor) {
     Preconditions.checkArgument(requestSize >= 0);
     Preconditions.checkNotNull(callback);
     Preconditions.checkNotNull(entityContext);
@@ -210,19 +210,19 @@ public class MemoryDistributor {
     private final MemoryUpdateCallback callback;
     private final InitialMemoryRequestContext requestContext;
 
-    public RequestorInfo(TezTaskContext taskContext, long requestSize,
+    public RequestorInfo(TaskContext taskContext, long requestSize,
         final MemoryUpdateCallback callback, TezEntityDescriptor<?> descriptor) {
       InitialMemoryRequestContext.ComponentType type;
       String componentVertexName;
-      if (taskContext instanceof TezInputContext) {
+      if (taskContext instanceof InputContext) {
         type = InitialMemoryRequestContext.ComponentType.INPUT;
-        componentVertexName = ((TezInputContext) taskContext).getSourceVertexName();
-      } else if (taskContext instanceof TezOutputContext) {
+        componentVertexName = ((InputContext) taskContext).getSourceVertexName();
+      } else if (taskContext instanceof OutputContext) {
         type = InitialMemoryRequestContext.ComponentType.OUTPUT;
-        componentVertexName = ((TezOutputContext) taskContext).getDestinationVertexName();
-      } else if (taskContext instanceof TezProcessorContext) {
+        componentVertexName = ((OutputContext) taskContext).getDestinationVertexName();
+      } else if (taskContext instanceof ProcessorContext) {
         type = InitialMemoryRequestContext.ComponentType.PROCESSOR;
-        componentVertexName = ((TezProcessorContext) taskContext).getTaskVertexName();
+        componentVertexName = ((ProcessorContext) taskContext).getTaskVertexName();
       } else {
         throw new IllegalArgumentException("Unknown type of entityContext: "
             + taskContext.getClass().getName());

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestInputReadyTracker.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestInputReadyTracker.java b/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestInputReadyTracker.java
index 352d09c..49855f2 100644
--- a/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestInputReadyTracker.java
+++ b/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestInputReadyTracker.java
@@ -33,7 +33,7 @@ import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.Input;
 import org.apache.tez.runtime.api.MergedLogicalInput;
 import org.apache.tez.runtime.api.Reader;
-import org.apache.tez.runtime.api.TezMergedInputContext;
+import org.apache.tez.runtime.api.MergedInputContext;
 import org.apache.tez.runtime.api.impl.TezMergedInputContextImpl;
 import org.junit.Test;
 
@@ -156,8 +156,8 @@ public class TestInputReadyTracker {
     group2Inputs.add(input4);
 
     Map<String, MergedLogicalInput> mergedInputMap = new HashMap<String, MergedLogicalInput>();
-    TezMergedInputContext mergedInputContext1 = new TezMergedInputContextImpl(null, "group1", mergedInputMap, inputReadyTracker, null);
-    TezMergedInputContext mergedInputContext2 = new TezMergedInputContextImpl(null, "group2", mergedInputMap, inputReadyTracker, null);
+    MergedInputContext mergedInputContext1 = new TezMergedInputContextImpl(null, "group1", mergedInputMap, inputReadyTracker, null);
+    MergedInputContext mergedInputContext2 = new TezMergedInputContextImpl(null, "group2", mergedInputMap, inputReadyTracker, null);
 
     AnyOneMergedInputForTest group1 = new AnyOneMergedInputForTest(mergedInputContext1, group1Inputs);
     AllMergedInputForTest group2 = new AllMergedInputForTest(mergedInputContext2, group2Inputs);
@@ -291,7 +291,7 @@ public class TestInputReadyTracker {
 
     private volatile boolean isReady = false;
 
-    public AnyOneMergedInputForTest(TezMergedInputContext context, List<Input> inputs) {
+    public AnyOneMergedInputForTest(MergedInputContext context, List<Input> inputs) {
       super(context, inputs);
     }
 
@@ -312,7 +312,7 @@ public class TestInputReadyTracker {
     private volatile boolean isReady = false;
     private Set<Input> readyInputs = Sets.newHashSet();
 
-    public AllMergedInputForTest(TezMergedInputContext context, List<Input> inputs) {
+    public AllMergedInputForTest(MergedInputContext context, List<Input> inputs) {
       super(context, inputs);
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestLogicalIOProcessorRuntimeTask.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestLogicalIOProcessorRuntimeTask.java b/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestLogicalIOProcessorRuntimeTask.java
index 7740cb0..0429218 100644
--- a/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestLogicalIOProcessorRuntimeTask.java
+++ b/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestLogicalIOProcessorRuntimeTask.java
@@ -41,9 +41,9 @@ import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.LogicalOutput;
 import org.apache.tez.runtime.api.Reader;
-import org.apache.tez.runtime.api.TezInputContext;
-import org.apache.tez.runtime.api.TezOutputContext;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.InputContext;
+import org.apache.tez.runtime.api.OutputContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.api.Writer;
 import org.apache.tez.runtime.api.impl.InputSpec;
 import org.apache.tez.runtime.api.impl.OutputSpec;
@@ -142,7 +142,7 @@ public class TestLogicalIOProcessorRuntimeTask {
 
     public static volatile int runCount = 0;
 
-    public TestProcessor(TezProcessorContext context) {
+    public TestProcessor(ProcessorContext context) {
       super(context);
     }
 
@@ -172,7 +172,7 @@ public class TestLogicalIOProcessorRuntimeTask {
 
     public static volatile int startCount = 0;
 
-    public TestInput(TezInputContext inputContext, int numPhysicalInputs) {
+    public TestInput(InputContext inputContext, int numPhysicalInputs) {
       super(inputContext, numPhysicalInputs);
     }
 
@@ -209,7 +209,7 @@ public class TestLogicalIOProcessorRuntimeTask {
 
     public static volatile int startCount = 0;
 
-    public TestOutput(TezOutputContext outputContext, int numPhysicalOutputs) {
+    public TestOutput(OutputContext outputContext, int numPhysicalOutputs) {
       super(outputContext, numPhysicalOutputs);
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-internals/src/test/java/org/apache/tez/runtime/common/resources/TestMemoryDistributor.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/test/java/org/apache/tez/runtime/common/resources/TestMemoryDistributor.java b/tez-runtime-internals/src/test/java/org/apache/tez/runtime/common/resources/TestMemoryDistributor.java
index 9d5f2e6..9b19264 100644
--- a/tez-runtime-internals/src/test/java/org/apache/tez/runtime/common/resources/TestMemoryDistributor.java
+++ b/tez-runtime-internals/src/test/java/org/apache/tez/runtime/common/resources/TestMemoryDistributor.java
@@ -29,9 +29,9 @@ import org.apache.tez.dag.api.OutputDescriptor;
 import org.apache.tez.dag.api.ProcessorDescriptor;
 import org.apache.tez.dag.api.TezConfiguration;
 import org.apache.tez.runtime.api.MemoryUpdateCallback;
-import org.apache.tez.runtime.api.TezInputContext;
-import org.apache.tez.runtime.api.TezOutputContext;
-import org.apache.tez.runtime.api.TezProcessorContext;
+import org.apache.tez.runtime.api.InputContext;
+import org.apache.tez.runtime.api.OutputContext;
+import org.apache.tez.runtime.api.ProcessorContext;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -54,19 +54,19 @@ public class TestMemoryDistributor {
 
     // First request
     MemoryUpdateCallbackForTest e1Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e1InputContext1 = createTestInputContext();
+    InputContext e1InputContext1 = createTestInputContext();
     InputDescriptor e1InDesc1 = createTestInputDescriptor();
     dist.requestMemory(10000, e1Callback, e1InputContext1, e1InDesc1);
     
     // Second request
     MemoryUpdateCallbackForTest e2Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e2InputContext2 = createTestInputContext();
+    InputContext e2InputContext2 = createTestInputContext();
     InputDescriptor e2InDesc2 = createTestInputDescriptor();
     dist.requestMemory(10000, e2Callback, e2InputContext2, e2InDesc2);
     
     // Third request - output
     MemoryUpdateCallbackForTest e3Callback = new MemoryUpdateCallbackForTest();
-    TezOutputContext e3OutputContext1 = createTestOutputContext();
+    OutputContext e3OutputContext1 = createTestOutputContext();
     OutputDescriptor e3OutDesc2 = createTestOutputDescriptor();
     dist.requestMemory(5000, e3Callback, e3OutputContext1, e3OutDesc2);
     
@@ -89,13 +89,13 @@ public class TestMemoryDistributor {
 
     // First request
     MemoryUpdateCallbackForTest e1Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e1InputContext1 = createTestInputContext();
+    InputContext e1InputContext1 = createTestInputContext();
     InputDescriptor e1InDesc1 = createTestInputDescriptor();
     dist.requestMemory(104857600l, e1Callback, e1InputContext1, e1InDesc1);
     
     // Second request
     MemoryUpdateCallbackForTest e2Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e2InputContext2 = createTestInputContext();
+    InputContext e2InputContext2 = createTestInputContext();
     InputDescriptor e2InDesc2 = createTestInputDescriptor();
     dist.requestMemory(157286400l, e2Callback, e2InputContext2, e2InDesc2);
     
@@ -113,25 +113,25 @@ public class TestMemoryDistributor {
 
     // First request
     MemoryUpdateCallbackForTest e1Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e1InputContext1 = createTestInputContext();
+    InputContext e1InputContext1 = createTestInputContext();
     InputDescriptor e1InDesc1 = createTestInputDescriptor();
     dist.requestMemory(10000, e1Callback, e1InputContext1, e1InDesc1);
     
     // Second request
     MemoryUpdateCallbackForTest e2Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e2InputContext2 = createTestInputContext();
+    InputContext e2InputContext2 = createTestInputContext();
     InputDescriptor e2InDesc2 = createTestInputDescriptor();
     dist.requestMemory(10000, e2Callback, e2InputContext2, e2InDesc2);
     
     // Third request - output
     MemoryUpdateCallbackForTest e3Callback = new MemoryUpdateCallbackForTest();
-    TezOutputContext e3OutputContext1 = createTestOutputContext();
+    OutputContext e3OutputContext1 = createTestOutputContext();
     OutputDescriptor e3OutDesc1 = createTestOutputDescriptor();
     dist.requestMemory(5000, e3Callback, e3OutputContext1, e3OutDesc1);
     
     // Fourth request - processor
     MemoryUpdateCallbackForTest e4Callback = new MemoryUpdateCallbackForTest();
-    TezProcessorContext e4ProcessorContext1 = createTestProcessortContext();
+    ProcessorContext e4ProcessorContext1 = createTestProcessortContext();
     ProcessorDescriptor e4ProcessorDesc1 = createTestProcessorDescriptor();
     dist.requestMemory(5000, e4Callback, e4ProcessorContext1, e4ProcessorDesc1);
     
@@ -158,13 +158,13 @@ public class TestMemoryDistributor {
 
     // First request
     MemoryUpdateCallbackForTest e1Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e1InputContext1 = createTestInputContext();
+    InputContext e1InputContext1 = createTestInputContext();
     InputDescriptor e1InDesc1 = createTestInputDescriptor();
     dist.requestMemory(104857600l, e1Callback, e1InputContext1, e1InDesc1);
     
     // Second request
     MemoryUpdateCallbackForTest e2Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e2InputContext2 = createTestInputContext();
+    InputContext e2InputContext2 = createTestInputContext();
     InputDescriptor e2InDesc2 = createTestInputDescriptor();
     dist.requestMemory(144965632l, e2Callback, e2InputContext2, e2InDesc2);
     
@@ -184,19 +184,19 @@ public class TestMemoryDistributor {
 
     // First request
     MemoryUpdateCallbackForTest e1Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e1InputContext1 = createTestInputContext();
+    InputContext e1InputContext1 = createTestInputContext();
     InputDescriptor e1InDesc1 = createTestInputDescriptor();
     dist.requestMemory(10000, e1Callback, e1InputContext1, e1InDesc1);
     
     // Second request
     MemoryUpdateCallbackForTest e2Callback = new MemoryUpdateCallbackForTest();
-    TezInputContext e2InputContext2 = createTestInputContext();
+    InputContext e2InputContext2 = createTestInputContext();
     InputDescriptor e2InDesc2 = createTestInputDescriptor();
     dist.requestMemory(10000, e2Callback, e2InputContext2, e2InDesc2);
     
     // Third request - output
     MemoryUpdateCallbackForTest e3Callback = new MemoryUpdateCallbackForTest();
-    TezOutputContext e3OutputContext1 = createTestOutputContext();
+    OutputContext e3OutputContext1 = createTestOutputContext();
     OutputDescriptor e3OutDesc2 = createTestOutputDescriptor();
     dist.requestMemory(5000, e3Callback, e3OutputContext1, e3OutDesc2);
     
@@ -239,22 +239,22 @@ public class TestMemoryDistributor {
     return desc;
   }
 
-  protected TezInputContext createTestInputContext() {
-    TezInputContext context = mock(TezInputContext.class);
+  protected InputContext createTestInputContext() {
+    InputContext context = mock(InputContext.class);
     doReturn("input").when(context).getSourceVertexName();
     doReturn("task").when(context).getTaskVertexName();
     return context;
   }
   
-  protected TezOutputContext createTestOutputContext() {
-    TezOutputContext context = mock(TezOutputContext.class);
+  protected OutputContext createTestOutputContext() {
+    OutputContext context = mock(OutputContext.class);
     doReturn("output").when(context).getDestinationVertexName();
     doReturn("task").when(context).getTaskVertexName();
     return context;
   }
   
-  protected TezProcessorContext createTestProcessortContext() {
-    TezProcessorContext context = mock(TezProcessorContext.class);
+  protected ProcessorContext createTestProcessortContext() {
+    ProcessorContext context = mock(ProcessorContext.class);
     doReturn("task").when(context).getTaskVertexName();
     return context;
   }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/dag/library/vertexmanager/ShuffleVertexManager.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/dag/library/vertexmanager/ShuffleVertexManager.java b/tez-runtime-library/src/main/java/org/apache/tez/dag/library/vertexmanager/ShuffleVertexManager.java
index 83c96e6..d171365 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/dag/library/vertexmanager/ShuffleVertexManager.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/dag/library/vertexmanager/ShuffleVertexManager.java
@@ -30,9 +30,9 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.tez.common.TezUtils;
-import org.apache.tez.dag.api.EdgeManager;
-import org.apache.tez.dag.api.EdgeManagerContext;
-import org.apache.tez.dag.api.EdgeManagerDescriptor;
+import org.apache.tez.dag.api.EdgeManagerPlugin;
+import org.apache.tez.dag.api.EdgeManagerPluginContext;
+import org.apache.tez.dag.api.EdgeManagerPluginDescriptor;
 import org.apache.tez.dag.api.EdgeProperty;
 import org.apache.tez.dag.api.InputDescriptor;
 import org.apache.tez.dag.api.TezUncheckedException;
@@ -125,14 +125,14 @@ public class ShuffleVertexManager extends VertexManagerPlugin {
     super(context);
   }
 
-  public static class CustomShuffleEdgeManager extends EdgeManager {
+  public static class CustomShuffleEdgeManager extends EdgeManagerPlugin {
     int numSourceTaskOutputs;
     int numDestinationTasks;
     int basePartitionRange;
     int remainderRangeForLastShuffler;
     int numSourceTasks;
 
-    public CustomShuffleEdgeManager(EdgeManagerContext context) {
+    public CustomShuffleEdgeManager(EdgeManagerPluginContext context) {
       super(context);
     }
 
@@ -419,8 +419,8 @@ public class ShuffleVertexManager extends VertexManagerPlugin {
           
     if(finalTaskParallelism < currentParallelism) {
       // final parallelism is less than actual parallelism
-      Map<String, EdgeManagerDescriptor> edgeManagers =
-          new HashMap<String, EdgeManagerDescriptor>(bipartiteSources.size());
+      Map<String, EdgeManagerPluginDescriptor> edgeManagers =
+          new HashMap<String, EdgeManagerPluginDescriptor>(bipartiteSources.size());
       for(String vertex : bipartiteSources.keySet()) {
         // use currentParallelism for numSourceTasks to maintain original state
         // for the source tasks
@@ -430,8 +430,8 @@ public class ShuffleVertexManager extends VertexManagerPlugin {
                 getContext().getVertexNumTasks(vertex), basePartitionRange,
                 ((remainderRangeForLastShuffler > 0) ?
                     remainderRangeForLastShuffler : basePartitionRange));
-        EdgeManagerDescriptor edgeManagerDescriptor =
-            new EdgeManagerDescriptor(CustomShuffleEdgeManager.class.getName());
+        EdgeManagerPluginDescriptor edgeManagerDescriptor =
+            new EdgeManagerPluginDescriptor(CustomShuffleEdgeManager.class.getName());
         edgeManagerDescriptor.setUserPayload(edgeManagerConfig.toUserPayload());
         edgeManagers.put(vertex, edgeManagerDescriptor);
       }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/broadcast/output/FileBasedKVWriter.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/broadcast/output/FileBasedKVWriter.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/broadcast/output/FileBasedKVWriter.java
index 5f48739..3ce8a8a 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/broadcast/output/FileBasedKVWriter.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/broadcast/output/FileBasedKVWriter.java
@@ -33,7 +33,7 @@ import org.apache.hadoop.io.compress.DefaultCodec;
 import org.apache.hadoop.util.ReflectionUtils;
 import org.apache.tez.common.counters.TaskCounter;
 import org.apache.tez.common.counters.TezCounter;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.library.api.KeyValuesWriter;
 import org.apache.tez.runtime.library.common.ConfigUtils;
 import org.apache.tez.runtime.library.common.TezRuntimeUtils;
@@ -82,7 +82,7 @@ public class FileBasedKVWriter extends KeyValuesWriter {
   // Time waiting for a write to complete, if that's possible.
   // Size of key-value pairs written.
 
-  public FileBasedKVWriter(TezOutputContext outputContext, Configuration conf) throws IOException {
+  public FileBasedKVWriter(OutputContext outputContext, Configuration conf) throws IOException {
     this.conf = conf;
 
     this.outputRecordsCounter = outputContext.getCounters().findCounter(TaskCounter.OUTPUT_RECORDS);

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/TezRuntimeUtils.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/TezRuntimeUtils.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/TezRuntimeUtils.java
index ae7bd30..17865ea 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/TezRuntimeUtils.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/TezRuntimeUtils.java
@@ -26,8 +26,8 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.tez.dag.api.TezUncheckedException;
-import org.apache.tez.runtime.api.TezOutputContext;
-import org.apache.tez.runtime.api.TezTaskContext;
+import org.apache.tez.runtime.api.OutputContext;
+import org.apache.tez.runtime.api.TaskContext;
 import org.apache.tez.runtime.library.api.Partitioner;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.combine.Combiner;
@@ -56,7 +56,7 @@ public class TezRuntimeUtils {
   }
 
   @SuppressWarnings("unchecked")
-  public static Combiner instantiateCombiner(Configuration conf, TezTaskContext taskContext) throws IOException {
+  public static Combiner instantiateCombiner(Configuration conf, TaskContext taskContext) throws IOException {
     Class<? extends Combiner> clazz;
     String className = conf.get(TezRuntimeConfiguration.TEZ_RUNTIME_COMBINER_CLASS);
     if (className == null) {
@@ -74,7 +74,7 @@ public class TezRuntimeUtils {
     
       Constructor<? extends Combiner> ctor;
       try {
-        ctor = clazz.getConstructor(TezTaskContext.class);
+        ctor = clazz.getConstructor(TaskContext.class);
         combiner = ctor.newInstance(taskContext);
       } catch (SecurityException e) {
         throw new IOException(e);
@@ -135,7 +135,7 @@ public class TezRuntimeUtils {
     return partitioner;
   }
   
-  public static TezTaskOutput instantiateTaskOutputManager(Configuration conf, TezOutputContext outputContext) {
+  public static TezTaskOutput instantiateTaskOutputManager(Configuration conf, OutputContext outputContext) {
     Class<?> clazz = conf.getClass(Constants.TEZ_RUNTIME_TASK_OUTPUT_MANAGER,
         TezTaskOutputFiles.class);
     try {

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/localshuffle/LocalShuffle.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/localshuffle/LocalShuffle.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/localshuffle/LocalShuffle.java
index 252d321..383f027 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/localshuffle/LocalShuffle.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/localshuffle/LocalShuffle.java
@@ -31,7 +31,7 @@ import org.apache.hadoop.io.compress.DefaultCodec;
 import org.apache.hadoop.util.ReflectionUtils;
 import org.apache.tez.common.counters.TaskCounter;
 import org.apache.tez.common.counters.TezCounter;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.ConfigUtils;
 import org.apache.tez.runtime.library.common.sort.impl.TezMerger;
@@ -44,7 +44,7 @@ public class LocalShuffle {
 
   // TODO NEWTEZ This is broken.
 
-  private final TezInputContext inputContext;
+  private final InputContext inputContext;
   private final Configuration conf;
   private final int numInputs;
 
@@ -63,7 +63,7 @@ public class LocalShuffle {
   private final int ifileReadAheadLength;
   private final int ifileBufferSize;
 
-  public LocalShuffle(TezInputContext inputContext, Configuration conf, int numInputs) throws IOException {
+  public LocalShuffle(InputContext inputContext, Configuration conf, int numInputs) throws IOException {
     this.inputContext = inputContext;
     this.conf = conf;
     this.numInputs = numInputs;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/Fetcher.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/Fetcher.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/Fetcher.java
index e5913e5..adfa060 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/Fetcher.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/Fetcher.java
@@ -33,7 +33,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.io.compress.CompressionCodec;
 import org.apache.tez.common.TezUtils;
 import org.apache.tez.common.counters.TezCounter;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.library.common.InputAttemptIdentifier;
 import org.apache.tez.runtime.library.common.shuffle.impl.MapOutput.Type;
 import org.apache.tez.runtime.library.shuffle.common.HttpConnection;
@@ -85,7 +85,7 @@ class Fetcher extends Thread {
       ShuffleClientMetrics metrics,
       Shuffle shuffle, SecretKey jobTokenSecret,
       boolean ifileReadAhead, int ifileReadAheadLength, CompressionCodec codec,
-      TezInputContext inputContext) throws IOException {
+      InputContext inputContext) throws IOException {
     setDaemon(true);
     this.scheduler = scheduler;
     this.merger = merger;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/MergeManager.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/MergeManager.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/MergeManager.java
index 17880e1..3c771c1 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/MergeManager.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/MergeManager.java
@@ -45,7 +45,7 @@ import org.apache.tez.common.TezUtils;
 import org.apache.tez.common.counters.TaskCounter;
 import org.apache.tez.common.counters.TezCounter;
 import org.apache.tez.dag.api.TezUncheckedException;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.ConfigUtils;
 import org.apache.tez.runtime.library.common.Constants;
@@ -105,7 +105,7 @@ public class MergeManager {
 
   private final ExceptionReporter exceptionReporter;
   
-  private final TezInputContext inputContext;
+  private final InputContext inputContext;
 
   private final TezCounter spilledRecordsCounter;
 
@@ -133,7 +133,7 @@ public class MergeManager {
   public MergeManager(Configuration conf, 
                       FileSystem localFS,
                       LocalDirAllocator localDirAllocator,  
-                      TezInputContext inputContext,
+                      InputContext inputContext,
                       Combiner combiner,
                       TezCounter spilledRecordsCounter,
                       TezCounter reduceCombineInputCounter,

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/Shuffle.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/Shuffle.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/Shuffle.java
index 78806a4..daf9df6 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/Shuffle.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/Shuffle.java
@@ -46,7 +46,7 @@ import org.apache.tez.common.counters.TaskCounter;
 import org.apache.tez.common.counters.TezCounter;
 import org.apache.tez.dag.api.TezConfiguration;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.ConfigUtils;
 import org.apache.tez.runtime.library.common.TezRuntimeUtils;
@@ -78,7 +78,7 @@ public class Shuffle implements ExceptionReporter {
   private static final int PROGRESS_FREQUENCY = 2000;
   
   private final Configuration conf;
-  private final TezInputContext inputContext;
+  private final InputContext inputContext;
   
   private final ShuffleClientMetrics metrics;
 
@@ -109,7 +109,7 @@ public class Shuffle implements ExceptionReporter {
   private AtomicBoolean schedulerClosed = new AtomicBoolean(false);
   private AtomicBoolean mergerClosed = new AtomicBoolean(false);
 
-  public Shuffle(TezInputContext inputContext, Configuration conf, int numInputs,
+  public Shuffle(InputContext inputContext, Configuration conf, int numInputs,
       long initialMemoryAvailable) throws IOException {
     this.inputContext = inputContext;
     this.conf = conf;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/ShuffleInputEventHandler.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/ShuffleInputEventHandler.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/ShuffleInputEventHandler.java
index 23616e0..040a08a 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/ShuffleInputEventHandler.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/ShuffleInputEventHandler.java
@@ -35,7 +35,7 @@ import org.apache.tez.common.TezRuntimeFrameworkConfigs;
 import org.apache.tez.common.TezUtils;
 import org.apache.tez.dag.api.TezUncheckedException;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.api.events.DataMovementEvent;
 import org.apache.tez.runtime.api.events.InputFailedEvent;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
@@ -53,7 +53,7 @@ public class ShuffleInputEventHandler {
   private static final Log LOG = LogFactory.getLog(ShuffleInputEventHandler.class);
 
   private final ShuffleScheduler scheduler;
-  private final TezInputContext inputContext;
+  private final InputContext inputContext;
 
   private int maxMapRuntime = 0;
   private final MergeManager merger;
@@ -61,7 +61,7 @@ public class ShuffleInputEventHandler {
   private final boolean sslShuffle;
   private final boolean doLocalFetch;
 
-  public ShuffleInputEventHandler(TezInputContext inputContext,
+  public ShuffleInputEventHandler(InputContext inputContext,
       ShuffleScheduler scheduler, MergeManager merger, Configuration conf, boolean sslShuffle) {
     this.inputContext = inputContext;
     this.scheduler = scheduler;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/ShuffleScheduler.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/ShuffleScheduler.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/ShuffleScheduler.java
index db322f7..13acf7b 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/ShuffleScheduler.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/ShuffleScheduler.java
@@ -42,7 +42,7 @@ import org.apache.tez.common.TezUtils;
 import org.apache.tez.common.counters.TaskCounter;
 import org.apache.tez.common.counters.TezCounter;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.api.events.InputReadErrorEvent;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.InputAttemptIdentifier;
@@ -79,7 +79,7 @@ class ShuffleScheduler {
     new HashMap<InputAttemptIdentifier,IntWritable>(); 
   private final Map<String,IntWritable> hostFailures = 
     new HashMap<String,IntWritable>();
-  private final TezInputContext inputContext;
+  private final InputContext inputContext;
   private final Shuffle shuffle;
   private final TezCounter shuffledInputsCounter;
   private final TezCounter skippedInputCounter;
@@ -102,7 +102,7 @@ class ShuffleScheduler {
   private long totalBytesShuffledTillNow = 0;
   private DecimalFormat  mbpsFormat = new DecimalFormat("0.00");
   
-  public ShuffleScheduler(TezInputContext inputContext,
+  public ShuffleScheduler(InputContext inputContext,
                           Configuration conf,
                           int numberOfInputs,
                           Shuffle shuffle,

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/ExternalSorter.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/ExternalSorter.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/ExternalSorter.java
index 0f4dbe2..00f985e 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/ExternalSorter.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/ExternalSorter.java
@@ -44,7 +44,7 @@ import org.apache.hadoop.util.ReflectionUtils;
 import org.apache.tez.common.TezRuntimeFrameworkConfigs;
 import org.apache.tez.common.counters.TaskCounter;
 import org.apache.tez.common.counters.TezCounter;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.library.api.Partitioner;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.ConfigUtils;
@@ -77,7 +77,7 @@ public abstract class ExternalSorter {
   }
 
   protected final Progressable nullProgressable = new NullProgressable();
-  protected final TezOutputContext outputContext;
+  protected final OutputContext outputContext;
   protected final Combiner combiner;
   protected final Partitioner partitioner;
   protected final Configuration conf;
@@ -129,7 +129,7 @@ public abstract class ExternalSorter {
   // spills)
   protected final TezCounter numAdditionalSpills;
 
-  public ExternalSorter(TezOutputContext outputContext, Configuration conf, int numOutputs,
+  public ExternalSorter(OutputContext outputContext, Configuration conf, int numOutputs,
       long initialMemoryAvailable) throws IOException {
     this.outputContext = outputContext;
     this.conf = conf;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java
index 6960736..7c28f95 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java
@@ -44,7 +44,7 @@ import org.apache.hadoop.util.IndexedSortable;
 import org.apache.hadoop.util.IndexedSorter;
 import org.apache.hadoop.util.Progress;
 import org.apache.tez.common.TezUtils;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.ConfigUtils;
 import org.apache.tez.runtime.library.common.sort.impl.IFile.Writer;
@@ -93,7 +93,7 @@ public class PipelinedSorter extends ExternalSorter {
 
   // TODO Set additional countesr - total bytes written, spills etc.
 
-  public PipelinedSorter(TezOutputContext outputContext, Configuration conf, int numOutputs,
+  public PipelinedSorter(OutputContext outputContext, Configuration conf, int numOutputs,
       long initialMemoryAvailable) throws IOException {
     super(outputContext, conf, numOutputs, initialMemoryAvailable);
     

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/dflt/DefaultSorter.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/dflt/DefaultSorter.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/dflt/DefaultSorter.java
index da6351d..7f28240 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/dflt/DefaultSorter.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/dflt/DefaultSorter.java
@@ -40,7 +40,7 @@ import org.apache.hadoop.util.IndexedSortable;
 import org.apache.hadoop.util.Progress;
 import org.apache.hadoop.util.StringUtils;
 import org.apache.tez.common.TezUtils;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.ConfigUtils;
 import org.apache.tez.runtime.library.common.sort.impl.ExternalSorter;
@@ -111,7 +111,7 @@ public class DefaultSorter extends ExternalSorter implements IndexedSortable {
   private final int indexCacheMemoryLimit;
   private int totalIndexCacheMemory;
 
-  public DefaultSorter(TezOutputContext outputContext, Configuration conf, int numOutputs,
+  public DefaultSorter(OutputContext outputContext, Configuration conf, int numOutputs,
       long initialMemoryAvailable) throws IOException {
     super(outputContext, conf, numOutputs, initialMemoryAvailable);
     // sanity checks

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/BaseUnorderedPartitionedKVWriter.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/BaseUnorderedPartitionedKVWriter.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/BaseUnorderedPartitionedKVWriter.java
index f784760..d1d575d 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/BaseUnorderedPartitionedKVWriter.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/BaseUnorderedPartitionedKVWriter.java
@@ -33,7 +33,7 @@ import org.apache.hadoop.util.ReflectionUtils;
 import org.apache.tez.common.counters.TaskCounter;
 import org.apache.tez.common.counters.TezCounter;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.library.api.KeyValuesWriter;
 import org.apache.tez.runtime.library.api.Partitioner;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
@@ -46,7 +46,7 @@ public abstract class BaseUnorderedPartitionedKVWriter extends KeyValuesWriter {
 
   private static final Log LOG = LogFactory.getLog(BaseUnorderedPartitionedKVWriter.class);
   
-  protected final TezOutputContext outputContext;
+  protected final OutputContext outputContext;
   protected final Configuration conf;
   protected final Partitioner partitioner;
   protected final Class keyClass;
@@ -102,7 +102,7 @@ public abstract class BaseUnorderedPartitionedKVWriter extends KeyValuesWriter {
   protected final TezCounter numAdditionalSpillsCounter;
 
   @SuppressWarnings("unchecked")
-  public BaseUnorderedPartitionedKVWriter(TezOutputContext outputContext, Configuration conf, int numOutputs) {
+  public BaseUnorderedPartitionedKVWriter(OutputContext outputContext, Configuration conf, int numOutputs) {
     this.outputContext = outputContext;
     this.conf = conf;
     this.numPartitions = numOutputs;

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/UnorderedPartitionedKVWriter.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/UnorderedPartitionedKVWriter.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/UnorderedPartitionedKVWriter.java
index 60bb021..8e98d1c 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/UnorderedPartitionedKVWriter.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/UnorderedPartitionedKVWriter.java
@@ -53,7 +53,7 @@ import org.apache.tez.common.TezUtils;
 import org.apache.tez.common.counters.TaskCounter;
 import org.apache.tez.common.counters.TezCounter;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezOutputContext;
+import org.apache.tez.runtime.api.OutputContext;
 import org.apache.tez.runtime.api.events.CompositeDataMovementEvent;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.Constants;
@@ -130,7 +130,7 @@ public class UnorderedPartitionedKVWriter extends BaseUnorderedPartitionedKVWrit
   private final ReentrantLock spillLock = new ReentrantLock();
   private final Condition spillInProgress = spillLock.newCondition();
 
-  public UnorderedPartitionedKVWriter(TezOutputContext outputContext, Configuration conf,
+  public UnorderedPartitionedKVWriter(OutputContext outputContext, Configuration conf,
       int numOutputs, long availableMemoryBytes) throws IOException {
     super(outputContext, conf, numOutputs);
     Preconditions.checkArgument(availableMemoryBytes > 0, "availableMemory should not be > 0 bytes");

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/OrderedPartitionedKVEdgeConfigurer.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/OrderedPartitionedKVEdgeConfigurer.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/OrderedPartitionedKVEdgeConfigurer.java
index 37e3ddc..029d640 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/OrderedPartitionedKVEdgeConfigurer.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/OrderedPartitionedKVEdgeConfigurer.java
@@ -25,7 +25,7 @@ import com.google.common.base.Preconditions;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.tez.dag.api.EdgeManagerDescriptor;
+import org.apache.tez.dag.api.EdgeManagerPluginDescriptor;
 import org.apache.tez.dag.api.EdgeProperty;
 import org.apache.tez.dag.api.InputDescriptor;
 import org.apache.tez.dag.api.OutputDescriptor;
@@ -129,7 +129,7 @@ public class OrderedPartitionedKVEdgeConfigurer extends HadoopKeyValuesBasedBase
    * @param edgeManagerDescriptor the custom edge specification
    * @return an {@link org.apache.tez.dag.api.EdgeProperty} instance
    */
-  public EdgeProperty createDefaultCustomEdgeProperty(EdgeManagerDescriptor edgeManagerDescriptor) {
+  public EdgeProperty createDefaultCustomEdgeProperty(EdgeManagerPluginDescriptor edgeManagerDescriptor) {
     Preconditions.checkNotNull(edgeManagerDescriptor, "EdgeManagerDescriptor cannot be null");
     EdgeProperty edgeProperty =
         new EdgeProperty(edgeManagerDescriptor, EdgeProperty.DataSourceType.PERSISTED,

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/UnorderedPartitionedKVEdgeConfigurer.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/UnorderedPartitionedKVEdgeConfigurer.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/UnorderedPartitionedKVEdgeConfigurer.java
index 1e2634a..728f8b3 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/UnorderedPartitionedKVEdgeConfigurer.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/UnorderedPartitionedKVEdgeConfigurer.java
@@ -27,7 +27,7 @@ import com.google.common.base.Preconditions;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.tez.dag.api.EdgeManagerDescriptor;
+import org.apache.tez.dag.api.EdgeManagerPluginDescriptor;
 import org.apache.tez.dag.api.EdgeProperty;
 import org.apache.tez.dag.api.InputDescriptor;
 import org.apache.tez.dag.api.OutputDescriptor;
@@ -135,7 +135,7 @@ public class UnorderedPartitionedKVEdgeConfigurer extends HadoopKeyValuesBasedBa
    * @param edgeManagerDescriptor the custom edge specification
    * @return an {@link org.apache.tez.dag.api.EdgeProperty} instance
    */
-  public EdgeProperty createDefaultCustomEdgeProperty(EdgeManagerDescriptor edgeManagerDescriptor) {
+  public EdgeProperty createDefaultCustomEdgeProperty(EdgeManagerPluginDescriptor edgeManagerDescriptor) {
     Preconditions.checkNotNull(edgeManagerDescriptor, "EdgeManagerDescriptor cannot be null");
     EdgeProperty edgeProperty =
         new EdgeProperty(edgeManagerDescriptor, EdgeProperty.DataSourceType.PERSISTED,

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/UnorderedUnpartitionedKVEdgeConfigurer.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/UnorderedUnpartitionedKVEdgeConfigurer.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/UnorderedUnpartitionedKVEdgeConfigurer.java
index 1f35f10..20cc449 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/UnorderedUnpartitionedKVEdgeConfigurer.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/conf/UnorderedUnpartitionedKVEdgeConfigurer.java
@@ -27,7 +27,7 @@ import com.google.common.base.Preconditions;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.tez.dag.api.EdgeManagerDescriptor;
+import org.apache.tez.dag.api.EdgeManagerPluginDescriptor;
 import org.apache.tez.dag.api.EdgeProperty;
 import org.apache.tez.dag.api.InputDescriptor;
 import org.apache.tez.dag.api.OutputDescriptor;
@@ -131,7 +131,7 @@ public class UnorderedUnpartitionedKVEdgeConfigurer extends HadoopKeyValuesBased
    * @param edgeManagerDescriptor the custom edge specification
    * @return an {@link org.apache.tez.dag.api.EdgeProperty} instance
    */
-  public EdgeProperty createDefaultCustomEdgeProperty(EdgeManagerDescriptor edgeManagerDescriptor) {
+  public EdgeProperty createDefaultCustomEdgeProperty(EdgeManagerPluginDescriptor edgeManagerDescriptor) {
     Preconditions.checkNotNull(edgeManagerDescriptor, "EdgeManagerDescriptor cannot be null");
     EdgeProperty edgeProperty =
         new EdgeProperty(edgeManagerDescriptor, EdgeProperty.DataSourceType.PERSISTED,

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ConcatenatedMergedKeyValueInput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ConcatenatedMergedKeyValueInput.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ConcatenatedMergedKeyValueInput.java
index 0012bae..f8d4215 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ConcatenatedMergedKeyValueInput.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ConcatenatedMergedKeyValueInput.java
@@ -25,12 +25,12 @@ import org.apache.tez.dag.api.TezUncheckedException;
 import org.apache.tez.runtime.api.Input;
 import org.apache.tez.runtime.api.MergedLogicalInput;
 import org.apache.tez.runtime.api.Reader;
-import org.apache.tez.runtime.api.TezMergedInputContext;
+import org.apache.tez.runtime.api.MergedInputContext;
 import org.apache.tez.runtime.library.api.KeyValueReader;
 
 public class ConcatenatedMergedKeyValueInput extends MergedLogicalInput {
 
-  public ConcatenatedMergedKeyValueInput(TezMergedInputContext context,
+  public ConcatenatedMergedKeyValueInput(MergedInputContext context,
                                          List<Input> inputs) {
     super(context, inputs);
   }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ConcatenatedMergedKeyValuesInput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ConcatenatedMergedKeyValuesInput.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ConcatenatedMergedKeyValuesInput.java
index 9bcadd8..3d5fed1 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ConcatenatedMergedKeyValuesInput.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ConcatenatedMergedKeyValuesInput.java
@@ -25,12 +25,12 @@ import org.apache.tez.dag.api.TezUncheckedException;
 import org.apache.tez.runtime.api.Input;
 import org.apache.tez.runtime.api.MergedLogicalInput;
 import org.apache.tez.runtime.api.Reader;
-import org.apache.tez.runtime.api.TezMergedInputContext;
+import org.apache.tez.runtime.api.MergedInputContext;
 import org.apache.tez.runtime.library.api.KeyValuesReader;
 
 public class ConcatenatedMergedKeyValuesInput extends MergedLogicalInput {
 
-  public ConcatenatedMergedKeyValuesInput(TezMergedInputContext context,
+  public ConcatenatedMergedKeyValuesInput(MergedInputContext context,
                                           List<Input> inputs) {
     super(context, inputs);
   }

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/LocalMergedInput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/LocalMergedInput.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/LocalMergedInput.java
index e1f825e..65938a8 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/LocalMergedInput.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/LocalMergedInput.java
@@ -24,7 +24,7 @@ import java.util.List;
 import org.apache.tez.common.TezUtils;
 import org.apache.tez.runtime.api.Event;
 import org.apache.tez.runtime.api.LogicalInput;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.library.common.localshuffle.LocalShuffle;
 
 /**
@@ -33,7 +33,7 @@ import org.apache.tez.runtime.library.common.localshuffle.LocalShuffle;
  */
 public class LocalMergedInput extends ShuffledMergedInputLegacy {
 
-  public LocalMergedInput(TezInputContext inputContext, int numPhysicalInputs) {
+  public LocalMergedInput(InputContext inputContext, int numPhysicalInputs) {
     super(inputContext, numPhysicalInputs);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledMergedInput.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledMergedInput.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledMergedInput.java
index 4c457bf..f09936b 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledMergedInput.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledMergedInput.java
@@ -39,7 +39,7 @@ import org.apache.tez.common.counters.TezCounter;
 import org.apache.tez.dag.api.TezConfiguration;
 import org.apache.tez.runtime.api.AbstractLogicalInput;
 import org.apache.tez.runtime.api.Event;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.library.api.KeyValuesReader;
 import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
 import org.apache.tez.runtime.library.common.ConfigUtils;
@@ -80,7 +80,7 @@ public class ShuffledMergedInput extends AbstractLogicalInput {
 
   private final AtomicBoolean isStarted = new AtomicBoolean(false);
 
-  public ShuffledMergedInput(TezInputContext inputContext, int numPhysicalInputs) {
+  public ShuffledMergedInput(InputContext inputContext, int numPhysicalInputs) {
     super(inputContext, numPhysicalInputs);
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/27e5b6c6/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledMergedInputLegacy.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledMergedInputLegacy.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledMergedInputLegacy.java
index 612bab5..2e3d354 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledMergedInputLegacy.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/ShuffledMergedInputLegacy.java
@@ -24,7 +24,7 @@ import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
 import org.apache.hadoop.classification.InterfaceAudience.Private;
 import org.apache.hadoop.io.DataInputBuffer;
 import org.apache.hadoop.util.Progress;
-import org.apache.tez.runtime.api.TezInputContext;
+import org.apache.tez.runtime.api.InputContext;
 import org.apache.tez.runtime.library.common.sort.impl.TezRawKeyValueIterator;
 
 @LimitedPrivate("mapreduce")
@@ -32,7 +32,7 @@ public class ShuffledMergedInputLegacy extends ShuffledMergedInput {
 
   private final Progress progress = new Progress();
 
-  public ShuffledMergedInputLegacy(TezInputContext inputContext, int numPhysicalInputs) {
+  public ShuffledMergedInputLegacy(InputContext inputContext, int numPhysicalInputs) {
     super(inputContext, numPhysicalInputs);
   }