Class ConfiguratorBase
- java.lang.Object
-
- org.apache.accumulo.hadoopImpl.mapreduce.lib.ConfiguratorBase
-
- Direct Known Subclasses:
FileOutputConfigurator
,InputConfigurator
,OutputConfigurator
public class ConfiguratorBase extends Object
- Since:
- 1.6.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConfiguratorBase.ClientOpts
static class
ConfiguratorBase.GeneralOpts
Configuration keys for general configuration options.
-
Constructor Summary
Constructors Constructor Description ConfiguratorBase()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkJobStored(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Checks if the job store method was called.static AccumuloClient
createClient(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Creates anAccumuloClient
based on the configuration that must be closed by userprotected static String
enumToConfKey(Class<?> implementingClass, Enum<?> e)
Provides a configuration key for a given feature enum, prefixed by the implementingClassprotected static String
enumToConfKey(Enum<?> e)
Provides a configuration key for a given feature enum.static Properties
getClientProperties(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
static int
getVisibilityCacheSize(org.apache.hadoop.conf.Configuration conf)
Gets the valid visibility count for this job.static Boolean
isClientConfigured(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Determines if the connector info has already been set for this instance.static void
setClientProperties(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf, Properties props, String clientPropsPath)
static void
setJobStored(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
The store method was called.static void
setVisibilityCacheSize(org.apache.hadoop.conf.Configuration conf, int visibilityCacheSize)
Sets the valid visibility count for this job.
-
-
-
Method Detail
-
enumToConfKey
protected static String enumToConfKey(Class<?> implementingClass, Enum<?> e)
Provides a configuration key for a given feature enum, prefixed by the implementingClass- Parameters:
implementingClass
- the class whose name will be used as a prefix for the property configuration keye
- the enum used to provide the unique part of the configuration key- Returns:
- the configuration key
- Since:
- 1.6.0
-
enumToConfKey
protected static String enumToConfKey(Enum<?> e)
Provides a configuration key for a given feature enum.- Parameters:
e
- the enum used to provide the unique part of the configuration key- Returns:
- the configuration key
-
setClientProperties
public static void setClientProperties(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf, Properties props, String clientPropsPath)
-
getClientProperties
public static Properties getClientProperties(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
-
isClientConfigured
public static Boolean isClientConfigured(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Determines if the connector info has already been set for this instance.- 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 connector info has already been set, false otherwise
- Since:
- 1.6.0
-
createClient
public static AccumuloClient createClient(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Creates anAccumuloClient
based on the configuration that must be closed by user- Parameters:
implementingClass
- class whose name will be used as a prefix for the property configurationconf
- Hadoop configuration object- Returns:
AccumuloClient
that must be closed by user- Since:
- 2.0.0
-
setVisibilityCacheSize
public static void setVisibilityCacheSize(org.apache.hadoop.conf.Configuration conf, int visibilityCacheSize)
Sets the valid visibility count for this job.- Parameters:
conf
- the Hadoop configuration object to configurevisibilityCacheSize
- the LRU cache size
-
getVisibilityCacheSize
public static int getVisibilityCacheSize(org.apache.hadoop.conf.Configuration conf)
Gets the valid visibility count for this job.- Parameters:
conf
- the Hadoop configuration object to configure- Returns:
- the valid visibility count
-
setJobStored
public static void setJobStored(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
The store method was called.- Since:
- 2.0.0
-
checkJobStored
public static void checkJobStored(Class<?> implementingClass, org.apache.hadoop.conf.Configuration conf)
Checks if the job store method was called. If not throw exception.- Since:
- 2.0.0
-
-