Class Cleanup
- java.lang.Object
-
- edu.isi.pegasus.planner.refiner.cleanup.Cleanup
-
- All Implemented Interfaces:
CleanupImplementation
public class Cleanup extends java.lang.Object implements CleanupImplementation
Uses pegasus-cleanup to do removal of the files on the remote sites.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DERIVATION_NAME
The name of the underlying derivation.static java.lang.String
DERIVATION_NAMESPACE
The derivation namespace for the job.static java.lang.String
DERIVATION_VERSION
The derivation version number for the job.static java.lang.String
DESCRIPTION
A short description of the transfer implementation.static java.lang.String
EXECUTABLE_BASENAME
The basename of the pegasus cleanup executable.private LogManager
mLogger
The handle to the logger.protected PlannerCache
mPlannerCache
Handle to the transient replica catalog.private PegasusProperties
mProps
The handle to the properties passed to Pegasus.protected SiteStore
mSiteStore
Handle to the stagingSite catalog.private java.lang.String
mSubmitDirectory
The submit directory where the output files have to be written.protected TransformationCatalog
mTCHandle
The handle to the transformation catalog.static java.lang.String
TRANSFORMATION_NAME
The name of the underlying transformation that is queried for in the Transformation Catalog.static java.lang.String
TRANSFORMATION_NAMESPACE
The transformation namespace for the job.static java.lang.String
TRANSFORMATION_VERSION
The version number for the job.-
Fields inherited from interface edu.isi.pegasus.planner.refiner.cleanup.CleanupImplementation
DEFAULT_CLEANUP_CATEGORY_KEY, VERSION
-
-
Constructor Summary
Constructors Constructor Description Cleanup()
The default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Job
createCleanupJob(java.lang.String id, java.util.List files, Job job)
Creates a cleanup job that removes the files from remote working directory.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.static java.lang.String
getCompleteTranformationName()
A convenience method to return the complete transformation name being used to construct jobs in this class.protected TransformationCatalogEntry
getTCEntry(java.lang.String site)
Returns the TCEntry object for the rm executable on a grid stagingSite.void
initialize(PegasusBag bag)
Creates a new instance of InPlace
-
-
-
Field Detail
-
TRANSFORMATION_NAMESPACE
public static final java.lang.String TRANSFORMATION_NAMESPACE
The transformation namespace for the job.- See Also:
- Constant Field Values
-
TRANSFORMATION_NAME
public static final java.lang.String TRANSFORMATION_NAME
The name of the underlying transformation that is queried for in the Transformation Catalog.- See Also:
- Constant Field Values
-
TRANSFORMATION_VERSION
public static final java.lang.String TRANSFORMATION_VERSION
The version number for the job.
-
DERIVATION_NAMESPACE
public static final java.lang.String DERIVATION_NAMESPACE
The derivation namespace for the job.- See Also:
- Constant Field Values
-
DERIVATION_NAME
public static final java.lang.String DERIVATION_NAME
The name of the underlying derivation.- See Also:
- Constant Field Values
-
DERIVATION_VERSION
public static final java.lang.String DERIVATION_VERSION
The derivation version number for the job.
-
EXECUTABLE_BASENAME
public static final java.lang.String EXECUTABLE_BASENAME
The basename of the pegasus cleanup executable.- See Also:
- Constant Field Values
-
DESCRIPTION
public static final java.lang.String DESCRIPTION
A short description of the transfer implementation.- See Also:
- Constant Field Values
-
mTCHandle
protected TransformationCatalog mTCHandle
The handle to the transformation catalog.
-
mSiteStore
protected SiteStore mSiteStore
Handle to the stagingSite catalog.
-
mPlannerCache
protected PlannerCache mPlannerCache
Handle to the transient replica catalog.
-
mProps
private PegasusProperties mProps
The handle to the properties passed to Pegasus.
-
mSubmitDirectory
private java.lang.String mSubmitDirectory
The submit directory where the output files have to be written.
-
mLogger
private LogManager mLogger
The handle to the logger.
-
-
Method Detail
-
getCompleteTranformationName
public static java.lang.String getCompleteTranformationName()
A convenience method to return the complete transformation name being used to construct jobs in this class.- Returns:
- the complete transformation name
-
initialize
public void initialize(PegasusBag bag)
Creates a new instance of InPlace- Specified by:
initialize
in interfaceCleanupImplementation
- Parameters:
bag
- the bag of initialization objects.
-
createCleanupJob
public Job createCleanupJob(java.lang.String id, java.util.List files, Job job)
Creates a cleanup job that removes the files from remote working directory. This will eventually make way to it's own interface.- Specified by:
createCleanupJob
in interfaceCleanupImplementation
- Parameters:
id
- the identifier to be assigned to the job.files
- the list ofPegasusFile
that need to be cleaned up.job
- the primary compute job with which this cleanup job is associated.- Returns:
- the cleanup job.
-
getTCEntry
protected TransformationCatalogEntry getTCEntry(java.lang.String site)
Returns the TCEntry object for the rm executable on a grid stagingSite.- Parameters:
stagingSite
- the stagingSite corresponding to which the entry is required.- Returns:
- the TransformationCatalogEntry corresponding to the stagingSite.
-
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:
stagingSite
- the stagingSite for which the default entry is required.- Returns:
- the default entry.
-
-