You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/05/26 12:11:49 UTC

[18/34] incubator-ignite git commit: [IGNITE-909]: Support HadoopExternalSplit in HadoopV2Context to get pig jobs to function.

[IGNITE-909]: Support HadoopExternalSplit in HadoopV2Context to get pig jobs to function.


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

Branch: refs/heads/ignite-37
Commit: c2734e4135c5bda3126c0ad865eb0c8e886c16ad
Parents: b375aaa
Author: Evans Ye <in...@gmail.com>
Authored: Fri May 22 16:00:42 2015 +0300
Committer: iveselovskiy <iv...@gridgain.com>
Committed: Fri May 22 16:00:42 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/hadoop/v2/HadoopV2Context.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c2734e41/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 3f8e2b6..53159b1 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
@@ -89,12 +89,12 @@ public class HadoopV2Context extends JobContextImpl implements MapContext, Reduc
 
                 inputSplit = new FileSplit(new Path(fileBlock.file()), fileBlock.start(), fileBlock.length(), null);
             }
-            else if (split instanceof HadoopExternalSplit)
-                throw new UnsupportedOperationException(); // TODO
-            else if (split instanceof HadoopSplitWrapper)
-                inputSplit = (InputSplit) HadoopUtils.unwrapSplit((HadoopSplitWrapper) split);
             else
-                throw new IllegalStateException();
+                try {
+                    inputSplit = (InputSplit) ((HadoopV2TaskContext)ctx).getNativeSplit(split);
+                } catch (IgniteCheckedException e) {
+                    throw new IllegalStateException(e);
+                }
         }
 
         return inputSplit;