avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r818632 - in /hadoop/avro/trunk: CHANGES.txt src/java/org/apache/avro/generic/GenericDatumReader.java
Date Thu, 24 Sep 2009 21:34:07 GMT
Author: cutting
Date: Thu Sep 24 21:34:06 2009
New Revision: 818632

URL: http://svn.apache.org/viewvc?rev=818632&view=rev
Log:
AVRO-121.  Permit reflect and specific datum readers to read data written with a different
version of the schema than is current.

Modified:
    hadoop/avro/trunk/CHANGES.txt
    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=818632&r1=818631&r2=818632&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Thu Sep 24 21:34:06 2009
@@ -10,6 +10,10 @@
 
   NEW FEATURES
 
+    AVRO-121.  Permit reflect and specific datum readers to read data
+    written with a different version of the schema than is current.
+    (cutting)
+
   IMPROVEMENTS
 
     AVRO-99.  Use Boost framework for C++ unit tests.

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=818632&r1=818631&r2=818632&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 Thu Sep 24
21:34:06 2009
@@ -44,15 +44,18 @@
 
   public GenericDatumReader(Schema actual) {
     setSchema(actual);
+    setExpected(actual);
   }
 
   public GenericDatumReader(Schema actual, Schema expected) {
-    this(actual);
-    this.expected = expected;
+    setSchema(actual);
+    setExpected(expected);
   }
 
   public void setSchema(Schema actual) { this.actual = actual; }
 
+  public void setExpected(Schema expected) { this.expected = expected; }
+
   @SuppressWarnings("unchecked")
   public D read(D reuse, Decoder in) throws IOException {
     return (D) read(reuse, actual, expected != null ? expected : actual, in);



Mime
View raw message