HADOOP-8297. Writable javadocs don't carry default constructor (harsh)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1338557 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Harsh J 2012-05-15 06:42:42 +00:00
parent 95710c15b7
commit f22276ee3f
2 changed files with 9 additions and 4 deletions

View File

@ -65,6 +65,8 @@ Trunk (unreleased changes)
HADOOP-8308. Support cross-project Jenkins builds. (tomwhite) HADOOP-8308. Support cross-project Jenkins builds. (tomwhite)
HADOOP-8297. Writable javadocs don't carry default constructor (harsh)
BUG FIXES BUG FIXES
HADOOP-8177. MBeans shouldn't try to register when it fails to create MBeanName. HADOOP-8177. MBeans shouldn't try to register when it fails to create MBeanName.

View File

@ -39,20 +39,23 @@ import org.apache.hadoop.classification.InterfaceStability;
* <p>Example:</p> * <p>Example:</p>
* <p><blockquote><pre> * <p><blockquote><pre>
* public class MyWritable implements Writable { * public class MyWritable implements Writable {
* // Some data * // Some data
* private int counter; * private int counter;
* private long timestamp; * private long timestamp;
* *
* // Default constructor to allow (de)serialization
* MyWritable() { }
*
* public void write(DataOutput out) throws IOException { * public void write(DataOutput out) throws IOException {
* out.writeInt(counter); * out.writeInt(counter);
* out.writeLong(timestamp); * out.writeLong(timestamp);
* } * }
* *
* public void readFields(DataInput in) throws IOException { * public void readFields(DataInput in) throws IOException {
* counter = in.readInt(); * counter = in.readInt();
* timestamp = in.readLong(); * timestamp = in.readLong();
* } * }
* *
* public static MyWritable read(DataInput in) throws IOException { * public static MyWritable read(DataInput in) throws IOException {
* MyWritable w = new MyWritable(); * MyWritable w = new MyWritable();
* w.readFields(in); * w.readFields(in);