accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject accumulo git commit: ACCUMULO-3403 Reinstate setZooKeeperInstance methods that accepts Strings.
Date Thu, 11 Dec 2014 22:54:06 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 9a9b2de83 -> 0904e5944


ACCUMULO-3403 Reinstate setZooKeeperInstance methods that accepts Strings.


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

Branch: refs/heads/master
Commit: 0904e59440232cc0b1913dfba622d682fd6f68c8
Parents: 9a9b2de
Author: Josh Elser <elserj@apache.org>
Authored: Thu Dec 11 17:47:38 2014 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Thu Dec 11 17:47:38 2014 -0500

----------------------------------------------------------------------
 .../core/client/mapred/AbstractInputFormat.java | 59 ++++++++++------
 .../client/mapred/AccumuloOutputFormat.java     | 73 ++++++++++++--------
 .../client/mapreduce/AbstractInputFormat.java   | 66 +++++++++++-------
 .../client/mapreduce/AccumuloOutputFormat.java  | 72 +++++++++++--------
 4 files changed, 171 insertions(+), 99 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0904e594/mapreduce/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
----------------------------------------------------------------------
diff --git a/mapreduce/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
b/mapreduce/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
index 3c86243..b83a024 100644
--- a/mapreduce/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
+++ b/mapreduce/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
@@ -75,11 +75,11 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Sets the connector information needed to communicate with Accumulo in this job.
-   * 
+   *
    * <p>
    * <b>WARNING:</b> The serialized token 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 job
    *          the Hadoop job instance to be configured
    * @param principal
@@ -94,10 +94,10 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Sets the connector information needed to communicate with Accumulo in this job.
-   * 
+   *
    * <p>
    * Stores the password in a file in HDFS and pulls that into the Distributed Cache in an
