edu.isi.pegasus.planner.refiner.createdir
Class AbstractStrategy

java.lang.Object
  extended by edu.isi.pegasus.planner.refiner.createdir.AbstractStrategy
All Implemented Interfaces:
Strategy
Direct Known Subclasses:
HourGlass, Tentacles

public abstract class AbstractStrategy
extends Object
implements Strategy

The interface that defines how the cleanup job is invoked and created.

Version:
$Revision: 4716 $
Author:
Karan Vahi

Field Summary
static String CREATE_DIR_PREFIX
          Constant prefix for the names of the create directory nodes.
static String CREATE_DIR_SUFFIX
          Constant suffix for the names of the create directory nodes.
protected  Implementation mImpl
          The implementation instance that is used to create a create dir job.
protected  String mJobPrefix
          The job prefix that needs to be applied to the job file basenames.
protected  LogManager mLogger
          The handle to the logging object, that is used to log the messages.
protected  SiteStore mSiteStore
          The Site Store handle.
protected  boolean mUseMkdir
          Whether we want to use dirmanager or mkdir directly.
 
Fields inherited from interface edu.isi.pegasus.planner.refiner.createdir.Strategy
VERSION
 
Constructor Summary
AbstractStrategy()
           
 
Method Summary
 String getCreateDirJobName(ADag dag, String pool)
          It returns the name of the create directory job, that is to be assigned.
protected  Set getCreateDirSites(ADag dag)
          Retrieves the sites for which the create dir jobs need to be created.
 void initialize(PegasusBag bag, Implementation impl)
          Intializes the class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.isi.pegasus.planner.refiner.createdir.Strategy
addCreateDirectoryNodes
 

Field Detail

CREATE_DIR_SUFFIX

public static final String CREATE_DIR_SUFFIX
Constant suffix for the names of the create directory nodes.

See Also:
Constant Field Values

CREATE_DIR_PREFIX

public static final String CREATE_DIR_PREFIX
Constant prefix for the names of the create directory nodes.

See Also:
Constant Field Values

mLogger

protected LogManager mLogger
The handle to the logging object, that is used to log the messages.


mJobPrefix

protected String mJobPrefix
The job prefix that needs to be applied to the job file basenames.


mUseMkdir

protected boolean mUseMkdir
Whether we want to use dirmanager or mkdir directly.


mImpl

protected Implementation mImpl
The implementation instance that is used to create a create dir job.


mSiteStore

protected SiteStore mSiteStore
The Site Store handle.

Constructor Detail

AbstractStrategy

public AbstractStrategy()
Method Detail

initialize

public void initialize(PegasusBag bag,
                       Implementation impl)
Intializes the class.

Specified by:
initialize in interface Strategy
Parameters:
bag - bag of initialization objects
impl - the implementation instance that creates create dir job

getCreateDirJobName

public String getCreateDirJobName(ADag dag,
                                  String pool)
It returns the name of the create directory job, that is to be assigned. The name takes into account the workflow name while constructing it, as that is thing that can guarentee uniqueness of name in case of deferred planning.

Parameters:
dag - the workflow to which the create dir jobs are being added.
pool - the execution pool for which the create directory job is responsible.
Returns:
String corresponding to the name of the job.

getCreateDirSites

protected Set getCreateDirSites(ADag dag)
Retrieves the sites for which the create dir jobs need to be created. It returns all the sites where the compute jobs have been scheduled.

Returns:
a Set containing a list of siteID's of the sites where the dag has to be run.


Copyright © 2011 The University of Southern California. All Rights Reserved.