1
0
Prechádzať zdrojové kódy

HADOOP-534. Change the default value classes in JobConf to be Text, not the now-deprecated UTF8. Contributed by Hairong.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@446695 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 19 rokov pred
rodič
commit
c12af2bd8c

+ 9 - 1
CHANGES.txt

@@ -17,10 +17,18 @@ Trunk (unreleased changes)
 4. HADOOP-288.  Add a file caching system and use it in MapReduce to
 4. HADOOP-288.  Add a file caching system and use it in MapReduce to
    cache job jar files on slave nodes.  (Mahadev Konar via cutting)
    cache job jar files on slave nodes.  (Mahadev Konar via cutting)
 
 
-5. HADOOP-532.  Fix a bug reading value-compressed sequence files,
+
+Release 0.6.2 (unreleased)
+
+1. HADOOP-532.  Fix a bug reading value-compressed sequence files,
    where an exception was thrown reporting that the full value had not
    where an exception was thrown reporting that the full value had not
    been read.  (omalley via cutting)
    been read.  (omalley via cutting)
 
 
+2. HADOOP-534.  Change the default value class in JobConf to be Text
+   instead of the now-deprecated UTF8.  This fixes the Grep example
+   program, which was updated to use Text, but relies on this
+   default.  (Hairong Kuang via cutting)
+
 
 
 Release 0.6.1 - 2006-08-13
 Release 0.6.1 - 2006-08-13
 
 

+ 3 - 3
src/java/org/apache/hadoop/mapred/JobConf.java

@@ -36,7 +36,7 @@ import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableComparable;
 import org.apache.hadoop.io.WritableComparable;
 import org.apache.hadoop.io.WritableComparator;
 import org.apache.hadoop.io.WritableComparator;
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.LongWritable;
-import org.apache.hadoop.io.UTF8;
+import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.compress.CompressionCodec;
 import org.apache.hadoop.io.compress.CompressionCodec;
 
 
 import org.apache.hadoop.mapred.lib.IdentityMapper;
 import org.apache.hadoop.mapred.lib.IdentityMapper;
@@ -314,7 +314,7 @@ public class JobConf extends Configuration {
 
 
   /** @deprecated Call {@link RecordReader#createValue()}. */
   /** @deprecated Call {@link RecordReader#createValue()}. */
   public Class getInputValueClass() {
   public Class getInputValueClass() {
-    return getClass("mapred.input.value.class", UTF8.class, Writable.class);
+    return getClass("mapred.input.value.class", Text.class, Writable.class);
   }
   }
 
 
   /** @deprecated Not used */
   /** @deprecated Not used */
@@ -444,7 +444,7 @@ public class JobConf extends Configuration {
   }
   }
 
 
   public Class getOutputValueClass() {
   public Class getOutputValueClass() {
-    return getClass("mapred.output.value.class", UTF8.class, Writable.class);
+    return getClass("mapred.output.value.class", Text.class, Writable.class);
   }
   }
   public void setOutputValueClass(Class theClass) {
   public void setOutputValueClass(Class theClass) {
     setClass("mapred.output.value.class", theClass, Writable.class);
     setClass("mapred.output.value.class", theClass, Writable.class);