avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbaldass...@apache.org
Subject svn commit: r1232552 - in /avro/trunk: CHANGES.txt lang/java/avro/src/main/java/org/apache/avro/generic/GenericDatumReader.java
Date Tue, 17 Jan 2012 19:42:22 GMT
Author: jbaldassari
Date: Tue Jan 17 19:42:22 2012
New Revision: 1232552

URL: http://svn.apache.org/viewvc?rev=1232552&view=rev
Log:
AVRO-993. Java: Add methods back to GenericDatumReader that were removed in AVRO-839.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/java/avro/src/main/java/org/apache/avro/generic/GenericDatumReader.java

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1232552&r1=1232551&r2=1232552&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Tue Jan 17 19:42:22 2012
@@ -64,6 +64,9 @@ Avro 1.6.2 (unreleased)
     AVRO-994. Java: TestFileSpanStorage.testTonsOfSpans() fails on my 
     slow VM. (jbaldassari)
 
+    AVRO-993. Java: Add methods back to GenericDatumReader that were 
+    removed in AVRO-839. (jbaldassari)
+
 Avro 1.6.1 (8 November 2011)
 
   INCOMPATIBLE CHANGES

Modified: avro/trunk/lang/java/avro/src/main/java/org/apache/avro/generic/GenericDatumReader.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/avro/src/main/java/org/apache/avro/generic/GenericDatumReader.java?rev=1232552&r1=1232551&r2=1232552&view=diff
==============================================================================
--- avro/trunk/lang/java/avro/src/main/java/org/apache/avro/generic/GenericDatumReader.java
(original)
+++ avro/trunk/lang/java/avro/src/main/java/org/apache/avro/generic/GenericDatumReader.java
Tue Jan 17 19:42:22 2012
@@ -258,6 +258,43 @@ public class GenericDatumReader<D> imple
     in.readFixed(fixed.bytes(), 0, expected.getFixedSize());
     return fixed;
   }
+  
+  /** 
+   * Called to create an fixed value. May be overridden for alternate fixed
+   * representations.  By default, returns {@link GenericFixed}.
+   * @deprecated As of Avro 1.6.0 this method has been moved to 
+   * {@link GenericData#createFixed(Object, Schema)}
+   */
+  @Deprecated
+  protected Object createFixed(Object old, Schema schema) {
+    return data.createFixed(old, schema);
+  }
+
+  /** 
+   * Called to create an fixed value. May be overridden for alternate fixed
+   * representations.  By default, returns {@link GenericFixed}.
+   * @deprecated As of Avro 1.6.0 this method has been moved to 
+   * {@link GenericData#createFixed(Object, byte[], Schema)}
+   */
+  @Deprecated
+  protected Object createFixed(Object old, byte[] bytes, Schema schema) {
+    return data.createFixed(old, bytes, schema);
+  }
+  
+  /**
+   * Called to create new record instances. Subclasses may override to use a
+   * different record implementation. The returned instance must conform to the
+   * schema provided. If the old object contains fields not present in the
+   * schema, they should either be removed from the old object, or it should
+   * create a new instance that conforms to the schema. By default, this returns
+   * a {@link GenericData.Record}.
+   * @deprecated As of Avro 1.6.0 this method has been moved to 
+   * {@link GenericData#newRecord(Object, Schema)}
+   */
+  @Deprecated
+  protected Object newRecord(Object old, Schema schema) {
+    return data.newRecord(old, schema);
+  }
 
   /** Called to create new array instances.  Subclasses may override to use a
    * different array implementation.  By default, this returns a {@link



Mime
View raw message