You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by en...@apache.org on 2008/08/26 13:02:13 UTC
svn commit: r689032 - in /hadoop/core/trunk: CHANGES.txt
src/mapred/org/apache/hadoop/mapred/join/TupleWritable.java
Author: enis
Date: Tue Aug 26 04:02:11 2008
New Revision: 689032
URL: http://svn.apache.org/viewvc?rev=689032&view=rev
Log:
HADOOP-3944. Improve documentation for public TupleWritable class in join package. Contributed by Chris Douglas.
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/join/TupleWritable.java
Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=689032&r1=689031&r2=689032&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue Aug 26 04:02:11 2008
@@ -215,6 +215,9 @@
HADOOP-3742. Remove HDFS from public java doc and add javadoc-dev for
generative javadoc for developers. (Sanjay Radia via omalley)
+ HADOOP-3944. Improve documentation for public TupleWritable class in
+ join package. (Chris Douglas via enis)
+
OPTIMIZATIONS
HADOOP-3556. Removed lock contention in MD5Hash by changing the
Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/join/TupleWritable.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/join/TupleWritable.java?rev=689032&r1=689031&r2=689032&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/join/TupleWritable.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/join/TupleWritable.java Tue Aug 26 04:02:11 2008
@@ -30,6 +30,15 @@
/**
* Writable type storing multiple {@link org.apache.hadoop.io.Writable}s.
+ *
+ * This is *not* a general-purpose tuple type. In almost all cases, users are
+ * encouraged to implement their own serializable types, which can perform
+ * better validation and provide more efficient encodings than this class is
+ * capable. TupleWritable relies on the join framework for type safety and
+ * assumes its instances will rarely be persisted, assumptions not only
+ * incompatible with, but contrary to the general case.
+ *
+ * @see org.apache.hadoop.io.Writable
*/
public class TupleWritable implements Writable, Iterable<Writable> {
@@ -77,7 +86,7 @@
public boolean equals(Object other) {
if (other instanceof TupleWritable) {
TupleWritable that = (TupleWritable)other;
- if (this.size() != that.size() || this.mask() != that.mask()) {
+ if (this.size() != that.size() || this.written != that.written) {
return false;
}
for (int i = 0; i < values.length; ++i) {
@@ -215,12 +224,4 @@
written = 0L;
}
- /**
- * Return a bitmap recording which of the writables that have been
- * written to.
- */
- long mask() {
- return written;
- }
-
}