Class InvocationRecord

  • All Implemented Interfaces:
    java.io.Serializable

    public class InvocationRecord
    extends Invocation
    This class is the container for an invocation record. The record itself contains information about the job or jobs that ran, the total usage, and information about central files that were used.
    Version:
    $Revision$
    Author:
    Jens-S. Vöckler, Yong Zhao
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private WorkingDir m_cwd
      Working directory at startup.
      private java.lang.String m_derivation
      Name of the Derivation that produced this invocation.
      private double m_duration
      total duration of call.
      private Environment m_environment
      Environment settings.
      private int m_gid
      numerical group id of the effective user.
      private java.lang.String m_group
      symbolical group name of the effective user.
      private java.net.InetAddress m_hostaddr
      host address where gridlaunch ran (primary interface).
      private java.lang.String m_hostname
      Symbolic hostname where gridlaunch ran (primary interface).
      private java.lang.String m_interface
      Symbolic name of primary interface we used to determine host-name and -address.
      private java.util.List m_job
      Job records: prejob, main job, postjob
      private Machine m_machine
      The Machine object capturing machine information.
      private int m_pid
      process id of gridlaunch itself.
      private long m_pmem
      Records the physical memory on the remote machine, if available.
      private java.lang.String m_resource
      Resource, site or pool at which the jobs was run.
      private java.util.Date m_start
      start of gridlaunch timestamp.
      private java.util.List m_stat
      Array with stat() and fstat() information about various files.
      private java.lang.String m_transformation
      Name of the: Transformation that produced this invocation.
      private int m_uid
      numerical user id of the effective user.
      private int m_umask
      Currently active umask while kickstart was executing.
      private Architecture m_uname
      Architectural information.
      private Usage m_usage
      Total resource consumption by gridlaunch and all siblings.
      private java.lang.String m_user
      symbolical user name of the effective user.
      private java.lang.String m_version
      protocol version information.
      private java.lang.String m_wf_label
      Workflow label, currently optional?
      private java.util.Date m_wf_stamp
      Workflow timestamp to make the label more unique.
      static java.lang.String SCHEMA_LOCATION
      The "not-so-official" location URL of the invocation record definition.
      static java.lang.String SCHEMA_NAMESPACE
      The "official" namespace URI of the invocation record schema.
    • Constructor Summary

      Constructors 
      Constructor Description
      InvocationRecord()
      Default c'tor: Construct a hollow shell and allow further information to be added later.
    • Field Detail

      • SCHEMA_NAMESPACE

        public static final java.lang.String SCHEMA_NAMESPACE
        The "official" namespace URI of the invocation record schema.
        See Also:
        Constant Field Values
      • SCHEMA_LOCATION

        public static final java.lang.String SCHEMA_LOCATION
        The "not-so-official" location URL of the invocation record definition.
        See Also:
        Constant Field Values
      • m_version

        private java.lang.String m_version
        protocol version information.
      • m_start

        private java.util.Date m_start
        start of gridlaunch timestamp.
      • m_duration

        private double m_duration
        total duration of call.
      • m_transformation

        private java.lang.String m_transformation
        Name of the: Transformation that produced this invocation.
      • m_derivation

        private java.lang.String m_derivation
        Name of the Derivation that produced this invocation.
      • m_pmem

        private long m_pmem
        Records the physical memory on the remote machine, if available.
      • m_pid

        private int m_pid
        process id of gridlaunch itself.
      • m_hostaddr

        private java.net.InetAddress m_hostaddr
        host address where gridlaunch ran (primary interface).
      • m_hostname

        private java.lang.String m_hostname
        Symbolic hostname where gridlaunch ran (primary interface).
      • m_interface

        private java.lang.String m_interface
        Symbolic name of primary interface we used to determine host-name and -address.
      • m_uid

        private int m_uid
        numerical user id of the effective user.
      • m_user

        private java.lang.String m_user
        symbolical user name of the effective user.
      • m_gid

        private int m_gid
        numerical group id of the effective user.
      • m_group

        private java.lang.String m_group
        symbolical group name of the effective user.
      • m_cwd

        private WorkingDir m_cwd
        Working directory at startup.
      • m_uname

        private Architecture m_uname
        Architectural information.
      • m_usage

        private Usage m_usage
        Total resource consumption by gridlaunch and all siblings.
      • m_job

        private java.util.List m_job
        Job records: prejob, main job, postjob
      • m_stat

        private java.util.List m_stat
        Array with stat() and fstat() information about various files.
      • m_resource

        private java.lang.String m_resource
        Resource, site or pool at which the jobs was run.
      • m_wf_label

        private java.lang.String m_wf_label
        Workflow label, currently optional?
      • m_wf_stamp

        private java.util.Date m_wf_stamp
        Workflow timestamp to make the label more unique.
      • m_environment

        private Environment m_environment
        Environment settings.
      • m_umask

        private int m_umask
        Currently active umask while kickstart was executing. This is available with new kickstart, older version will have -1 at this API point.
      • m_machine

        private Machine m_machine
        The Machine object capturing machine information.
    • Constructor Detail

      • InvocationRecord

        public InvocationRecord()
        Default c'tor: Construct a hollow shell and allow further information to be added later.
    • Method Detail

      • getUMask

        public int getUMask()
        Accessor
        See Also:
        setUMask(int)
      • setUMask

        public void setUMask​(int umask)
        Accessor.
        Parameters:
        umask -
        See Also:
        getUMask()
      • setVersion

        public void setVersion​(java.lang.String version)
        Accessor.
        Parameters:
        version -
        See Also:
        getVersion()
      • getStart

        public java.util.Date getStart()
        Accessor
        See Also:
        setStart(Date)
      • setStart

        public void setStart​(java.util.Date start)
        Accessor.
        Parameters:
        start -
        See Also:
        getStart()
      • setDuration

        public void setDuration​(double duration)
        Accessor.
        Parameters:
        duration -
        See Also:
        getDuration()
      • setMachine

        public void setMachine​(Machine machine)
        Accessor.
        Parameters:
        machine -
        See Also:
        getMachine()
      • setTransformation

        public void setTransformation​(java.lang.String transformation)
        Accessor.
        Parameters:
        transformation -
        See Also:
        getTransformation()
      • setDerivation

        public void setDerivation​(java.lang.String derivation)
        Accessor.
        Parameters:
        derivation -
        See Also:
        getDerivation()
      • getPID

        public int getPID()
        Accessor
        See Also:
        setPID(int)
      • setPID

        public void setPID​(int pid)
        Accessor.
        Parameters:
        pid -
        See Also:
        getPID()
      • setHostAddress

        public void setHostAddress​(java.net.InetAddress hostaddr)
        Accessor.
        Parameters:
        hostaddr -
        See Also:
        getHostAddress()
      • setHostname

        public void setHostname​(java.lang.String hostname)
        Accessor.
        Parameters:
        hostname -
        See Also:
        getHostname()
      • setInterface

        public void setInterface​(java.lang.String p_interface)
        Accessor.
        Parameters:
        p_interface -
        See Also:
        getInterface()
      • getUID

        public int getUID()
        Accessor
        See Also:
        setUID(int)
      • setUID

        public void setUID​(int uid)
        Accessor.
        Parameters:
        uid -
        See Also:
        getUID()
      • getUser

        public java.lang.String getUser()
        Accessor
        See Also:
        setUser(String)
      • setUser

        public void setUser​(java.lang.String user)
        Accessor.
        Parameters:
        user -
        See Also:
        getUser()
      • getGID

        public int getGID()
        Accessor
        See Also:
        setGID(int)
      • setGID

        public void setGID​(int gid)
        Accessor.
        Parameters:
        gid -
        See Also:
        getGID()
      • getGroup

        public java.lang.String getGroup()
        Accessor
        See Also:
        setGroup(String)
      • setGroup

        public void setGroup​(java.lang.String group)
        Accessor.
        Parameters:
        group -
        See Also:
        getGroup()
      • setUsage

        public void setUsage​(Usage usage)
        Accessor.
        Parameters:
        usage -
        See Also:
        getUsage()
      • setResource

        public void setResource​(java.lang.String resource)
        Accessor.
        Parameters:
        resource -
        See Also:
        getResource()
      • setWorkflowLabel

        public void setWorkflowLabel​(java.lang.String label)
        Accessor.
        Parameters:
        label -
        See Also:
        getWorkflowLabel()
      • setWorkflowTimestamp

        public void setWorkflowTimestamp​(java.util.Date stamp)
        Accessor.
        Parameters:
        stamp -
        See Also:
        getResource()
      • setEnvironment

        public void setEnvironment​(Environment environment)
        Accessor.
        Parameters:
        environment -
        See Also:
        getEnvironment()
      • addJob

        public void addJob​(Job job)
        Accessor: Appends a job to the list of jobs.
        Parameters:
        job - is the job to append to the list.
      • addJob

        public void addJob​(int index,
                           Job job)
        Accessor: Inserts a Job into a specific position of the job list.
        Parameters:
        index - is the position to insert the item into
        job - is the job to insert into the list.
      • getJob

        public Job getJob​(int index)
                   throws java.lang.IndexOutOfBoundsException
        Accessor: Obtains a job at a certain position in the job list.
        Parameters:
        index - is the position in the list to obtain a job from
        Returns:
        the job at that position.
        Throws:
        java.lang.IndexOutOfBoundsException - if the index points to an element in the list that does not contain any elments.
      • getJobCount

        public int getJobCount()
        Accessor: Obtains the size of the job list.
        Returns:
        number of elements that an external array needs to be sized to.
      • getJobList

        public java.util.List getJobList()
        Accessor: Gets an array of all values that constitute the current content. This list is read-only.
        Returns:
        a list of jobs.
      • iterateJob

        public java.util.Iterator iterateJob()
        Accessor: Enumerates the internal values that constitute the content of the job list.
        Returns:
        an iterator to walk the list with.
      • listIterateJob

        public java.util.ListIterator listIterateJob()
        Accessor: Enumerates the internal values that constitute the content of the job list.
        Returns:
        a list iterator to walk the list with.
      • removeAllJob

        public void removeAllJob()
        Accessor: Removes all values from the job list.
      • removeJob

        public Job removeJob​(int index)
        Accessor: Removes a specific job from the job list.
        Parameters:
        index - is the position at which an element is to be removed.
        Returns:
        the job that was removed.
      • setJob

        public void setJob​(int index,
                           Job job)
                    throws java.lang.IndexOutOfBoundsException
        Accessor: Overwrites a job at a certain position.
        Parameters:
        index - position to overwrite an elment in.
        job - is the Job to replace with.
        Throws:
        java.lang.IndexOutOfBoundsException - if the position pointed to is invalid.
      • setJob

        public void setJob​(java.util.Collection jobs)
        Accessor: Overwrites internal list with an external list representing jobs.
        Parameters:
        jobs - is the external list of job to overwrite with.
      • addStatCall

        public void addStatCall​(StatCall stat)
        Accessor: Appends a stat to the list of stats.
        Parameters:
        stat - is the stat to append to the list.
      • addStatCall

        public void addStatCall​(int index,
                                StatCall stat)
        Accessor: Inserts a StatCall into a specific position of the stat list.
        Parameters:
        index - is the position to insert the item into
        stat - is the stat to insert into the list.
      • getStatCall

        public StatCall getStatCall​(int index)
                             throws java.lang.IndexOutOfBoundsException
        Accessor: Obtains a stat at a certain position in the stat list.
        Parameters:
        index - is the position in the list to obtain a stat from
        Returns:
        the stat at that position.
        Throws:
        java.lang.IndexOutOfBoundsException - if the index points to an element in the list that does not contain any elments.
      • getStatCount

        public int getStatCount()
        Accessor: Obtains the size of the stat list.
        Returns:
        number of elements that an external array needs to be sized to.
      • getStatList

        public java.util.List getStatList()
        Accessor: Gets an array of all values that constitute the current content. This list is read-only.
        Returns:
        a list of stats.
      • iterateStatCall

        public java.util.Iterator iterateStatCall()
        Accessor: Enumerates the internal values that constitute the content of the stat list.
        Returns:
        an iterator to walk the list with.
      • listIterateStatCall

        public java.util.ListIterator listIterateStatCall()
        Accessor: Enumerates the internal values that constitute the content of the stat list.
        Returns:
        a list iterator to walk the list with.
      • removeAllStatCall

        public void removeAllStatCall()
        Accessor: Removes all values from the stat list.
      • removeStatCall

        public StatCall removeStatCall​(int index)
        Accessor: Removes a specific stat from the stat list.
        Parameters:
        index - is the position at which an element is to be removed.
        Returns:
        the stat that was removed.
      • setStatCall

        public void setStatCall​(int index,
                                StatCall stat)
                         throws java.lang.IndexOutOfBoundsException
        Accessor: Overwrites a stat at a certain position.
        Parameters:
        index - position to overwrite an elment in.
        stat - is the StatCall to replace with.
        Throws:
        java.lang.IndexOutOfBoundsException - if the position pointed to is invalid.
      • setStatCall

        public void setStatCall​(java.util.Collection stats)
        Accessor: Overwrites internal list with an external list representing stats.
        Parameters:
        stats - is the external list of stat to overwrite with.
      • getPhysicalMemory

        public long getPhysicalMemory()
        Accessor.
        Returns:
        the recorded physical memory in byte, or -1 if not available.
        See Also:
        setPhysicalMemory( long )
      • setPhysicalMemory

        public void setPhysicalMemory​(long pmem)
        Accessor.
        Parameters:
        pmem -
        See Also:
        getPhysicalMemory()
      • toString

        public void toString​(java.io.Writer stream)
                      throws java.io.IOException
        Converts the active state into something meant for human consumption. The method will be called when recursively traversing the instance tree.
        Specified by:
        toString in class org.griphyn.vdl.Chimera
        Parameters:
        stream - is a stream opened and ready for writing. This can also be a string stream for efficient output.
        Throws:
        java.io.IOException - if something fishy happens to the stream.
      • writeXMLHeader

        public void writeXMLHeader​(java.io.Writer stream,
                                   java.lang.String indent,
                                   java.lang.String namespace)
                            throws java.io.IOException
        Writes the header of the XML output. The output contains the special strings to start an XML document, some comments, and the root element. The latter points to the XML schema via XML Instances.
        Parameters:
        stream - is a stream opened and ready for writing. This can also be a string stream for efficient output.
        indent - is a String of spaces used for pretty printing. The initial amount of spaces should be an empty string. The parameter is used internally for the recursive traversal.
        namespace - is the XML schema namespace prefix. If neither empty nor null, each element will be prefixed with this prefix, and the root element will map the XML namespace.
        Throws:
        java.io.IOException - if something fishy happens to the stream.
      • toXML

        public void toXML​(java.io.Writer stream,
                          java.lang.String indent,
                          java.lang.String namespace)
                   throws java.io.IOException
        Dump the state of the current element as XML output. This function traverses all sibling classes as necessary, and converts the data into pretty-printed XML output. The stream interface should be able to handle large output efficiently.
        Specified by:
        toXML in class org.griphyn.vdl.Chimera
        Parameters:
        stream - is a stream opened and ready for writing. This can also be a string stream for efficient output.
        indent - is a String of spaces used for pretty printing. The initial amount of spaces should be an empty string. The parameter is used internally for the recursive traversal.
        namespace - is the XML schema namespace prefix. If neither empty nor null, each element will be prefixed with this prefix, and the root element will map the XML namespace.
        Throws:
        java.io.IOException - if something fishy happens to the stream.
        See Also:
        BufferedWriter