|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.code.gridstart.Kickstart
public class Kickstart
This enables a constituentJob to be run on the grid, by launching it through kickstart. The kickstart executable is a light-weight program which connects the stdin, stdout and stderr filehandles for Pegasus jobs on the remote site.
Sitting in between the remote scheduler and the executable, it is possible for kickstart to gather additional information about the executable run-time behavior, including the exit status of jobs.
Kickstart is an executable distributed with Pegasus that can generally be found at $PEGASUS_HOME/bin/kickstart
| Field Summary | |
|---|---|
static String |
CLASSNAME
The basename of the class that is implmenting this. |
static String |
COMPLETE_TRANSFORMATION_NAME
The complete TC name for kickstart. |
static String |
EXECUTABLE_BASENAME
The basename of the kickstart executable. |
static String |
KICKSTART_CLEANUP
The environment variable used to the set Kickstart CLEANUP JOB. |
static String |
KICKSTART_INPUT_SUFFIX
The suffix for the kickstart input file, that is generated to use invoke at the remote end. |
static String |
KICKSTART_POSTJOB
The environment variable used to the set Kickstart POSTJOB. |
static String |
KICKSTART_PREJOB
The environment variable used to the set Kickstart PREJOB. |
static String |
KICKSTART_SETUP
The environment variable used to the set Kickstart SETUP JOB. |
private ADag |
mConcDAG
The handle to the workflow that is being enabled. |
private boolean |
mDisableInvokeFunctionality
Boolean indicating whether to disable invoke functionality. |
private boolean |
mDoStat
A boolean indicating whether to stat files or not. |
private boolean |
mDynamicDeployment
A boolean indicating whether kickstart is deployed dynamically or not. |
private boolean |
mEnablingPartOfAggregatedJob
An instance variable to track if enabling is happening as part of a clustered constituentJob. |
private boolean |
mGenerateLOF
A boolean indicating whether to generate lof files or not. |
private boolean |
mInvokeAlways
A boolean indicating whether to use invoke always or not. |
private long |
mInvokeLength
The invoke limit trigger. |
private String |
mKickstartLabel
The label that is passed to kickstart. |
private LogManager |
mLogger
The LogManager object which is used to log all the messages. |
private GridStart |
mNoGridStartImpl
Handle to NoGridStart implementation. |
private PlannerOptions |
mPOptions
The options passed to the planner. |
private PegasusProperties |
mProps
The object holding all the properties pertaining to Pegasus. |
private boolean |
mSetXBit
Whether kickstart should set the X Bit on the staged executables. |
private SiteStore |
mSiteStore
Handle to the site catalog store. |
private SLS |
mSLS
The handle to the SLS implementor |
private String |
mSubmitDir
The submit exectionSiteDirectory where the submit files are being generated for the workflow. |
private TransformationCatalog |
mTCHandle
Handle to Transformation Catalog. |
private boolean |
mUseFullPathToGridStart
Boolean indicating whether to use full path or not |
(package private) boolean |
mWorkerNodeExecution
A boolean indicating whether to have worker node execution or not. |
static String |
SHORT_NAME
The SHORTNAME for this implementation. |
static String |
TRANSFORMATION_NAME
The logical name of kickstart |
static String |
TRANSFORMATION_NAMESPACE
The transformation namespace for the kickstart |
static String |
TRANSFORMATION_VERSION
The version number for kickstart. |
| Fields inherited from interface edu.isi.pegasus.planner.code.GridStart |
|---|
mSeparator, VERSION |
| Constructor Summary | |
|---|---|
Kickstart()
|
|
| Method Summary | |
|---|---|
private void |
addCleanupPostScript(Job job,
List files)
Adds a /bin/rm post constituentJob to kickstart that removes the files passed. |
boolean |
canSetXBit()
Indicates whether the enabling mechanism can set the X bit on the executable on the remote grid site, in addition to launching it on the remote grid site. |
private void |
construct(Job job,
String key,
String value)
Constructs a condor variable in the condor profile namespace associated with the constituentJob. |
protected String |
constructCleanupJob(Job job,
String workerNodeTmp)
Constructs a kickstart setup constituentJob |
protected String |
constructPREJob(Job job,
String headNodeURLPrefix,
String headNodeDirectory,
String workerNodeDirectory,
String slsFile)
Constructs the prejob that fetches sls file, and then invokes transfer again. |
protected String |
constructSetupJob(Job job,
String workerNodeTmp)
Constructs a kickstart setup constituentJob |
String |
defaultPOSTScript()
Returns the SHORT_NAME for the POSTScript implementation that is used to be as default with this GridStart implementation. |
boolean |
enable(AggregatedJob job,
boolean isGlobusJob)
Enables a constituentJob to run on the grid. |
boolean |
enable(Job job,
boolean isGlobusJob)
Enables a constituentJob to run on the grid by launching it through kickstart. |
protected boolean |
enable(Job job,
boolean isGlobusJob,
boolean stat,
boolean addPostScript,
boolean partOfClusteredJob)
Enables a constituentJob to run on the grid by launching it through kickstart. |
String |
generateListofFilenamesFile(Set files,
String basename)
Writes out the list of filenames file for the constituentJob. |
protected String |
getDirectory(Job job)
Returns the directory in which the job should run. |
private String |
getDirectoryKey(Job job)
Returns the exectionSiteDirectory that is associated with the constituentJob to specify the exectionSiteDirectory in which the constituentJob needs to run |
String |
getKickstartPath(SiteCatalogEntry site)
Returns the default path to kickstart as constructed from the environment variable associated with a site in the site catalog |
TransformationCatalogEntry |
getTransformationCatalogEntry(String site)
Returns the transformation catalog entry for kickstart on a site |
String |
getVDSKeyValue()
Returns the value of the vds profile with key as Pegasus.GRIDSTART_KEY, that would result in the loading of this particular implementation. |
String |
getWorkerNodeDirectory(Job job)
Returns the exectionSiteDirectory in which the constituentJob executes on the worker node. |
protected String |
handleTransferOfExecutable(Job job,
String path)
It changes the paths to the executable depending on whether we want to transfer the executable or not. |
void |
initialize(PegasusBag bag,
ADag dag)
Initializes the GridStart implementation. |
private String |
quote(String string)
Condor Quotes a string |
protected boolean |
requiresToSetDirectory(Job job)
Returns a boolean indicating whether we need to set the directory for the job or not. |
String |
shortDescribe()
Returns a short textual description in the form of the name of the class. |
void |
useFullPathToGridStarts(boolean fullPath)
Setter method to control whether a full path to Gridstart should be returned while wrapping a job or not. |
private boolean |
useInvoke(Job job,
String executable,
StringBuffer args)
Triggers the creation of the kickstart input file, that contains the the remote executable and the arguments with which it has to be invoked. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TRANSFORMATION_NAMESPACE
public static final String TRANSFORMATION_NAME
public static final String TRANSFORMATION_VERSION
public static final String EXECUTABLE_BASENAME
public static final String COMPLETE_TRANSFORMATION_NAME
public static final String KICKSTART_INPUT_SUFFIX
public static final String CLASSNAME
public static final String SHORT_NAME
public static final String KICKSTART_SETUP
public static final String KICKSTART_PREJOB
public static final String KICKSTART_POSTJOB
public static final String KICKSTART_CLEANUP
private LogManager mLogger
private PegasusProperties mProps
private PlannerOptions mPOptions
private ADag mConcDAG
private SiteStore mSiteStore
private TransformationCatalog mTCHandle
private String mSubmitDir
private boolean mInvokeAlways
private boolean mDoStat
private boolean mGenerateLOF
private long mInvokeLength
boolean mWorkerNodeExecution
private SLS mSLS
private boolean mEnablingPartOfAggregatedJob
private boolean mDynamicDeployment
private String mKickstartLabel
private boolean mSetXBit
private GridStart mNoGridStartImpl
private boolean mUseFullPathToGridStart
private boolean mDisableInvokeFunctionality
| Constructor Detail |
|---|
public Kickstart()
| Method Detail |
|---|
public void initialize(PegasusBag bag,
ADag dag)
initialize in interface GridStartbag - the bag of objects that is used for initialization.dag - the concrete dag so far.public void useFullPathToGridStarts(boolean fullPath)
useFullPathToGridStarts in interface GridStartfullPath - if set to true, indicates that full path would be used.
public boolean enable(AggregatedJob job,
boolean isGlobusJob)
enable in interface GridStartconstituentJob - the Job object containing the constituentJob description
of the constituentJob that has to be enabled on the grid.isGlobusJob - is true, if the constituentJob generated a
line universe = globus, and thus runs remotely.
Set to false, if the constituentJob runs on the submit
host in any way.
public boolean enable(Job job,
boolean isGlobusJob)
enable in interface GridStartconstituentJob - the Job object containing the constituentJob description
of the constituentJob that has to be enabled on the grid.isGlobusJob - is true, if the constituentJob generated a
line universe = globus, and thus runs remotely.
Set to false, if the constituentJob runs on the submit
host in any way.
protected boolean enable(Job job,
boolean isGlobusJob,
boolean stat,
boolean addPostScript,
boolean partOfClusteredJob)
constituentJob - the Job object containing the constituentJob description
of the constituentJob that has to be enabled on the grid.isGlobusJob - is true, if the constituentJob generated a
line universe = globus, and thus runs remotely.
Set to false, if the constituentJob runs on the submit
host in any way.stat - boolean indicating whether to generate the lof files
for kickstart stat option or not.addPostScript - boolean indicating whether to add a postscript or not.partOfClusteredJob - boolean indicating whether the job being enabled
is part of a clustered job or not.
protected String handleTransferOfExecutable(Job job,
String path)
constituentJob - the Job containing the constituentJob description.path - the path to kickstart on the remote compute site, as determined
from the site catalog.
public TransformationCatalogEntry getTransformationCatalogEntry(String site)
site - the site on which the entry is required
public String getKickstartPath(SiteCatalogEntry site)
site - the SiteCatalogEntry object for the site.
public String getWorkerNodeDirectory(Job job)
getWorkerNodeDirectory in interface GridStartconstituentJob -
public boolean canSetXBit()
canSetXBit in interface GridStartpublic String getVDSKeyValue()
getVDSKeyValue in interface GridStartorg.griphyn.cPlanner.namespace.Pegasus#GRIDSTART_KEYpublic String shortDescribe()
shortDescribe in interface GridStartpublic String defaultPOSTScript()
defaultPOSTScript in interface GridStartPOSTScript.shortDescribe()protected boolean requiresToSetDirectory(Job job)
job - the job for which to set directory.
protected String getDirectory(Job job)
job - the job in which the directory has to run.
private String getDirectoryKey(Job job)
constituentJob - the constituentJob
private boolean useInvoke(Job job,
String executable,
StringBuffer args)
constituentJob - the Job object containing the constituentJob description.executable - the path to the executable used.args - the arguments buffer for gridstart invocation so far.
protected String constructSetupJob(Job job,
String workerNodeTmp)
constituentJob - the constituentJob to be run.workerNodeTmp - the worker node tmp to run the constituentJob in.
protected String constructCleanupJob(Job job,
String workerNodeTmp)
constituentJob - the constituentJob to be run.workerNodeTmp - the worker node tmp to run the constituentJob in.
protected String constructPREJob(Job job,
String headNodeURLPrefix,
String headNodeDirectory,
String workerNodeDirectory,
String slsFile)
constituentJob - the constituentJob for which the prejob is being createdheadNodeURLPrefix - StringheadNodeDirectory - StringworkerNodeDirectory - StringslsFile - String
public String generateListofFilenamesFile(Set files,
String basename)
files - the list of PegasusFile objects contains the files
whose stat information is required.basename - the basename of the file that is to be created
private void construct(Job job,
String key,
String value)
constituentJob - contains the constituentJob description.key - the key of the profile.value - the associated value.private String quote(String string)
string - the string to be quoted.
private void addCleanupPostScript(Job job,
List files)
constituentJob - the constituentJob in which the post constituentJob needs to be added.files - the files to be deleted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||