List of usage examples for org.apache.hadoop.mapreduce JobContext getConfiguration
public Configuration getConfiguration();
From source file:org.apache.accumulo.core.client.mapreduce.AccumuloFileOutputFormat.java
License:Apache License
/** * This helper method provides an AccumuloConfiguration object constructed from the Accumulo defaults, and overridden with Accumulo properties that have been * stored in the Job's configuration.//from w ww .jav a2 s.co m * * @param context * the Hadoop context for the configured job * @since 1.5.0 * @deprecated since 1.7.0 This method returns a type that is not part of the public API and is not guaranteed to be stable. The method was deprecated to * discourage its use. */ @Deprecated protected static AccumuloConfiguration getAccumuloConfiguration(JobContext context) { return FileOutputConfigurator.getAccumuloConfiguration(CLASS, context.getConfiguration()); }
From source file:org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat.java
License:Apache License
/** * Determines if the connector has been configured. * * @param context//ww w. j ava2 s . c om * the Hadoop context for the configured job * @return true if the connector has been configured, false otherwise * @since 1.5.0 * @see #setConnectorInfo(Job, String, AuthenticationToken) */ protected static Boolean isConnectorInfoSet(JobContext context) { return OutputConfigurator.isConnectorInfoSet(CLASS, context.getConfiguration()); }
From source file:org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat.java
License:Apache License
/** * Gets the user name from the configuration. * * @param context/*from www . jav a 2 s .com*/ * the Hadoop context for the configured job * @return the user name * @since 1.5.0 * @see #setConnectorInfo(Job, String, AuthenticationToken) */ protected static String getPrincipal(JobContext context) { return OutputConfigurator.getPrincipal(CLASS, context.getConfiguration()); }
From source file:org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat.java
License:Apache License
/** * 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/*from www.j a v a 2 s. co m*/ * the Hadoop context for the configured job * @return the principal's authentication token * @since 1.6.0 * @see #setConnectorInfo(Job, String, AuthenticationToken) * @see #setConnectorInfo(Job, String, String) */ protected static AuthenticationToken getAuthenticationToken(JobContext context) { AuthenticationToken token = OutputConfigurator.getAuthenticationToken(CLASS, context.getConfiguration()); return ConfiguratorBase.unwrapAuthenticationToken(context, token); }
From source file:org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat.java
License:Apache License
/** * Initializes an Accumulo {@link Instance} based on the configuration. * * @param context/*from w w w . j av a2s . co m*/ * the Hadoop context for the configured job * @return an Accumulo instance * @since 1.5.0 * @see #setZooKeeperInstance(Job, ClientConfiguration) */ protected static Instance getInstance(JobContext context) { return OutputConfigurator.getInstance(CLASS, context.getConfiguration()); }
From source file:org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat.java
License:Apache License
/** * Gets the log level from this configuration. * * @param context/*from w w w . j a v a2s . c om*/ * the Hadoop context for the configured job * @return the log level * @since 1.5.0 * @see #setLogLevel(Job, Level) */ protected static Level getLogLevel(JobContext context) { return OutputConfigurator.getLogLevel(CLASS, context.getConfiguration()); }
From source file:org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat.java
License:Apache License
/** * Gets the default table name from the configuration. * * @param context//from www .j av a2 s . com * the Hadoop context for the configured job * @return the default table name * @since 1.5.0 * @see #setDefaultTableName(Job, String) */ protected static String getDefaultTableName(JobContext context) { return OutputConfigurator.getDefaultTableName(CLASS, context.getConfiguration()); }
From source file:org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat.java
License:Apache License
/** * Gets the {@link BatchWriterConfig} settings. * * @param context/*from w w w . ja v a2 s .co m*/ * the Hadoop context for the configured job * @return the configuration object * @since 1.5.0 * @see #setBatchWriterOptions(Job, BatchWriterConfig) */ protected static BatchWriterConfig getBatchWriterOptions(JobContext context) { return OutputConfigurator.getBatchWriterOptions(CLASS, context.getConfiguration()); }
From source file:org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat.java
License:Apache License
/** * Determines whether tables are permitted to be created as needed. * * @param context//from w w w.java2s. c o m * the Hadoop context for the configured job * @return true if the feature is disabled, false otherwise * @since 1.5.0 * @see #setCreateTables(Job, boolean) */ protected static Boolean canCreateTables(JobContext context) { return OutputConfigurator.canCreateTables(CLASS, context.getConfiguration()); }
From source file:org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat.java
License:Apache License
/** * Determines whether this feature is enabled. * * @param context//from w ww . jav a 2 s. co m * the Hadoop context for the configured job * @return true if the feature is enabled, false otherwise * @since 1.5.0 * @see #setSimulationMode(Job, boolean) */ protected static Boolean getSimulationMode(JobContext context) { return OutputConfigurator.getSimulationMode(CLASS, context.getConfiguration()); }