accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject svn commit: r1298097 - in /incubator/accumulo/trunk: ./ docs/examples/ src/core/src/main/java/org/apache/accumulo/core/iterators/ src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/ src/examples/simple/src/main/java/org/apache...
Date Wed, 07 Mar 2012 20:38:14 GMT
Author: billie
Date: Wed Mar  7 20:38:12 2012
New Revision: 1298097

URL: http://svn.apache.org/viewvc?rev=1298097&view=rev
Log:
ACCUMULO-411 wrote some javadocs - merged to trunk

Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/docs/examples/README
    incubator/accumulo/trunk/docs/examples/README.batch
    incubator/accumulo/trunk/docs/examples/README.combiner
    incubator/accumulo/trunk/docs/examples/README.constraints
    incubator/accumulo/trunk/docs/examples/README.filedata
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/OptionDescriber.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchScanner.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RowOperations.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/SequentialBatchWriter.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/combiner/StatsCombiner.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/AlphaNumKeyConstraint.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/NumericValueConstraint.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/FileCount.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Ingest.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/QueryUtil.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Viewer.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/CharacterHistogram.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkCombiner.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkInputFormat.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkInputStream.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/KeyUtil.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/VisibilityCombiner.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithOutputFormat.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/ReadData.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/ContinuousQuery.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Index.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Query.java
    incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Reverse.java

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar  7 20:38:12 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611,1228195,1230180,1230736,1231043,1236873,1245632
 /incubator/accumulo/branches/1.3.5rc:1209938
-/incubator/accumulo/branches/1.4:1201902-1297794
+/incubator/accumulo/branches/1.4:1201902-1298088

Modified: incubator/accumulo/trunk/docs/examples/README
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/docs/examples/README?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/docs/examples/README (original)
+++ incubator/accumulo/trunk/docs/examples/README Wed Mar  7 20:38:12 2012
@@ -26,6 +26,7 @@ A comma-separated list of zookeeper serv
 
 2. Create an Accumulo user (see the [user manual][1]), or use the root user.
 The Accumulo user name will be referred to as "username" with password "password" throughout the examples.
+This user will need to have the ability to create tables.
 
 In all commands, you will need to replace "instance", "zookeepers", "username", and "password" with the values you set for your Accumulo instance.
 

Modified: incubator/accumulo/trunk/docs/examples/README.batch
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/docs/examples/README.batch?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/docs/examples/README.batch (original)
+++ incubator/accumulo/trunk/docs/examples/README.batch Wed Mar  7 20:38:12 2012
@@ -16,6 +16,12 @@ Notice:    Licensed to the Apache Softwa
            specific language governing permissions and limitations
            under the License.
 
+This tutorial uses the following Java classes, which can be found in org.apache.accumulo.examples.simple.client in the simple-examples module:
+
+ * SequentialBatchWriter.java - writes mutations with sequential rows and random values
+ * RandomBatchWriter.java - used by SequentialBatchWriter to generate random values
+ * RandomBatchScanner.java - reads random rows and verifies their values
+
 This is an example of how to use the batch writer and batch scanner. To compile
 the example, run maven and copy the produced jar into the accumulo lib dir.
 This is already done in the tar distribution. 
