hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r1348808 - in /hive/trunk: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java conf/hive-default.xml.template ql/src/java/org/apache/hadoop/hive/ql/exec/BinaryRecordReader.java
Date Mon, 11 Jun 2012 11:54:02 GMT
Author: namit
Date: Mon Jun 11 11:54:02 2012
New Revision: 1348808

URL: http://svn.apache.org/viewvc?rev=1348808&view=rev
Log:
HIVE-3061 hive.binary.record.max.length is a magic string
(Edward Capriolo via namit)


Modified:
    hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
    hive/trunk/conf/hive-default.xml.template
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/BinaryRecordReader.java

Modified: hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
URL: http://svn.apache.org/viewvc/hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java?rev=1348808&r1=1348807&r2=1348808&view=diff
==============================================================================
--- hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (original)
+++ hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java Mon Jun 11 11:54:02
2012
@@ -391,6 +391,7 @@ public class HiveConf extends Configurat
     HIVESCRIPTRECORDWRITER("hive.script.recordwriter",
         "org.apache.hadoop.hive.ql.exec.TextRecordWriter"),
     HIVESCRIPTESCAPE("hive.transform.escape.input", false),
+    HIVEBINARYRECORDMAX("hive.binary.record.max.length", 1000 ),
 
     // HWI
     HIVEHWILISTENHOST("hive.hwi.listen.host", "0.0.0.0"),

Modified: hive/trunk/conf/hive-default.xml.template
URL: http://svn.apache.org/viewvc/hive/trunk/conf/hive-default.xml.template?rev=1348808&r1=1348807&r2=1348808&view=diff
==============================================================================
--- hive/trunk/conf/hive-default.xml.template (original)
+++ hive/trunk/conf/hive-default.xml.template Mon Jun 11 11:54:02 2012
@@ -664,6 +664,14 @@
 </property>
 
 <property>
+  <name>hive.binary.record.max.length</name>
+  <value>1000</value>
+  <description>Read from a binary stream and treat each hive.binary.record.max.length
bytes as a record.
+  The last record before the end of stream can have less than hive.binary.record.max.length
bytes</description>
+</property>
+
+
+<property>
   <name>hive.script.recordreader</name>
   <value>org.apache.hadoop.hive.ql.exec.TextRecordReader</value>
   <description>The default record reader for reading data from the user scripts. </description>

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/BinaryRecordReader.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/BinaryRecordReader.java?rev=1348808&r1=1348807&r2=1348808&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/BinaryRecordReader.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/BinaryRecordReader.java Mon Jun
11 11:54:02 2012
@@ -25,11 +25,12 @@ import java.util.Properties;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.BytesWritable;
 import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.hive.conf.HiveConf;
 
 /**
- * Read from a binary stream and treat each 1000 bytes (configurable via 
- * hive.binary.record.max.length) as a record.  The last record before the 
- * end of stream can have less than 1000 bytes. 
+ * Read from a binary stream and treat each 1000 bytes (configurable via
+ * hive.binary.record.max.length) as a record.  The last record before the
+ * end of stream can have less than 1000 bytes.
  */
 public class BinaryRecordReader implements RecordReader {
 
@@ -39,7 +40,7 @@ public class BinaryRecordReader implemen
 
   public void initialize(InputStream in, Configuration conf, Properties tbl) throws IOException
{
     this.in = in;
-    maxRecordLength = conf.getInt("hive.binary.record.max.length", 1000);
+    maxRecordLength = HiveConf.getIntVar(conf, HiveConf.ConfVars.HIVEBINARYRECORDMAX);
   }
 
   public Writable createRow() throws IOException {



Mime
View raw message