Class JobManager


  • public class JobManager
    extends java.lang.Object
    This is a data class that is used to store information about a jobmanager and the information that it reports about a remote pool.

    The various attributes that can be associated with the the server are displayed in the following table.

    Attribute NameAttribute Description
    url the url string pointing to the jobmanager.
    universe the VDS universe that is associated with this job. Can be transfer or vanilla or any other user defined type.
    jobamanager type remote scheduler type to which the jobmanager talks to.
    idle nodes the number of idle nodes on the remote resource.
    total nodes the total number of nodes on the remote resource.
    free memory the free memory.
    total memory the total memory
    jobs in queue the number of jobs in the queue on the remote scheduler.
    running jobs the number of jobs currently running on the remote site.
    max count the maximum number of jobs that can be run.
    max cpu time the max walltime for the jobs on the remote resource.
    os type/th> the operating system type of the remote machines to which the jobmanager talks to.
    architecture type the architecture type of the remote machines to which the jobmanager talks to.
    Version:
    $Revision$
    Author:
    Gaurang Mehta gmehta@isi.edu, Karan Vahi vahi@isi.edu
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ARCH_TYPE
      The constant to be passed to the accessor functions to get or set the architecture type of the remote machines to which the jobmanager talks to.
      static java.lang.String FORK_JOBMANAGER_TYPE
      The jobmanager type associated with the transfer jobs.
      static int FREE_MEM
      The constant to be passed to the accessor functions to get or set the free memory .
      static int GLOBUS_VERSION
      The constant to be passed to the accessor functions to get or set the globus version.
      static int IDLE_NODES
      The constant to be passed to the accessor functions to get or set the idle nodes.
      static int JOBMANAGER_TYPE
      The constant to be passed to the accessor functions to get or set the jobmanager type.
      static java.lang.String[] JOBMANAGERINFO
      Array storing the names of the attributes that are stored with the jobmanager.
      static int JOBS_IN_QUEUE
      The constant to be passed to the accessor functions to get or set the number of the jobs in the queue attribute.
      private java.lang.String mArchType
      The architecture type of the remote machines to which the jobmanager talks to.
      static int MAX_COUNT
      The constant to be passed to the accessor functions to get or set the maximum number of jobs that can be in the queue.
      static int MAX_CPU_TIME
      The constant to be passed to the accessor functions to get or set the maxwalltime for the jobs.
      private java.lang.String mFreeMem
      The free memory that the jobmanager reports.
      private java.lang.String mGlobusVersion
      The globus version that is installed on the remote site.
      private java.lang.String mIdleNodes
      The total number of idle nodes that the jobmanager reports are on the remote site.
      private java.lang.String mJobManagerType
      The type of remote scheduler to which the jobmanager talks to.
      private java.lang.String mJobsInQueue
      The number of jobs in the remote queue at the remote site.
      private java.lang.String mMaxCount
      The maximum number of jobs that can be running on the remote site.
      private java.lang.String mMaxCPUTime
      The max walltime of the jobs that are run on the remote site.
      private java.lang.String mOSType
      The operating system type type of the remote machines to which the jobmanager talks to.
      private java.lang.String mRunningJobs
      The number of jobs in the remote queue that are running at the remote site.
      private java.lang.String mTotalMem
      The total memory that the jobmanager reports.
      private java.lang.String mTotalNodes
      The total number of nodes that the jobmanager reports are on the remote site.
      private java.lang.String mUniverse
      The VDS universe with which the jobmanager is associated with.
      private java.lang.String mURL
      The url to the jobmanager on the remote site.
      static int OS_TYPE
      The constant to be passed to the accessor functions to get or set the operating system type of the remote machines to which the jobmanager talks to.
      static int RUNNING_JOBS
      The constant to be passed to the accessor functions to get or set the number of running jobs attribute.
      static int TOTAL_MEM
      The constant to be passed to the accessor functions to get or set the total memory.
      static int TOTAL_NODES
      The constant to be passed to the accessor functions to get or set the total number of nodes.
      static int UNIVERSE
      The constant to be passed to the accessor functions to get or set the universe.
      static int URL
      The constant to be passed to the accessor functions to get or set the url.
      static java.lang.String VANILLA_JOBMANAGER_TYPE
      The jobmanager type associated with the compute jobs.
    • Constructor Summary

      Constructors 
      Constructor Description
      JobManager()
      Default constructor for the class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Checks if an object is similar to the one referred to by this class.
      java.lang.String getInfo​(int key)
      Returns the attribute value of a particular attribute of the jobmanager.
      void setInfo​(int key, java.lang.String value)
      Sets an attribute associated with the jobmanager.
      java.lang.String toMultiLine()
      Returns the textual description of the contents of JobManager object in the multiline format.
      java.lang.String toString()
      Returns the textual description of the contents of JobManager object.
      java.lang.String toXML()
      Returns the XML description of the contents of JobManager object.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • JOBMANAGERINFO

        public static final java.lang.String[] JOBMANAGERINFO
        Array storing the names of the attributes that are stored with the jobmanager.
      • VANILLA_JOBMANAGER_TYPE

        public static final java.lang.String VANILLA_JOBMANAGER_TYPE
        The jobmanager type associated with the compute jobs.
        See Also:
        Constant Field Values
      • FORK_JOBMANAGER_TYPE

        public static final java.lang.String FORK_JOBMANAGER_TYPE
        The jobmanager type associated with the transfer jobs.
        See Also:
        Constant Field Values
      • URL

        public static final int URL
        The constant to be passed to the accessor functions to get or set the url.
        See Also:
        Constant Field Values
      • UNIVERSE

        public static final int UNIVERSE
        The constant to be passed to the accessor functions to get or set the universe.
        See Also:
        Constant Field Values
      • GLOBUS_VERSION

        public static final int GLOBUS_VERSION
        The constant to be passed to the accessor functions to get or set the globus version.
        See Also:
        Constant Field Values
      • JOBMANAGER_TYPE

        public static final int JOBMANAGER_TYPE
        The constant to be passed to the accessor functions to get or set the jobmanager type.
        See Also:
        Constant Field Values
      • IDLE_NODES

        public static final int IDLE_NODES
        The constant to be passed to the accessor functions to get or set the idle nodes.
        See Also:
        Constant Field Values
      • TOTAL_NODES

        public static final int TOTAL_NODES
        The constant to be passed to the accessor functions to get or set the total number of nodes.
        See Also:
        Constant Field Values
      • FREE_MEM

        public static final int FREE_MEM
        The constant to be passed to the accessor functions to get or set the free memory .
        See Also:
        Constant Field Values
      • TOTAL_MEM

        public static final int TOTAL_MEM
        The constant to be passed to the accessor functions to get or set the total memory.
        See Also:
        Constant Field Values
      • JOBS_IN_QUEUE

        public static final int JOBS_IN_QUEUE
        The constant to be passed to the accessor functions to get or set the number of the jobs in the queue attribute.
        See Also:
        Constant Field Values
      • RUNNING_JOBS

        public static final int RUNNING_JOBS
        The constant to be passed to the accessor functions to get or set the number of running jobs attribute.
        See Also:
        Constant Field Values
      • MAX_COUNT

        public static final int MAX_COUNT
        The constant to be passed to the accessor functions to get or set the maximum number of jobs that can be in the queue.
        See Also:
        Constant Field Values
      • MAX_CPU_TIME

        public static final int MAX_CPU_TIME
        The constant to be passed to the accessor functions to get or set the maxwalltime for the jobs.
        See Also:
        Constant Field Values
      • OS_TYPE

        public static final int OS_TYPE
        The constant to be passed to the accessor functions to get or set the operating system type of the remote machines to which the jobmanager talks to.
        See Also:
        Constant Field Values
      • ARCH_TYPE

        public static final int ARCH_TYPE
        The constant to be passed to the accessor functions to get or set the architecture type of the remote machines to which the jobmanager talks to.
        See Also:
        Constant Field Values
      • mTotalMem

        private java.lang.String mTotalMem
        The total memory that the jobmanager reports.
      • mFreeMem

        private java.lang.String mFreeMem
        The free memory that the jobmanager reports.
      • mTotalNodes

        private java.lang.String mTotalNodes
        The total number of nodes that the jobmanager reports are on the remote site.
      • mIdleNodes

        private java.lang.String mIdleNodes
        The total number of idle nodes that the jobmanager reports are on the remote site.
      • mMaxCount

        private java.lang.String mMaxCount
        The maximum number of jobs that can be running on the remote site.
      • mMaxCPUTime

        private java.lang.String mMaxCPUTime
        The max walltime of the jobs that are run on the remote site.
      • mJobsInQueue

        private java.lang.String mJobsInQueue
        The number of jobs in the remote queue at the remote site.
      • mRunningJobs

        private java.lang.String mRunningJobs
        The number of jobs in the remote queue that are running at the remote site.
      • mOSType

        private java.lang.String mOSType
        The operating system type type of the remote machines to which the jobmanager talks to.
      • mArchType

        private java.lang.String mArchType
        The architecture type of the remote machines to which the jobmanager talks to.
      • mJobManagerType

        private java.lang.String mJobManagerType
        The type of remote scheduler to which the jobmanager talks to.
      • mURL

        private java.lang.String mURL
        The url to the jobmanager on the remote site.
      • mUniverse

        private java.lang.String mUniverse
        The VDS universe with which the jobmanager is associated with.
      • mGlobusVersion

        private java.lang.String mGlobusVersion
        The globus version that is installed on the remote site.
    • Constructor Detail

      • JobManager

        public JobManager()
        Default constructor for the class.
    • Method Detail

      • setInfo

        public void setInfo​(int key,
                            java.lang.String value)
        Sets an attribute associated with the jobmanager.
        Parameters:
        key - the attribute key, which is one of the predefined keys.
        value - value of the attribute.
      • getInfo

        public java.lang.String getInfo​(int key)
        Returns the attribute value of a particular attribute of the jobmanager.
        Parameters:
        key - the key/attribute name.
        Returns:
        the attribute value
      • equals

        public boolean equals​(java.lang.Object o)
        Checks if an object is similar to the one referred to by this class. We compare the primary key to determine if it is the same or not.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - the object to be compared for equality.
        Returns:
        true if the primary key (url) match. else false.
      • toMultiLine

        public java.lang.String toMultiLine()
        Returns the textual description of the contents of JobManager object in the multiline format.
        Returns:
        the textual description in multiline format.
      • toString

        public java.lang.String toString()
        Returns the textual description of the contents of JobManager object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the textual description.
      • toXML

        public java.lang.String toXML()
        Returns the XML description of the contents of JobManager object.
        Returns:
        the xml description.