Class DefaultImplementation
- java.lang.Object
-
- edu.isi.pegasus.planner.refiner.createdir.DefaultImplementation
-
- All Implemented Interfaces:
Implementation
public class DefaultImplementation extends java.lang.Object implements Implementation
The default implementation for creating create dir jobs.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COMPLETE_TRANSFORMATION_NAME
The complete TC name for kickstart.static java.lang.String
DERIVATION_NAME
The logical name of the transformation that creates directories on the remote execution pools.static java.lang.String
DERIVATION_NAMESPACE
The derivation namespace for the create dir jobs.static java.lang.String
DERIVATION_VERSION
The version number for the derivations for create dir jobs.static java.lang.String
EXECUTABLE_BASENAME
The basename of the pegasus cleanup executable.protected LogManager
mLogger
The handle to the logging object.protected PegasusProperties
mProps
The handle to the pegasus properties.protected SiteStore
mSiteStore
The handle to the SiteStore.protected TransformationCatalog
mTCHandle
The handle to the transformation catalog.protected boolean
mUseMkdir
Whether we want to use dirmanager or mkdir directly.static java.lang.String
PATH_VALUE
The path to be set for create dir jobs.static java.lang.String
POSTSCRIPT_ARGUMENTS_FOR_ONLY_ROTATING_LOG_FILE
The arguments for pegasus-exitcode when you only want the log files to be rotated.static java.lang.String
TRANSFORMATION_NAME
The logical name of the transformation that creates directories on the remote execution pools.static java.lang.String
TRANSFORMATION_NAMESPACE
The transformation namespace for the create dir jobs.static java.lang.String
TRANSFORMATION_VERSION
The version number for the derivations for create dir jobs.-
Fields inherited from interface edu.isi.pegasus.planner.refiner.createdir.Implementation
VERSION
-
-
Constructor Summary
Constructors Constructor Description DefaultImplementation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private TransformationCatalogEntry
defaultTCEntry(java.lang.String site)
Returns a default TC entry to be used in case entry is not found in the transformation catalog.protected java.lang.String
getCreateDirJobExecutionSite(java.lang.String site, java.lang.String directoryURL)
Determines the site where the create dir job should be run , looking at the directory URL passed.void
initialize(PegasusBag bag)
Intializes the class.Job
makeCreateDirJob(java.lang.String site, java.lang.String name, java.lang.String directoryURL)
It creates a make directoryURL job that creates a directoryURL on the remote pool using the perl executable that Gaurang wrote.
-
-
-
Field Detail
-
TRANSFORMATION_NAMESPACE
public static final java.lang.String TRANSFORMATION_NAMESPACE
The transformation namespace for the create dir jobs.- See Also:
- Constant Field Values
-
TRANSFORMATION_NAME
public static final java.lang.String TRANSFORMATION_NAME
The logical name of the transformation that creates directories on the remote execution pools.- See Also:
- Constant Field Values
-
TRANSFORMATION_VERSION
public static final java.lang.String TRANSFORMATION_VERSION
The version number for the derivations for create dir jobs.
-
EXECUTABLE_BASENAME
public static final java.lang.String EXECUTABLE_BASENAME
The basename of the pegasus cleanup executable.- See Also:
- Constant Field Values
-
PATH_VALUE
public static final java.lang.String PATH_VALUE
The path to be set for create dir jobs.- See Also:
- Constant Field Values
-
POSTSCRIPT_ARGUMENTS_FOR_ONLY_ROTATING_LOG_FILE
public static final java.lang.String POSTSCRIPT_ARGUMENTS_FOR_ONLY_ROTATING_LOG_FILE
The arguments for pegasus-exitcode when you only want the log files to be rotated.- See Also:
- Constant Field Values
-
COMPLETE_TRANSFORMATION_NAME
public static final java.lang.String COMPLETE_TRANSFORMATION_NAME
The complete TC name for kickstart.
-
DERIVATION_NAMESPACE
public static final java.lang.String DERIVATION_NAMESPACE
The derivation namespace for the create dir jobs.- See Also:
- Constant Field Values
-
DERIVATION_NAME
public static final java.lang.String DERIVATION_NAME
The logical name of the transformation that creates directories on the remote execution pools.- See Also:
- Constant Field Values
-
DERIVATION_VERSION
public static final java.lang.String DERIVATION_VERSION
The version number for the derivations for create dir jobs.- See Also:
- Constant Field Values
-
mTCHandle
protected TransformationCatalog mTCHandle
The handle to the transformation catalog.
-
mSiteStore
protected SiteStore mSiteStore
The handle to the SiteStore.
-
mLogger
protected LogManager mLogger
The handle to the logging object.
-
mProps
protected PegasusProperties mProps
The handle to the pegasus properties.
-
mUseMkdir
protected boolean mUseMkdir
Whether we want to use dirmanager or mkdir directly.
-
-
Method Detail
-
initialize
public void initialize(PegasusBag bag)
Intializes the class.- Specified by:
initialize
in interfaceImplementation
- Parameters:
bag
- bag of initialization objects
-
makeCreateDirJob
public Job makeCreateDirJob(java.lang.String site, java.lang.String name, java.lang.String directoryURL)
It creates a make directoryURL job that creates a directoryURL on the remote pool using the perl executable that Gaurang wrote. It access mkdir underneath.- Specified by:
makeCreateDirJob
in interfaceImplementation
- Parameters:
site
- the site for which the create dir job is to be created.name
- the name that is to be assigned to the job.directoryURL
- the externally accessible URL to the directoryURL that is created- Returns:
- create dir job.
-
defaultTCEntry
private TransformationCatalogEntry defaultTCEntry(java.lang.String site)
Returns a default TC entry to be used in case entry is not found in the transformation catalog.- Parameters:
site
- the site for which the default entry is required.- Returns:
- the default entry.
-
getCreateDirJobExecutionSite
protected java.lang.String getCreateDirJobExecutionSite(java.lang.String site, java.lang.String directoryURL)
Determines the site where the create dir job should be run , looking at the directory URL passed. Preference is given to local site unless the directoryURL is a file URL. In that case, the create dir job is executed on the site where the directory is to be created.- Parameters:
site
- the site where the directory is to be createddirectoryURL
- the URL to the directory.- Returns:
- the site for create dir job
-
-