Package edu.isi.pegasus.planner.transfer
Interface Refiner
-
- All Superinterfaces:
Refiner
- All Known Implementing Classes:
AbstractRefiner
,BalancedCluster
,Basic
,Bundle
,Chain
,Cluster
,Empty
,MultipleFTPerXFERJobRefiner
,SingleFTPerXFERJobRefiner
public interface Refiner extends Refiner
The refiner interface, that determines the functions that need to be implemented to add various types of transfer nodes to the workflow.- Version:
- $Revision$
- Author:
- Karan Vahi, Gaurang Mehta
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INTER_POOL_PREFIX
The prefix for the jobs which are added to transfer the files generated by the parents of a job to the jobs execution pool.static java.lang.String
LOCAL_PREFIX
The prefix for all local transfer jobs.static java.lang.String
REGISTER_PREFIX
The prefix for the jobs which register the newly materialized files in the Replica Catalog.static java.lang.String
REMOTE_PREFIX
The prefix for all remote transfer jobsstatic java.lang.String
STAGE_IN_PREFIX
The prefix for the jobs which are added to transfer the files to a job's execution pool from the location returned from the replica mechanism.static java.lang.String
STAGE_OUT_PREFIX
The prefix for the jobs which are added to transfer the files generated by a job on an execution pool to the output pool.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addInterSiteTXNodes(Job job, java.util.Collection files, boolean localTransfer)
Adds the inter pool transfer nodes that are required for transferring the output files of the parents to the jobs execution site.void
addJob(Job job)
Add a new job to the workflow being refined.void
addRelation(java.lang.String parent, java.lang.String child)
Adds a new relation to the workflow being refiner.void
addRelation(java.lang.String parent, java.lang.String child, java.lang.String pool, boolean parentNew)
Adds a new relation to the workflow.void
addStageInXFERNodes(Job job, java.util.Collection<FileTransfer> files, java.util.Collection<FileTransfer> symLinkFiles)
Adds the stage in transfer nodes which transfer the input files for a job, from the location returned from the replica catalog to the job's execution pool.void
addStageOutXFERNodes(Job job, java.util.Collection files, ReplicaCatalogBridge rcb, boolean localTransfer)
Adds the stageout transfer nodes, that stage data to an output site specified by the user.void
addStageOutXFERNodes(Job job, java.util.Collection files, ReplicaCatalogBridge rcb, boolean localTransfer, boolean deletedLeaf)
Adds the stageout transfer nodes, that stage data to an output site specified by the user.void
done()
Signals that the traversal of the workflow is done.java.lang.String
getDescription()
Returns a textual description of the transfer mode.boolean
isSiteThirdParty(java.lang.String site, int type)
Returns whether a Site is third party enabled or not.void
loadImplementations(PegasusBag bag)
Loads the appropriate implementations that is required by this refinement strategy for different types of transfer jobs.boolean
refinerPreferenceForLocalTransferJobs(int type)
Boolean indicating Refiner preference for transfer jobs to run locally.boolean
refinerPreferenceForTransferJobLocation()
Boolean indicating whether the Transfer Refiner has a preference for where a transfer job is run.boolean
runTPTOnRemoteSite(java.lang.String site, int type)
Returns whether the third party transfers for a particular site are to be run on the remote site or the submit host.boolean
runTransferRemotely(java.lang.String site, int type)
Returns whether a Site prefers transfers to be run on it i.e remote transfers enabled.-
Methods inherited from interface edu.isi.pegasus.planner.refiner.Refiner
getWorkflow, getXMLProducer
-
-
-
-
Field Detail
-
LOCAL_PREFIX
static final java.lang.String LOCAL_PREFIX
The prefix for all local transfer jobs.- See Also:
- Constant Field Values
-
REMOTE_PREFIX
static final java.lang.String REMOTE_PREFIX
The prefix for all remote transfer jobs- See Also:
- Constant Field Values
-
STAGE_IN_PREFIX
static final java.lang.String STAGE_IN_PREFIX
The prefix for the jobs which are added to transfer the files to a job's execution pool from the location returned from the replica mechanism. the new job's name is FROM_RC_PREFIX + nameofjob + _+ counter.- See Also:
- Constant Field Values
-
STAGE_OUT_PREFIX
static final java.lang.String STAGE_OUT_PREFIX
The prefix for the jobs which are added to transfer the files generated by a job on an execution pool to the output pool. The new job's name is TO_RC_PREFIX + nameofjob + _+ counter.- See Also:
- Constant Field Values
-
INTER_POOL_PREFIX
static final java.lang.String INTER_POOL_PREFIX
The prefix for the jobs which are added to transfer the files generated by the parents of a job to the jobs execution pool. The new job's name is INTER_POOL_PREFIX + nameofjob + _+ counter.- See Also:
- Constant Field Values
-
REGISTER_PREFIX
static final java.lang.String REGISTER_PREFIX
The prefix for the jobs which register the newly materialized files in the Replica Catalog. The job's name should be RC_REGISTER_PREFIX + nameofjob, where nameofjob is the job that generates these materialized files.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadImplementations
void loadImplementations(PegasusBag bag) throws TransferImplementationFactoryException
Loads the appropriate implementations that is required by this refinement strategy for different types of transfer jobs. It calls to the factory method to load the appropriate Implementor. Loads the implementing class corresponding to the mode specified by the user at runtime in the properties file. The properties object passed should not be null.- Parameters:
bag
- the bag of initialization objects.- Throws:
org.griphyn.cPlanner.transfer.implementation.TransferImplementationFactoryException
TransferImplementationFactoryException
-
addInterSiteTXNodes
void addInterSiteTXNodes(Job job, java.util.Collection files, boolean localTransfer)
Adds the inter pool transfer nodes that are required for transferring the output files of the parents to the jobs execution site.- Parameters:
job
-Job
object corresponding to the node to which the files are to be transferred to.files
- Collection ofFileTransfer
objects containing the information about source and destURL's.localTransfer
- boolean indicating that associated transfer job will run on local site.
-
addStageOutXFERNodes
void addStageOutXFERNodes(Job job, java.util.Collection files, ReplicaCatalogBridge rcb, boolean localTransfer)
Adds the stageout transfer nodes, that stage data to an output site specified by the user.- Parameters:
job
-Job
object corresponding to the node to which the files are to be transferred to.files
- Collection ofFileTransfer
objects containing the information about source and destURL's.rcb
- bridge to the Replica Catalog. Used for creating registration nodes in the workflow.localTransfer
- boolean indicating that associated transfer job will run on local site.
-
addStageOutXFERNodes
void addStageOutXFERNodes(Job job, java.util.Collection files, ReplicaCatalogBridge rcb, boolean localTransfer, boolean deletedLeaf)
Adds the stageout transfer nodes, that stage data to an output site specified by the user. It also adds the registration nodes to register the data in the replica catalog if required.- Parameters:
job
-Job
object corresponding to the node to which the files are to be transferred to.files
- Collection ofFileTransfer
objects containing the information about source and destURL's.rcb
- bridge to the Replica Catalog. Used for creating registration nodes in the workflow.localTransfer
- boolean indicating that associated transfer job will run on local site.deletedLeaf
- to specify whether the node is being added for a deleted node by the reduction engine or not. default: false
-
addStageInXFERNodes
void addStageInXFERNodes(Job job, java.util.Collection<FileTransfer> files, java.util.Collection<FileTransfer> symLinkFiles)
Adds the stage in transfer nodes which transfer the input files for a job, from the location returned from the replica catalog to the job's execution pool.- Parameters:
job
-Job
object corresponding to the node to which the files are to be transferred to.files
- Collection ofFileTransfer
objects containing the information about source and destURL's.symLinkFiles
- Collection ofFileTransfer
objects containing source and destination file url's for symbolic linking on compute site.
-
done
void done()
Signals that the traversal of the workflow is done. This would allow the transfer mechanisms to clean up any state that they might be keeping that needs to be explicitly freed.
-
refinerPreferenceForTransferJobLocation
boolean refinerPreferenceForTransferJobLocation()
Boolean indicating whether the Transfer Refiner has a preference for where a transfer job is run.- Returns:
- boolean
-
refinerPreferenceForLocalTransferJobs
boolean refinerPreferenceForLocalTransferJobs(int type)
Boolean indicating Refiner preference for transfer jobs to run locally. This method should be called only if refinerPreferenceForTransferJobLocation is true for a refiner.- Parameters:
type
- the type of transfer job for which the URL is being constructed. Should be one of the following: stage-in stage-out inter-pool transfer- Returns:
- boolean refiner preference for transfer job to run locally or not.
-
runTransferRemotely
boolean runTransferRemotely(java.lang.String site, int type)
Returns whether a Site prefers transfers to be run on it i.e remote transfers enabled.- Parameters:
site
- the name of the site.type
- the type of transfer job for which the URL is being constructed. Should be one of the following: stage-in stage-out inter-pool transfer- Returns:
- true if site is setup for remote transfers
- See Also:
Job.STAGE_IN_JOB
,Job.INTER_POOL_JOB
,Job.STAGE_OUT_JOB
-
isSiteThirdParty
boolean isSiteThirdParty(java.lang.String site, int type)
Returns whether a Site is third party enabled or not.- Parameters:
site
- the name of the site.type
- the type of transfer job for which the URL is being constructed. Should be one of the following: stage-in stage-out inter-pool transfer- Returns:
- true pool is third party enabled false pool is not third party enabled.
- See Also:
Job.STAGE_IN_JOB
,Job.INTER_POOL_JOB
,Job.STAGE_OUT_JOB
-
runTPTOnRemoteSite
boolean runTPTOnRemoteSite(java.lang.String site, int type)
Returns whether the third party transfers for a particular site are to be run on the remote site or the submit host.- Parameters:
site
- the name of the site.type
- the type of transfer job for which the URL is being constructed. Should be one of the following: stage-in stage-out inter-pool transfer- Returns:
- true if the transfers are to be run on remote site, else false.
- See Also:
Job.STAGE_IN_JOB
,Job.INTER_POOL_JOB
,Job.STAGE_OUT_JOB
-
addJob
void addJob(Job job)
Add a new job to the workflow being refined.- Parameters:
job
- the job to be added.
-
addRelation
void addRelation(java.lang.String parent, java.lang.String child)
Adds a new relation to the workflow being refiner.- Parameters:
parent
- the jobname of the parent node of the edge.child
- the jobname of the child node of the edge.
-
addRelation
void addRelation(java.lang.String parent, java.lang.String child, java.lang.String pool, boolean parentNew)
Adds a new relation to the workflow. In the case when the parent is a transfer job that is added, the parentNew should be set only the first time a relation is added. For subsequent compute jobs that maybe dependant on this, it needs to be set to false.- Parameters:
parent
- the jobname of the parent node of the edge.child
- the jobname of the child node of the edge.pool
- the execution pool where the transfer node is to be run.parentNew
- the parent node being added, is the new transfer job and is being called for the first time.
-
getDescription
java.lang.String getDescription()
Returns a textual description of the transfer mode.- Returns:
- a short textual description
-
-