tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject tez git commit: TEZ-3436. Check input and output count before start in MapProcessor. (Darion Yaphet via hitesh)
Date Wed, 21 Sep 2016 21:25:19 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.8 f86ed0d49 -> 97d23dca6


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

(cherry picked from commit de51d40e991efcae6a85acac9c30d22f45ba2444)

Conflicts:
	CHANGES.txt
	tez-mapreduce/src/main/java/org/apache/tez/mapreduce/processor/map/MapProcessor.java


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

Branch: refs/heads/branch-0.8
Commit: 97d23dca6388b0e0a1376cf8116cd9506fa9089c
Parents: f86ed0d
Author: Hitesh Shah <hitesh@apache.org>
Authored: Wed Sep 21 14:17:30 2016 -0700
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Wed Sep 21 14:25:05 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/tez/blob/97d23dca/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index fbb305d..b41e65e 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-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/97d23dca/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 1a12a21..5ef0d2b 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
@@ -78,6 +78,14 @@ public class MapProcessor extends MRTask{
       Map<String, LogicalOutput> outputs) throws Exception {
 
     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();
     }
@@ -85,12 +93,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();
 


Mime
View raw message