org.griphyn.cPlanner.engine.cleanup
Class Cleanup

java.lang.Object
  extended by org.griphyn.cPlanner.engine.cleanup.Cleanup
All Implemented Interfaces:
Implementation

public class Cleanup
extends Object
implements Implementation

Use's RM to do removal of the files on the remote sites.

Version:
$Revision: 141 $
Author:
Karan Vahi

Field Summary
static String DEFAULT_PRIORITY_KEY
          The default priority key associated with the cleanup jobs.
static String DERIVATION_NAME
          The name of the underlying derivation.
static String DERIVATION_NAMESPACE
          The derivation namespace for the job.
static String DERIVATION_VERSION
          The derivation version number for the job.
static String DESCRIPTION
          A short description of the transfer implementation.
private  LogManager mLogger
          The handle to the logger.
private  PegasusProperties mProps
          The handle to the properties passed to Pegasus.
protected  PoolInfoProvider mSiteHandle
          Handle to the site catalog.
private  String mSubmitDirectory
          The submit directory where the output files have to be written.
protected  TransformationCatalog mTCHandle
          The handle to the transformation catalog.
static String TRANSFORMATION_NAME
          The name of the underlying transformation that is queried for in the Transformation Catalog.
static String TRANSFORMATION_NAMESPACE
          The transformation namespace for the job.
static String TRANSFORMATION_VERSION
          The version number for the job.
 
Fields inherited from interface org.griphyn.cPlanner.engine.cleanup.Implementation
VERSION
 
Constructor Summary
Cleanup(PegasusProperties properties, PlannerOptions options)
          Creates a new instance of InPlace
 
Method Summary
 SubInfo createCleanupJob(String id, List files, SubInfo job)
          Creates a cleanup job that removes the files from remote working directory.
private  TransformationCatalogEntry defaultTCEntry(String site)
          Returns a default TC entry to be used in case entry is not found in the transformation catalog.
static String getCompleteTranformationName()
          A convenience method to return the complete transformation name being used to construct jobs in this class.
protected  TransformationCatalogEntry getTCEntry(String site)
          Returns the TCEntry object for the rm executable on a grid site.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSFORMATION_NAMESPACE

public static final String TRANSFORMATION_NAMESPACE
The transformation namespace for the job.

See Also:
Constant Field Values

DEFAULT_PRIORITY_KEY

public static final String DEFAULT_PRIORITY_KEY
The default priority key associated with the cleanup jobs.

See Also:
Constant Field Values

TRANSFORMATION_NAME

public static final 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 String TRANSFORMATION_VERSION
The version number for the job.


DERIVATION_NAMESPACE

public static final String DERIVATION_NAMESPACE
The derivation namespace for the job.

See Also:
Constant Field Values

DERIVATION_NAME

public static final String DERIVATION_NAME
The name of the underlying derivation.

See Also:
Constant Field Values

DERIVATION_VERSION

public static final String DERIVATION_VERSION
The derivation version number for the job.


DESCRIPTION

public static final String DESCRIPTION
A short description of the transfer implementation.

See Also:
Constant Field Values

mTCHandle

protected TransformationCatalog mTCHandle
The handle to the transformation catalog.


mSiteHandle

protected PoolInfoProvider mSiteHandle
Handle to the site catalog.


mProps

private PegasusProperties mProps
The handle to the properties passed to Pegasus.


mSubmitDirectory

private String mSubmitDirectory
The submit directory where the output files have to be written.


mLogger

private LogManager mLogger
The handle to the logger.

Constructor Detail

Cleanup

public Cleanup(PegasusProperties properties,
               PlannerOptions options)
Creates a new instance of InPlace

Parameters:
properties - the properties passed to the planner.
options - the options passed to the planner.
Method Detail

getCompleteTranformationName

public static String getCompleteTranformationName()
A convenience method to return the complete transformation name being used to construct jobs in this class.

Returns:
the complete transformation name

createCleanupJob

public SubInfo createCleanupJob(String id,
                                List files,
                                SubInfo 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 interface Implementation
Parameters:
id - the identifier to be assigned to the job.
files - the list of PegasusFile 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(String site)
Returns the TCEntry object for the rm executable on a grid site.

Parameters:
site - the site corresponding to which the entry is required.
Returns:
the TransformationCatalogEntry corresponding to the site.

defaultTCEntry

private TransformationCatalogEntry defaultTCEntry(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.


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