|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.kumpe.hadooptimizer.Optimizer<I>
de.kumpe.hadooptimizer.hadoop.HadoOptimizerBase<I>
I
- the individuals' typepublic abstract class HadoOptimizerBase<I>
Base-class for all Hadoop-based Optimizer
implementations. Subclasses
need to override the doOptimize()
method and setup and create the
Hadoop-jobs
to do the actual optimization.
When setting up Mapper
s or Reducer
s you can use
readConfiguration(Mapper.Context)
to read in the
OptimizerConfiguration
.
Constructor Summary | |
---|---|
HadoOptimizerBase(EaOptimizerConfigurationBase<I> configuration)
|
Method Summary | |
---|---|
protected abstract void |
doOptimize()
Needs to be overridden to do the actual optimization. |
org.apache.hadoop.conf.Configuration |
getConf()
|
protected EaOptimizerConfigurationBase<I> |
getConfiguration()
Returns the optimizer's configuration. |
void |
optimize()
Creates the output-directory, writes the EaOptimizerConfigurationBase into the file-system and starts the
actual optimization in doOptimize() . |
static OptimizerConfiguration |
readConfiguration(org.apache.hadoop.mapreduce.Mapper.Context context)
Reads the OptimizerConfiguration out of the hadoop's job configuration from the specified Mapper.Context . |
void |
setConf(org.apache.hadoop.conf.Configuration conf)
|
Methods inherited from class de.kumpe.hadooptimizer.Optimizer |
---|
getRandomGenerator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HadoOptimizerBase(EaOptimizerConfigurationBase<I> configuration)
Method Detail |
---|
public static OptimizerConfiguration readConfiguration(org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException
OptimizerConfiguration
out of the hadoop's job configuration
from the specified Mapper.Context
.
If the InputSplit
of the specified Mapper.Context
is
implementing HasSeed
then a new
Well44497b.Well44497b(long)
-instance with the
retrieved seed
is
injected
into the configuration. Otherwise taskAttemptID is used to create a seed.
context
- the mapper's context
IOException
protected EaOptimizerConfigurationBase<I> getConfiguration()
Optimizer
This method can be overridden to cast the OptimizerConfiguration
to the appropriate subtype for the concrete optimizer implementation.
getConfiguration
in class Optimizer<I>
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public final void optimize()
EaOptimizerConfigurationBase
into the file-system and starts the
actual optimization in doOptimize()
.
optimize
in class Optimizer<I>
Optimizer.optimize()
protected abstract void doOptimize() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |