@Override public void setConf(Configuration conf) { this.conf = conf; this.delegate = WrapperUtil.createDelegate(conf, getDelegateClassAttr()); }
/** * Returns the {@link BasicMapReduceTaskContext} for the given task. */ public final <K, V> BasicMapReduceTaskContext<K, V> get(TaskAttemptContext taskAttemptContext) { return get(new ContextCacheKey(taskAttemptContext)); }
Parameters(MapReduceContextConfig contextConfig, ClassLoader programClassLoader) { this(contextConfig.getCConf(), contextConfig.getHConf(), programClassLoader, contextConfig.getPlugins(), createPluginInstantiator(contextConfig, programClassLoader)); }
@Override public void configure() { setName("AppWithTxAware"); setDescription("Application with MapReduce job that uses a TxAware dataset"); createDataset("pedanticTxAware", PedanticTxAware.class); addMapReduce(new PedanticMapReduce()); }
@Override protected CloseableBatchWritable<KEY, VALUE> createBatchWritable(TaskAttemptContext context, String namespace, String datasetName, Map<String, String> datasetArgs) { MapReduceClassLoader classLoader = MapReduceClassLoader.getFromConfiguration(context.getConfiguration()); BasicMapReduceTaskContext<?, ?> taskContext = classLoader.getTaskContextProvider().get(context); return taskContext.getBatchWritable(namespace, datasetName, datasetArgs); } }
@Override public void configure() { createDataset(MR_INPUT_DATASET, KeyValueTable.class); createDataset(MR_OUTPUT_DATASET, KeyValueTable.class); addMapReduce(new MapReduceWithLocalFiles()); }
public long getMetricsReportIntervalMillis() { return MapReduceMetricsUtil.getReportIntervalMillis(cConf, getRuntimeArguments()); }
@Override public Set<Operation> getFieldLineageOperations() { return context.getFieldLineageOperations(); } }
/** * Creates from the Job Configuration */ Parameters() { this(createContextConfig()); }
@Override protected BatchReadable<KEY, VALUE> createBatchReadable(TaskAttemptContext context, String datasetName, Map<String, String> datasetArgs) { return createBatchReadable(context, null, datasetName, datasetArgs); }
/** * Returns the program {@link ProgramClassLoader} used to construct this ClassLoader. */ public ClassLoader getProgramClassLoader() { return parameters.getProgramClassLoader(); }
Parameters(MapReduceContextConfig contextConfig, ClassLoader programClassLoader) { this(contextConfig.getCConf(), contextConfig.getHConf(), programClassLoader, contextConfig.getPlugins(), createPluginInstantiator(contextConfig, programClassLoader)); }
@Override protected CloseableBatchWritable<KEY, VALUE> createBatchWritable(TaskAttemptContext context, String namespace, String datasetName, Map<String, String> datasetArgs) { MapReduceClassLoader classLoader = MapReduceClassLoader.getFromConfiguration(context.getConfiguration()); BasicMapReduceTaskContext<?, ?> taskContext = classLoader.getTaskContextProvider().get(context); return taskContext.getBatchWritable(namespace, datasetName, datasetArgs); } }
/** * Returns the {@link BasicMapReduceTaskContext} for the given configuration. Since TaskAttemptContext is not * provided, the returned MapReduceTaskContext will not have Metrics available. * */ public final <K, V> BasicMapReduceTaskContext<K, V> get(Configuration configuration) { return get(new ContextCacheKey(null, configuration)); }
@Override public void setConf(Configuration conf) { this.conf = conf; this.delegate = WrapperUtil.createDelegate(conf, getDelegateClassAttr()); }
public long getMetricsReportIntervalMillis() { return MapReduceMetricsUtil.getReportIntervalMillis(cConf, getRuntimeArguments()); }
/** * Returns the {@link BasicMapReduceTaskContext} for the given task. */ public final <K, V> BasicMapReduceTaskContext<K, V> get(TaskAttemptContext taskAttemptContext) { return get(new ContextCacheKey(taskAttemptContext)); }
/** * Returns the {@link BasicMapReduceTaskContext} for the given configuration. Since TaskAttemptContext is not * provided, the returned MapReduceTaskContext will not have Metrics available. * */ public final <K, V> BasicMapReduceTaskContext<K, V> get(Configuration configuration) { return get(new ContextCacheKey(null, configuration)); }