public abstract class AbstractInputFormat<K,V>
extends org.apache.hadoop.mapreduce.InputFormat<K,V>
RecordReader.| Modifier and Type | Class and Description | 
|---|---|
| protected static class  | AbstractInputFormat.AbstractRecordReader<K,V> | 
| Modifier and Type | Field and Description | 
|---|---|
| protected static Class<?> | CLASS | 
| protected static org.apache.log4j.Logger | log | 
| Constructor and Description | 
|---|
| AbstractInputFormat() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected static AuthenticationToken | getAuthenticationToken(org.apache.hadoop.mapreduce.JobContext context)Gets the authenticated token from either the specified token file or directly from the configuration, whichever was used when the job was configured. | 
| protected static InputTableConfig | getInputTableConfig(org.apache.hadoop.mapreduce.JobContext context,
                   String tableName)Fetches a  InputTableConfigthat has been set on the configuration for a specific table. | 
| protected static Map<String,InputTableConfig> | getInputTableConfigs(org.apache.hadoop.mapreduce.JobContext context)Fetches all  InputTableConfigs that have been set on the given job. | 
| protected static Instance | getInstance(org.apache.hadoop.mapreduce.JobContext context)Initializes an Accumulo  Instancebased on the configuration. | 
| protected static org.apache.log4j.Level | getLogLevel(org.apache.hadoop.mapreduce.JobContext context)Gets the log level from this configuration. | 
| protected static String | getPrincipal(org.apache.hadoop.mapreduce.JobContext context)Gets the user name from the configuration. | 
| protected static Authorizations | getScanAuthorizations(org.apache.hadoop.mapreduce.JobContext context)Gets the authorizations to set for the scans from the configuration. | 
| List<org.apache.hadoop.mapreduce.InputSplit> | getSplits(org.apache.hadoop.mapreduce.JobContext context)Gets the splits of the tables that have been set on the job. | 
| protected static org.apache.accumulo.core.client.impl.TabletLocator | getTabletLocator(org.apache.hadoop.mapreduce.JobContext context,
                String table)Initializes an Accumulo  TabletLocatorbased on the configuration. | 
| protected static byte[] | getToken(org.apache.hadoop.mapreduce.JobContext context)Deprecated. 
 since 1.6.0; Use  getAuthenticationToken(JobContext)instead. | 
| protected static String | getTokenClass(org.apache.hadoop.mapreduce.JobContext context)Deprecated. 
 since 1.6.0; Use  getAuthenticationToken(JobContext)instead. | 
| protected static Boolean | isConnectorInfoSet(org.apache.hadoop.mapreduce.JobContext context)Determines if the connector has been configured. | 
| static void | setConnectorInfo(org.apache.hadoop.mapreduce.Job job,
                String principal,
                AuthenticationToken token)Sets the connector information needed to communicate with Accumulo in this job. | 
| static void | setConnectorInfo(org.apache.hadoop.mapreduce.Job job,
                String principal,
                String tokenFile)Sets the connector information needed to communicate with Accumulo in this job. | 
| static void | setLogLevel(org.apache.hadoop.mapreduce.Job job,
           org.apache.log4j.Level level)Sets the log level for this job. | 
| static void | setMockInstance(org.apache.hadoop.mapreduce.Job job,
               String instanceName)Configures a  MockInstancefor this job. | 
| static void | setScanAuthorizations(org.apache.hadoop.mapreduce.Job job,
                     Authorizations auths)Sets the  Authorizationsused to scan. | 
| static void | setZooKeeperInstance(org.apache.hadoop.mapreduce.Job job,
                    ClientConfiguration clientConfig)Configures a  ZooKeeperInstancefor this job. | 
| static void | setZooKeeperInstance(org.apache.hadoop.mapreduce.Job job,
                    String instanceName,
                    String zooKeepers)Deprecated. 
 since 1.6.0; Use  setZooKeeperInstance(Job, ClientConfiguration)instead. | 
| protected static void | validateOptions(org.apache.hadoop.mapreduce.JobContext context)Check whether a configuration is fully configured to be used with an Accumulo  InputFormat. | 
protected static final Class<?> CLASS
protected static final org.apache.log4j.Logger log
public static void setConnectorInfo(org.apache.hadoop.mapreduce.Job job,
                                    String principal,
                                    AuthenticationToken token)
                             throws AccumuloSecurityException
