hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1489441 - in /hive/trunk: hcatalog/build.xml ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java ql/src/java/org/apache/hadoop/hive/ql/plan/ConditionalResolverSkewJoin.java
Date Tue, 04 Jun 2013 13:36:45 GMT
Author: hashutosh
Date: Tue Jun  4 13:36:45 2013
New Revision: 1489441

URL: http://svn.apache.org/r1489441
Log:
HIVE-4646 : skewjoin.q is failing in hadoop2 (Navis via Ashutosh Chauhan)

Modified:
    hive/trunk/hcatalog/build.xml
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ConditionalResolverSkewJoin.java

Modified: hive/trunk/hcatalog/build.xml
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/build.xml?rev=1489441&r1=1489440&r2=1489441&view=diff
==============================================================================
--- hive/trunk/hcatalog/build.xml (original)
+++ hive/trunk/hcatalog/build.xml Tue Jun  4 13:36:45 2013
@@ -106,7 +106,7 @@
             <path id="checkstyle.class.path">
                 <fileset dir="core/build/lib/test"/>
             </path>
-            <!--<antcall target="checkstyle" inheritRefs="true"/> -->
+            <antcall target="checkstyle" inheritRefs="true"/>
         </parallel>
     </target>
 

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java?rev=1489441&r1=1489440&r2=1489441&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java Tue Jun  4 13:36:45
2013
@@ -1313,6 +1313,18 @@ public final class Utilities {
   }
 
   /**
+   * returns null if path is not exist
+   */
+  public static FileStatus[] listStatusIfExists(Path path, FileSystem fs) throws IOException
{
+    try {
+      return fs.listStatus(path);
+    } catch (FileNotFoundException e) {
+      // FS in hadoop 2.0 throws FNF instead of returning null
+      return null;
+    }
+  }
+
+  /**
    * Get all file status from a root path and recursively go deep into certain levels.
    *
    * @param path

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ConditionalResolverSkewJoin.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ConditionalResolverSkewJoin.java?rev=1489441&r1=1489440&r2=1489441&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ConditionalResolverSkewJoin.java
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ConditionalResolverSkewJoin.java
Tue Jun  4 13:36:45 2013
@@ -31,6 +31,7 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.ql.exec.Task;
+import org.apache.hadoop.hive.ql.exec.Utilities;
 
 /**
  * ConditionalResolverSkewJoin.
@@ -93,7 +94,7 @@ public class ConditionalResolverSkewJoin
         String path = entry.getKey();
         Path dirPath = new Path(path);
         FileSystem inpFs = dirPath.getFileSystem(conf);
-        FileStatus[] fstatus = inpFs.listStatus(dirPath);
+        FileStatus[] fstatus = Utilities.listStatusIfExists(dirPath, inpFs);
         if (fstatus != null && fstatus.length > 0) {
           Task <? extends Serializable> task = entry.getValue();
           List<Task <? extends Serializable>> parentOps = task.getParentTasks();



Mime
View raw message