Class GUC

  • All Implemented Interfaces:
    Implementation, MultipleFTPerXFERJob
    Direct Known Subclasses:
    TPTGUC

    public class GUC
    extends AbstractMultipleFTPerXFERJob
    The implementation that is used to create transfer jobs that callout to the new globus-url-copy client, that support multiple file transfers

    In order to use the transfer implementation implemented by this class,

            - the property pegasus.transfer.*.impl must be set to value GUC.
     

    There should be an entry in the transformation catalog with the fully qualified name as globus::guc for all the sites where workflow is run, or on the local site in case of third party transfers. Pegasus can automatically construct the path to the globus-url-copy client, if the environment variable GLOBUS_LOCATION is specified in the site catalog for the site.

    The arguments with which the client is invoked can be specified

           - by specifying the property pegasus.transfer.arguments
           - associating the Pegasus profile key transfer.arguments
     
    Version:
    $Revision: 145 $
    Author:
    Karan Vahi
    • Field Detail

      • TRANSFORMATION_NAMESPACE

        public static final java.lang.String TRANSFORMATION_NAMESPACE
        The transformation namespace for the transfer job.
        See Also:
        Constant Field Values
      • TRANSFORMATION_NAME

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

        public static final java.lang.String DERIVATION_NAMESPACE
        The derivation namespace for for the transfer job.
        See Also:
        Constant Field Values
      • DERIVATION_NAME

        public static final java.lang.String DERIVATION_NAME
        The name of the underlying derivation.
        See Also:
        Constant Field Values
      • DERIVATION_VERSION

        public static final java.lang.String DERIVATION_VERSION
        The derivation version number for the transfer job.
      • DESCRIPTION

        public static final java.lang.String DESCRIPTION
        A short description of the transfer implementation.
        See Also:
        Constant Field Values
      • mNumOfTXStreams

        protected java.lang.String mNumOfTXStreams
        The number of streams that each g-u-c process opens to do the ftp transfer.
      • mUseForce

        protected boolean mUseForce
        Whether to use force option for the transfer executable or not.
    • Constructor Detail

      • GUC

        public GUC​(PegasusBag bag)
        The overloaded constructor, that is called by the Factory to load the class.
        Parameters:
        bag - the bag of Pegasus initialization objects.
    • Method Detail

      • useThirdPartyTransferAlways

        public boolean useThirdPartyTransferAlways()
        Return a boolean indicating whether the transfers to be done always in a third party transfer mode. A value of false, results in the direct or peer to peer transfers being done.

        A value of false does not preclude third party transfers. They still can be done, by setting the property "pegasus.transfer.*.thirdparty.sites".

        Returns:
        boolean indicating whether to always use third party transfers or not.
        See Also:
        PegasusProperties.getThirdPartySites(String)
      • doesPreserveXBit

        public boolean doesPreserveXBit()
        Returns a boolean indicating whether the transfer protocol being used by the implementation preserves the X Bit or not while staging.
        Returns:
        boolean
      • getDescription

        public java.lang.String getDescription()
        Returns a textual description of the transfer implementation.
        Returns:
        a short textual description
      • getTransformationCatalogEntry

        public TransformationCatalogEntry getTransformationCatalogEntry​(java.lang.String siteHandle,
                                                                        int jobClass)
        Retrieves the transformation catalog entry for the executable that is being used to transfer the files in the implementation.
        Parameters:
        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 transfer
        Returns:
        the transformation catalog entry if found, else null.
      • defaultTCEntry

        protected TransformationCatalogEntry defaultTCEntry​(java.lang.String namespace,
                                                            java.lang.String name,
                                                            java.lang.String version,
                                                            java.lang.String site)
        Returns a default TC entry to be used in case entry is not found in the transformation catalog.
        Parameters:
        namespace - the namespace of the transfer transformation
        name - the logical name of the transfer transformation
        version - the version of the transfer transformation
        site - the site for which the default entry is required.
        Returns:
        the default entry.
      • getEnvironmentVariables

        protected java.util.List getEnvironmentVariables​(java.lang.String site)
        Returns the environment profiles that are required for the default entry to sensibly work.
        Specified by:
        getEnvironmentVariables in class AbstractMultipleFTPerXFERJob
        Parameters:
        site - the site where the job is going to run.
        Returns:
        List of environment variables, else null in case where the required environment variables could not be found.
      • getDerivationNamespace

        protected java.lang.String getDerivationNamespace()
        Returns the namespace of the derivation that this implementation refers to.
        Specified by:
        getDerivationNamespace in class AbstractMultipleFTPerXFERJob
        Returns:
        the namespace of the derivation.
      • getDerivationName

        protected java.lang.String getDerivationName()
        Returns the logical name of the derivation that this implementation refers to.
        Specified by:
        getDerivationName in class AbstractMultipleFTPerXFERJob
        Returns:
        the name of the derivation.
      • getDerivationVersion

        protected java.lang.String getDerivationVersion()
        Returns the version of the derivation that this implementation refers to.
        Specified by:
        getDerivationVersion in class AbstractMultipleFTPerXFERJob
        Returns:
        the version of the derivation.
      • generateArgumentString

        protected java.lang.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.
        Specified by:
        generateArgumentString in class AbstractMultipleFTPerXFERJob
        Parameters:
        job - the object containing the transfer node.
        Returns:
        the argument string
      • postProcess

        public void postProcess​(TransferJob job)
        Makes sure the stdin is transferred by the Condor File Transfer Mechanism. In addition, the stdin is set to null, after the file has been marked for transfer by Condor File Transfer Mechanism.
        Overrides:
        postProcess in class AbstractMultipleFTPerXFERJob
        Parameters:
        job - the TransferJob that has been created.
      • writeStdInAndAssociateCredentials

        protected void writeStdInAndAssociateCredentials​(TransferJob job,
                                                         java.io.FileWriter writer,
                                                         java.util.Collection files,
                                                         java.lang.String stagingSite,
                                                         int jobClass)
                                                  throws java.lang.Exception
        Writes to a FileWriter stream the stdin which goes into the magic script via standard input
        Specified by:
        writeStdInAndAssociateCredentials in class AbstractMultipleFTPerXFERJob
        Parameters:
        job - the transfer job.
        writer - 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 transfer
        Throws:
        java.lang.Exception