hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1520709 - in /hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql: exec/Utilities.java io/orc/OrcInputFormat.java
Date Fri, 06 Sep 2013 22:05:01 GMT
Author: hashutosh
Date: Fri Sep  6 22:05:00 2013
New Revision: 1520709

URL: http://svn.apache.org/r1520709
Log:
HIVE-5226 : orc_create.q and other orc tests fail on the branch. (Jitendra Nath Pandey via
Ashutosh Chauhan)

Modified:
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java?rev=1520709&r1=1520708&r2=1520709&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
(original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
Fri Sep  6 22:05:00 2013
@@ -527,7 +527,7 @@ public final class Utilities {
     }
   }
 
-  private static Path getPlanPath(Configuration conf) {
+  public static Path getPlanPath(Configuration conf) {
     String plan = HiveConf.getVar(conf, HiveConf.ConfVars.PLAN);
     if (plan != null && !plan.isEmpty()) {
       return new Path(plan);

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java?rev=1520709&r1=1520708&r2=1520709&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
(original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
Fri Sep  6 22:05:00 2013
@@ -167,8 +167,7 @@ public class OrcInputFormat  extends Fil
   public RecordReader<NullWritable, OrcStruct>
       getRecordReader(InputSplit inputSplit, JobConf conf,
                       Reporter reporter) throws IOException {
-    if (Utilities
-        .getMapRedWork(conf).getMapWork().getVectorMode()) {
+    if (isVectorMode(conf)) {
       RecordReader<NullWritable, VectorizedRowBatch> vorr = voif.getRecordReader(inputSplit,
conf,
           reporter);
       return (RecordReader) vorr;
@@ -187,8 +186,7 @@ public class OrcInputFormat  extends Fil
                                ArrayList<FileStatus> files
                               ) throws IOException {
 
-    if (Utilities
-        .getMapRedWork(conf).getMapWork().getVectorMode()) {
+    if (isVectorMode(conf)) {
       return voif.validateInput(fs, conf, files);
     }
 
@@ -204,4 +202,12 @@ public class OrcInputFormat  extends Fil
     }
     return true;
   }
+
+  private boolean isVectorMode(Configuration conf) {
+    if (Utilities.getPlanPath(conf) != null && Utilities
+        .getMapRedWork(conf).getMapWork().getVectorMode()) {
+      return true;
+    }
+    return false;
+  }
 }



Mime
View raw message