org.griphyn.cPlanner.transfer.implementation
Class Abstract

java.lang.Object
  extended byorg.griphyn.cPlanner.transfer.implementation.Abstract
All Implemented Interfaces:
Implementation
Direct Known Subclasses:
AbstractMultipleFTPerXFERJob, AbstractSingleFTPerXFERJob

public abstract class Abstract
extends Object
implements Implementation

An abstract implementation that implements some of the common functions in the Implementation Interface that are required by all the implementations.

Version:
$Revision: 1.1 $
Author:
Karan Vahi

Field Summary
static String CHANGE_XBIT_TRANSFORMATION
          The logical name of the transformation that creates directories on the remote execution pools.
protected  String mLocalUserProxy
          The path to the user proxy on the submit host (local pool), that is picked up for use in transfer of proxies.
protected  String mLocalUserProxyBasename
          The basename of the user proxy , that is picked up for use in transfer of proxies.
protected  LogManager mLogger
          The logging object which is used to log all the messages.
protected  PlannerOptions mPOptions
          Contains the various options to the Planner as passed by the user at runtime.
protected  PegasusProperties mProps
          The handle to the properties object holding the properties relevant to Pegasus.
protected  Refiner mRefiner
          The handle to the refiner that loaded this implementation.
protected  PoolInfoProvider mSCHandle
          The handle to the Site Catalog.
protected  TransformationCatalog mTCHandle
          The handle to the Transformation Catalog.
static String SET_XBIT_PREFIX
          The prefix for the jobs which are added to set X bit for the staged executables.
static String XBIT_DERIVATION_NS
          The derivation namespace for the setXBit jobs.
static String XBIT_DERIVATION_VERSION
          The version number for the derivations for setXBit jobs.
static String XBIT_TRANSFORMATION_NS
          The transformation namespace for the setXBit jobs.
static String XBIT_TRANSFORMATION_VERSION
          The version number for the derivations for setXBit jobs.
 
Fields inherited from interface org.griphyn.cPlanner.transfer.Implementation
TRANSFER_UNIVERSE
 
Constructor Summary
Abstract(PegasusProperties properties, PlannerOptions options)
          The overloaded constructor, that is called by the Factory to load the class.
 
Method Summary
 boolean addSetXBitJobs(String computeJobName, String txJobName, Collection execFiles, int transferClass)
          Adds the dirmanager job to the workflow, that do a chmod on the files being staged.
protected  boolean addSetXBitJobs(SubInfo computeJob, SubInfo txJob, Collection execFiles)
          Adds the dirmanager to the workflow, that do a chmod on the files being staged.
 void applyPriority(TransferJob job)
          Applies priorities to the transfer jobs if a priority is specified in the properties file.
 boolean checkAndTransferProxy(TransferJob job)
          Determines if there is a need to transfer proxy for the transfer job or not.
protected  SubInfo createSetXBitJob(FileTransfer file, String name)
          Creates a dirmanager job, that does a chmod on the file being staged.
protected  String getPathToUserProxy()
          Returns the path to the user proxy from the pool configuration file and the properties file.
protected  String getPriority(TransferJob job)
          Returns the priority for the transfer job as specified in the properties file.
 String getSetXBitJobName(String name, int counter)
          Generates the name of the setXBitJob , that is unique for the given workflow.
 void setRefiner(Refiner refiner)
          Sets the callback to the refiner, that has loaded this implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.griphyn.cPlanner.transfer.Implementation
createTransferJob, doesPreserveXBit, getDescription, getTransformationCatalogEntry, useThirdPartyTransferAlways
 

Field Detail

CHANGE_XBIT_TRANSFORMATION

public static final String CHANGE_XBIT_TRANSFORMATION
The logical name of the transformation that creates directories on the remote execution pools.

See Also:
Constant Field Values

XBIT_TRANSFORMATION_NS

public static final String XBIT_TRANSFORMATION_NS
The transformation namespace for the setXBit jobs.

See Also:
Constant Field Values

XBIT_TRANSFORMATION_VERSION

public static final String XBIT_TRANSFORMATION_VERSION
The version number for the derivations for setXBit jobs.

See Also:
Constant Field Values

XBIT_DERIVATION_NS

public static final String XBIT_DERIVATION_NS
The derivation namespace for the setXBit jobs.

See Also:
Constant Field Values

XBIT_DERIVATION_VERSION

public static final String XBIT_DERIVATION_VERSION
The version number for the derivations for setXBit jobs.

See Also:
Constant Field Values

SET_XBIT_PREFIX

public static final String SET_XBIT_PREFIX
The prefix for the jobs which are added to set X bit for the staged executables.

See Also:
Constant Field Values

mLocalUserProxy