attempt to be more secure than storing it in the Configuration.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param principal
@@ -112,7 +112,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Determines if the connector has been configured.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return true if the connector has been configured, false otherwise
@@ -125,7 +125,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Gets the user name from the configuration.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return the user name
@@ -138,7 +138,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Gets the authenticated token from either the specified token file or directly from the
configuration, whichever was used when the job was configured.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return the principal's authentication token
@@ -152,7 +152,24 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Configures a {@link org.apache.accumulo.core.client.ZooKeeperInstance} for this job.
-   * 
+   *
+   * @param job
+   *          the Hadoop job instance to be configured
+   * @param instanceName
+   *          the Accumulo instance name
+   * @param zooKeepers
+   *          a comma-separated list of zookeeper servers
+   * @since 1.5.0
+   * @deprecated since 1.6.0; Use {@link #setZooKeeperInstance(JobConf, ClientConfiguration)}
instead.
+   */
+  @Deprecated
+  public static void setZooKeeperInstance(JobConf job, String instanceName, String zooKeepers)
{
+    setZooKeeperInstance(job, new ClientConfiguration().withInstance(instanceName).withZkHosts(zooKeepers));
+  }
+
+  /**
+   * Configures a {@link org.apache.accumulo.core.client.ZooKeeperInstance} for this job.
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param clientConfig
@@ -165,7 +182,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Configures a {@link org.apache.accumulo.core.client.mock.MockInstance} for this job.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param instanceName
@@ -178,7 +195,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Initializes an Accumulo {@link org.apache.accumulo.core.client.Instance} based on the
configuration.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return an Accumulo instance
@@ -192,7 +209,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Sets the log level for this job.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param level
@@ -205,7 +222,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Gets the log level from this configuration.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return the log level
@@ -218,7 +235,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Sets the {@link org.apache.accumulo.core.security.Authorizations} used to scan. Must
be a subset of the user's authorization. Defaults to the empty set.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param auths
@@ -231,7 +248,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Gets the authorizations to set for the scans from the configuration.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return the Accumulo scan authorizations
@@ -244,7 +261,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Initializes an Accumulo {@link org.apache.accumulo.core.client.impl.TabletLocator} based
on the configuration.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return an Accumulo tablet locator
@@ -259,7 +276,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
   // 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
InputFormat}.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @throws java.io.IOException
@@ -272,7 +289,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Fetches all {@link InputTableConfig}s that have been set on the given Hadoop job.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @return the {@link InputTableConfig} objects set on the job
@@ -284,10 +301,10 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
   /**
    * Fetches a {@link InputTableConfig} that has been set on the configuration for a specific
table.
-   * 
+   *
    * <p>
    * null is returned in the event that the table doesn't exist.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param tableName
@@ -302,7 +319,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
   /**
    * An abstract base class to be used to create {@link org.apache.hadoop.mapred.RecordReader}
instances that convert from Accumulo
    * {@link org.apache.accumulo.core.data.Key}/{@link org.apache.accumulo.core.data.Value}
pairs to the user's K/V types.
-   * 
+   *
    * Subclasses must implement {@link #next(Object, Object)} to update key and value, and
also to update the following variables:
    * <ul>
    * <li>Key {@link #currentKey} (used for progress reporting)</li>
@@ -316,7 +333,7 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V>
{
 
     /**
      * Configures the iterators on a scanner for the given table name.
-     * 
+     *
      * @param job
      *          the Hadoop job configuration
      * @param scanner

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0904e594/mapreduce/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
----------------------------------------------------------------------
diff --git a/mapreduce/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
b/mapreduce/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
index eba340b..a32a8b8 100644
--- a/mapreduce/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
+++ b/mapreduce/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
@@ -56,15 +56,15 @@ import org.apache.log4j.Logger;
 /**
  * This class allows MapReduce jobs to use Accumulo as the sink for data. This {@link OutputFormat}
accepts keys and values of type {@link Text} (for a table
  * name) and {@link Mutation} from the Map and Reduce functions.
- * 
+ *
  * The user must specify the following via static configurator methods:
- * 
+ *
  * <ul>
  * <li>{@link AccumuloOutputFormat#setConnectorInfo(JobConf, String, AuthenticationToken)}
  * <li>{@link AccumuloOutputFormat#setConnectorInfo(JobConf, String, String)}
  * <li>{@link AccumuloOutputFormat#setZooKeeperInstance(JobConf, ClientConfiguration)}
OR {@link AccumuloOutputFormat#setMockInstance(JobConf, String)}
  * </ul>
- * 
+ *
  * Other static methods are optional.
  */
 public class AccumuloOutputFormat implements OutputFormat<Text,Mutation> {
@@ -74,11 +74,11 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Sets the connector information needed to communicate with Accumulo in this job.
-   * 
+   *
    * <p>
    * <b>WARNING:</b> The serialized token 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 job
    *          the Hadoop job instance to be configured
    * @param principal
@@ -93,10 +93,10 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Sets the connector information needed to communicate with Accumulo in this job.
-   * 
+   *
    * <p>
    * Stores the password in a file in HDFS and pulls that into the Distributed Cache in an
attempt to be more secure than storing it in the Configuration.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param principal
@@ -111,7 +111,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Determines if the connector has been configured.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return true if the connector has been configured, false otherwise
@@ -124,7 +124,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the principal from the configuration.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return the user name
@@ -137,7 +137,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the serialized token class from either the configuration or the token file.
-   * 
+   *
    * @since 1.5.0
    * @deprecated since 1.6.0; Use {@link #getAuthenticationToken(JobConf)} instead.
    */
@@ -148,7 +148,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the serialized token from either the configuration or the token file.
-   * 
+   *
    * @since 1.5.0
    * @deprecated since 1.6.0; Use {@link #getAuthenticationToken(JobConf)} instead.
    */
@@ -159,7 +159,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the authenticated token from either the specified token file or directly from the
configuration, whichever was used when the job was configured.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @return the principal's authentication token
@@ -173,9 +173,28 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Configures a {@link ZooKeeperInstance} for this job.
-   * 
+   *
+   * @param job
+   *          the Hadoop job instance to be configured
+   * @param instanceName
+   *          the Accumulo instance name
+   * @param zooKeepers
+   *          a comma-separated list of zookeeper servers
+   * @since 1.5.0
+   * @deprecated since 1.6.0; Use {@link #setZooKeeperInstance(JobConf, ClientConfiguration)}
instead.
+   */
+
+  @Deprecated
+  public static void setZooKeeperInstance(JobConf job, String instanceName, String zooKeepers)
{
+    setZooKeeperInstance(job, new ClientConfiguration().withInstance(instanceName).withZkHosts(zooKeepers));
+  }
+
+  /**
+   * Configures a {@link ZooKeeperInstance} for this job.
+   *
    * @param job
    *          the Hadoop job instance to be configured
+   *
    * @param clientConfig
    *          client configuration for specifying connection timeouts, SSL connection options,
etc.
    * @since 1.6.0
@@ -186,7 +205,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Configures a {@link MockInstance} for this job.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param instanceName
@@ -199,7 +218,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Initializes an Accumulo {@link Instance} based on the configuration.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return an Accumulo instance
@@ -213,7 +232,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Sets the log level for this job.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param level
@@ -226,7 +245,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the log level from this configuration.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return the log level
@@ -240,7 +259,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
   /**
    * Sets the default table name to use if one emits a null in place of a table name for
a given mutation. Table names can only be alpha-numeric and
    * underscores.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param tableName
@@ -253,7 +272,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the default table name from the configuration.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return the default table name
@@ -267,7 +286,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
   /**
    * Sets the configuration for for the job's {@link BatchWriter} instances. If not set,
a new {@link BatchWriterConfig}, with sensible built-in defaults is
    * used. Setting the configuration multiple times overwrites any previous configuration.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param bwConfig
@@ -280,7 +299,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the {@link BatchWriterConfig} settings.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return the configuration object
@@ -293,10 +312,10 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Sets the directive to create new tables, as necessary. Table names can only be alpha-numeric
and underscores.
-   * 
+   *
    * <p>
    * By default, this feature is <b>disabled</b>.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param enableFeature
@@ -309,7 +328,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Determines whether tables are permitted to be created as needed.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return true if the feature is disabled, false otherwise
@@ -322,10 +341,10 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Sets the directive to use simulation mode for this job. In simulation mode, no output
is produced. This is useful for testing.
-   * 
+   *
    * <p>
    * By default, this feature is <b>disabled</b>.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param enableFeature
@@ -338,7 +357,7 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation>
{
 
   /**
    * Determines whether this feature is enabled.
-   * 
+   *
    * @param job
    *          the Hadoop context for the configured job
    * @return true if the feature is enabled, false otherwise

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0904e594/mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
----------------------------------------------------------------------
diff --git a/mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
b/mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
index 40cdb14..2866896 100644
--- a/mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
+++ b/mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
@@ -79,11 +79,11 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Sets the connector information needed to communicate with Accumulo in this job.
-   * 
+   *
    * <p>
    * <b>WARNING:</b> The serialized token 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 job
    *          the Hadoop job instance to be configured
    * @param principal
@@ -98,10 +98,10 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Sets the connector information needed to communicate with Accumulo in this job.
-   * 
+   *
    * <p>
    * Stores the password in a file in HDFS and pulls that into the Distributed Cache in an
attempt to be more secure than storing it in the Configuration.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param principal
@@ -116,7 +116,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Determines if the connector has been configured.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return true if the connector has been configured, false otherwise
@@ -129,7 +129,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Gets the user name from the configuration.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return the user name
@@ -142,7 +142,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Gets the serialized token class from either the configuration or the token file.
-   * 
+   *
    * @since 1.5.0
    * @deprecated since 1.6.0; Use {@link #getAuthenticationToken(JobContext)} instead.
    */
@@ -153,7 +153,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Gets the serialized token from either the configuration or the token file.
-   * 
+   *
    * @since 1.5.0
    * @deprecated since 1.6.0; Use {@link #getAuthenticationToken(JobContext)} instead.
    */
@@ -164,7 +164,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Gets the authenticated token from either the specified token file or directly from the
configuration, whichever was used when the job was configured.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return the principal's authentication token
@@ -178,9 +178,27 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Configures a {@link org.apache.accumulo.core.client.ZooKeeperInstance} for this job.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
+   * @param instanceName
+   *          the Accumulo instance name
+   * @param zooKeepers
+   *          a comma-separated list of zookeeper servers
+   * @since 1.5.0
+   * @deprecated since 1.6.0; Use {@link #setZooKeeperInstance(Job, ClientConfiguration)}
instead.
+   */
+  @Deprecated
+  public static void setZooKeeperInstance(Job job, String instanceName, String zooKeepers)
{
+    setZooKeeperInstance(job, new ClientConfiguration().withInstance(instanceName).withZkHosts(zooKeepers));
+  }
+
+  /**
+   * Configures a {@link org.apache.accumulo.core.client.ZooKeeperInstance} for this job.
+   *
+   * @param job
+   *          the Hadoop job instance to be configured
+   *
    * @param clientConfig
    *          client configuration containing connection options
    * @since 1.6.0
@@ -191,7 +209,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Configures a {@link org.apache.accumulo.core.client.mock.MockInstance} for this job.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param instanceName
@@ -204,7 +222,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Initializes an Accumulo {@link org.apache.accumulo.core.client.Instance} based on the
configuration.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return an Accumulo instance
@@ -218,7 +236,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Sets the log level for this job.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param level
@@ -231,7 +249,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Gets the log level from this configuration.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return the log level
@@ -244,7 +262,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Sets the {@link org.apache.accumulo.core.security.Authorizations} used to scan. Must
be a subset of the user's authorization. Defaults to the empty set.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param auths
@@ -256,7 +274,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Gets the authorizations to set for the scans from the configuration.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return the Accumulo scan authorizations
@@ -269,7 +287,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Fetches all {@link InputTableConfig}s that have been set on the given job.
-   * 
+   *
    * @param context
    *          the Hadoop job instance to be configured
    * @return the {@link InputTableConfig} objects for the job
@@ -281,10 +299,10 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Fetches a {@link InputTableConfig} that has been set on the configuration for a specific
table.
-   * 
+   *
    * <p>
    * null is returned in the event that the table doesn't exist.
-   * 
+   *
    * @param context
    *          the Hadoop job instance to be configured
    * @param tableName
@@ -298,7 +316,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Initializes an Accumulo {@link org.apache.accumulo.core.client.impl.TabletLocator} based
on the configuration.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @param table
@@ -315,7 +333,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
   // 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 context
    *          the Hadoop context for the configured job
    * @throws java.io.IOException
@@ -329,7 +347,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
   /**
    * An abstract base class to be used to create {@link org.apache.hadoop.mapreduce.RecordReader}
instances that convert from Accumulo
    * {@link org.apache.accumulo.core.data.Key}/{@link org.apache.accumulo.core.data.Value}
pairs to the user's K/V types.
-   * 
+   *
    * Subclasses must implement {@link #nextKeyValue()} and use it to update the following
variables:
    * <ul>
    * <li>K {@link #currentK}</li>
@@ -345,7 +363,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
     /**
      * Configures the iterators on a scanner for the given table name.
-     * 
+     *
      * @param context
      *          the Hadoop context for the configured job
      * @param scanner
@@ -508,7 +526,7 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V>
{
 
   /**
    * Gets the splits of the tables that have been set on the job.
-   * 
+   *
    * @param context
    *          the configuration of the job
    * @return the splits from the tables based on the ranges.

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0904e594/mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
----------------------------------------------------------------------
diff --git a/mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
b/mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
index cfe36c4..e220c00 100644
--- a/mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
+++ b/mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
@@ -57,15 +57,15 @@ import org.apache.log4j.Logger;
 /**
  * This class allows MapReduce jobs to use Accumulo as the sink for data. This {@link OutputFormat}
accepts keys and values of type {@link Text} (for a table
  * name) and {@link Mutation} from the Map and Reduce functions.
- * 
+ *
  * The user must specify the following via static configurator methods:
- * 
+ *
  * <ul>
  * <li>{@link AccumuloOutputFormat#setConnectorInfo(Job, String, AuthenticationToken)}
  * <li>{@link AccumuloOutputFormat#setConnectorInfo(Job, String, String)}
  * <li>{@link AccumuloOutputFormat#setZooKeeperInstance(Job, ClientConfiguration)}
OR {@link AccumuloOutputFormat#setMockInstance(Job, String)}
  * </ul>
- * 
+ *
  * Other static methods are optional.
  */
 public class AccumuloOutputFormat extends OutputFormat<Text,Mutation> {
@@ -75,11 +75,11 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Sets the connector information needed to communicate with Accumulo in this job.
-   * 
+   *
    * <p>
    * <b>WARNING:</b> The serialized token 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 job
    *          the Hadoop job instance to be configured
    * @param principal
@@ -94,10 +94,10 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Sets the connector information needed to communicate with Accumulo in this job.
-   * 
+   *
    * <p>
    * Stores the password in a file in HDFS and pulls that into the Distributed Cache in an
attempt to be more secure than storing it in the Configuration.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param principal
@@ -112,7 +112,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Determines if the connector has been configured.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return true if the connector has been configured, false otherwise
@@ -125,7 +125,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the user name from the configuration.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return the user name
@@ -138,7 +138,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the serialized token class from either the configuration or the token file.
-   * 
+   *
    * @since 1.5.0
    * @deprecated since 1.6.0; Use {@link #getAuthenticationToken(JobContext)} instead.
    */
@@ -149,7 +149,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the serialized token from either the configuration or the token file.
-   * 
+   *
    * @since 1.5.0
    * @deprecated since 1.6.0; Use {@link #getAuthenticationToken(JobContext)} instead.
    */
@@ -160,7 +160,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the authenticated token from either the specified token file or directly from the
configuration, whichever was used when the job was configured.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return the principal's authentication token
@@ -174,9 +174,27 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Configures a {@link ZooKeeperInstance} for this job.
-   * 
+   *
+   * @param job
+   *          the Hadoop job instance to be configured
+   * @param instanceName
+   *          the Accumulo instance name
+   * @param zooKeepers
+   *          a comma-separated list of zookeeper servers
+   * @since 1.5.0
+   * @deprecated since 1.6.0; Use {@link #setZooKeeperInstance(Job, ClientConfiguration)}
instead.
+   */
+  @Deprecated
+  public static void setZooKeeperInstance(Job job, String instanceName, String zooKeepers)
{
+    setZooKeeperInstance(job, new ClientConfiguration().withInstance(instanceName).withZkHosts(zooKeepers));
+  }
+
+  /**
+   * Configures a {@link ZooKeeperInstance} for this job.
+   *
    * @param job
    *          the Hadoop job instance to be configured
+   *
    * @param clientConfig
    *          client configuration for specifying connection timeouts, SSL connection options,
etc.
    * @since 1.6.0
@@ -187,7 +205,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Configures a {@link MockInstance} for this job.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param instanceName
@@ -200,7 +218,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Initializes an Accumulo {@link Instance} based on the configuration.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return an Accumulo instance
@@ -214,7 +232,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Sets the log level for this job.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param level
@@ -227,7 +245,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the log level from this configuration.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return the log level
@@ -241,7 +259,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
   /**
    * Sets the default table name to use if one emits a null in place of a table name for
a given mutation. Table names can only be alpha-numeric and
    * underscores.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param tableName
@@ -254,7 +272,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the default table name from the configuration.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return the default table name
@@ -268,7 +286,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
   /**
    * Sets the configuration for for the job's {@link BatchWriter} instances. If not set,
a new {@link BatchWriterConfig}, with sensible built-in defaults is
    * used. Setting the configuration multiple times overwrites any previous configuration.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param bwConfig
@@ -281,7 +299,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Gets the {@link BatchWriterConfig} settings.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return the configuration object
@@ -294,10 +312,10 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Sets the directive to create new tables, as necessary. Table names can only be alpha-numeric
and underscores.
-   * 
+   *
    * <p>
    * By default, this feature is <b>disabled</b>.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param enableFeature
@@ -310,7 +328,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Determines whether tables are permitted to be created as needed.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return true if the feature is disabled, false otherwise
@@ -323,10 +341,10 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Sets the directive to use simulation mode for this job. In simulation mode, no output
is produced. This is useful for testing.
-   * 
+   *
    * <p>
    * By default, this feature is <b>disabled</b>.
-   * 
+   *
    * @param job
    *          the Hadoop job instance to be configured
    * @param enableFeature
@@ -339,7 +357,7 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation>
{
 
   /**
    * Determines whether this feature is enabled.
-   * 
+   *
    * @param context
    *          the Hadoop context for the configured job
    * @return true if the feature is enabled, false otherwise


Mime
View raw message