hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r524906 - in /lucene/hadoop/branches/branch-0.12: CHANGES.txt src/java/org/apache/hadoop/record/Buffer.java src/test/org/apache/hadoop/record/TestRecordIO.java
Date Mon, 02 Apr 2007 19:52:02 GMT
Author: cutting
Date: Mon Apr  2 12:52:01 2007
New Revision: 524906

URL: http://svn.apache.org/viewvc?view=rev&rev=524906
Log:
HADOOP-1162.  Merge -r 523071:523072 from trunk to 0.12 branch.

Modified:
    lucene/hadoop/branches/branch-0.12/CHANGES.txt
    lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/record/Buffer.java
    lucene/hadoop/branches/branch-0.12/src/test/org/apache/hadoop/record/TestRecordIO.java

Modified: lucene/hadoop/branches/branch-0.12/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.12/CHANGES.txt?view=diff&rev=524906&r1=524905&r2=524906
==============================================================================
--- lucene/hadoop/branches/branch-0.12/CHANGES.txt (original)
+++ lucene/hadoop/branches/branch-0.12/CHANGES.txt Mon Apr  2 12:52:01 2007
@@ -1,6 +1,12 @@
 Hadoop Change Log
 
 
+Release 0.12.3 (not yet released)
+
+15. HADOOP-1162.  Fix bug in record CSV and XML serialization of
+    binary values.  (Milind Bhandarkar via cutting)
+
+
 Release 0.12.2 - 2007-23-17
 
  1. HADOOP-1135.  Fix bug in block report processing which may cause

Modified: lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/record/Buffer.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/record/Buffer.java?view=diff&rev=524906&r1=524905&r2=524906
==============================================================================
--- lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/record/Buffer.java (original)
+++ lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/record/Buffer.java Mon Apr
 2 12:52:01 2007
@@ -222,7 +222,8 @@
   public String toString() {
     StringBuffer sb = new StringBuffer(2*count);
     for(int idx = 0; idx < count; idx++) {
-      sb.append(Integer.toHexString((int)bytes[idx]));
+      sb.append(Character.forDigit((bytes[idx] & 0xF0) >> 4, 16));
+      sb.append(Character.forDigit(bytes[idx] & 0x0F, 16));
     }
     return sb.toString();
   }

Modified: lucene/hadoop/branches/branch-0.12/src/test/org/apache/hadoop/record/TestRecordIO.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.12/src/test/org/apache/hadoop/record/TestRecordIO.java?view=diff&rev=524906&r1=524905&r2=524906
==============================================================================
--- lucene/hadoop/branches/branch-0.12/src/test/org/apache/hadoop/record/TestRecordIO.java
(original)
+++ lucene/hadoop/branches/branch-0.12/src/test/org/apache/hadoop/record/TestRecordIO.java
Mon Apr  2 12:52:01 2007
@@ -121,7 +121,11 @@
             r1.setIntVal(4567);
             r1.setLongVal(0x5a5a5a5a5a5aL);
             r1.setStringVal("random text");
-            r1.setBufferVal(new Buffer());
+            byte[] barr = new byte[256];
+            for (int idx = 0; idx < 256; idx++) {
+              barr[idx] = (byte) idx;
+            }
+            r1.setBufferVal(new Buffer(barr));
             r1.setVectorVal(new ArrayList<String>());
             r1.setMapVal(new TreeMap<String,String>());
             RecRecord0 r0 = new RecRecord0();



Mime
View raw message