Class OutputConfigurator
- java.lang.Object
-
- org.apache.accumulo.core.client.mapreduce.lib.impl.ConfiguratorBase
-
- org.apache.accumulo.core.client.mapreduce.lib.impl.OutputConfigurator
-
public class OutputConfigurator extends ConfiguratorBase
- Since:
- 1.6.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OutputConfigurator.Features
Configuration keys for various features.static class
OutputConfigurator.WriteOpts
Configuration keys forBatchWriter
.-
Nested classes/interfaces inherited from class org.apache.accumulo.core.client.mapreduce.lib.impl.ConfiguratorBase
ConfiguratorBase.ConnectorInfo, ConfiguratorBase.GeneralOpts, ConfiguratorBase.InstanceOpts, ConfiguratorBase.TokenSource
-
-
Constructor Summary
Constructors Constructor Description OutputConfigurator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Boolean
canCreateTables(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Determines whether tables are permitted to be created as needed.static BatchWriterConfig
getBatchWriterOptions(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Gets theBatchWriterConfig
settings.static String
getDefaultTableName(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Gets the default table name from the configuration.static Boolean
getSimulationMode(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Determines whether this feature is enabled.static void
setBatchWriterOptions(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf, BatchWriterConfig bwConfig)
Sets the configuration for for the job'sBatchWriter
instances.static void
setCreateTables(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf, boolean enableFeature)
Sets the directive to create new tables, as necessary.static void
setDefaultTableName(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf, String tableName)
Sets the default table name to use if one emits a null in place of a table name for a given mutation.static void
setSimulationMode(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf, boolean enableFeature)
Sets the directive to use simulation mode for this job.-
Methods inherited from class org.apache.accumulo.core.client.mapreduce.lib.impl.ConfiguratorBase
enumToConfKey, enumToConfKey, getAuthenticationToken, getClientConfiguration, getInstance, getLogLevel, getPrincipal, getTokenFromFile, getVisibilityCacheSize, isConnectorInfoSet, setConnectorInfo, setConnectorInfo, setLogLevel, setMockInstance, setVisibilityCacheSize, setZooKeeperInstance, unwrapAuthenticationToken, unwrapAuthenticationToken
-
-
-
-
Method Detail
-
setDefaultTableName
public static void setDefaultTableName(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf, String tableName)
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.- Parameters:
implementingClass
- the class whose name will be used as a prefix for the property configuration keyconf
- the Hadoop configuration object to configuretableName
- the table to use when the tablename is null in the write call- Since:
- 1.6.0
-
getDefaultTableName
public static String getDefaultTableName(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Gets the default table name from the configuration.- Parameters:
implementingClass
- the class whose name will be used as a prefix for the property configuration keyconf
- the Hadoop configuration object to configure- Returns:
- the default table name
- Since:
- 1.6.0
- See Also:
setDefaultTableName(Class, Configuration, String)
-
setBatchWriterOptions
public static void setBatchWriterOptions(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf, BatchWriterConfig bwConfig)
Sets the configuration for for the job'sBatchWriter
instances. If not set, a newBatchWriterConfig
, with sensible built-in defaults is used. Setting the configuration multiple times overwrites any previous configuration.- Parameters:
implementingClass
- the class whose name will be used as a prefix for the property configuration keyconf
- the Hadoop configuration object to configurebwConfig
- the configuration for theBatchWriter
- Since:
- 1.6.0
-
getBatchWriterOptions
public static BatchWriterConfig getBatchWriterOptions(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Gets theBatchWriterConfig
settings.- Parameters:
implementingClass
- the class whose name will be used as a prefix for the property configuration keyconf
- the Hadoop configuration object to configure- Returns:
- the configuration object
- Since:
- 1.6.0
- See Also:
setBatchWriterOptions(Class, Configuration, BatchWriterConfig)
-
setCreateTables
public static void setCreateTables(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf, boolean enableFeature)
Sets the directive to create new tables, as necessary. Table names can only be alpha-numeric and underscores.By default, this feature is disabled.
- Parameters:
implementingClass
- the class whose name will be used as a prefix for the property configuration keyconf
- the Hadoop configuration object to configureenableFeature
- the feature is enabled if true, disabled otherwise- Since:
- 1.6.0
-
canCreateTables
public static Boolean canCreateTables(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Determines whether tables are permitted to be created as needed.- Parameters:
implementingClass
- the class whose name will be used as a prefix for the property configuration keyconf
- the Hadoop configuration object to configure- Returns:
- true if the feature is disabled, false otherwise
- Since:
- 1.6.0
- See Also:
setCreateTables(Class, Configuration, boolean)
-
setSimulationMode
public static void setSimulationMode(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf, boolean enableFeature)
Sets the directive to use simulation mode for this job. In simulation mode, no output is produced. This is useful for testing.By default, this feature is disabled.
- Parameters:
implementingClass
- the class whose name will be used as a prefix for the property configuration keyconf
- the Hadoop configuration object to configureenableFeature
- the feature is enabled if true, disabled otherwise- Since:
- 1.6.0
-
getSimulationMode
public static Boolean getSimulationMode(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Determines whether this feature is enabled.- Parameters:
implementingClass
- the class whose name will be used as a prefix for the property configuration keyconf
- the Hadoop configuration object to configure- Returns:
- true if the feature is enabled, false otherwise
- Since:
- 1.6.0
- See Also:
setSimulationMode(Class, Configuration, boolean)
-
-