Repository: tez
Updated Branches:
  refs/heads/master da4098b9d -> de51d40e9


TEZ-3436. Check input and output count before start in MapProcessor. (Darion 
Yaphet via hitesh)


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

Branch: refs/heads/master
Commit: de51d40e991efcae6a85acac9c30d22f45ba2444
Parents: da4098b
Author: Hitesh Shah <hit...@apache.org>
Authored: Wed Sep 21 14:17:30 2016 -0700
Committer: Hitesh Shah <hit...@apache.org>
Committed: Wed Sep 21 14:17:30 2016 -0700

----------------------------------------------------------------------
 CHANGES.txt                                           |  2 ++
 .../tez/mapreduce/processor/map/MapProcessor.java     | 14 ++++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/de51d40e/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3a55ec7..bdfd4c2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ INCOMPATIBLE CHANGES
 
 ALL CHANGES:
 
+  TEZ-3436. Check input and output count before start in MapProcessor.
   TEZ-3163. Reuse and tune Inflaters and Deflaters to speed DME processing
   TEZ-3434. Add unit tests for flushing of recovery events.
   TEZ-3317. Speculative execution starts too early due to 0 progress.
@@ -110,6 +111,7 @@ INCOMPATIBLE CHANGES
 
 ALL CHANGES:
 
+  TEZ-3436. Check input and output count before start in MapProcessor.
   TEZ-3426. Second AM attempt launched for session mode and recovery disabled 
for certain cases
   TEZ-3326. Display JVM system properties in AM and task logs.
   TEZ-3009. Errors that occur during container task acquisition are not logged.

http://git-wip-us.apache.org/repos/asf/tez/blob/de51d40e/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 ed22d2b..9888cd4 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
@@ -111,6 +111,14 @@ public class MapProcessor extends MRTask{
     this.inputs = _inputs;
     this.outputs = _outputs;
     LOG.info("Running map: " + processorContext.getUniqueIdentifier());
+
+    if (_inputs.size() != 1
+            || _outputs.size() != 1) {
+      throw new IOException("Cannot handle multiple _inputs or _outputs"
+              + ", inputCount=" + _inputs.size()
+              + ", outputCount=" + _outputs.size());
+    }
+
     for (LogicalInput input : _inputs.values()) {
       input.start();
     }
@@ -118,12 +126,6 @@ public class MapProcessor extends MRTask{
       output.start();
     }
 
-    if (_inputs.size() != 1
-        || _outputs.size() != 1) {
-      throw new IOException("Cannot handle multiple _inputs or _outputs"
-          + ", inputCount=" + _inputs.size()
-          + ", outputCount=" + _outputs.size());
-    }
     LogicalInput in = _inputs.values().iterator().next();
     LogicalOutput out = _outputs.values().iterator().next();
 

Reply via email to