hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasan...@apache.org
Subject [14/52] [abbrv] hive git commit: HIVE-10579 : Fix hadoop-1 build (Xuefu via Szehon)
Date Thu, 07 May 2015 01:21:08 GMT
HIVE-10579 : Fix hadoop-1 build (Xuefu via Szehon)


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

Branch: refs/heads/llap
Commit: 8eb0ede826663d02e8972a26145e8b55f2349995
Parents: 2baa1e9
Author: Szehon Ho <szehon@cloudera.com>
Authored: Sun May 3 17:06:36 2015 -0700
Committer: Szehon Ho <szehon@cloudera.com>
Committed: Sun May 3 17:06:36 2015 -0700

----------------------------------------------------------------------
 .../hive/ql/optimizer/BucketingSortingReduceSinkOptimizer.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/8eb0ede8/ql/src/java/org/apache/hadoop/hive/ql/optimizer/BucketingSortingReduceSinkOptimizer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/BucketingSortingReduceSinkOptimizer.java
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/BucketingSortingReduceSinkOptimizer.java
index 7cb0f15..3c8c0d6 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/BucketingSortingReduceSinkOptimizer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/BucketingSortingReduceSinkOptimizer.java
@@ -57,6 +57,7 @@ import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
 import org.apache.hadoop.hive.ql.plan.OperatorDesc;
 import org.apache.hadoop.hive.ql.plan.SMBJoinDesc;
 import org.apache.hadoop.hive.ql.plan.SelectDesc;
+import org.apache.hadoop.hive.shims.ShimLoader;
 
 /**
  * This transformation does optimization for enforcing bucketing and sorting.
@@ -216,7 +217,7 @@ public class BucketingSortingReduceSinkOptimizer implements Transform
{
     private void storeBucketPathMapping(TableScanOperator tsOp, FileStatus[] srcs) {
       Map<String, Integer> bucketFileNameMapping = new HashMap<String, Integer>();
       for (int pos = 0; pos < srcs.length; pos++) {
-        if(!srcs[pos].isFile()) {
+        if (ShimLoader.getHadoopShims().isDirectory(srcs[pos])) {
           throw new RuntimeException("Was expecting '" + srcs[pos].getPath() + "' to be bucket
file.");
         }
         bucketFileNameMapping.put(srcs[pos].getPath().getName(), pos);


Mime
View raw message