You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by bi...@apache.org on 2012/03/06 21:38:19 UTC

svn commit: r1297697 - in /incubator/accumulo/trunk: ./ src/core/src/main/java/org/apache/accumulo/core/client/ src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/ src/core/src/main/java/org/apache/accumulo/core/iterators/user/

Author: billie
Date: Tue Mar  6 20:38:18 2012
New Revision: 1297697

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

Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar  6 20:38:18 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-1297533
+/incubator/accumulo/branches/1.4:1201902-1297657

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java?rev=1297697&r1=1297696&r2=1297697&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java Tue Mar  6 20:38:18 2012
@@ -26,7 +26,14 @@ import org.apache.accumulo.core.data.Ran
  */
 
 public interface BatchDeleter extends ScannerBase {
-  
+  /**
+   * Deletes the ranges specified by {@link #setRanges}.
+   * 
+   * @throws MutationsRejectedException
+   *           this can be thrown when deletion mutations fail
+   * @throws TableNotFoundException
+   *           when the table does not exist
+   */
   public void delete() throws MutationsRejectedException, TableNotFoundException;
   
   /**
@@ -37,5 +44,8 @@ public interface BatchDeleter extends Sc
    */
   void setRanges(Collection<Range> ranges);
   
+  /**
+   * Releases any resources.
+   */
   void close();
 }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java?rev=1297697&r1=1297696&r2=1297697&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java Tue Mar  6 20:38:18 2012
