incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1229177 - in /incubator/accumulo/trunk/src: core/src/main/java/org/apache/accumulo/core/client/mapreduce/ core/src/test/java/org/apache/accumulo/core/client/mapreduce/ examples/src/main/java/org/apache/accumulo/examples/mapreduce/ examples...
Date Mon, 09 Jan 2012 14:38:31 GMT
Author: vines
Date: Mon Jan  9 14:38:31 2012
New Revision: 1229177

URL: http://svn.apache.org/viewvc?rev=1229177&view=rev
Log:
Fixes ACCUMULO-267

Modified:
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
    incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
    incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormatTest.java
    incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/RegexExample.java
    incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/RowHash.java
    incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/TableToFile.java
    incubator/accumulo/trunk/src/examples/src/test/java/org/apache/accumulo/examples/filedata/ChunkInputFormatTest.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousMoru.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousVerify.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/multitable/CopyTool.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/MapRedVerifyTool.java

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java?rev=1229177&r1=1229176&r2=1229177&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java Mon Jan  9 14:38:31 2012
@@ -43,7 +43,7 @@ import org.apache.hadoop.mapreduce.TaskA
 public class AccumuloInputFormat extends InputFormatBase<Key,Value> {
   @Override
   public RecordReader<Key,Value> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException {
-    log.setLevel(getLogLevel(context));
+    log.setLevel(getLogLevel(context.getConfiguration()));
     return new RecordReaderBase<Key,Value>() {
       @Override
       public boolean nextKeyValue() throws IOException, InterruptedException {

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=1229177&r1=1229176&r2=1229177&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 Mon Jan  9 14:38:31 2012
@@ -134,11 +134,10 @@ public abstract class InputFormatBase<K,
   /**
    * Enable or disable use of the {@link IsolatedScanner}. By default it is not enabled.
    * 
-   * @param job
+   * @param conf
    * @param enable
    */
-  public static void setIsolated(JobContext job, boolean enable) {
-    Configuration conf = job.getConfiguration();
+  public static void setIsolated(Configuration conf, boolean enable) {
     conf.setBoolean(ISOLATED, enable);
   }
   
@@ -148,13 +147,11 @@ public abstract class InputFormatBase<K,
    * @param job
    * @param enable
    */
-  public static void setLocalIterators(JobContext job, boolean enable) {
-    Configuration conf = job.getConfiguration();
+  public static void setLocalIterators(Configuration conf, boolean enable) {
     conf.setBoolean(LOCAL_ITERATORS, enable);
   }
   
-  public static void setInputInfo(JobContext job, String user, byte[] passwd, String table, Authorizations auths) {
-    Configuration conf = job.getConfiguration();
+  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");
     conf.setBoolean(INPUT_INFO_HAS_BEEN_SET, true);
@@ -167,8 +164,7 @@ public abstract class InputFormatBase<K,
       conf.set(AUTHORIZATIONS, auths.serialize());
   }
   
-  public static void setZooKeeperInstance(JobContext job, String instanceName, String zooKeepers) {
-    Configuration conf = job.getConfiguration();
+  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");
     conf.setBoolean(INSTANCE_HAS_BEEN_SET, true);
@@ -178,14 +174,13 @@ public abstract class InputFormatBase<K,
     conf.set(ZOOKEEPERS, zooKeepers);
   }
   
-  public static void setMockInstance(JobContext job, String instanceName) {
-    Configuration conf = job.getConfiguration();
+  public static void setMockInstance(Configuration conf, String instanceName) {
     conf.setBoolean(INSTANCE_HAS_BEEN_SET, true);
     conf.setBoolean(MOCK, true);
     conf.set(INSTANCE_NAME, instanceName);
   }
   
-  public static void setRanges(JobContext job, Collection<Range> ranges) {
+  public static void setRanges(Configuration conf, Collection<Range> ranges) {
     ArgumentChecker.notNull(ranges);
     ArrayList<String> rangeStrings = new ArrayList<String>(ranges.size());
     try {
@@ -197,27 +192,27 @@ public abstract class InputFormatBase<K,
     } catch (IOException ex) {
       throw new IllegalArgumentException("Unable to encode ranges to Base64", ex);
     }
-    job.getConfiguration().setStrings(RANGES, rangeStrings.toArray(new String[0]));
+    conf.setStrings(RANGES, rangeStrings.toArray(new String[0]));
   }
   
-  public static void disableAutoAdjustRanges(JobContext job) {
-    job.getConfiguration().setBoolean(AUTO_ADJUST_RANGES, false);
+  public static void disableAutoAdjustRanges(Configuration conf) {
+    conf.setBoolean(AUTO_ADJUST_RANGES, false);
   }
   
   /**
    * Sets the max # of values that may be returned for an individual Accumulo cell. By default, applied before all other Accumulo iterators (highest priority)
    * leveraged in the scan by the record reader. To adjust priority use setIterator() & setIteratorOptions() w/ the VersioningIterator type explicitly.
    * 
-   * @param job
+   * @param conf
    *          the job
    * @param maxVersions
    *          the max versions
    * @throws IOException
    */
-  public static void setMaxVersions(JobContext job, int maxVersions) throws IOException {
+  public static void setMaxVersions(Configuration conf, int maxVersions) throws IOException {
     if (maxVersions < 1)
       throw new IOException("Invalid maxVersions: " + maxVersions + ".  Must be >= 1");
-    job.getConfiguration().setInt(MAX_VERSIONS, maxVersions);
+    conf.setInt(MAX_VERSIONS, maxVersions);
   }
   
   /**
@@ -226,7 +221,7 @@ public abstract class InputFormatBase<K,
    *          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.
    */
-  public static void fetchColumns(JobContext job, Collection<Pair<Text,Text>> columnFamilyColumnQualifierPairs) {
+  public static void fetchColumns(Configuration conf, Collection<Pair<Text,Text>> columnFamilyColumnQualifierPairs) {
     ArgumentChecker.notNull(columnFamilyColumnQualifierPairs);
     ArrayList<String> columnStrings = new ArrayList<String>(columnFamilyColumnQualifierPairs.size());
     for (Pair<Text,Text> column : columnFamilyColumnQualifierPairs) {
@@ -238,28 +233,28 @@ public abstract class InputFormatBase<K,
         col += ":" + new String(Base64.encodeBase64(TextUtil.getBytes(column.getSecond())));
       columnStrings.add(col);
     }
-    job.getConfiguration().setStrings(COLUMNS, columnStrings.toArray(new String[0]));
+    conf.setStrings(COLUMNS, columnStrings.toArray(new String[0]));
   }
   
-  public static void setLogLevel(JobContext job, Level level) {
+  public static void setLogLevel(Configuration conf, Level level) {
     ArgumentChecker.notNull(level);
     log.setLevel(level);
-    job.getConfiguration().setInt(LOGLEVEL, level.toInt());
+    conf.setInt(LOGLEVEL, level.toInt());
   }
   
   /**
    * Encode an iterator on the input.
    * 
-   * @param job
+   * @param conf
    *          The job in which to save the iterator configuration
    * @param priority
    *          The priority of the iterator
    * @param cfg
    *          The configuration of the iterator
    */
-  public static void addIterator(JobContext job, IteratorSetting cfg) {
+  public static void addIterator(Configuration conf, IteratorSetting cfg) {
     // First check to see if anything has been set already
-    String iterators = job.getConfiguration().get(ITERATORS);
+    String iterators = conf.get(ITERATORS);
     
     // No iterators specified yet, create a new string
     if (iterators == null || iterators.isEmpty()) {
@@ -269,12 +264,12 @@ public abstract class InputFormatBase<K,
       iterators = iterators.concat(ITERATORS_DELIM + new AccumuloIterator(cfg.getPriority(), cfg.getIteratorClass(), cfg.getName()).toString());
     }
     // Store the iterators w/ the job
-    job.getConfiguration().set(ITERATORS, iterators);
+    conf.set(ITERATORS, iterators);
     for (Entry<String,String> entry : cfg.getProperties().entrySet()) {
       if (entry.getValue() == null)
         continue;
       
-      String iteratorOptions = job.getConfiguration().get(ITERATORS_OPTIONS);
+      String iteratorOptions = conf.get(ITERATORS_OPTIONS);
       
       // No options specified yet, create a new string
       if (iteratorOptions == null || iteratorOptions.isEmpty()) {
@@ -285,123 +280,59 @@ public abstract class InputFormatBase<K,
       }
       
       // Store the options w/ the job
-      job.getConfiguration().set(ITERATORS_OPTIONS, iteratorOptions);
-    }
-  }
-  
-  /**
-   * Specify an Accumulo iterator type to manage the behavior of the underlying table scan this InputFormat's Record Reader will conduct, w/ priority dictating
-   * the order in which specified iterators are applied. Repeat calls to specify multiple iterators are allowed.
-   * 
-   * @param job
-   *          the job
-   * @param priority
-   *          the priority
-   * @param iteratorClass
-   *          the iterator class
-   * @param iteratorName
-   *          the iterator name
-   * 
-   * @deprecated since 1.4, see {@link #addIterator(JobContext, IteratorSetting)}
-   */
-  public static void setIterator(JobContext job, int priority, String iteratorClass, String iteratorName) {
-    // First check to see if anything has been set already
-    String iterators = job.getConfiguration().get(ITERATORS);
-    
-    // No iterators specified yet, create a new string
-    if (iterators == null || iterators.isEmpty()) {
-      iterators = new AccumuloIterator(priority, iteratorClass, iteratorName).toString();
-    } else {
-      // append the next iterator & reset
-      iterators = iterators.concat(ITERATORS_DELIM + new AccumuloIterator(priority, iteratorClass, iteratorName).toString());
+      conf.set(ITERATORS_OPTIONS, iteratorOptions);
     }
-    // Store the iterators w/ the job
-    job.getConfiguration().set(ITERATORS, iterators);
-    
   }
   
-  /**
-   * Specify an option for a named Accumulo iterator, further specifying that iterator's behavior.
-   * 
-   * @param job
-   *          the job
-   * @param iteratorName
-   *          the iterator name. Should correspond to an iterator set w/ a prior setIterator call.
-   * @param key
-   *          the key
-   * @param value
-   *          the value
-   * 
-   * @deprecated since 1.4, see {@link #addIterator(JobContext, IteratorSetting)}
-   */
-  public static void setIteratorOption(JobContext job, String iteratorName, String key, String value) {
-    if (iteratorName == null || key == null || value == null)
-      return;
-    
-    String iteratorOptions = job.getConfiguration().get(ITERATORS_OPTIONS);
-    
-    // No options specified yet, create a new string
-    if (iteratorOptions == null || iteratorOptions.isEmpty()) {
-      iteratorOptions = new AccumuloIteratorOption(iteratorName, key, value).toString();
-    } else {
-      // append the next option & reset
-      iteratorOptions = iteratorOptions.concat(ITERATORS_DELIM + new AccumuloIteratorOption(iteratorName, key, value));
-    }
-    
-    // Store the options w/ the job
-    job.getConfiguration().set(ITERATORS_OPTIONS, iteratorOptions);
+  protected static boolean isIsolated(Configuration conf) {
+    return conf.getBoolean(ISOLATED, false);
   }
   
-  protected static boolean isIsolated(JobContext job) {
-    return job.getConfiguration().getBoolean(ISOLATED, false);
+  protected static boolean usesLocalIterators(Configuration conf) {
+    return conf.getBoolean(LOCAL_ITERATORS, false);
   }
   
-  protected static boolean usesLocalIterators(JobContext job) {
-    return job.getConfiguration().getBoolean(LOCAL_ITERATORS, false);
-  }
-  
-  protected static String getUsername(JobContext job) {
-    return job.getConfiguration().get(USERNAME);
+  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.
    */
-  protected static byte[] getPassword(JobContext job) {
-    return Base64.decodeBase64(job.getConfiguration().get(PASSWORD, "").getBytes());
+  protected static byte[] getPassword(Configuration conf) {
+    return Base64.decodeBase64(conf.get(PASSWORD, "").getBytes());
   }
   
-  protected static String getTablename(JobContext job) {
-    return job.getConfiguration().get(TABLE_NAME);
+  protected static String getTablename(Configuration conf) {
+    return conf.get(TABLE_NAME);
   }
   
-  protected static Authorizations getAuthorizations(JobContext job) {
-    String authString = job.getConfiguration().get(AUTHORIZATIONS);
+  protected static Authorizations getAuthorizations(Configuration conf) {
+    String authString = conf.get(AUTHORIZATIONS);
     return authString == null ? Constants.NO_AUTHS : new Authorizations(authString.split(","));
   }
   
-  protected static Instance getInstance(JobContext job) {
-    Configuration conf = job.getConfiguration();
+  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));
   }
   
-  protected static TabletLocator getTabletLocator(JobContext job) throws TableNotFoundException {
-    if (job.getConfiguration().getBoolean(MOCK, false))
+  protected static TabletLocator getTabletLocator(Configuration conf) throws TableNotFoundException {
+    if (conf.getBoolean(MOCK, false))
       return new MockTabletLocator();
-    Instance instance = getInstance(job);
-    String username = getUsername(job);
-    byte[] password = getPassword(job);
-    String tableName = getTablename(job);
+    Instance instance = getInstance(conf);
+    String username = getUsername(conf);
+    byte[] password = getPassword(conf);
+    String tableName = getTablename(conf);
     return TabletLocator.getInstance(instance, new AuthInfo(username, ByteBuffer.wrap(password), instance.getInstanceID()),
         new Text(Tables.getTableId(instance, tableName)));
   }
   
-  protected static List<Range> getRanges(JobContext job) throws IOException {
+  protected static List<Range> getRanges(Configuration conf) throws IOException {
     ArrayList<Range> ranges = new ArrayList<Range>();
-    for (String rangeString : job.getConfiguration().getStringCollection(RANGES)) {
+    for (String rangeString : conf.getStringCollection(RANGES)) {
       ByteArrayInputStream bais = new ByteArrayInputStream(Base64.decodeBase64(rangeString.getBytes()));
       Range range = new Range();
       range.readFields(new DataInputStream(bais));
@@ -410,9 +341,9 @@ public abstract class InputFormatBase<K,
     return ranges;
   }
   
-  protected static Set<Pair<Text,Text>> getFetchedColumns(JobContext job) {
+  protected static Set<Pair<Text,Text>> getFetchedColumns(Configuration conf) {
     Set<Pair<Text,Text>> columns = new HashSet<Pair<Text,Text>>();
-    for (String col : job.getConfiguration().getStringCollection(COLUMNS)) {
+    for (String col : conf.getStringCollection(COLUMNS)) {
       int idx = col.indexOf(":");
       Text cf = new Text(idx < 0 ? Base64.decodeBase64(col.getBytes()) : Base64.decodeBase64(col.substring(0, idx).getBytes()));
       Text cq = idx < 0 ? null : new Text(Base64.decodeBase64(col.substring(idx + 1).getBytes()));
@@ -421,33 +352,31 @@ public abstract class InputFormatBase<K,
     return columns;
   }
   
-  protected static boolean getAutoAdjustRanges(JobContext job) {
-    return job.getConfiguration().getBoolean(AUTO_ADJUST_RANGES, true);
+  protected static boolean getAutoAdjustRanges(Configuration conf) {
+    return conf.getBoolean(AUTO_ADJUST_RANGES, true);
   }
   
-  protected static Level getLogLevel(JobContext job) {
-    return Level.toLevel(job.getConfiguration().getInt(LOGLEVEL, Level.INFO.toInt()));
+  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)
-  protected static void validateOptions(JobContext job) throws IOException {
-    Configuration conf = job.getConfiguration();
+  // InputFormat doesn't have the equivalent of OutputFormat's checkOutputSpecs(JobContext job)
+  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.");
     if (!conf.getBoolean(INSTANCE_HAS_BEEN_SET, false))
       throw new IOException("Instance info has not been set.");
     // validate that we can connect as configured
     try {
-      Connector c = getInstance(job).getConnector(getUsername(job), getPassword(job));
-      if (!c.securityOperations().authenticateUser(getUsername(job), getPassword(job)))
+      Connector c = getInstance(conf).getConnector(getUsername(conf), getPassword(conf));
+      if (!c.securityOperations().authenticateUser(getUsername(conf), getPassword(conf)))
         throw new IOException("Unable to authenticate user");
-      if (!c.securityOperations().hasTablePermission(getUsername(job), getTablename(job), TablePermission.READ))
+      if (!c.securityOperations().hasTablePermission(getUsername(conf), getTablename(conf), TablePermission.READ))
         throw new IOException("Unable to access table");
       
-      if (!usesLocalIterators(job)) {
+      if (!usesLocalIterators(conf)) {
         // validate that any scan-time iterators can be loaded by the the tablet servers
-        for (AccumuloIterator iter : getIterators(job)) {
+        for (AccumuloIterator iter : getIterators(conf)) {
           if (!c.instanceOperations().testClassLoad(iter.getIteratorClass(), SortedKeyValueIterator.class.getName()))
             throw new AccumuloException("Servers are unable to load " + iter.getIteratorClass() + " as a " + SortedKeyValueIterator.class.getName());
         }
@@ -461,21 +390,21 @@ public abstract class InputFormatBase<K,
   }
   
   // Get the maxVersions the VersionsIterator should be configured with. Return -1 if none.
-  protected static int getMaxVersions(JobContext job) {
-    return job.getConfiguration().getInt(MAX_VERSIONS, -1);
+  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)
-  protected static List<AccumuloIterator> getIterators(JobContext job) {
+  protected static List<AccumuloIterator> getIterators(Configuration conf) {
     
-    String iterators = job.getConfiguration().get(ITERATORS);
+    String iterators = conf.get(ITERATORS);
     
     // If no iterators are present, return an empty list
     if (iterators == null || iterators.isEmpty())
       return new ArrayList<AccumuloIterator>();
     
     // Compose the set of iterators encoded in the job configuration
-    StringTokenizer tokens = new StringTokenizer(job.getConfiguration().get(ITERATORS), ITERATORS_DELIM);
+    StringTokenizer tokens = new StringTokenizer(conf.get(ITERATORS), ITERATORS_DELIM);
     List<AccumuloIterator> list = new ArrayList<AccumuloIterator>();
     while (tokens.hasMoreTokens()) {
       String itstring = tokens.nextToken();
@@ -485,15 +414,15 @@ public abstract class InputFormatBase<K,
   }
   
   // Return a list of the iterator options specified
-  protected static List<AccumuloIteratorOption> getIteratorOptions(JobContext job) {
-    String iteratorOptions = job.getConfiguration().get(ITERATORS_OPTIONS);
+  protected static List<AccumuloIteratorOption> getIteratorOptions(Configuration conf) {
+    String iteratorOptions = conf.get(ITERATORS_OPTIONS);
     
     // If no options are present, return an empty list
     if (iteratorOptions == null || iteratorOptions.isEmpty())
       return new ArrayList<AccumuloIteratorOption>();
     
     // Compose the set of options encoded in the job configuration
-    StringTokenizer tokens = new StringTokenizer(job.getConfiguration().get(ITERATORS_OPTIONS), ITERATORS_DELIM);
+    StringTokenizer tokens = new StringTokenizer(conf.get(ITERATORS_OPTIONS), ITERATORS_DELIM);
     List<AccumuloIteratorOption> list = new ArrayList<AccumuloIteratorOption>();
     while (tokens.hasMoreTokens()) {
       String optionString = tokens.nextToken();
@@ -506,11 +435,11 @@ public abstract class InputFormatBase<K,
     protected long numKeysRead;
     protected Iterator<Entry<Key,Value>> scannerIterator;
     protected RangeInputSplit split;
-       
+    
     // Apply the configured iterators from the job to the scanner
-    protected void setupIterators(TaskAttemptContext attempt, Scanner scanner) throws AccumuloException {
-      List<AccumuloIterator> iterators = getIterators(attempt);
-      List<AccumuloIteratorOption> options = getIteratorOptions(attempt);
+    protected void setupIterators(Configuration conf, Scanner scanner) throws AccumuloException {
+      List<AccumuloIterator> iterators = getIterators(conf);
+      List<AccumuloIteratorOption> options = getIteratorOptions(conf);
       
       Map<String,IteratorSetting> scanIterators = new HashMap<String,IteratorSetting>();
       for (AccumuloIterator iterator : iterators) {
@@ -525,8 +454,8 @@ public abstract class InputFormatBase<K,
     }
     
     // Apply the VersioningIterator at priority 0 based on the job config
-    protected void setupMaxVersions(TaskAttemptContext attempt, Scanner scanner) {
-      int maxVersions = getMaxVersions(attempt);
+    protected void setupMaxVersions(Configuration conf, Scanner scanner) {
+      int maxVersions = getMaxVersions(conf);
       // Check to make sure its a legit value
       if (maxVersions >= 1) {
         IteratorSetting vers = new IteratorSetting(0, "vers", VersioningIterator.class);
@@ -539,33 +468,33 @@ public abstract class InputFormatBase<K,
       Scanner scanner;
       split = (RangeInputSplit) inSplit;
       log.debug("Initializing input split: " + split.range);
-      Instance instance = getInstance(attempt);
-      String user = getUsername(attempt);
-      byte[] password = getPassword(attempt);
-      Authorizations authorizations = getAuthorizations(attempt);
+      Instance instance = getInstance(attempt.getConfiguration());
+      String user = getUsername(attempt.getConfiguration());
+      byte[] password = getPassword(attempt.getConfiguration());
+      Authorizations authorizations = getAuthorizations(attempt.getConfiguration());
       
       try {
         log.debug("Creating connector with user: " + user);
         Connector conn = instance.getConnector(user, password);
-        log.debug("Creating scanner for table: " + getTablename(attempt));
+        log.debug("Creating scanner for table: " + getTablename(attempt.getConfiguration()));
         log.debug("Authorizations are: " + authorizations);
-        scanner = conn.createScanner(getTablename(attempt), authorizations);
-        if (isIsolated(attempt)) {
+        scanner = conn.createScanner(getTablename(attempt.getConfiguration()), authorizations);
+        if (isIsolated(attempt.getConfiguration())) {
           log.info("Creating isolated scanner");
           scanner = new IsolatedScanner(scanner);
         }
-        if (usesLocalIterators(attempt)) {
+        if (usesLocalIterators(attempt.getConfiguration())) {
           log.info("Using local iterators");
           scanner = new ClientSideIteratorScanner(scanner);
         }
-        setupMaxVersions(attempt, scanner);
-        setupIterators(attempt, scanner);
+        setupMaxVersions(attempt.getConfiguration(), scanner);
+        setupIterators(attempt.getConfiguration(), scanner);
       } catch (Exception e) {
         throw new IOException(e);
       }
       
       // setup a scanner within the bounds of this split
-      for (Pair<Text,Text> c : getFetchedColumns(attempt)) {
+      for (Pair<Text,Text> c : getFetchedColumns(attempt.getConfiguration())) {
         if (c.getSecond() != null) {
           log.debug("Fetching column " + c.getFirst() + ":" + c.getSecond());
           scanner.fetchColumn(c.getFirst(), c.getSecond());
@@ -611,12 +540,12 @@ public abstract class InputFormatBase<K,
    * read the metadata table to get tablets of interest these each become a split
    */
   public List<InputSplit> getSplits(JobContext job) throws IOException {
-    log.setLevel(getLogLevel(job));
-    validateOptions(job);
+    log.setLevel(getLogLevel(job.getConfiguration()));
+    validateOptions(job.getConfiguration());
     
-    String tableName = getTablename(job);
-    boolean autoAdjust = getAutoAdjustRanges(job);
-    List<Range> ranges = autoAdjust ? Range.mergeOverlapping(getRanges(job)) : getRanges(job);
+    String tableName = getTablename(job.getConfiguration());
+    boolean autoAdjust = getAutoAdjustRanges(job.getConfiguration());
+    List<Range> ranges = autoAdjust ? Range.mergeOverlapping(getRanges(job.getConfiguration())) : getRanges(job.getConfiguration());
     
     if (ranges.isEmpty()) {
       ranges = new ArrayList<Range>(1);
@@ -627,11 +556,10 @@ public abstract class InputFormatBase<K,
     Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<String,Map<KeyExtent,List<Range>>>();
     TabletLocator tl;
     try {
-      tl = getTabletLocator(job);
+      tl = getTabletLocator(job.getConfiguration());
       while (!tl.binRanges(ranges, binnedRanges).isEmpty()) {
         log.warn("Unable to locate bins for specified ranges. Retrying.");
-        UtilWaitThread.sleep(100 + (int) (Math.random() * 100)); // sleep
-        // randomly between 100 and 200 ms
+        UtilWaitThread.sleep(100 + (int) (Math.random() * 100)); // sleep randomly between 100 and 200 ms
       }
     } catch (Exception e) {
       throw new IOException(e);

Modified: incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java?rev=1229177&r1=1229176&r2=1229177&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java (original)
+++ incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java Mon Jan  9 14:38:31 2012
@@ -32,8 +32,8 @@ import org.apache.accumulo.core.client.m
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.iterators.user.WholeRowIterator;
 import org.apache.accumulo.core.iterators.user.RegExFilter;
+import org.apache.accumulo.core.iterators.user.WholeRowIterator;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.Text;
@@ -62,8 +62,8 @@ public class AccumuloInputFormatTest {
   @Test
   public void testMaxVersions() throws IOException {
     JobContext job = new JobContext(new Configuration(), new JobID());
-    AccumuloInputFormat.setMaxVersions(job, 1);
-    int version = AccumuloInputFormat.getMaxVersions(job);
+    AccumuloInputFormat.setMaxVersions(job.getConfiguration(), 1);
+    int version = AccumuloInputFormat.getMaxVersions(job.getConfiguration());
     assertEquals(1, version);
   }
   
@@ -76,7 +76,7 @@ public class AccumuloInputFormatTest {
   @Test(expected = IOException.class)
   public void testMaxVersionsLessThan1() throws IOException {
     JobContext job = new JobContext(new Configuration(), new JobID());
-    AccumuloInputFormat.setMaxVersions(job, 0);
+    AccumuloInputFormat.setMaxVersions(job.getConfiguration(), 0);
   }
   
   /**
@@ -85,7 +85,7 @@ public class AccumuloInputFormatTest {
   @Test
   public void testNoMaxVersion() {
     JobContext job = new JobContext(new Configuration(), new JobID());
-    assertEquals(-1, AccumuloInputFormat.getMaxVersions(job));
+    assertEquals(-1, AccumuloInputFormat.getMaxVersions(job.getConfiguration()));
   }
   
   /**
@@ -95,7 +95,7 @@ public class AccumuloInputFormatTest {
   public void testSetIterator() {
     JobContext job = new JobContext(new Configuration(), new JobID());
     
-    AccumuloInputFormat.addIterator(job, new IteratorSetting(1, "WholeRow", "org.apache.accumulo.core.iterators.WholeRowIterator"));
+    AccumuloInputFormat.addIterator(job.getConfiguration(), new IteratorSetting(1, "WholeRow", "org.apache.accumulo.core.iterators.WholeRowIterator"));
     Configuration conf = job.getConfiguration();
     String iterators = conf.get("AccumuloInputFormat.iterators");
     assertEquals("1:org.apache.accumulo.core.iterators.WholeRowIterator:WholeRow", iterators);
@@ -105,14 +105,14 @@ public class AccumuloInputFormatTest {
   public void testAddIterator() {
     JobContext job = new JobContext(new Configuration(), new JobID());
     
-    AccumuloInputFormat.addIterator(job, new IteratorSetting(1, "WholeRow", WholeRowIterator.class));
-    AccumuloInputFormat.addIterator(job, new IteratorSetting(2, "Versions", "org.apache.accumulo.core.iterators.VersioningIterator"));
+    AccumuloInputFormat.addIterator(job.getConfiguration(), new IteratorSetting(1, "WholeRow", WholeRowIterator.class));
+    AccumuloInputFormat.addIterator(job.getConfiguration(), new IteratorSetting(2, "Versions", "org.apache.accumulo.core.iterators.VersioningIterator"));
     IteratorSetting iter = new IteratorSetting(3, "Count", "org.apache.accumulo.core.iterators.CountingIterator");
     iter.addOption("v1", "1");
     iter.addOption("junk", "\0omg:!\\xyzzy");
-    AccumuloInputFormat.addIterator(job, iter);
+    AccumuloInputFormat.addIterator(job.getConfiguration(), iter);
     
-    List<AccumuloIterator> list = AccumuloInputFormat.getIterators(job);
+    List<AccumuloIterator> list = AccumuloInputFormat.getIterators(job.getConfiguration());
     
     // Check the list size
     assertTrue(list.size() == 3);
@@ -133,7 +133,7 @@ public class AccumuloInputFormatTest {
     assertEquals("org.apache.accumulo.core.iterators.CountingIterator", setting.getIteratorClass());
     assertEquals("Count", setting.getIteratorName());
     
-    List<AccumuloIteratorOption> iteratorOptions = AccumuloInputFormat.getIteratorOptions(job);
+    List<AccumuloIteratorOption> iteratorOptions = AccumuloInputFormat.getIteratorOptions(job.getConfiguration());
     assertEquals(2, iteratorOptions.size());
     assertEquals("Count", iteratorOptions.get(0).getIteratorName());
     assertEquals("Count", iteratorOptions.get(1).getIteratorName());
@@ -156,13 +156,13 @@ public class AccumuloInputFormatTest {
     IteratorSetting someSetting = new IteratorSetting(1, "iterator", "Iterator.class");
     someSetting.addOption(key, value);
     Job job = new Job();
-    AccumuloInputFormat.addIterator(job, someSetting);
+    AccumuloInputFormat.addIterator(job.getConfiguration(), someSetting);
     
     final String rawConfigOpt = new AccumuloIteratorOption("iterator", key, value).toString();
     
     assertEquals(rawConfigOpt, job.getConfiguration().get("AccumuloInputFormat.iterators.options"));
     
-    List<AccumuloIteratorOption> opts = AccumuloInputFormat.getIteratorOptions(job);
+    List<AccumuloIteratorOption> opts = AccumuloInputFormat.getIteratorOptions(job.getConfiguration());
     assertEquals(1, opts.size());
     assertEquals(opts.get(0).getKey(), key);
     assertEquals(opts.get(0).getValue(), value);
@@ -170,8 +170,8 @@ public class AccumuloInputFormatTest {
     someSetting.addOption(key + "2", value);
     someSetting.setPriority(2);
     someSetting.setName("it2");
-    AccumuloInputFormat.addIterator(job, someSetting);
-    opts = AccumuloInputFormat.getIteratorOptions(job);
+    AccumuloInputFormat.addIterator(job.getConfiguration(), someSetting);
+    opts = AccumuloInputFormat.getIteratorOptions(job.getConfiguration());
     assertEquals(3, opts.size());
     for (AccumuloIteratorOption opt : opts) {
       assertEquals(opt.getKey().substring(0, key.length()), key);
@@ -186,11 +186,11 @@ public class AccumuloInputFormatTest {
   public void testGetIteratorSettings() {
     JobContext job = new JobContext(new Configuration(), new JobID());
     
-    AccumuloInputFormat.addIterator(job, new IteratorSetting(1, "WholeRow", "org.apache.accumulo.core.iterators.WholeRowIterator"));
-    AccumuloInputFormat.addIterator(job, new IteratorSetting(2, "Versions", "org.apache.accumulo.core.iterators.VersioningIterator"));
-    AccumuloInputFormat.addIterator(job, new IteratorSetting(3, "Count", "org.apache.accumulo.core.iterators.CountingIterator"));
+    AccumuloInputFormat.addIterator(job.getConfiguration(), new IteratorSetting(1, "WholeRow", "org.apache.accumulo.core.iterators.WholeRowIterator"));
+    AccumuloInputFormat.addIterator(job.getConfiguration(), new IteratorSetting(2, "Versions", "org.apache.accumulo.core.iterators.VersioningIterator"));
+    AccumuloInputFormat.addIterator(job.getConfiguration(), new IteratorSetting(3, "Count", "org.apache.accumulo.core.iterators.CountingIterator"));
     
-    List<AccumuloIterator> list = AccumuloInputFormat.getIterators(job);
+    List<AccumuloIterator> list = AccumuloInputFormat.getIterators(job.getConfiguration());
     
     // Check the list size
     assertTrue(list.size() == 3);
@@ -221,9 +221,9 @@ public class AccumuloInputFormatTest {
     
     IteratorSetting is = new IteratorSetting(50, regex, RegExFilter.class);
     RegExFilter.setRegexs(is, regex, null, null, null, false);
-    AccumuloInputFormat.addIterator(job, is);
+    AccumuloInputFormat.addIterator(job.getConfiguration(), is);
     
-    assertTrue(regex.equals(AccumuloInputFormat.getIterators(job).get(0).getIteratorName()));
+    assertTrue(regex.equals(AccumuloInputFormat.getIterators(job.getConfiguration()).get(0).getIteratorName()));
   }
   
   static class TestMapper extends Mapper<Key,Value,Key,Value> {
@@ -258,8 +258,8 @@ public class AccumuloInputFormatTest {
     job.setInputFormatClass(AccumuloInputFormat.class);
     job.setMapperClass(TestMapper.class);
     job.setNumReduceTasks(0);
-    AccumuloInputFormat.setInputInfo(job, "root", "".getBytes(), "testtable", new Authorizations());
-    AccumuloInputFormat.setMockInstance(job, "testmapinstance");
+    AccumuloInputFormat.setInputInfo(job.getConfiguration(), "root", "".getBytes(), "testtable", new Authorizations());
+    AccumuloInputFormat.setMockInstance(job.getConfiguration(), "testmapinstance");
     
     AccumuloInputFormat input = new AccumuloInputFormat();
     List<InputSplit> splits = input.getSplits(job);
@@ -290,8 +290,8 @@ public class AccumuloInputFormatTest {
     bw.close();
     
     JobContext job = new JobContext(new Configuration(), new JobID());
-    AccumuloInputFormat.setInputInfo(job, "root", "".getBytes(), "testtable2", new Authorizations());
-    AccumuloInputFormat.setMockInstance(job, "testmapinstance");
+    AccumuloInputFormat.setInputInfo(job.getConfiguration(), "root", "".getBytes(), "testtable2", new Authorizations());
+    AccumuloInputFormat.setMockInstance(job.getConfiguration(), "testmapinstance");
     AccumuloInputFormat input = new AccumuloInputFormat();
     RangeInputSplit ris = new RangeInputSplit();
     TaskAttemptContext tac = new TaskAttemptContext(job.getConfiguration(), new TaskAttemptID());

Modified: incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormatTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormatTest.java?rev=1229177&r1=1229176&r2=1229177&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormatTest.java (original)
+++ incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormatTest.java Mon Jan  9 14:38:31 2012
@@ -27,7 +27,6 @@ import java.util.Map.Entry;
 
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.client.mapreduce.AccumuloRowInputFormat;
 import org.apache.accumulo.core.client.mapreduce.InputFormatBase.RangeInputSplit;
 import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.data.Key;
@@ -102,8 +101,8 @@ public class AccumuloRowInputFormatTest 
     bw.close();
     
     JobContext job = new JobContext(new Configuration(), new JobID());
-    AccumuloRowInputFormat.setInputInfo(job, "root", "".getBytes(), "test", new Authorizations());
-    AccumuloRowInputFormat.setMockInstance(job, "instance1");
+    AccumuloRowInputFormat.setInputInfo(job.getConfiguration(), "root", "".getBytes(), "test", new Authorizations());
+    AccumuloRowInputFormat.setMockInstance(job.getConfiguration(), "instance1");
     AccumuloRowInputFormat crif = new AccumuloRowInputFormat();
     RangeInputSplit ris = new RangeInputSplit();
     TaskAttemptContext tac = new TaskAttemptContext(job.getConfiguration(), new TaskAttemptID());

Modified: incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/RegexExample.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/RegexExample.java?rev=1229177&r1=1229176&r2=1229177&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/RegexExample.java (original)
+++ incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/RegexExample.java Mon Jan  9 14:38:31 2012
@@ -45,12 +45,12 @@ public class RegexExample extends Config
     job.setJarByClass(this.getClass());
     
     job.setInputFormatClass(AccumuloInputFormat.class);
-    AccumuloInputFormat.setZooKeeperInstance(job, args[0], args[1]);
-    AccumuloInputFormat.setInputInfo(job, args[2], args[3].getBytes(), args[4], new Authorizations());
+    AccumuloInputFormat.setZooKeeperInstance(job.getConfiguration(), args[0], args[1]);
+    AccumuloInputFormat.setInputInfo(job.getConfiguration(), args[2], args[3].getBytes(), args[4], new Authorizations());
     
     IteratorSetting regex = new IteratorSetting(50, "regex", RegExFilter.class);
     RegExFilter.setRegexs(regex, args[5], args[6], args[7], args[8], false);
-    AccumuloInputFormat.addIterator(job, regex);
+    AccumuloInputFormat.addIterator(job.getConfiguration(), regex);
     
     job.setMapperClass(RegexMapper.class);
     job.setMapOutputKeyClass(Key.class);

Modified: incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/RowHash.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/RowHash.java?rev=1229177&r1=1229176&r2=1229177&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/RowHash.java (original)
+++ incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/RowHash.java Mon Jan  9 14:38:31 2012
@@ -58,15 +58,15 @@ public class RowHash extends Configured 
     job.setJarByClass(this.getClass());
     
     job.setInputFormatClass(AccumuloInputFormat.class);
-    AccumuloInputFormat.setZooKeeperInstance(job, args[0], args[1]);
-    AccumuloInputFormat.setInputInfo(job, args[2], args[3].getBytes(), args[4], new Authorizations());
+    AccumuloInputFormat.setZooKeeperInstance(job.getConfiguration(), args[0], args[1]);
+    AccumuloInputFormat.setInputInfo(job.getConfiguration(), args[2], args[3].getBytes(), args[4], new Authorizations());
     
     String col = args[5];
     int idx = col.indexOf(":");
     Text cf = new Text(idx < 0 ? col : col.substring(0, idx));
     Text cq = idx < 0 ? null : new Text(col.substring(idx + 1));
     if (cf.getLength() > 0)
-      AccumuloInputFormat.fetchColumns(job, Collections.singleton(new Pair<Text,Text>(cf, cq)));
+      AccumuloInputFormat.fetchColumns(job.getConfiguration(), Collections.singleton(new Pair<Text,Text>(cf, cq)));
     
     // AccumuloInputFormat.setLogLevel(job, Level.TRACE);
     

Modified: incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/TableToFile.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/TableToFile.java?rev=1229177&r1=1229176&r2=1229177&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/TableToFile.java (original)
+++ incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/TableToFile.java Mon Jan  9 14:38:31 2012
@@ -76,8 +76,8 @@ public class TableToFile extends Configu
     job.setJarByClass(this.getClass());
     
     job.setInputFormatClass(AccumuloInputFormat.class);
-    AccumuloInputFormat.setZooKeeperInstance(job, args[0], args[1]);
-    AccumuloInputFormat.setInputInfo(job, args[2], args[3].getBytes(), args[4], new Authorizations());
+    AccumuloInputFormat.setZooKeeperInstance(job.getConfiguration(), args[0], args[1]);
+    AccumuloInputFormat.setInputInfo(job.getConfiguration(), args[2], args[3].getBytes(), args[4], new Authorizations());
     
     HashSet<Pair<Text,Text>> columnsToFetch = new HashSet<Pair<Text,Text>>();
     for (String col : args[5].split(",")) {
@@ -88,7 +88,7 @@ public class TableToFile extends Configu
         columnsToFetch.add(new Pair<Text,Text>(cf, cq));
     }
     if (!columnsToFetch.isEmpty())
-      AccumuloInputFormat.fetchColumns(job, columnsToFetch);
+      AccumuloInputFormat.fetchColumns(job.getConfiguration(), columnsToFetch);
     
     job.setMapperClass(TTFMapper.class);
     job.setMapOutputKeyClass(NullWritable.class);

Modified: incubator/accumulo/trunk/src/examples/src/test/java/org/apache/accumulo/examples/filedata/ChunkInputFormatTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/src/test/java/org/apache/accumulo/examples/filedata/ChunkInputFormatTest.java?rev=1229177&r1=1229176&r2=1229177&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/src/test/java/org/apache/accumulo/examples/filedata/ChunkInputFormatTest.java (original)
+++ incubator/accumulo/trunk/src/examples/src/test/java/org/apache/accumulo/examples/filedata/ChunkInputFormatTest.java Mon Jan  9 14:38:31 2012
@@ -37,8 +37,6 @@ import org.apache.accumulo.core.data.Mut
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.ColumnVisibility;
-import org.apache.accumulo.examples.filedata.ChunkInputFormat;
-import org.apache.accumulo.examples.filedata.ChunkInputStream;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.mapreduce.JobContext;
 import org.apache.hadoop.mapreduce.JobID;
@@ -90,8 +88,8 @@ public class ChunkInputFormatTest extend
     bw.close();
     
     JobContext job = new JobContext(new Configuration(), new JobID());
-    ChunkInputFormat.setInputInfo(job, "root", "".getBytes(), "test", new Authorizations("A", "B", "C", "D"));
-    ChunkInputFormat.setMockInstance(job, "instance1");
+    ChunkInputFormat.setInputInfo(job.getConfiguration(), "root", "".getBytes(), "test", new Authorizations("A", "B", "C", "D"));
+    ChunkInputFormat.setMockInstance(job.getConfiguration(), "instance1");
     ChunkInputFormat cif = new ChunkInputFormat();
     RangeInputSplit ris = new RangeInputSplit();
     TaskAttemptContext tac = new TaskAttemptContext(job.getConfiguration(), new TaskAttemptID());
@@ -141,8 +139,8 @@ public class ChunkInputFormatTest extend
     bw.close();
     
     JobContext job = new JobContext(new Configuration(), new JobID());
-    ChunkInputFormat.setInputInfo(job, "root", "".getBytes(), "test", new Authorizations("A", "B", "C", "D"));
-    ChunkInputFormat.setMockInstance(job, "instance2");
+    ChunkInputFormat.setInputInfo(job.getConfiguration(), "root", "".getBytes(), "test", new Authorizations("A", "B", "C", "D"));
+    ChunkInputFormat.setMockInstance(job.getConfiguration(), "instance2");
     ChunkInputFormat cif = new ChunkInputFormat();
     RangeInputSplit ris = new RangeInputSplit();
     TaskAttemptContext tac = new TaskAttemptContext(job.getConfiguration(), new TaskAttemptID());
@@ -180,8 +178,8 @@ public class ChunkInputFormatTest extend
     bw.close();
     
     JobContext job = new JobContext(new Configuration(), new JobID());
-    ChunkInputFormat.setInputInfo(job, "root", "".getBytes(), "test", new Authorizations("A", "B", "C", "D"));
-    ChunkInputFormat.setMockInstance(job, "instance3");
+    ChunkInputFormat.setInputInfo(job.getConfiguration(), "root", "".getBytes(), "test", new Authorizations("A", "B", "C", "D"));
+    ChunkInputFormat.setMockInstance(job.getConfiguration(), "instance3");
     ChunkInputFormat cif = new ChunkInputFormat();
     RangeInputSplit ris = new RangeInputSplit();
     TaskAttemptContext tac = new TaskAttemptContext(job.getConfiguration(), new TaskAttemptID());

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousMoru.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousMoru.java?rev=1229177&r1=1229176&r2=1229177&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousMoru.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousMoru.java Mon Jan  9 14:38:31 2012
@@ -128,16 +128,14 @@ public class ContinuousMoru extends Conf
     job.setJarByClass(this.getClass());
     
     job.setInputFormatClass(AccumuloInputFormat.class);
-    AccumuloInputFormat.setInputInfo(job, user, pass.getBytes(), table, new Authorizations());
-    AccumuloInputFormat.setZooKeeperInstance(job, instance, zookeepers);
+    AccumuloInputFormat.setInputInfo(job.getConfiguration(), user, pass.getBytes(), table, new Authorizations());
+    AccumuloInputFormat.setZooKeeperInstance(job.getConfiguration(), instance, zookeepers);
     
     // set up ranges
     try {
-      AccumuloInputFormat.setRanges(
-          job,
-          new ZooKeeperInstance(instance, zookeepers).getConnector(user, pass.getBytes()).tableOperations()
-              .splitRangeByTablets(table, new Range(), Integer.parseInt(maxMaps)));
-      AccumuloInputFormat.disableAutoAdjustRanges(job);
+      AccumuloInputFormat.setRanges(job.getConfiguration(), new ZooKeeperInstance(instance, zookeepers).getConnector(user, pass.getBytes()).tableOperations()
+          .splitRangeByTablets(table, new Range(), Integer.parseInt(maxMaps)));
+      AccumuloInputFormat.disableAutoAdjustRanges(job.getConfiguration());
     } catch (Exception e) {
       throw new IOException(e);
     }

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousVerify.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousVerify.java?rev=1229177&r1=1229176&r2=1229177&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousVerify.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousVerify.java Mon Jan  9 14:38:31 2012
@@ -149,15 +149,15 @@ public class ContinuousVerify extends Co
     job.setJarByClass(this.getClass());
     
     job.setInputFormatClass(AccumuloInputFormat.class);
-    AccumuloInputFormat.setInputInfo(job, user, pass.getBytes(), table, new Authorizations());
-    AccumuloInputFormat.setZooKeeperInstance(job, instance, zookeepers);
+    AccumuloInputFormat.setInputInfo(job.getConfiguration(), user, pass.getBytes(), table, new Authorizations());
+    AccumuloInputFormat.setZooKeeperInstance(job.getConfiguration(), instance, zookeepers);
     
     // set up ranges
     try {
       Set<Range> ranges = new ZooKeeperInstance(instance, zookeepers).getConnector(user, pass.getBytes()).tableOperations()
           .splitRangeByTablets(table, new Range(), Integer.parseInt(maxMaps));
-      AccumuloInputFormat.setRanges(job, ranges);
-      AccumuloInputFormat.disableAutoAdjustRanges(job);
+      AccumuloInputFormat.setRanges(job.getConfiguration(), ranges);
+      AccumuloInputFormat.disableAutoAdjustRanges(job.getConfiguration());
     } catch (Exception e) {
       throw new IOException(e);
     }

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/multitable/CopyTool.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/multitable/CopyTool.java?rev=1229177&r1=1229176&r2=1229177&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/multitable/CopyTool.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/multitable/CopyTool.java Mon Jan  9 14:38:31 2012
@@ -52,8 +52,8 @@ public class CopyTool extends Configured
     }
     
     job.setInputFormatClass(AccumuloInputFormat.class);
-    AccumuloInputFormat.setInputInfo(job, args[0], args[1].getBytes(), args[2], new Authorizations());
-    AccumuloInputFormat.setZooKeeperInstance(job, args[3], args[4]);
+    AccumuloInputFormat.setInputInfo(job.getConfiguration(), args[0], args[1].getBytes(), args[2], new Authorizations());
+    AccumuloInputFormat.setZooKeeperInstance(job.getConfiguration(), args[3], args[4]);
     
     job.setMapperClass(SeqMapClass.class);
     job.setMapOutputKeyClass(Text.class);

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/MapRedVerifyTool.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/MapRedVerifyTool.java?rev=1229177&r1=1229176&r2=1229177&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/MapRedVerifyTool.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/MapRedVerifyTool.java Mon Jan  9 14:38:31 2012
@@ -84,8 +84,8 @@ public class MapRedVerifyTool extends Co
     }
     
     job.setInputFormatClass(AccumuloInputFormat.class);
-    AccumuloInputFormat.setInputInfo(job, args[0], args[1].getBytes(), args[2], new Authorizations());
-    AccumuloInputFormat.setZooKeeperInstance(job, args[3], args[4]);
+    AccumuloInputFormat.setInputInfo(job.getConfiguration(), args[0], args[1].getBytes(), args[2], new Authorizations());
+    AccumuloInputFormat.setZooKeeperInstance(job.getConfiguration(), args[3], args[4]);
     
     job.setMapperClass(SeqMapClass.class);
     job.setMapOutputKeyClass(NullWritable.class);



Mime
View raw message