You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by cu...@apache.org on 2012/07/12 21:03:25 UTC
svn commit: r1360859 - in /avro/trunk: CHANGES.txt
lang/java/avro/src/main/java/org/apache/avro/reflect/package.html
Author: cutting
Date: Thu Jul 12 19:03:25 2012
New Revision: 1360859
URL: http://svn.apache.org/viewvc?rev=1360859&view=rev
Log:
AVRO-1125. Remove un-needed warning about reflect API.
Modified:
avro/trunk/CHANGES.txt
avro/trunk/lang/java/avro/src/main/java/org/apache/avro/reflect/package.html
Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1360859&r1=1360858&r2=1360859&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Thu Jul 12 19:03:25 2012
@@ -27,6 +27,8 @@ Avro 1.7.1 (unreleased)
AVRO-1119. Java: Permit NettyServer to be used with SSL.
(Sebastian Ortega via cutting)
+ AVRO-1125. Java: Remove un-needed warning about reflect API. (cutting)
+
BUG FIXES
AVRO-1114. Java: Update license headers for new mapreduce code. (cutting)
Modified: avro/trunk/lang/java/avro/src/main/java/org/apache/avro/reflect/package.html
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/avro/src/main/java/org/apache/avro/reflect/package.html?rev=1360859&r1=1360858&r2=1360859&view=diff
==============================================================================
--- avro/trunk/lang/java/avro/src/main/java/org/apache/avro/reflect/package.html (original)
+++ avro/trunk/lang/java/avro/src/main/java/org/apache/avro/reflect/package.html Thu Jul 12 19:03:25 2012
@@ -21,20 +21,16 @@
Use Java reflection to generate schemas and protocols for existing
classes.
-<p>This API is not recommended except as a stepping stone for
-systems that currently uses Java interfaces to define RPC protocols.
-For new RPC systems, the {@link org.apache.avro.specific specific} API
-is preferred. For systems that process dynamic data, the {@link
-org.apache.avro.generic generic} API is probably best.
-
<p>Java types are mapped to Avro schemas as follows:
<ul>
<li><b>Classes</b> are mapped to Avro records. Only concrete classes
- with a no-argument constructor are supported. Fields are not
- permitted to be null. All inherited fields that are not static or
- transient are used.</li>
+ with a no-argument constructor are supported. All inherited fields
+ that are not static or transient are used. Fields are not permitted
+ to be null unless annotated by {@link
+ org.apache.avro.reflect.Nullable Nullable} or a {@link
+ org.apache.avro.reflect.Union Union} containing null.</li>
<li><b>Arrays</b> are mapped to Avro array schemas. If an array's
elements are a union defined by the {@link
@@ -62,9 +58,13 @@ org.apache.avro.generic generic} API is
</ul>
-The {@link org.apache.avro.reflect.Union Union} annotation can be used
+<p>The {@link org.apache.avro.reflect.Union Union} annotation can be used
to support reflection of schemas for interfaces, abstract base classes
and other uses of polymorphism.
+<p>The {@link org.apache.avro.reflect.Stringable Stringable} annotation
+will cause a type to be serialized via its {@link java.lang.Object#toString()
+toString} method.
+
</body>
</html>