Class DefaultImplementation

  • All Implemented Interfaces:
    Implementation

    public class DefaultImplementation
    extends java.lang.Object
    implements Implementation
    The default implementation for creating create dir jobs.
    Version:
    $Revision$
    Author:
    Karan Vahi
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private TransformationCatalogEntry defaultTCEntry​(java.lang.String site)
      Returns a default TC entry to be used in case entry is not found in the transformation catalog.
      protected java.lang.String getCreateDirJobExecutionSite​(java.lang.String site, java.lang.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​(java.lang.String site, java.lang.String name, java.lang.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

      • TRANSFORMATION_NAMESPACE

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

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

        public static final java.lang.String EXECUTABLE_BASENAME
        The basename of the pegasus cleanup executable.
        See Also:
        Constant Field Values
      • PATH_VALUE

        public static final java.lang.String PATH_VALUE
        The path to be set for create dir jobs.
        See Also:
        Constant Field Values
      • POSTSCRIPT_ARGUMENTS_FOR_ONLY_ROTATING_LOG_FILE

        public static final java.lang.String POSTSCRIPT_ARGUMENTS_FOR_ONLY_ROTATING_LOG_FILE
        The arguments for pegasus-exitcode when you only want the log files to be rotated.
        See Also:
        Constant Field Values
      • COMPLETE_TRANSFORMATION_NAME

        public static final java.lang.String COMPLETE_TRANSFORMATION_NAME
        The complete TC name for kickstart.
      • DERIVATION_NAMESPACE

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

        public static final java.lang.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 java.lang.String DERIVATION_VERSION
        The version number for the derivations for create dir jobs.
        See Also:
        Constant Field Values
      • mSiteStore

        protected SiteStore mSiteStore
        The handle to the SiteStore.
      • mLogger

        protected LogManager mLogger
        The handle to the logging object.
      • 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​(java.lang.String site,
                                    java.lang.String name,
                                    java.lang.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​(java.lang.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 java.lang.String getCreateDirJobExecutionSite​(java.lang.String site,
                                                                java.lang.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