avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r796008 - in /hadoop/avro/trunk: CHANGES.txt src/doc/content/xdocs/spec.xml src/java/org/apache/avro/generic/GenericDatumReader.java
Date Mon, 20 Jul 2009 21:03:52 GMT
Author: cutting
Date: Mon Jul 20 21:03:52 2009
New Revision: 796008

URL: http://svn.apache.org/viewvc?rev=796008&view=rev
Log:
AVRO-79.  Specify format for default fixed values.  Contributed by Thiruvalluvan M. G.

Modified:
    hadoop/avro/trunk/CHANGES.txt
    hadoop/avro/trunk/src/doc/content/xdocs/spec.xml
    hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericDatumReader.java

Modified: hadoop/avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=796008&r1=796007&r2=796008&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Mon Jul 20 21:03:52 2009
@@ -22,6 +22,9 @@
 
     AVRO-78. Fix Java reflect to work on non-public fields. (cutting)
 
+    AVRO-79. Specify format for default fixed values, and implement
+    correctly in Java.  (Thiruvalluvan M. G. via cutting)
+
 Avro 1.0.0 -- 9 July 2009
 
   INCOMPATIBLE CHANGES

Modified: hadoop/avro/trunk/src/doc/content/xdocs/spec.xml
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/doc/content/xdocs/spec.xml?rev=796008&r1=796007&r2=796008&view=diff
==============================================================================
--- hadoop/avro/trunk/src/doc/content/xdocs/spec.xml (original)
+++ hadoop/avro/trunk/src/doc/content/xdocs/spec.xml Mon Jul 20 21:03:52 2009
@@ -113,6 +113,7 @@
 		    <tr><td>enum</td><td>string</td><td>"FOO"</td></tr>
 		    <tr><td>array</td><td>array</td><td>[1]</td></tr>
 		    <tr><td>map</td><td>object</td><td>{"a": 1}</td></tr>
+		    <tr><td>fixed</td><td>string</td><td>"\u00ff"</td></tr>
 		  </table>
 		</li>
 	      </ul>

Modified: hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericDatumReader.java
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericDatumReader.java?rev=796008&r1=796007&r2=796008&view=diff
==============================================================================
--- hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericDatumReader.java (original)
+++ hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericDatumReader.java Mon Jul 20
21:03:52 2009
@@ -229,7 +229,7 @@
       }
       return map;
     case UNION:   return defaultFieldValue(old, schema.getTypes().get(0), json);
-    case FIXED:   return createFixed(old,json.getTextValue().getBytes(),schema);
+    case FIXED:   return createFixed(old,json.getTextValue().getBytes("ISO-8859-1"),schema);
     case STRING:  return createString(json.getTextValue());
     case BYTES:  return createBytes(json.getTextValue().getBytes("ISO-8859-1"));
     case INT:     return json.getIntValue();



Mime
View raw message