public class Transfer extends AbstractMultipleFTPerXFERJob
Transfer is distributed as part of the Pegasus worker package and can be found at $PEGASUS_HOME/bin/pegasus-transfer.
It leads to the creation of the setup chmod jobs to the workflow, that appear as parents to compute jobs in case the transfer implementation does not preserve the X bit on the file being transferred. This is required for staging of executables as part of the workflow. The setup jobs are only added as children to the stage in jobs.
In order to use the transfer implementation implemented by this class, the
property pegasus.transfer.*.impl
must be set to
value Transfer
.
The arguments with which the pegasus-transfer client is invoked can be specified
- by specifying the property pegasus.transfer.arguments - associating the Pegasus profile key transfer.arguments
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_NUMBER_OF_THREADS
The default number of threads pegasus-transfer uses
|
static String |
DERIVATION_NAME
The name of the underlying derivation.
|
static String |
DERIVATION_NAMESPACE
The derivation namespace for for the transfer job.
|
static String |
DERIVATION_VERSION
The derivation version number for the transfer job.
|
static String |
DESCRIPTION
A short description of the transfer implementation.
|
static String |
EXECUTABLE_BASENAME
The executable basename for the transfer executable.
|
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 transfer job.
|
static String |
TRANSFORMATION_VERSION
The version number for the transfer job.
|
CHANGE_XBIT_TRANSFORMATION, mAddNodesForSettingXBit, mChmodDisabledForAllSites, mDisabledChmodSites, mLocalIrodsEnv, mLocalIrodsEnvBasename, mLocalS3cfg, mLocalS3cfgBasename, mLocalUserProxy, mLocalUserProxyBasename, mLogger, mPOptions, mProps, mRefiner, mSiteStore, mTCHandle, NOOP_PREFIX, SET_XBIT_PREFIX, XBIT_DERIVATION_NS, XBIT_DERIVATION_VERSION, XBIT_EXECUTABLE_BASENAME, XBIT_TRANSFORMATION_NS, XBIT_TRANSFORMATION_VERSION
TRANSFER_UNIVERSE, VERSION
Constructor and Description |
---|
Transfer(PegasusBag bag)
The overloaded constructor, that is called by the Factory to load the
class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
doesPreserveXBit()
Returns a boolean indicating whether the transfer protocol being used by
the implementation preserves the X Bit or not while staging.
|
protected String |
generateArgumentString(TransferJob job)
It constructs the arguments to the transfer executable that need to be passed
to the executable referred to in this transfer mode.
|
protected String |
getCompleteTCName()
Returns the complete name for the transformation.
|
protected String |
getDerivationName()
Returns the logical name of the derivation that this implementation
refers to.
|
protected String |
getDerivationNamespace()
Returns the namespace of the derivation that this implementation
refers to.
|
protected String |
getDerivationVersion()
Returns the version of the derivation that this implementation
refers to.
|
String |
getDescription()
Returns a textual description of the transfer implementation.
|
protected List |
getEnvironmentVariables(String site)
Returns the environment profiles that are required for the default
entry to sensibly work.
|
TransformationCatalogEntry |
getTransformationCatalogEntry(String siteHandle,
int jobClass)
Retrieves the transformation catalog entry for the executable that is
being used to transfer the files in the implementation.
|
void |
postProcess(TransferJob job)
An optional method that allows the derived classes to do their own
post processing on the the transfer job before it is returned to
the calling module.
|
boolean |
useThirdPartyTransferAlways()
Return a boolean indicating whether the transfers to be done always in
a third party transfer mode.
|
protected void |
writeStdInAndAssociateCredentials(TransferJob job,
FileWriter writer,
Collection files,
String stagingSite,
int jobClass)
Writes to a FileWriter stream the stdin which goes into the magic script
via standard input
|
createTransferJob, defaultTCEntry, prepareSTDINAndAssociateCredentials
addSetXBitJobs, addSetXBitJobs, addSetXBitJobs, applyPriority, checkAndTransferIrodsEnvFile, checkAndTransferProxy, construct, createNoOPJob, createSetXBitJob, createSetXBitJob, createSetXBitJob, determineDisabledChmodSites, disableChmodJobCreation, getNOOPJobName, getPriority, getSetXBitJobName, setRefiner
public static final String TRANSFORMATION_NAMESPACE
public static final String TRANSFORMATION_NAME
public static final String TRANSFORMATION_VERSION
public static final String DERIVATION_NAMESPACE
public static final String DERIVATION_NAME
public static final String DERIVATION_VERSION
public static final int DEFAULT_NUMBER_OF_THREADS
public static final String DESCRIPTION
public static final String EXECUTABLE_BASENAME
public Transfer(PegasusBag bag)
bag
- the bag of initialization objects.public boolean useThirdPartyTransferAlways()
A value of false does not preclude third party transfers. They still can be done, by setting the property "pegasus.transfer.*.thirdparty.sites".
PegasusProperties.getThirdPartySites(String)
public boolean doesPreserveXBit()
public String getDescription()
public TransformationCatalogEntry getTransformationCatalogEntry(String siteHandle, int jobClass)
siteHandle
- the handle of the site where the transformation is
to be searched.jobClass
- the job Class for the newly added job. Can be one of the
following:
stage-in
stage-out
inter-pool transfer
stage-in worker transferpublic void postProcess(TransferJob job)
postProcess
in class AbstractMultipleFTPerXFERJob
job
- the TransferJob
that has been created.protected List getEnvironmentVariables(String site)
PEGASUS_HOME GLOBUS_LOCATION LD_LIBRARY_PATH
getEnvironmentVariables
in class AbstractMultipleFTPerXFERJob
site
- the site where the job is going to run.protected String getDerivationNamespace()
getDerivationNamespace
in class AbstractMultipleFTPerXFERJob
protected String getDerivationName()
getDerivationName
in class AbstractMultipleFTPerXFERJob
protected String getDerivationVersion()
getDerivationVersion
in class AbstractMultipleFTPerXFERJob
protected String generateArgumentString(TransferJob job)
generateArgumentString
in class AbstractMultipleFTPerXFERJob
job
- the object containing the transfer node.protected void writeStdInAndAssociateCredentials(TransferJob job, FileWriter writer, Collection files, String stagingSite, int jobClass) throws Exception
writeStdInAndAssociateCredentials
in class AbstractMultipleFTPerXFERJob
job
- the transfer jobwriter
- the writer to the stdin file.files
- Collection of FileTransfer
objects containing
the information about sourceam fin and destURL's.stagingSite
- the site where the data will be populated by first
level staging jobs.jobClass
- the job Class for the newly added job. Can be one of the
following:
stage-in
stage-out
inter-pool transferException
protected String getCompleteTCName()
getCompleteTCName
in class AbstractMultipleFTPerXFERJob