@@ -48,7 +48,7 @@ public class IteratorSetting {
   private Map<String,String> properties;
   
   /**
-   * Get layer at which this iterator applies. See {@link #setPriority(int) for how the priority is used.}
+   * Get layer at which this iterator applies. See {@link #setPriority(int)} for how the priority is used.
    * 
    * @return the priority of this Iterator
    */
@@ -138,7 +138,7 @@ public class IteratorSetting {
    * Constructs an iterator setting configured for the scan scope with no parameters. (Parameters can be added later.)
    * 
    * @param priority
-   *          the priority for the iterator @see {@link #setPriority(int)}
+   *          the priority for the iterator (see {@link #setPriority(int)})
    * @param name
    *          the distinguishing name for the iterator
    * @param iteratorClass
@@ -152,7 +152,7 @@ public class IteratorSetting {
    * Constructs an iterator setting configured for the specified scopes with the specified parameters.
    * 
    * @param priority
-   *          the priority for the iterator @see {@link #setPriority(int)}
+   *          the priority for the iterator (see {@link #setPriority(int)})
    * @param name
    *          the distinguishing name for the iterator
    * @param iteratorClass
@@ -173,7 +173,7 @@ public class IteratorSetting {
    * parameters.
    * 
    * @param priority
-   *          the priority for the iterator @see {@link #setPriority(int)}
+   *          the priority for the iterator (see {@link #setPriority(int)})
    * @param iteratorClass
    *          the class for the iterator
    */
@@ -182,19 +182,18 @@ public class IteratorSetting {
   }
   
   /**
-
+   * 
    * Constructs an iterator setting using the given class's SimpleName for the iterator name and configured for the specified scopes with the specified
    * parameters.
    * 
    * @param priority
-   *          the priority for the iterator @see {@link #setPriority(int)}
+   *          the priority for the iterator (see {@link #setPriority(int)})
    * @param iteratorClass
    *          the class for the iterator
    * @param properties
    *          any properties for the iterator
    */
-  public IteratorSetting(int priority, Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass,
-      Map<String,String> properties) {
+  public IteratorSetting(int priority, Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass, Map<String,String> properties) {
     this(priority, iteratorClass.getSimpleName(), iteratorClass.getName(), properties);
   }
   
@@ -202,7 +201,7 @@ public class IteratorSetting {
    * Constructs an iterator setting configured for the scan scope with no parameters.
    * 
    * @param priority
-   *          the priority for the iterator @see {@link #setPriority(int)}
+   *          the priority for the iterator (see {@link #setPriority(int)})
    * @param name
    *          the distinguishing name for the iterator
    * @param iteratorClass
@@ -313,6 +312,6 @@ public class IteratorSetting {
     public Text getColumnQualifier() {
       return getSecond();
     }
-
+    
   }
 }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java?rev=1297697&r1=1297696&r2=1297697&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java Tue Mar  6 20:38:18 2012
@@ -26,7 +26,11 @@ import org.apache.accumulo.core.util.Pee
 import org.apache.hadoop.io.Text;
 
 /**
- * Group Key/Value pairs into Iterators over rows.
+ * Group Key/Value pairs into Iterators over rows. Suggested usage:
+ * 
+ * <pre>
+ * RowIterator rowIterator = new RowIterator(connector.createScanner(tableName, authorizations));
+ * </pre>
  */
 public class RowIterator implements Iterator<Iterator<Entry<Key,Value>>> {
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java?rev=1297697&r1=1297696&r2=1297697&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java Tue Mar  6 20:38:18 2012
@@ -232,6 +232,13 @@ public class ZooKeeperInstance implement
     this.conf = conf;
   }
   
+  /**
+   * Given a zooCache and instanceId, look up the instance name.
+   * 
+   * @param zooCache
+   * @param instanceId
+   * @return the instance name
+   */
   public static String lookupInstanceName(ZooCache zooCache, UUID instanceId) {
     ArgumentChecker.notNull(zooCache, instanceId);
     for (String name : zooCache.getChildren(Constants.ZROOT + Constants.ZINSTANCES)) {

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java?rev=1297697&r1=1297696&r2=1297697&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java Tue Mar  6 20:38:18 2012
@@ -133,7 +133,7 @@ public abstract class InputFormatBase<K,
   private static final String ITERATORS_DELIM = ",";
   
   /**
-   * Enable or disable use of the {@link IsolatedScanner}. By default it is not enabled.
+   * Enable or disable use of the {@link IsolatedScanner} in this configuration object. By default it is not enabled.
    * 
    * @param conf
    *          The Hadoop configuration object
@@ -145,7 +145,7 @@ public abstract class InputFormatBase<K,
   }
   
   /**
-   * Enable or disable use of the {@link ClientSideIteratorScanner}. By default it is not enabled.
+   * Enable or disable use of the {@link ClientSideIteratorScanner} in this configuration object. By default it is not enabled.
    * 
    * @param conf
    *          The Hadoop configuration object
@@ -156,6 +156,20 @@ public abstract class InputFormatBase<K,
     conf.setBoolean(LOCAL_ITERATORS, enable);
   }
   
+  /**
+   * Initialize the user, table, and authorization information for the configuration object that will be used with an Accumulo InputFormat.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @param user
+   *          a valid accumulo user
+   * @param passwd
+   *          the user's password
+   * @param table
+   *          the table to read
+   * @param auths
+   *          the authorizations used to restrict data read
+   */
   public static void setInputInfo(Configuration conf, String user, byte[] passwd, String table, Authorizations auths) {
     if (conf.getBoolean(INPUT_INFO_HAS_BEEN_SET, false))
       throw new IllegalStateException("Input info can only be set once per job");
@@ -169,6 +183,16 @@ public abstract class InputFormatBase<K,
       conf.set(AUTHORIZATIONS, auths.serialize());
   }
   
+  /**
+   * Configure a {@link ZooKeeperInstance} for this configuration object.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @param instanceName
+   *          the accumulo instance name
+   * @param zooKeepers
+   *          a comma-separated list of zookeeper servers
+   */
   public static void setZooKeeperInstance(Configuration conf, String instanceName, String zooKeepers) {
     if (conf.getBoolean(INSTANCE_HAS_BEEN_SET, false))
       throw new IllegalStateException("Instance info can only be set once per job");
@@ -179,12 +203,28 @@ public abstract class InputFormatBase<K,
     conf.set(ZOOKEEPERS, zooKeepers);
   }
   
+  /**
+   * Configure a {@link MockInstance} for this configuration object.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @param instanceName
+   *          the accumulo instance name
+   */
   public static void setMockInstance(Configuration conf, String instanceName) {
     conf.setBoolean(INSTANCE_HAS_BEEN_SET, true);
     conf.setBoolean(MOCK, true);
     conf.set(INSTANCE_NAME, instanceName);
   }
   
+  /**
+   * Set the ranges to map over for this configuration object.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @param ranges
+   *          the ranges that will be mapped over
+   */
   public static void setRanges(Configuration conf, Collection<Range> ranges) {
     ArgumentChecker.notNull(ranges);
     ArrayList<String> rangeStrings = new ArrayList<String>(ranges.size());
@@ -200,6 +240,13 @@ public abstract class InputFormatBase<K,
     conf.setStrings(RANGES, rangeStrings.toArray(new String[0]));
   }
   
+  /**
+   * Disables the adjustment of ranges for this configuration object. By default, overlapping ranges will be merged and ranges will be fit to existing tablet
+   * boundaries. Disabling this adjustment will cause there to be exactly one mapper per range set using {@link #setRanges(Configuration, Collection)}.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   */
   public static void disableAutoAdjustRanges(Configuration conf) {
     conf.setBoolean(AUTO_ADJUST_RANGES, false);
   }
@@ -209,10 +256,11 @@ public abstract class InputFormatBase<K,
    * leveraged in the scan by the record reader. To adjust priority use setIterator() & setIteratorOptions() w/ the VersioningIterator type explicitly.
    * 
    * @param conf
-   *          the job
+   *          the Hadoop configuration object
    * @param maxVersions
-   *          the max versions
+   *          the max number of versions per accumulo cell
    * @throws IOException
+   *           if maxVersions is < 1
    */
   public static void setMaxVersions(Configuration conf, int maxVersions) throws IOException {
     if (maxVersions < 1)
@@ -221,7 +269,10 @@ public abstract class InputFormatBase<K,
   }
   
   /**
+   * Restricts the columns that will be mapped over for this configuration object.
    * 
+   * @param conf
+   *          the Hadoop configuration object
    * @param columnFamilyColumnQualifierPairs
    *          A pair of {@link Text} objects corresponding to column family and column qualifier. If the column qualifier is null, the entire column family is
    *          selected. An empty set is the default and is equivalent to scanning the all columns.
@@ -241,6 +292,14 @@ public abstract class InputFormatBase<K,
     conf.setStrings(COLUMNS, columnStrings.toArray(new String[0]));
   }
   
+  /**
+   * Sets the log level for this configuration object.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @param level
+   *          the logging level
+   */
   public static void setLogLevel(Configuration conf, Level level) {
     ArgumentChecker.notNull(level);
     log.setLevel(level);
@@ -248,10 +307,10 @@ public abstract class InputFormatBase<K,
   }
   
   /**
-   * Encode an iterator on the input.
+   * Encode an iterator on the input for this configuration object.
    * 
    * @param conf
-   *          The job in which to save the iterator configuration
+   *          The Hadoop configuration in which to save the iterator configuration
    * @param cfg
    *          The configuration of the iterator
    */
@@ -287,41 +346,104 @@ public abstract class InputFormatBase<K,
     }
   }
   
+  /**
+   * Determines whether a configuration has isolation enabled.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return true if isolation is enabled, false otherwise
+   * @see #setIsolated(Configuration, boolean)
+   */
   protected static boolean isIsolated(Configuration conf) {
     return conf.getBoolean(ISOLATED, false);
   }
   
+  /**
+   * Determines whether a configuration uses local iterators.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return true if uses local iterators, false otherwise
+   * @see #setLocalIterators(Configuration, boolean)
+   */
   protected static boolean usesLocalIterators(Configuration conf) {
     return conf.getBoolean(LOCAL_ITERATORS, false);
   }
   
+  /**
+   * Gets the user name from the configuration.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return the user name
+   * @see #setInputInfo(Configuration, String, byte[], String, Authorizations)
+   */
   protected static String getUsername(Configuration conf) {
     return conf.get(USERNAME);
   }
   
   /**
-   * WARNING: The password is stored in the Configuration and shared with all MapReduce tasks; It is BASE64 encoded to provide a charset safe conversion to a
-   * string, and is not intended to be secure.
+   * Gets the password from the configuration. WARNING: The password is stored in the Configuration and shared with all MapReduce tasks; It is BASE64 encoded to
+   * provide a charset safe conversion to a string, and is not intended to be secure.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return the BASE64-encoded password
+   * @see #setInputInfo(Configuration, String, byte[], String, Authorizations)
    */
   protected static byte[] getPassword(Configuration conf) {
     return Base64.decodeBase64(conf.get(PASSWORD, "").getBytes());
   }
   
+  /**
+   * Gets the table name from the configuration.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return the table name
+   * @see #setInputInfo(Configuration, String, byte[], String, Authorizations)
+   */
   protected static String getTablename(Configuration conf) {
     return conf.get(TABLE_NAME);
   }
   
+  /**
+   * Gets the authorizations to set for the scans from the configuration.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return the accumulo scan authorizations
+   * @see #setInputInfo(Configuration, String, byte[], String, Authorizations)
+   */
   protected static Authorizations getAuthorizations(Configuration conf) {
     String authString = conf.get(AUTHORIZATIONS);
     return authString == null ? Constants.NO_AUTHS : new Authorizations(authString.split(","));
   }
   
+  /**
+   * Initializes an Accumulo {@link Instance} based on the configuration.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return an accumulo instance
+   * @see #setZooKeeperInstance(Configuration, String, String)
+   * @see #setMockInstance(Configuration, String)
+   */
   protected static Instance getInstance(Configuration conf) {
     if (conf.getBoolean(MOCK, false))
       return new MockInstance(conf.get(INSTANCE_NAME));
     return new ZooKeeperInstance(conf.get(INSTANCE_NAME), conf.get(ZOOKEEPERS));
   }
   
+  /**
+   * Initializes an Accumulo {@link TabletLocator} based on the configuration.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return an accumulo tablet locator
+   * @throws TableNotFoundException
+   *           if the table name set on the configuration doesn't exist
+   */
   protected static TabletLocator getTabletLocator(Configuration conf) throws TableNotFoundException {
     if (conf.getBoolean(MOCK, false))
       return new MockTabletLocator();
@@ -333,6 +455,16 @@ public abstract class InputFormatBase<K,
         new Text(Tables.getTableId(instance, tableName)));
   }
   
+  /**
+   * Gets the ranges to scan over from a configuration object.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return the ranges
+   * @throws IOException
+   *           if the ranges have been encoded improperly
+   * @see #setRanges(Configuration, Collection)
+   */
   protected static List<Range> getRanges(Configuration conf) throws IOException {
     ArrayList<Range> ranges = new ArrayList<Range>();
     for (String rangeString : conf.getStringCollection(RANGES)) {
@@ -344,6 +476,14 @@ public abstract class InputFormatBase<K,
     return ranges;
   }
   
+  /**
+   * Gets the columns to be mapped over from this configuration object.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return a set of columns
+   * @see #fetchColumns(Configuration, Collection)
+   */
   protected static Set<Pair<Text,Text>> getFetchedColumns(Configuration conf) {
     Set<Pair<Text,Text>> columns = new HashSet<Pair<Text,Text>>();
     for (String col : conf.getStringCollection(COLUMNS)) {
@@ -355,15 +495,39 @@ public abstract class InputFormatBase<K,
     return columns;
   }
   
+  /**
+   * Determines whether a configuration has auto-adjust ranges enabled.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return true if auto-adjust is enabled, false otherwise
+   * @see #disableAutoAdjustRanges(Configuration)
+   */
   protected static boolean getAutoAdjustRanges(Configuration conf) {
     return conf.getBoolean(AUTO_ADJUST_RANGES, true);
   }
   
+  /**
+   * Gets the log level from this configuration.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return the log level
+   * @see #setLogLevel(Configuration, Level)
+   */
   protected static Level getLogLevel(Configuration conf) {
     return Level.toLevel(conf.getInt(LOGLEVEL, Level.INFO.toInt()));
   }
   
   // InputFormat doesn't have the equivalent of OutputFormat's checkOutputSpecs(JobContext job)
+  /**
+   * Check whether a configuration is fully configured to be used with an Accumulo {@link org.apache.hadoop.mapreduce.InputFormat}.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @throws IOException
+   *           if the configuration is improperly configured
+   */
   protected static void validateOptions(Configuration conf) throws IOException {
     if (!conf.getBoolean(INPUT_INFO_HAS_BEEN_SET, false))
       throw new IOException("Input info has not been set.");
@@ -392,12 +556,26 @@ public abstract class InputFormatBase<K,
     }
   }
   
-  // Get the maxVersions the VersionsIterator should be configured with. Return -1 if none.
+  /**
+   * Gets the maxVersions to use for the {@link VersioningIterator} from this configuration.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return the max versions, -1 if not configured
+   * @see #setMaxVersions(Configuration, int)
+   */
   protected static int getMaxVersions(Configuration conf) {
     return conf.getInt(MAX_VERSIONS, -1);
   }
   
-  // Return a list of the iterator settings (for iterators to apply to a scanner)
+  /**
+   * Gets a list of the iterator settings (for iterators to apply to a scanner) from this configuration.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return a list of iterators
+   * @see #addIterator(Configuration, IteratorSetting)
+   */
   protected static List<AccumuloIterator> getIterators(Configuration conf) {
     
     String iterators = conf.get(ITERATORS);
@@ -416,7 +594,14 @@ public abstract class InputFormatBase<K,
     return list;
   }
   
-  // Return a list of the iterator options specified
+  /**
+   * Gets a list of the iterator options specified on this configuration.
+   * 
+   * @param conf
+   *          the Hadoop configuration object
+   * @return a list of iterator options
+   * @see #addIterator(Configuration, IteratorSetting)
+   */
   protected static List<AccumuloIteratorOption> getIteratorOptions(Configuration conf) {
     String iteratorOptions = conf.get(ITERATORS_OPTIONS);
     
@@ -439,7 +624,15 @@ public abstract class InputFormatBase<K,
     protected Iterator<Entry<Key,Value>> scannerIterator;
     protected RangeInputSplit split;
     
-    // Apply the configured iterators from the job to the scanner
+    /**
+     * Apply the configured iterators from the configuration to the scanner.
+     * 
+     * @param conf
+     *          the Hadoop configuration object
+     * @param scanner
+     *          the scanner to configure
+     * @throws AccumuloException
+     */
     protected void setupIterators(Configuration conf, Scanner scanner) throws AccumuloException {
       List<AccumuloIterator> iterators = getIterators(conf);
       List<AccumuloIteratorOption> options = getIteratorOptions(conf);
@@ -456,7 +649,14 @@ public abstract class InputFormatBase<K,
       }
     }
     
-    // Apply the VersioningIterator at priority 0 based on the job config
+    /**
+     * If maxVersions has been set, configure a {@link VersioningIterator} at priority 0 for this scanner.
+     * 
+     * @param conf
+     *          the Hadoop configuration object
+     * @param scanner
+     *          the scanner to configure
+     */
     protected void setupMaxVersions(Configuration conf, Scanner scanner) {
       int maxVersions = getMaxVersions(conf);
       // Check to make sure its a legit value
@@ -467,6 +667,9 @@ public abstract class InputFormatBase<K,
       }
     }
     
+    /**
+     * Initialize a scanner over the given input split using this task attempt configuration.
+     */
     public void initialize(InputSplit inSplit, TaskAttemptContext attempt) throws IOException {
       Scanner scanner;
       split = (RangeInputSplit) inSplit;
@@ -540,7 +743,7 @@ public abstract class InputFormatBase<K,
   }
   
   /**
-   * read the metadata table to get tablets of interest these each become a split
+   * Read the metadata table to get tablets and match up ranges to them.
    */
   public List<InputSplit> getSplits(JobContext job) throws IOException {
     log.setLevel(getLogLevel(job.getConfiguration()));
@@ -575,7 +778,7 @@ public abstract class InputFormatBase<K,
       splitsToAdd = new HashMap<Range,ArrayList<String>>();
     
     HashMap<String,String> hostNameCache = new HashMap<String,String>();
-
+    
     for (Entry<String,Map<KeyExtent,List<Range>>> tserverBin : binnedRanges.entrySet()) {
       String ip = tserverBin.getKey().split(":", 2)[0];
       String location = hostNameCache.get(ip);
@@ -584,7 +787,7 @@ public abstract class InputFormatBase<K,
         location = inetAddress.getHostName();
         hostNameCache.put(ip, location);
       }
-
+      
       for (Entry<KeyExtent,List<Range>> extentRanges : tserverBin.getValue().entrySet()) {
         Range ke = extentRanges.getKey().toDataRange();
         for (Range r : extentRanges.getValue()) {

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java?rev=1297697&r1=1297696&r2=1297697&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java Tue Mar  6 20:38:18 2012
@@ -382,13 +382,10 @@ public class IntersectingIterator implem
   private static final String notFlagOptionName = "notFlag";
   
   /**
-   * to be made protected
-   * 
    * @param columns
    * @return encoded columns
-   * @deprecated since 1.4 {@link #setColumnFamilies(IteratorSetting, Text[] columns)}
    */
-  public static String encodeColumns(Text[] columns) {
+  protected static String encodeColumns(Text[] columns) {
     StringBuilder sb = new StringBuilder();
     for (int i = 0; i < columns.length; i++) {
       sb.append(new String(Base64.encodeBase64(TextUtil.getBytes(columns[i]))));
@@ -398,13 +395,10 @@ public class IntersectingIterator implem
   }
   
   /**
-   * to be made protected
-   * 
    * @param flags
    * @return encoded flags
-   * @deprecated since 1.4 {@link #setColumnFamilies(IteratorSetting, Text[] columns, boolean[] flags)}
    */
-  public static String encodeBooleans(boolean[] flags) {
+  protected static String encodeBooleans(boolean[] flags) {
     byte[] bytes = new byte[flags.length];
     for (int i = 0; i < flags.length; i++) {
       if (flags[i])
@@ -425,13 +419,10 @@ public class IntersectingIterator implem
   }
   
   /**
-   * to be made protected
-   * 
    * @param flags
    * @return decoded flags
-   * @deprecated since 1.4
    */
-  public static boolean[] decodeBooleans(String flags) {
+  protected static boolean[] decodeBooleans(String flags) {
     // return null of there were no flags
     if (flags == null)
       return null;