Interface SLS

  • All Known Implementing Classes:
    Condor, Transfer

    public interface SLS
    This interface defines the second level staging process, that manages the transfer of files from the headnode to the worker node temp and back.
    Version:
    $Revision$
    Author:
    Karan Vahi
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String VERSION
      The version associated with the API.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Collection<FileTransfer> determineSLSInputTransfers​(Job job, java.lang.String fileName, FileServer stagingSiteServer, java.lang.String stagingSiteDirectory, java.lang.String workerNodeDirectory)
      Generates a second level staging file of the input files to the worker node directory.
      java.util.Collection<FileTransfer> determineSLSOutputTransfers​(Job job, java.lang.String fileName, FileServer stagingSiteServer, java.lang.String stagingSiteDirectory, java.lang.String workerNodeDirectory)
      Generates a second level staging file of the input files to the worker node directory.
      boolean doesCondorModifications()
      Returns a boolean whether the SLS implementation does a condor based modification or not.
      java.lang.String getSLSInputLFN​(Job job)
      Returns the LFN of sls input file.
      java.lang.String getSLSOutputLFN​(Job job)
      Returns the LFN of sls output file.
      void initialize​(PegasusBag bag)
      Initializes the SLS implementation.
      java.lang.String invocationString​(Job job, java.io.File slsFile)
      Constructs a command line invocation for a job, with a given sls file.
      boolean modifyJobForWorkerNodeExecution​(Job job, java.lang.String stagingSiteURLPrefix, java.lang.String stagingSitedirectory, java.lang.String workerNodeDirectory)
      Modifies a compute job for second level staging.
      boolean needsSLSInputTransfers​(Job job)
      Returns a boolean indicating whether it will an input file for a job to do the transfers.
      boolean needsSLSOutputTransfers​(Job job)
      Returns a boolean indicating whether it will an output file for a job to do the transfers.
    • Field Detail

      • VERSION

        static final java.lang.String VERSION
        The version associated with the API.
        See Also:
        Constant Field Values
    • Method Detail

      • initialize

        void initialize​(PegasusBag bag)
        Initializes the SLS implementation.
        Parameters:
        bag - the bag of objects. Contains access to catalogs etc.
      • doesCondorModifications

        boolean doesCondorModifications()
        Returns a boolean whether the SLS implementation does a condor based modification or not. By condor based modification we mean whether it uses condor specific classads to achieve the second level staging or not.
        Returns:
        boolean
      • invocationString

        java.lang.String invocationString​(Job job,
                                          java.io.File slsFile)
        Constructs a command line invocation for a job, with a given sls file. The SLS maybe null. In the case where SLS impl does not read from a file, it is advised to create a file in generateSLSXXX methods, and then read the file in this function and put it on the command line.
        Parameters:
        job - the job that is being sls enabled
        slsFile - the slsFile that is accessible on the worker node. Can be null
        Returns:
        invocation string
      • needsSLSInputTransfers

        boolean needsSLSInputTransfers​(Job job)
        Returns a boolean indicating whether it will an input file for a job to do the transfers. Transfer reads from stdin the file transfers that it needs to do.
        Parameters:
        job - the job being detected.
        Returns:
        true
      • needsSLSOutputTransfers

        boolean needsSLSOutputTransfers​(Job job)
        Returns a boolean indicating whether it will an output file for a job to do the transfers. Transfer reads from stdin the file transfers that it needs to do.
        Parameters:
        job - the job being detected.
        Returns:
        true
      • getSLSInputLFN

        java.lang.String getSLSInputLFN​(Job job)
        Returns the LFN of sls input file.
        Parameters:
        job - Job
        Returns:
        the name of the sls input file.
      • getSLSOutputLFN

        java.lang.String getSLSOutputLFN​(Job job)
        Returns the LFN of sls output file.
        Parameters:
        job - Job
        Returns:
        the name of the sls input file.
      • determineSLSInputTransfers

        java.util.Collection<FileTransfer> determineSLSInputTransfers​(Job job,
                                                                      java.lang.String fileName,
                                                                      FileServer stagingSiteServer,
                                                                      java.lang.String stagingSiteDirectory,
                                                                      java.lang.String workerNodeDirectory)
        Generates a second level staging file of the input files to the worker node directory. It should be consistent with the function needsSLSFile( Job )
        Parameters:
        job - the job for which the file is being created
        fileName - the name of the file that needs to be written out.
        stagingSiteServer - the file server on the staging site to be used for retrieval of files i.e the get operation
        stagingSiteDirectory - the directory on the head node of the staging site.
        workerNodeDirectory - the worker node directory
        Returns:
        a Collection of FileTransfer objects listing the transfers that need to be done.
        See Also:
        needsSLSInputTransfers( Job)
      • determineSLSOutputTransfers

        java.util.Collection<FileTransfer> determineSLSOutputTransfers​(Job job,
                                                                       java.lang.String fileName,
                                                                       FileServer stagingSiteServer,
                                                                       java.lang.String stagingSiteDirectory,
                                                                       java.lang.String workerNodeDirectory)
        Generates a second level staging file of the input files to the worker node directory. It should be consistent with the function needsSLSFile( Job )
        Parameters:
        job - the job for which the file is being created
        fileName - the name of the file that needs to be written out.
        stagingSiteServer - the file server on the staging site to be used for retrieval of files i.e the put operation
        stagingSiteDirectory - the directory on the head node of the staging site.
        workerNodeDirectory - the worker node directory
        Returns:
        a Collection of FileTransfer objects listing the transfers that need to be done.
        See Also:
        needsSLSOutputTransfers( Job)
      • modifyJobForWorkerNodeExecution

        boolean modifyJobForWorkerNodeExecution​(Job job,
                                                java.lang.String stagingSiteURLPrefix,
                                                java.lang.String stagingSitedirectory,
                                                java.lang.String workerNodeDirectory)
        Modifies a compute job for second level staging.
        Parameters:
        job - the job to be modified.
        stagingSiteURLPrefix - the url prefix for the server on the staging site
        stagingSitedirectory - the directory on the staging site, where the input data is read from and the output data written out.
        workerNodeDirectory - the directory in the worker node tmp
        Returns:
        boolean indicating whether job was successfully modified or not.