Author: nzhang
Date: Sat Jul 16 15:28:30 2011
New Revision: 1147436
URL: http://svn.apache.org/viewvc?rev=1147436&view=rev
Log:
HIVE-2260. ExecDriver::addInputPaths should pass the table properties to the
record writer (Jakob Homan via Ning Zhang)
Modified:
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java
URL:
http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java?rev=1147436&r1=1147435&r2=1147436&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java Sat
Jul 16 15:28:30 2011
@@ -743,12 +743,15 @@ public class ExecDriver extends Task<Map
// The input file does not exist, replace it by a empty file
Class<? extends HiveOutputFormat> outFileFormat = null;
boolean nonNative = true;
+ Properties props;
if (isEmptyPath) {
PartitionDesc partDesc = work.getPathToPartitionInfo().get(path);
+ props = partDesc.getProperties();
outFileFormat = partDesc.getOutputFileFormatClass();
nonNative = partDesc.getTableDesc().isNonNative();
} else {
TableDesc tableDesc =
work.getAliasToPartnInfo().get(alias).getTableDesc();
+ props = tableDesc.getProperties();
outFileFormat = tableDesc.getOutputFileFormatClass();
nonNative = tableDesc.isNonNative();
}
@@ -802,7 +805,7 @@ public class ExecDriver extends Task<Map
String onefile = newPath.toString();
RecordWriter recWriter =
outFileFormat.newInstance().getHiveRecordWriter(job, newFilePath,
- Text.class, false, new Properties(), null);
+ Text.class, false, props, null);
recWriter.close(false);
FileInputFormat.addInputPaths(job, onefile);
return numEmptyPaths;