@@ -29,15 +35,11 @@ list of zookeeper nodes (given as zookee
 Before you run this, you must ensure that the user you are running has the
 "exampleVis" authorization. (you can set this in the shell with "setauths -u username -s exampleVis")
 
-    $ ./bin/accumulo shell -u root
-    > setauths -u username -s exampleVis
-    > exit
+    $ ./bin/accumulo shell -u root -e "setauths -u username -s exampleVis"
 
 You must also create the table, batchtest1, ahead of time. (In the shell, use "createtable batchtest1")
 
-    $ ./bin/accumulo shell -u username
-    > createtable batchtest1
-    > exit
+    $ ./bin/accumulo shell -u username -e "createtable batchtest1"
     $ ./bin/accumulo org.apache.accumulo.examples.simple.client.SequentialBatchWriter instance zookeepers username password batchtest1 0 10000 50 20000000 500 20 exampleVis
     $ ./bin/accumulo org.apache.accumulo.examples.simple.client.RandomBatchScanner instance zookeepers username password batchtest1 100 0 10000 50 20 exampleVis
     07 11:33:11,103 [client.CountingVerifyingReceiver] INFO : Generating 100 random queries...

Modified: incubator/accumulo/trunk/docs/examples/README.combiner
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/docs/examples/README.combiner?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/docs/examples/README.combiner (original)
+++ incubator/accumulo/trunk/docs/examples/README.combiner Wed Mar  7 20:38:12 2012
@@ -16,6 +16,10 @@ Notice:    Licensed to the Apache Softwa
            specific language governing permissions and limitations
            under the License.
 
+This tutorial uses the following Java class, which can be found in org.apache.accumulo.examples.simple.combiner in the simple-examples module:
+
+ * StatsCombiner.java - a combiner that calculates max, min, sum, and count
+
 This is a simple combiner example.  To build this example run maven and then
 copy the produced jar into the accumulo lib dir.  This is already done in the
 tar distribution.

Modified: incubator/accumulo/trunk/docs/examples/README.constraints
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/docs/examples/README.constraints?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/docs/examples/README.constraints (original)
+++ incubator/accumulo/trunk/docs/examples/README.constraints Wed Mar  7 20:38:12 2012
@@ -16,6 +16,11 @@ Notice:    Licensed to the Apache Softwa
            specific language governing permissions and limitations
            under the License.
 
+This tutorial uses the following Java classes, which can be found in org.apache.accumulo.examples.simple.constraints in the simple-examples module:
+
+ * AlphaNumKeyConstraint.java - a constraint that requires alphanumeric keys
+ * NumericValueConstraint.java - a constraint that requires numeric string values
+
 This an example of how to create a table with constraints. Below a table is
 create with two example constraints.  One constraints does not allow non alpha
 numeric keys.  The other constraint does not allow non numeric values. Two

Modified: incubator/accumulo/trunk/docs/examples/README.filedata
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/docs/examples/README.filedata?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/docs/examples/README.filedata (original)
+++ incubator/accumulo/trunk/docs/examples/README.filedata Wed Mar  7 20:38:12 2012
@@ -24,7 +24,7 @@ The example has the following classes:
  * ChunkInputFormat - An Accumulo InputFormat that provides keys containing file info (List<Entry<Key,Value>>) and values with an InputStream over the file (ChunkInputStream).
  * ChunkInputStream - An input stream over file data stored in Accumulo.
  * FileDataIngest - Takes a list of files and archives them into Accumulo keyed on the SHA1 hashes of the files.
- * FileDataQuery - Retrieves file data based on the SHA1 hash of the file. (Used by the filedata.Viewer.)
+ * FileDataQuery - Retrieves file data based on the SHA1 hash of the file. (Used by the dirlist.Viewer.)
  * KeyUtil - A utility for creating and parsing null-byte separated strings into/from Text objects.
  * VisibilityCombiner - A utility for merging visibilities into the form (VIS1)|(VIS2)|...
 

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java Wed Mar  7 20:38:12 2012
@@ -38,7 +38,7 @@ import org.apache.log4j.Logger;
  * A SortedKeyValueIterator that combines the Values for different versions of a Key into a single Value. Combiner will replace one or more versions of a Key
  * and their Values with the most recent Key and a Value which is the result of the reduce method.
  * 
- * Subclasses must implement a reduce method: public Value reduce(Key key, Iterator<Value> iter);
+ * Subclasses must implement a reduce method: {@code public Value reduce(Key key, Iterator<Value> iter)}.
  * 
  * This reduce method will be passed the most recent Key and an iterator over the Values for all non-deleted versions of that Key.
  */
@@ -295,7 +295,7 @@ public abstract class Combiner extends W
   }
   
   /**
-   * A convenience method to set the "all columns" option on a Combiner. 
+   * A convenience method to set the "all columns" option on a Combiner.
    * 
    * @param is
    *          iterator settings object to configure

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/OptionDescriber.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/OptionDescriber.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/OptionDescriber.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/OptionDescriber.java Wed Mar  7 20:38:12 2012
@@ -26,8 +26,8 @@ import java.util.Map;
  * this interface for the interactive part. The alternative would be to manually set configuration options with the config -t tableName property=value. If you
  * go the manual route, be careful to use the correct structure for the property and to set all the properties required for the iterator.
  * 
- * OptionDescribers will need to implement two methods: describeOptions() which returns an instance of IteratorOptions and validateOptions(Map<String,String>
- * options) which is intended to throw an exception or return false if the options are not acceptable.
+ * OptionDescribers will need to implement two methods: {@code describeOptions()} which returns an instance of {@link IteratorOptions} and
+ * {@code validateOptions(Map<String,String> options)} which is intended to throw an exception or return false if the options are not acceptable.
  * 
  */
 public interface OptionDescriber {
@@ -38,7 +38,7 @@ public interface OptionDescriber {
     public String description;
     
     /**
-     * IteratorOptions requires the following:
+     * IteratorOptions holds the name, description, and option information for an iterator.
      * 
      * @param name
      *          is the distinguishing name for the iterator or filter
@@ -109,7 +109,20 @@ public interface OptionDescriber {
     }
   }
   
+  /**
+   * Gets an iterator options object that contains information needed to configure this iterator. This object will be used by the accumulo shell to prompt the
+   * user to input the appropriate information.
+   * 
+   * @return an iterator options object
+   */
   public IteratorOptions describeOptions();
   
+  /**
+   * Check to see if an options map contains all options required by an iterator and that the option values are in the expected formats.
+   * 
+   * @param options
+   *          a map of option names to option values
+   * @return true if options are valid, false otherwise
+   */
   public boolean validateOptions(Map<String,String> options);
 }

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchScanner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchScanner.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchScanner.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchScanner.java Wed Mar  7 20:38:12 2012
@@ -35,6 +35,9 @@ import org.apache.accumulo.core.security
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
 
+/**
+ * Internal class used to verify validity of data read.
+ */
 class CountingVerifyingReceiver {
   private static final Logger log = Logger.getLogger(CountingVerifyingReceiver.class);
   
@@ -68,9 +71,28 @@ class CountingVerifyingReceiver {
   }
 }
 
+/**
+ * Simple example for reading random batches of data from Accumulo. See docs/examples/README.batch for instructions.
+ */
 public class RandomBatchScanner {
   private static final Logger log = Logger.getLogger(CountingVerifyingReceiver.class);
   
+  /**
+   * Generate a number of ranges, each covering a single random row.
+   * 
+   * @param num
+   *          the number of ranges to generate
+   * @param min
+   *          the minimum row that will be generated
+   * @param max
+   *          the maximum row that will be generated
+   * @param r
+   *          a random number generator
+   * @param ranges
+   *          a set in which to store the generated ranges
+   * @param expectedRows
+   *          a map in which to store the rows covered by the ranges (initially mapped to false)
+   */
   static void generateRandomQueries(int num, long min, long max, Random r, HashSet<Range> ranges, HashMap<Text,Boolean> expectedRows) {
     log.info(String.format("Generating %,d random queries...", num));
     while (ranges.size() < num) {
@@ -86,6 +108,11 @@ public class RandomBatchScanner {
     log.info("finished");
   }
   
+  /**
+   * Prints a count of the number of rows mapped to false.
+   * 
+   * @param expectedRows
+   */
   private static void printRowsNotFound(HashMap<Text,Boolean> expectedRows) {
     int count = 0;
     for (Entry<Text,Boolean> entry : expectedRows.entrySet())
@@ -96,6 +123,23 @@ public class RandomBatchScanner {
       log.warn("Did not find " + count + " rows");
   }
   
+  /**
+   * Generates a number of random queries, verifies that the key/value pairs returned were in the queried ranges and that the values were generated by
+   * {@link RandomBatchWriter#createValue(long, int)}. Prints information about the results.
+   * 
+   * @param num
+   *          the number of queries to generate
+   * @param min
+   *          the min row to query
+   * @param max
+   *          the max row to query
+   * @param evs
+   *          the expected size of the values
+   * @param r
+   *          a random number generator
+   * @param tsbr
+   *          a batch scanner
+   */
   static void doRandomQueries(int num, long min, long max, int evs, Random r, BatchScanner tsbr) {
     
     HashSet<Range> ranges = new HashSet<Range>(num);
@@ -121,6 +165,15 @@ public class RandomBatchScanner {
     printRowsNotFound(expectedRows);
   }
   
+  /**
+   * Scans over a specified number of entries to Accumulo using a {@link BatchScanner}. Completes scans twice to compare times for a fresh query with those for
+   * a repeated query which has cached metadata and connections already established.
+   * 
+   * @param args
+   * @throws AccumuloException
+   * @throws AccumuloSecurityException
+   * @throws TableNotFoundException
+   */
   public static void main(String[] args) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     String seed = null;
     

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java Wed Mar  7 20:38:12 2012
@@ -32,8 +32,23 @@ import org.apache.accumulo.core.data.Val
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.hadoop.io.Text;
 
+/**
+ * Simple example for writing random data to Accumulo. See docs/examples/README.batch for instructions.
+ * 
+ * The rows of the entries will be randomly generated numbers between a specified min and max (prefixed by "row_"). The column families will be "foo" and column
+ * qualifiers will be "1". The values will be random byte arrays of a specified size.
+ */
 public class RandomBatchWriter {
   
+  /**
+   * Creates a random byte array of specified size using the specified seed.
+   * 
+   * @param rowid
+   *          the seed to use for the random number generator
+   * @param dataSize
+   *          the size of the array
+   * @return a random byte array
+   */
   public static byte[] createValue(long rowid, int dataSize) {
     Random r = new Random(rowid);
     byte value[] = new byte[dataSize];
@@ -48,6 +63,17 @@ public class RandomBatchWriter {
     return value;
   }
   
+  /**
+   * Creates a mutation on a specified row with column family "foo", column qualifier "1", specified visibility, and a random value of specified size.
+   * 
+   * @param rowid
+   *          the row of the mutation
+   * @param dataSize
+   *          the size of the random value
+   * @param visibility
+   *          the visibility of the entry to insert
+   * @return a mutation
+   */
   public static Mutation createMutation(long rowid, int dataSize, ColumnVisibility visibility) {
     Text row = new Text(String.format("row_%010d", rowid));
     
@@ -62,6 +88,13 @@ public class RandomBatchWriter {
     return m;
   }
   
+  /**
+   * Writes a specified number of entries to Accumulo using a {@link BatchWriter}.
+   * 
+   * @throws AccumuloException
+   * @throws AccumuloSecurityException
+   * @throws TableNotFoundException
+   */
   public static void main(String[] args) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     
     String seed = null;

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RowOperations.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RowOperations.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RowOperations.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RowOperations.java Wed Mar  7 20:38:12 2012
@@ -36,6 +36,9 @@ import org.apache.accumulo.core.data.Val
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
 
+/**
+ * A demonstration of reading entire rows and deleting entire rows.
+ */
 public class RowOperations {
   
   private static final Logger log = Logger.getLogger(RowOperations.class);

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/SequentialBatchWriter.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/SequentialBatchWriter.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/SequentialBatchWriter.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/SequentialBatchWriter.java Wed Mar  7 20:38:12 2012
@@ -26,8 +26,19 @@ import org.apache.accumulo.core.client.Z
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.security.ColumnVisibility;
 
+/**
+ * Simple example for writing random data in sequential order to Accumulo. See docs/examples/README.batch for instructions.
+ */
 public class SequentialBatchWriter {
-  
+  /**
+   * Writes a specified number of entries to Accumulo using a {@link BatchWriter}. The rows of the entries will be sequential starting at a specified number.
+   * The column families will be "foo" and column qualifiers will be "1". The values will be random byte arrays of a specified size.
+   * 
+   * @throws AccumuloException
+   * @throws AccumuloSecurityException
+   * @throws TableNotFoundException
+   * @throws MutationsRejectedException
+   */
   public static void main(String[] args) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, MutationsRejectedException {
     if (args.length != 12) {
       System.out

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/combiner/StatsCombiner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/combiner/StatsCombiner.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/combiner/StatsCombiner.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/combiner/StatsCombiner.java Wed Mar  7 20:38:12 2012
@@ -28,14 +28,16 @@ import org.apache.accumulo.core.iterator
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 
 /**
- * 
+ * This combiner calculates the max, min, sum, and count of long integers represented as strings in values. It stores the result in a comma-separated value of
+ * the form max,min,sum,count. If such a value is encountered while combining, its information is incorporated into the running calculations of max, min, sum,
+ * and count. See {@link Combiner} for more information on which values are combined together. See docs/examples/README.combiner for instructions.
  */
 public class StatsCombiner extends Combiner {
   
   public static final String RADIX_OPTION = "radix";
   
   private int radix = 10;
-
+  
   @Override
   public Value reduce(Key key, Iterator<Value> iter) {
     
@@ -60,7 +62,7 @@ public class StatsCombiner extends Combi
         count += Long.parseLong(stats[3], radix);
       }
     }
-
+    
     String ret = Long.toString(min, radix) + "," + Long.toString(max, radix) + "," + Long.toString(sum, radix) + "," + Long.toString(count, radix);
     return new Value(ret.getBytes());
   }

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/AlphaNumKeyConstraint.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/AlphaNumKeyConstraint.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/AlphaNumKeyConstraint.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/AlphaNumKeyConstraint.java Wed Mar  7 20:38:12 2012
@@ -27,7 +27,7 @@ import org.apache.accumulo.core.data.Mut
 /**
  * This class is an accumulo constraint that ensures all fields of a key are alpha numeric.
  * 
- * 
+ * See docs/examples/README.constraint for instructions.
  * 
  */
 

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/NumericValueConstraint.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/NumericValueConstraint.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/NumericValueConstraint.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/NumericValueConstraint.java Wed Mar  7 20:38:12 2012
@@ -24,6 +24,9 @@ import org.apache.accumulo.core.constrai
 import org.apache.accumulo.core.data.ColumnUpdate;
 import org.apache.accumulo.core.data.Mutation;
 
+/**
+ * This class is an accumulo constraint that ensures values are numeric strings. See docs/examples/README.constraint for instructions.
+ */
 public class NumericValueConstraint implements Constraint {
   
   private static final short NON_NUMERIC_VALUE = 1;

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/FileCount.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/FileCount.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/FileCount.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/FileCount.java Wed Mar  7 20:38:12 2012
@@ -33,6 +33,9 @@ import org.apache.accumulo.core.security
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.hadoop.io.Text;
 
+/**
+ * Computes recursive counts over file system information and stores them back into the same Accumulo table. See docs/examples/README.dirlist for instructions.
+ */
 public class FileCount {
   
   private int entriesScanned;

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Ingest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Ingest.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Ingest.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Ingest.java Wed Mar  7 20:38:12 2012
@@ -32,6 +32,10 @@ import org.apache.accumulo.examples.simp
 import org.apache.accumulo.examples.simple.filedata.FileDataIngest;
 import org.apache.hadoop.io.Text;
 
+/**
+ * Recursively lists the files and directories under a given path, ingests their names and file info into one Accumulo table, indexes the file names in a
+ * separate table, and the file data into a third table. See docs/examples/README.dirlist for instructions.
+ */
 public class Ingest {
   static final Value nullValue = new Value(new byte[0]);
   public static final String LENGTH_CQ = "length";

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/QueryUtil.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/QueryUtil.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/QueryUtil.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/QueryUtil.java Wed Mar  7 20:38:12 2012
@@ -34,6 +34,10 @@ import org.apache.accumulo.core.iterator
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.hadoop.io.Text;
 
+/**
+ * Provides utility methods for getting the info for a file, listing the contents of a directory, and performing single wild card searches on file or directory
+ * names. See docs/examples/README.dirlist for instructions.
+ */
 public class QueryUtil {
   private Connector conn = null;
   private String tableName;
@@ -52,6 +56,13 @@ public class QueryUtil {
     this.auths = auths;
   }
   
+  /**
+   * Calculates the depth of a path, i.e. the number of forward slashes in the path name.
+   * 
+   * @param path
+   *          the full path of a file or directory
+   * @return the depth of the path
+   */
   public static int getDepth(String path) {
     int numSlashes = 0;
     int index = -1;
@@ -60,12 +71,26 @@ public class QueryUtil {
     return numSlashes;
   }
   
+  /**
+   * Given a path, construct an accumulo row prepended with the path's depth for the directory table.
+   * 
+   * @param path
+   *          the full path of a file or directory
+   * @return the accumulo row associated with this path
+   */
   public static Text getRow(String path) {
     Text row = new Text(String.format("%03d", getDepth(path)));
     row.append(path.getBytes(), 0, path.length());
     return row;
   }
   
+  /**
+   * Given a path, construct an accumulo row prepended with the {@link #FORWARD_PREFIX} for the index table.
+   * 
+   * @param path
+   *          the full path of a file or directory
+   * @return the accumulo row associated with this path
+   */
   public static Text getForwardIndex(String path) {
     String part = path.substring(path.lastIndexOf("/") + 1);
     if (part.length() == 0)
@@ -75,6 +100,13 @@ public class QueryUtil {
     return row;
   }
   
+  /**
+   * Given a path, construct an accumulo row prepended with the {@link #REVERSE_PREFIX} with the path reversed for the index table.
+   * 
+   * @param path
+   *          the full path of a file or directory
+   * @return the accumulo row associated with this path
+   */
   public static Text getReverseIndex(String path) {
     String part = path.substring(path.lastIndexOf("/") + 1);
     if (part.length() == 0)
@@ -88,12 +120,24 @@ public class QueryUtil {
     return row;
   }
   
+  /**
+   * Returns either the {@link #DIR_COLF} or a decoded string version of the colf.
+   * 
+   * @param colf
+   *          the column family
+   */
   public static String getType(Text colf) {
     if (colf.equals(DIR_COLF))
       return colf.toString() + ":";
     return Long.toString(Ingest.encoder.decode(colf.getBytes())) + ":";
   }
   
+  /**
+   * Scans over the directory table and pulls out stat information about a path.
+   * 
+   * @param path
+   *          the full path of a file or directory
+   */
   public Map<String,String> getData(String path) throws TableNotFoundException {
     if (path.endsWith("/"))
       path = path.substring(0, path.length() - 1);
@@ -108,6 +152,12 @@ public class QueryUtil {
     return data;
   }
   
+  /**
+   * Uses the directory table to list the contents of a directory.
+   * 
+   * @param path
+   *          the full path of a directory
+   */
   public Map<String,Map<String,String>> getDirList(String path) throws TableNotFoundException {
     if (!path.endsWith("/"))
       path = path + "/";
@@ -127,6 +177,12 @@ public class QueryUtil {
     return fim;
   }
   
+  /**
+   * Scans over the index table for files or directories with a given name.
+   * 
+   * @param term
+   *          the name a file or directory to search for
+   */
   public Iterable<Entry<Key,Value>> exactTermSearch(String term) throws Exception {
     System.out.println("executing exactTermSearch for " + term);
     Scanner scanner = conn.createScanner(tableName, auths);
@@ -134,6 +190,12 @@ public class QueryUtil {
     return scanner;
   }
   
+  /**
+   * Scans over the index table for files or directories with a given name, prefix, or suffix (indicated by a wildcard '*' at the beginning or end of the term.
+   * 
+   * @param exp
+   *          the name a file or directory to search for with an optional wildcard '*' at the beginning or end
+   */
   public Iterable<Entry<Key,Value>> singleRestrictedWildCardSearch(String exp) throws Exception {
     if (exp.indexOf("/") >= 0)
       throw new Exception("this method only works with unqualified names");
@@ -155,6 +217,12 @@ public class QueryUtil {
     return scanner;
   }
   
+  /**
+   * Scans over the index table for files or directories with a given name that can contain a single wildcard '*' anywhere in the term.
+   * 
+   * @param exp
+   *          the name a file or directory to search for with one optional wildcard '*'
+   */
   public Iterable<Entry<Key,Value>> singleWildCardSearch(String exp) throws Exception {
     int starIndex = exp.indexOf("*");
     if (exp.indexOf("*", starIndex + 1) >= 0)
@@ -184,6 +252,12 @@ public class QueryUtil {
     return scanner;
   }
   
+  /**
+   * Lists the contents of a directory using the directory table, or searches for file or directory names (if the -search flag is included).
+   * 
+   * @param args
+   * @throws Exception
+   */
   public static void main(String[] args) throws Exception {
     if (args.length != 7 && (args.length != 8 || !args[7].equals("-search"))) {
       System.out.println("usage: " + QueryUtil.class.getSimpleName() + " <instance> <zookeepers> <user> <pass> <table> <auths> <path> [-search]");

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Viewer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Viewer.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Viewer.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Viewer.java Wed Mar  7 20:38:12 2012
@@ -40,6 +40,9 @@ import org.apache.accumulo.core.security
 import org.apache.accumulo.examples.simple.filedata.FileDataQuery;
 import org.apache.log4j.Logger;
 
+/**
+ * Provides a GUI for browsing the file system information stored in Accumulo. See docs/examples/README.dirlist for instructions.
+ */
 @SuppressWarnings("serial")
 public class Viewer extends JFrame implements TreeSelectionListener, TreeExpansionListener {
   private static final Logger log = Logger.getLogger(Viewer.class);

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/CharacterHistogram.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/CharacterHistogram.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/CharacterHistogram.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/CharacterHistogram.java Wed Mar  7 20:38:12 2012
@@ -38,7 +38,8 @@ import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
 
 /**
- * 
+ * A MapReduce that computes a histogram of byte frequency for each file and stores the histogram alongside the file data. The {@link ChunkInputFormat} is used
+ * to read the file data from Accumulo. See docs/examples/README.filedata for instructions.
  */
 public class CharacterHistogram extends Configured implements Tool {
   public static final String VIS = "vis";

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkCombiner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkCombiner.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkCombiner.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkCombiner.java Wed Mar  7 20:38:12 2012
@@ -31,22 +31,26 @@ import org.apache.accumulo.core.iterator
 import org.apache.hadoop.io.Text;
 
 /**
- * This iterator dedupes chunks and sets their visibilities to the combined
- * visibility of the refs columns.  For example, it would combine
+ * This iterator dedupes chunks and sets their visibilities to the combined visibility of the refs columns. For example, it would combine
  * 
+ * <pre>
  *    row1 refs uid1\0a A&B V0
  *    row1 refs uid2\0b C&D V0
  *    row1 ~chunk 0 A&B V1
  *    row1 ~chunk 0 C&D V1
  *    row1 ~chunk 0 E&F V1
  *    row1 ~chunk 0 G&H V1
- *    
- *  into the following...
- *  
+ * </pre>
+ * 
+ * into the following
+ * 
+ * <pre>
  *    row1 refs uid1\0a A&B V0
  *    row1 refs uid2\0b C&D V0
  *    row1 ~chunk 0 (A&B)|(C&D) V1
- *    
+ * </pre>
+ * 
+ * {@link VisibilityCombiner} is used to combie the visibilities.
  */
 
 public class ChunkCombiner implements SortedKeyValueIterator<Key,Value> {

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkInputFormat.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkInputFormat.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkInputFormat.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkInputFormat.java Wed Mar  7 20:38:12 2012
@@ -32,7 +32,8 @@ import org.apache.hadoop.mapreduce.Recor
 import org.apache.hadoop.mapreduce.TaskAttemptContext;
 
 /**
- * An InputFormat that turns the file data ingested with FileDataIngest into an InputStream. Mappers used with this InputFormat must close the InputStream.
+ * An InputFormat that turns the file data ingested with {@link FileDataIngest} into an InputStream using {@link ChunkInputStream}. Mappers used with this
+ * InputFormat must close the InputStream.
  */
 public class ChunkInputFormat extends InputFormatBase<List<Entry<Key,Value>>,InputStream> {
   @Override

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkInputStream.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkInputStream.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkInputStream.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkInputStream.java Wed Mar  7 20:38:12 2012
@@ -29,6 +29,9 @@ import org.apache.accumulo.core.util.Pee
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
 
+/**
+ * An input stream that reads file data stored in one or more Accumulo values. Used by {@link ChunkInputFormat} to present input streams to a mapper.
+ */
 public class ChunkInputStream extends InputStream {
   private static final Logger log = Logger.getLogger(ChunkInputStream.class);
   

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java Wed Mar  7 20:38:12 2012
@@ -34,6 +34,9 @@ import org.apache.accumulo.core.data.Val
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.hadoop.io.Text;
 
+/**
+ * Takes a list of files and archives them into Accumulo keyed on the SHA1 hashes of the files. See docs/examples/README.filedata for instructions.
+ */
 public class FileDataIngest {
   public static final Text CHUNK_CF = new Text("~chunk");
   public static final Text REFS_CF = new Text("refs");

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java Wed Mar  7 20:38:12 2012
@@ -33,6 +33,10 @@ import org.apache.accumulo.core.data.Val
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.PeekingIterator;
 
+/**
+ * Retrieves file data based on the SHA1 hash of the file. Used by the {@link org.apache.accumulo.examples.simple.dirlist.Viewer}. See README.dirlist for
+ * instructions.
+ */
 public class FileDataQuery {
   private Connector conn = null;
   List<Entry<Key,Value>> lastRefs;

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/KeyUtil.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/KeyUtil.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/KeyUtil.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/KeyUtil.java Wed Mar  7 20:38:12 2012
@@ -20,9 +20,19 @@ import java.util.ArrayList;
 
 import org.apache.hadoop.io.Text;
 
+/**
+ * A utility for creating and parsing null-byte separated strings into/from Text objects.
+ */
 public class KeyUtil {
   public static final byte[] nullbyte = new byte[] {0};
   
+  /**
+   * Join some number of strings using a null byte separator into a text object.
+   * 
+   * @param s
+   *          strings
+   * @return a text object containing the strings separated by null bytes
+   */
   public static Text buildNullSepText(String... s) {
     Text t = new Text(s[0]);
     for (int i = 1; i < s.length; i++) {
@@ -32,6 +42,13 @@ public class KeyUtil {
     return t;
   }
   
+  /**
+   * Split a text object using a null byte separator into an array of strings.
+   * 
+   * @param t
+   *          null-byte separated text object
+   * @return an array of strings
+   */
   public static String[] splitNullSepText(Text t) {
     ArrayList<String> s = new ArrayList<String>();
     byte[] b = t.getBytes();

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/VisibilityCombiner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/VisibilityCombiner.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/VisibilityCombiner.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/VisibilityCombiner.java Wed Mar  7 20:38:12 2012
@@ -20,6 +20,9 @@ import java.util.TreeSet;
 
 import org.apache.accumulo.core.data.ByteSequence;
 
+/**
+ * A utility for merging visibilities into the form {@code (VIS1)|(VIS2)|...|(VISN)}. Used by the {@link ChunkCombiner}.
+ */
 public class VisibilityCombiner {
   
   private TreeSet<String> visibilities = new TreeSet<String>();

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java Wed Mar  7 20:38:12 2012
@@ -29,6 +29,9 @@ import org.apache.accumulo.core.data.Mut
 import org.apache.accumulo.core.data.Value;
 import org.apache.hadoop.io.Text;
 
+/**
+ * Inserts 10K rows (50K entries) into accumulo with each row having 5 entries.
+ */
 public class InsertWithBatchWriter {
   public static void main(String[] args) throws AccumuloException, AccumuloSecurityException, MutationsRejectedException, TableExistsException,
       TableNotFoundException {

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithOutputFormat.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithOutputFormat.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithOutputFormat.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithOutputFormat.java Wed Mar  7 20:38:12 2012
@@ -30,6 +30,9 @@ import org.apache.hadoop.mapreduce.TaskA
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
 
+/**
+ * Inserts 10K rows (50K entries) into accumulo with each row having 5 entries using an OutputFormat.
+ */
 public class InsertWithOutputFormat extends Configured implements Tool {
   // this is a tool because when you run a mapreduce, you will need to use the
   // ToolRunner
@@ -38,7 +41,7 @@ public class InsertWithOutputFormat exte
   @Override
   public int run(String[] args) throws Exception {
     if (args.length != 5) {
-      System.out.println("Usage: accumulo " + this.getClass().getName() + " <instance name> <zoo keepers> <username> <password> <tablename>");
+      System.out.println("Usage: bin/tool.sh " + this.getClass().getName() + " <instance name> <zoo keepers> <username> <password> <tablename>");
       return 1;
     }
     Text tableName = new Text(args[4]);

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/ReadData.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/ReadData.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/ReadData.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/ReadData.java Wed Mar  7 20:38:12 2012
@@ -31,6 +31,9 @@ import org.apache.accumulo.core.data.Ran
 import org.apache.accumulo.core.data.Value;
 import org.apache.hadoop.io.Text;
 
+/**
+ * Reads all data between two rows; all data after a given row; or all data in a table, depending on the number of arguments given.
+ */
 public class ReadData {
   public static void main(String[] args) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     if (args.length < 5 || args.length > 7) {

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/ContinuousQuery.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/ContinuousQuery.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/ContinuousQuery.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/ContinuousQuery.java Wed Mar  7 20:38:12 2012
@@ -36,8 +36,9 @@ import org.apache.hadoop.io.Text;
 
 /**
  * Using the doc2word table created by Reverse.java, this program randomly selects N words per document. Then it continually queries a random set of words in
- * the shard table (created by Index.java) using the intersecting iterator.
+ * the shard table (created by {@link Index}) using the {@link IntersectingIterator}.
  * 
+ * See docs/examples/README.shard for instructions.
  */
 
 public class ContinuousQuery {
@@ -68,13 +69,13 @@ public class ContinuousQuery {
     Random rand = new Random();
     
     BatchScanner bs = conn.createBatchScanner(table, Constants.NO_AUTHS, 20);
-
+    
     for (long i = 0; i < iterations; i += 1) {
       Text[] columns = randTerms.get(rand.nextInt(randTerms.size()));
       
       bs.clearScanIterators();
       bs.clearColumns();
-
+      
       IteratorSetting ii = new IteratorSetting(20, "ii", IntersectingIterator.class);
       IntersectingIterator.setColumnFamilies(ii, columns);
       bs.addScanIterator(ii);
@@ -92,7 +93,7 @@ public class ContinuousQuery {
     }
     
     bs.close();
-
+    
   }
   
   private static ArrayList<Text[]> findRandomTerms(Scanner scanner, int numTerms) {

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Index.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Index.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Index.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Index.java Wed Mar  7 20:38:12 2012
@@ -30,7 +30,9 @@ import org.apache.hadoop.io.Text;
 /**
  * This program indexes a set of documents given on the command line into a shard table.
  * 
- * What it writes to the table is row = partition id column family = term column qualifier = document id
+ * What it writes to the table is row = partition id, column family = term, column qualifier = document id.
+ * 
+ * See docs/examples/README.shard for instructions.
  */
 
 public class Index {

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Query.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Query.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Query.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Query.java Wed Mar  7 20:38:12 2012
@@ -31,8 +31,9 @@ import org.apache.accumulo.core.iterator
 import org.apache.hadoop.io.Text;
 
 /**
- * This program queries a set of terms in the shard table (populated by Index.java) using the intersecting iterator.
+ * This program queries a set of terms in the shard table (populated by {@link Index}) using the {@link IntersectingIterator}.
  * 
+ * See docs/examples/README.shard for instructions.
  */
 
 public class Query {

Modified: incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Reverse.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Reverse.java?rev=1298097&r1=1298096&r2=1298097&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Reverse.java (original)
+++ incubator/accumulo/trunk/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Reverse.java Wed Mar  7 20:38:12 2012
@@ -29,9 +29,10 @@ import org.apache.accumulo.core.data.Val
 import org.apache.hadoop.io.Text;
 
 /**
- * The program reads an accumulo table written by Index.java and writes out to another table. It writes out a mapping of documents to terms. The document to term
- * mapping is used by ContinuousQuery.java
+ * The program reads an accumulo table written by {@link Index} and writes out to another table. It writes out a mapping of documents to terms. The document to
+ * term mapping is used by {@link ContinuousQuery}.
  * 
+ * See docs/examples/README.shard for instructions.
  */
 
 public class Reverse {



Mime
View raw message