Class JobAggregatorFactory
- java.lang.Object
-
- edu.isi.pegasus.planner.cluster.aggregator.JobAggregatorFactory
-
public class JobAggregatorFactory extends java.lang.Object
A factory class to load the appropriate JobAggregator implementations while clustering jobs.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_PACKAGE_NAME
Package to prefix "just" class names with.static java.lang.String
MPI_EXEC_CLASS
The name of the class in this package, that corresponds to mpiexec.static java.lang.String
SEQ_EXEC_CLASS
The name of the class in this package, that corresponds to seqexec.
-
Constructor Summary
Constructors Constructor Description JobAggregatorFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JobAggregator
loadInstance(ADag dag, PegasusBag bag)
Loads the implementing class corresponding to the mode specified by the user at runtime in the properties file.static JobAggregator
loadInstance(java.lang.String className, ADag dag, PegasusBag bag)
Loads the implementing class corresponding to the class passed.
-
-
-
Field Detail
-
DEFAULT_PACKAGE_NAME
public static final java.lang.String DEFAULT_PACKAGE_NAME
Package to prefix "just" class names with.- See Also:
- Constant Field Values
-
SEQ_EXEC_CLASS
public static final java.lang.String SEQ_EXEC_CLASS
The name of the class in this package, that corresponds to seqexec. This is required to load the correct class, even though the user specifyies a class that matches on ignoring case, but not directly.- See Also:
- Constant Field Values
-
MPI_EXEC_CLASS
public static final java.lang.String MPI_EXEC_CLASS
The name of the class in this package, that corresponds to mpiexec. This is required to load the correct class, even though the user specifyies a class that matches on ignoring case, but not directly.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadInstance
public static JobAggregator loadInstance(ADag dag, PegasusBag bag)
Loads the implementing class corresponding to the mode specified by the user at runtime in the properties file. The properties object passed should not be null.- Parameters:
dag
- the workflow that is being clustered.bag
- the bag of objects that is useful for initialization.- Returns:
- the instance of the class implementing this interface.
- Throws:
JobAggregatorFactoryException
- that nests any error that might occur during the instantiation- See Also:
DEFAULT_PACKAGE_NAME
-
loadInstance
public static JobAggregator loadInstance(java.lang.String className, ADag dag, PegasusBag bag)
Loads the implementing class corresponding to the class passed.- Parameters:
className
- the name of the class that implements the mode. It is the name of the class, not the complete name with package. That is added by itself.dag
- the workflow that is being clustered.bag
- the bag of objects that is useful for initialization.- Returns:
- the instance of the class implementing this interface.
- Throws:
JobAggregatorFactoryException
- that nests any error that might occur during the instantiation- See Also:
DEFAULT_PACKAGE_NAME
-
-