public abstract class AbstractMapReduce extends AbstractPluginConfigurable<MapReduceConfigurer> implements MapReduce, ProgramLifecycle<MapReduceContext>
MapReduce
methods for easy extension.Constructor and Description |
---|
AbstractMapReduce() |
Modifier and Type | Method and Description |
---|---|
protected void |
configure()
Override this method to configure this
MapReduce job. |
void |
configure(MapReduceConfigurer configurer)
Configures a
MapReduce job using the given MapReduceConfigurer . |
void |
destroy()
Classes derived from
AbstractMapReduce can override this method to destroy the MapReduce . |
protected MapReduceConfigurer |
getConfigurer()
Returns the
MapReduceConfigurer , only available at configuration time. |
protected MapReduceContext |
getContext()
Return an instance of the
MapReduceContext . |
protected void |
initialize()
Classes derived from
AbstractMapReduce can override this method to initialize the MapReduce . |
void |
initialize(MapReduceContext context)
Initializes a Program.
|
protected void |
setDescription(String description)
Sets the description of the
MapReduce . |
protected void |
setDriverResources(Resources resources)
Sets the resources requirement for the driver of the
MapReduce . |
protected void |
setMapperResources(Resources resources)
Sets the resources requirement for Mapper task of the
MapReduce . |
protected void |
setName(String name)
Sets the name of the
MapReduce . |
protected void |
setProperties(Map<String,String> properties)
Sets a set of properties that will be available through the
MapReduceSpecification.getProperties()
at runtime. |
protected void |
setReducerResources(Resources resources)
Sets the resources requirement for Reducer task of the
MapReduce . |
usePlugin, usePlugin, usePluginClass, usePluginClass
addDatasetModule, addDatasetType, createDataset, createDataset, createDataset, createDataset
public final void configure(MapReduceConfigurer configurer)
MapReduce
MapReduce
job using the given MapReduceConfigurer
.protected void configure()
MapReduce
job.protected final MapReduceConfigurer getConfigurer()
MapReduceConfigurer
, only available at configuration time.getConfigurer
in class AbstractPluginConfigurable<MapReduceConfigurer>
protected final void setDescription(String description)
MapReduce
.protected final void setProperties(Map<String,String> properties)
MapReduceSpecification.getProperties()
at runtime.properties
- the properties to setprotected final void setDriverResources(Resources resources)
MapReduce
.protected final void setMapperResources(Resources resources)
MapReduce
.protected final void setReducerResources(Resources resources)
MapReduce
.public final void initialize(MapReduceContext context) throws Exception
ProgramLifecycle
This method will be called only once per ProgramLifecycle
instance.
initialize
in interface ProgramLifecycle<MapReduceContext>
context
- An instance of RuntimeContext
Exception
- If there is any error during initialization.protected void initialize() throws Exception
AbstractMapReduce
can override this method to initialize the MapReduce
.
MapReduceContext
will be available in this method using getContext()
.Exception
- if there is any error in initializing the MapReducepublic void destroy()
AbstractMapReduce
can override this method to destroy the MapReduce
.destroy
in interface ProgramLifecycle<MapReduceContext>
protected final MapReduceContext getContext()
MapReduceContext
.Copyright © 2021 Cask Data, Inc. Licensed under the Apache License, Version 2.0.