You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/05/21 05:01:27 UTC

[3/9] git commit: Update iterator javadoc

Update iterator javadoc


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b2eaf13b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b2eaf13b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b2eaf13b

Branch: refs/heads/1.6.1-SNAPSHOT
Commit: b2eaf13b8abbedc8a1a5b80cae469f20b7587842
Parents: 73a9e6c
Author: Ryan Leary <rl...@bbn.com>
Authored: Tue May 20 10:02:50 2014 -0400
Committer: Ryan Leary <rl...@bbn.com>
Committed: Tue May 20 10:02:50 2014 -0400

----------------------------------------------------------------------
 .../iterators/user/RowEncodingIterator.java     | 22 +++++++++++++-------
 .../core/iterators/user/WholeRowIterator.java   | 19 ++++++++++-------
 2 files changed, 27 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b2eaf13b/core/src/main/java/org/apache/accumulo/core/iterators/user/RowEncodingIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/RowEncodingIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/RowEncodingIterator.java
index dff1e04..f083eb3 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/RowEncodingIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/RowEncodingIterator.java
@@ -34,17 +34,25 @@ import org.apache.hadoop.io.Text;
 
 /**
  * 
- * The WholeRowIterator is designed to provide row-isolation so that queries see mutations as atomic. It does so by encapsulating an entire row of key/value
- * pairs into a single key/value pair, which is returned through the client as an atomic operation.
+ * The RowEncodingIterator is designed to provide row-isolation so that queries see mutations as atomic.
+ * It does so by encapsulating an entire row of key/value pairs into a single key/value pair, which is
+ * returned through the client as an atomic operation. This is an abstract class, allowing the user to
+ * implement rowEncoder and rowDecoder such that the columns and values of a given row may be encoded
+ * in a format best suited to the client. 
  * 
  * <p>
- * One caveat is that when seeking in the WholeRowIterator using a range that starts at a non-inclusive first key in a row, (e.g. seek(new Range(new Key(new
- * Text("row")),false,...),...)) this iterator will skip to the next row. This is done in order to prevent repeated scanning of the same row when system
- * automatically creates ranges of that form, which happens in the case of the client calling continueScan, or in the case of the tablet server continuing a
- * scan after swapping out sources.
+ * For an example implementation, see {@link WholeRowIterator}.
+ *  
+ * <p>
+ * One caveat is that when seeking in the WholeRowIterator using a range that starts at a non-inclusive
+ * first key in a row, (e.g. seek(new Range(new Key(new Text("row")),false,...),...)) this iterator will
+ * skip to the next row. This is done in order to prevent repeated scanning of the same row when system
+ * automatically creates ranges of that form, which happens in the case of the client calling 
+ * continueScan, or in the case of the tablet server continuing a scan after swapping out sources.
  * 
  * <p>
- * To regain the original key/value pairs of the row, call the decodeRow function on the key/value pair that this iterator returned.
+ * To regain the original key/value pairs of the row, call the rowDecoder function on the key/value 
+ * pair that this iterator returned.
  * 
  * @see RowFilter
  */

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b2eaf13b/core/src/main/java/org/apache/accumulo/core/iterators/user/WholeRowIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/WholeRowIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/WholeRowIterator.java
index c8bceea..060a004 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/WholeRowIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/WholeRowIterator.java
@@ -33,17 +33,22 @@ import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 
 /**
  * 
- * The WholeRowIterator is designed to provide row-isolation so that queries see mutations as atomic. It does so by encapsulating an entire row of key/value
- * pairs into a single key/value pair, which is returned through the client as an atomic operation.
+ * The WholeRowIterator is designed to provide row-isolation so that queries see mutations as atomic. 
+ * It does so by encapsulating an entire row of key/value pairs into a single key/value pair, which 
+ * is returned through the client as an atomic operation. 
  * 
  * <p>
- * One caveat is that when seeking in the WholeRowIterator using a range that starts at a non-inclusive first key in a row, (e.g. seek(new Range(new Key(new
- * Text("row")),false,...),...)) this iterator will skip to the next row. This is done in order to prevent repeated scanning of the same row when system
- * automatically creates ranges of that form, which happens in the case of the client calling continueScan, or in the case of the tablet server continuing a
- * scan after swapping out sources.
+ * This iterator extends the {@link RowEncodingIterator}, providing implementations for rowEncoder
+ * and rowDecoder which serializes all column and value information from a given row into a
+ * single ByteStream in a value.
  * 
  * <p>
- * To regain the original key/value pairs of the row, call the decodeRow function on the key/value pair that this iterator returned.
+ * As with the RowEncodingIterator, when seeking in the WholeRowIterator using a range that starts
+ * at a non-inclusive first key in a row, this iterator will skip to the next row.
+ * 
+ * <p>
+ * To regain the original key/value pairs of the row, call the decodeRow function on the key/value
+ * pair that this iterator returned.
  * 
  * @see RowFilter
  */