ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [2/2] ignite git commit: IGNITE-2343: Review.
Date Mon, 25 Jan 2016 08:49:44 GMT
IGNITE-2343: Review.


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

Branch: refs/heads/ignite-2343
Commit: 009421ecca8cf1b75e92fd3a2639e6a9b5340f90
Parents: 6da42b4
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon Jan 25 11:49:05 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Jan 25 11:49:05 2016 +0300

----------------------------------------------------------------------
 .../internal/processors/hadoop/v2/HadoopV2Context.java       | 8 ++++----
 .../internal/processors/hadoop/v2/HadoopV2MapTask.java       | 8 ++------
 2 files changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/009421ec/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Context.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Context.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Context.java
index e2ee6d4..3deaf4cb 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Context.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Context.java
@@ -93,20 +93,20 @@ public class HadoopV2Context extends JobContextImpl implements MapContext,
Reduc
             HadoopInputSplit split = ctx.taskInfo().inputSplit();
 
             if (split == null)
-                throw new IllegalStateException("Failed to get input split.");
+                return null;
 
             if (split instanceof HadoopFileBlock) {
                 HadoopFileBlock fileBlock = (HadoopFileBlock)split;
 
                 inputSplit = new FileSplit(new Path(fileBlock.file()), fileBlock.start(),
fileBlock.length(), null);
             }
-            else
+            else {
                 try {
                     inputSplit = (InputSplit) ((HadoopV2TaskContext)ctx).getNativeSplit(split);
-                }
-                catch (IgniteCheckedException e) {
+                } catch (IgniteCheckedException e) {
                     throw new IllegalStateException(e);
                 }
+            }
         }
 
         return inputSplit;

http://git-wip-us.apache.org/repos/asf/ignite/blob/009421ec/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2MapTask.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2MapTask.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2MapTask.java
index d7ff60a..a46807d 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2MapTask.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2MapTask.java
@@ -52,7 +52,8 @@ public class HadoopV2MapTask extends HadoopV2Task {
         try {
             InputSplit nativeSplit = hadoopContext().getInputSplit();
 
-            assert nativeSplit != null;
+            if (nativeSplit == null)
+                throw new IgniteCheckedException("...");
 
             InputFormat inFormat = ReflectionUtils.newInstance(jobCtx.getInputFormatClass(),
                 hadoopContext().getConfiguration());
@@ -88,11 +89,6 @@ public class HadoopV2MapTask extends HadoopV2Task {
         catch (Exception e) {
             err = e;
 
-            // org.apache.ignite.internal.processors.hadoop.v2.HadoopV2Context.getInputSplit
-            // throws IgniteCheckedException wrapped into IllegalStateException, so we unwrap
it back:
-            if (e.getCause() instanceof IgniteCheckedException)
-                throw (IgniteCheckedException)e.getCause();
-
             throw new IgniteCheckedException(e);
         }
         finally {


Mime
View raw message