hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xu...@apache.org
Subject svn commit: r1664346 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/plan/ptf/PTFInputDef.java test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java
Date Thu, 05 Mar 2015 13:52:38 GMT
Author: xuefu
Date: Thu Mar  5 13:52:38 2015
New Revision: 1664346

URL: http://svn.apache.org/r1664346
Log:
HIVE-9869: Trunk doesn't build with hadoop-1 (Rui via Xuefu, reviewed by Ashutosh)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/PTFInputDef.java
    hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/PTFInputDef.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/PTFInputDef.java?rev=1664346&r1=1664345&r2=1664346&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/PTFInputDef.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/PTFInputDef.java Thu Mar  5
13:52:38 2015
@@ -19,9 +19,9 @@
 package org.apache.hadoop.hive.ql.plan.ptf;
 
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.hive.ql.exec.RowSchema;
 import org.apache.hadoop.hive.ql.plan.Explain;
-import org.apache.hadoop.util.StringUtils;
 
 public abstract class PTFInputDef {
   private String expressionTreeString;
@@ -43,7 +43,7 @@ public abstract class PTFInputDef {
   @Explain(displayName = "output shape")
   public String getOutputShapeExplain() {
     RowSchema schema = outputShape.getRr().getRowSchema();
-    return StringUtils.join(", ", schema.getSignature());
+    return StringUtils.join(schema.getSignature(), ", ");
   }
 
   public void setOutputShape(ShapeDetails outputShape) {

Modified: hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java?rev=1664346&r1=1664345&r2=1664346&view=diff
==============================================================================
--- hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java (original)
+++ hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java Thu Mar  5 13:52:38
2015
@@ -59,6 +59,7 @@ import org.apache.hadoop.hive.ql.plan.Se
 import org.apache.hadoop.hive.ql.session.SessionState;
 import org.apache.hadoop.hive.serde.serdeConstants;
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
+import org.apache.hadoop.hive.shims.ShimLoader;
 import org.apache.hadoop.mapred.TextInputFormat;
 import org.apache.hadoop.util.Shell;
 
@@ -93,7 +94,8 @@ public class TestExecDriver extends Test
       tmppath = new Path(tmpdir);
 
       fs = FileSystem.get(conf);
-      if (fs.exists(tmppath) && !fs.getFileStatus(tmppath).isDirectory()) {
+      if (fs.exists(tmppath) &&
+          !ShimLoader.getHadoopShims().isDirectory(fs.getFileStatus(tmppath))) {
         throw new RuntimeException(tmpdir + " exists but is not a directory");
       }
 
@@ -166,7 +168,7 @@ public class TestExecDriver extends Test
     if (!fs.exists(di_test)) {
       throw new RuntimeException(tmpdir + File.separator + testdir + " does not exist");
     }
-    if (!fs.getFileStatus(di_test).isDirectory()) {
+    if (!ShimLoader.getHadoopShims().isDirectory(fs.getFileStatus(di_test))) {
       throw new RuntimeException(tmpdir + File.separator + testdir + " is not a directory");
     }
     FSDataInputStream fi_test = fs.open((fs.listStatus(di_test))[0].getPath());



Mime
View raw message