protected String mLocalUserProxy
The path to the user proxy on the submit host (local pool), that is picked up for use in transfer of proxies.


mLocalUserProxyBasename

protected String mLocalUserProxyBasename
The basename of the user proxy , that is picked up for use in transfer of proxies.


mProps

protected PegasusProperties mProps
The handle to the properties object holding the properties relevant to Pegasus.


mPOptions

protected PlannerOptions mPOptions
Contains the various options to the Planner as passed by the user at runtime.


mSCHandle

protected PoolInfoProvider mSCHandle
The handle to the Site Catalog. It is instantiated in this class.


mTCHandle

protected TransformationCatalog mTCHandle
The handle to the Transformation Catalog. It must be instantiated in the implementing class


mRefiner

protected Refiner mRefiner
The handle to the refiner that loaded this implementation.


mLogger

protected LogManager mLogger
The logging object which is used to log all the messages.

See Also:
LogManager
Constructor Detail

Abstract

public Abstract(PegasusProperties properties,
                PlannerOptions options)
The overloaded constructor, that is called by the Factory to load the class.

Parameters:
properties - the properties object.
options - the options passed to the Planner.
Method Detail

applyPriority

public void applyPriority(TransferJob job)
Applies priorities to the transfer jobs if a priority is specified in the properties file.

Specified by:
applyPriority in interface Implementation
Parameters:
job - the transfer job .

checkAndTransferProxy

public boolean checkAndTransferProxy(TransferJob job)
Determines if there is a need to transfer proxy for the transfer job or not. If there is a need to transfer proxy, then the job is modified to create the correct condor commands to transfer the proxy. Proxy is usually transferred if the VDS profile TRANSFER_PROXY is set, or the job is being run in the condor vanilla universe. The proxy is transferred from the submit host (i.e site local). The location is determined from the value of the X509_USER_PROXY profile key associated in the env namespace.

Specified by:
checkAndTransferProxy in interface Implementation
Parameters:
job - the transfer job .
Returns:
boolean true job was modified to transfer the proxy, else false when job is not modified.

setRefiner

public void setRefiner(Refiner refiner)
Sets the callback to the refiner, that has loaded this implementation.

Specified by:
setRefiner in interface Implementation
Parameters:
refiner - the transfer refiner that loaded the implementation.

addSetXBitJobs

protected boolean addSetXBitJobs(SubInfo computeJob,
                                 SubInfo txJob,
                                 Collection execFiles)
Adds the dirmanager to the workflow, that do a chmod on the files being staged.

Parameters:
computeJob - the computeJob for which the files are being staged.
txJob - the transfer job that is staging the files.
execFiles - the executable files that are being staged.
Returns:
boolean indicating whether any XBitJobs were succesfully added or not.

addSetXBitJobs

public boolean addSetXBitJobs(String computeJobName,
                              String txJobName,
                              Collection execFiles,
                              int transferClass)
Adds the dirmanager job to the workflow, that do a chmod on the files being staged.

Specified by:
addSetXBitJobs in interface Implementation
Parameters:
computeJobName - the name pf the computeJob for which the files are being staged.
txJobName - the name of the transfer job that is staging the files.
execFiles - the executable files that are being staged.
transferClass - the class of transfer job
Returns:
boolean indicating whether any XBitJobs were succesfully added or not.

getSetXBitJobName

public String getSetXBitJobName(String name,
                                int counter)
Generates the name of the setXBitJob , that is unique for the given workflow.

Specified by:
getSetXBitJobName in interface Implementation
Parameters:
name - the name of the compute job
counter - the index for the setXBit job.
Returns:
the name of the setXBitJob .

createSetXBitJob

protected SubInfo createSetXBitJob(FileTransfer file,
                                   String name)
Creates a dirmanager job, that does a chmod on the file being staged. The file being staged should be of type executable. Though no explicit check is made for that. The staged file is the one whose X bit would be set on execution of this job. The site at which job is executed, is determined from the site associated with the destination URL.

Parameters:
file - the FileTransfer containing the file that has to be X Bit Set.
name - the name that has to be assigned to the job.
Returns:
the chmod job, else null if it is not able to be created for some reason.

getPriority

protected String getPriority(TransferJob job)
Returns the priority for the transfer job as specified in the properties file.

Parameters:
job - the Transfer job.
Returns:
the priority of the job as determined from properties, can be null if invalid value passed or property not set.

getPathToUserProxy

protected String getPathToUserProxy()
Returns the path to the user proxy from the pool configuration file and the properties file. The value in the properties file overrides the value from the pool configuration file.

Returns:
path to user proxy on local pool. null if no path is found.


Copyright © 2003 The University of Chicago and The University of Southern California. All Rights Reserved.