Github user lewismc commented on a diff in the pull request:
https://github.com/apache/gora/pull/72#discussion_r73615608
--- Diff:
gora-compiler/src/main/velocity/org/apache/gora/compiler/templates/record.vm ---
@@ -353,6 +353,33 @@ public class ${this.mangle($schema.getName())}#if
($schema.isError()) extends or
#end
}
+
+ private static final org.apache.avro.io.DatumWriter
+ DATUM_WRITER$ = new
org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
+ private static final org.apache.avro.io.DatumReader
+ DATUM_READER$ = new
org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
+
+ @Override
+ public void writeExternal(java.io.ObjectOutput out)
+ throws java.io.IOException {
+ out.write(super.getDirtyBytes().array());
+ DATUM_WRITER$.write
+ (this, org.apache.avro.io.EncoderFactory.get()
+ .directBinaryEncoder((java.io.OutputStream) out,
+ null));
+ }
+
+ @Override
+ public void readExternal(java.io.ObjectInput in)
--- End diff --
Possible to document this method template?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---