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

java.lang.Object
  extended by edu.isi.pegasus.planner.refiner.createdir.DefaultImplementation
All Implemented Interfaces:
Implementation

public class DefaultImplementation
extends Object
implements Implementation

The default implementation for creating create dir jobs.

Version:
$Revision: 4778 $
Author:
Karan Vahi

Field Summary
static String COMPLETE_TRANSFORMATION_NAME
          The complete TC name for kickstart.
static String DERIVATION_NAME
          The logical name of the transformation that creates directories on the remote execution pools.
static String DERIVATION_NAMESPACE
          The derivation namespace for the create dir jobs.
static String DERIVATION_VERSION
          The version number for the derivations for create dir jobs.
static String EXECUTABLE_BASENAME
          The basename of the pegasus cleanup executable.
static String FILE_URL_SCHEME
          The scheme name for file url.
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 String PATH_VALUE
          The path to be set for create dir jobs.
static String TRANSFORMATION_NAME
          The logical name of the transformation that creates directories on the remote execution pools.
static String TRANSFORMATION_NAMESPACE
          The transformation namespace for the create dir jobs.
static 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
DefaultImplementation()
           
 
Method Summary
private  TransformationCatalogEntry defaultTCEntry(String site)
          Returns a default TC entry to be used in case entry is not found in the transformation catalog.
protected  String getCreateDirJobExecutionSite(String site, 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(String site, String name, String directoryURL)
          It creates a make directoryURL job that creates a directoryURL on the remote pool using the perl executable that Gaurang wrote.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_URL_SCHEME

public static final String FILE_URL_SCHEME
The scheme name for file url.

See Also:
Constant Field Values

TRANSFORMATION_NAMESPACE

public static final String TRANSFORMATION_NAMESPACE
The transformation namespace for the create dir jobs.

See Also:
Constant Field Values

TRANSFORMATION_NAME

public static final 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 String TRANSFORMATION_VERSION
The version number for the derivations for create dir jobs.


EXECUTABLE_BASENAME

public static final String EXECUTABLE_BASENAME
The basename of the pegasus cleanup executable.

See Also:
Constant Field Values

PATH_VALUE

public static final String PATH_VALUE
The path to be set for create dir jobs.

See Also:
Constant Field Values

COMPLETE_TRANSFORMATION_NAME

public static final String COMPLETE_TRANSFORMATION_NAME
The complete TC name for kickstart.


DERIVATION_NAMESPACE

public static final String DERIVATION_NAMESPACE
The derivation namespace for the create dir jobs.

See Also:
Constant Field Values

DERIVATION_NAME

public static final 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 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.

Constructor Detail

DefaultImplementation

public DefaultImplementation()
Method Detail

initialize

public void initialize(PegasusBag bag)
Intializes the class.

Specified by:
initialize in interface Implementation
Parameters:
bag - bag of initialization objects

makeCreateDirJob

public Job makeCreateDirJob(String site,
                            String name,
                            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 interface Implementation
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(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 String getCreateDirJobExecutionSite(String site,
                                              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 created
directoryURL - the URL to the directory.
Returns:
the site for create dir job


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