WARNING: 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.
job - the Hadoop job instance to be configuredprincipal - a valid Accumulo user name (user must have Table.CREATE permission)token - the user's passwordAccumuloSecurityExceptionpublic static void setConnectorInfo(org.apache.hadoop.mapreduce.Job job,
                                    String principal,
                                    String tokenFile)
                             throws AccumuloSecurityException
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.
job - the Hadoop job instance to be configuredprincipal - a valid Accumulo user name (user must have Table.CREATE permission)tokenFile - the path to the token fileAccumuloSecurityExceptionprotected static Boolean isConnectorInfoSet(org.apache.hadoop.mapreduce.JobContext context)
context - the Hadoop context for the configured jobsetConnectorInfo(Job, String, AuthenticationToken)protected static String getPrincipal(org.apache.hadoop.mapreduce.JobContext context)
context - the Hadoop context for the configured jobsetConnectorInfo(Job, String, AuthenticationToken)@Deprecated protected static String getTokenClass(org.apache.hadoop.mapreduce.JobContext context)
getAuthenticationToken(JobContext) instead.@Deprecated protected static byte[] getToken(org.apache.hadoop.mapreduce.JobContext context)
getAuthenticationToken(JobContext) instead.protected static AuthenticationToken getAuthenticationToken(org.apache.hadoop.mapreduce.JobContext context)
context - the Hadoop context for the configured jobsetConnectorInfo(Job, String, AuthenticationToken), 
setConnectorInfo(Job, String, String)@Deprecated public static void setZooKeeperInstance(org.apache.hadoop.mapreduce.Job job, String instanceName, String zooKeepers)
setZooKeeperInstance(Job, ClientConfiguration) instead.ZooKeeperInstance for this job.job - the Hadoop job instance to be configuredinstanceName - the Accumulo instance namezooKeepers - a comma-separated list of zookeeper serverspublic static void setZooKeeperInstance(org.apache.hadoop.mapreduce.Job job,
                                        ClientConfiguration clientConfig)
ZooKeeperInstance for this job.job - the Hadoop job instance to be configuredclientConfig - client configuration containing connection optionspublic static void setMockInstance(org.apache.hadoop.mapreduce.Job job,
                                   String instanceName)
MockInstance for this job.job - the Hadoop job instance to be configuredinstanceName - the Accumulo instance nameprotected static Instance getInstance(org.apache.hadoop.mapreduce.JobContext context)
Instance based on the configuration.context - the Hadoop context for the configured jobsetZooKeeperInstance(Job, String, String), 
setMockInstance(Job, String)public static void setLogLevel(org.apache.hadoop.mapreduce.Job job,
                               org.apache.log4j.Level level)
job - the Hadoop job instance to be configuredlevel - the logging levelprotected static org.apache.log4j.Level getLogLevel(org.apache.hadoop.mapreduce.JobContext context)
context - the Hadoop context for the configured jobsetLogLevel(Job, Level)public static void setScanAuthorizations(org.apache.hadoop.mapreduce.Job job,
                                         Authorizations auths)
Authorizations used to scan. Must be a subset of the user's authorization. Defaults to the empty set.job - the Hadoop job instance to be configuredauths - the user's authorizationsprotected static Authorizations getScanAuthorizations(org.apache.hadoop.mapreduce.JobContext context)
context - the Hadoop context for the configured jobsetScanAuthorizations(Job, Authorizations)protected static Map<String,InputTableConfig> getInputTableConfigs(org.apache.hadoop.mapreduce.JobContext context)
InputTableConfigs that have been set on the given job.context - the Hadoop job instance to be configuredInputTableConfig objects for the jobprotected static InputTableConfig getInputTableConfig(org.apache.hadoop.mapreduce.JobContext context, String tableName)
InputTableConfig that has been set on the configuration for a specific table.
 null is returned in the event that the table doesn't exist.
context - the Hadoop job instance to be configuredtableName - the table name for which to grab the config objectInputTableConfig for the given tableprotected static org.apache.accumulo.core.client.impl.TabletLocator getTabletLocator(org.apache.hadoop.mapreduce.JobContext context,
                                                                                     String table)
                                                                              throws TableNotFoundException
TabletLocator based on the configuration.context - the Hadoop context for the configured jobtable - the table for which to initialize the locatorTableNotFoundException - if the table name set on the configuration doesn't existprotected static void validateOptions(org.apache.hadoop.mapreduce.JobContext context)
                               throws IOException
InputFormat.context - the Hadoop context for the configured jobIOException - if the context is improperly configuredpublic List<org.apache.hadoop.mapreduce.InputSplit> getSplits(org.apache.hadoop.mapreduce.JobContext context) throws IOException
getSplits in class org.apache.hadoop.mapreduce.InputFormat<K,V>context - the configuration of the jobIOException - if a table set on the job doesn't exist or an error occurs initializing the tablet locatorCopyright © 2011–2016 The Apache Software Foundation. All rights reserved.