edu.isi.pegasus.planner.invocation
Class InvocationRecord

java.lang.Object
  extended by org.griphyn.vdl.Chimera
      extended by edu.isi.pegasus.planner.invocation.Invocation
          extended by edu.isi.pegasus.planner.invocation.InvocationRecord
All Implemented Interfaces:
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: 2587 $
Author:
Jens-S. Vöckler, Yong Zhao
See Also:
Serialized Form

Field Summary
private  WorkingDir m_cwd
          Working directory at startup.
private  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  String m_group
          symbolical group name of the effective user.
private  InetAddress m_hostaddr
          host address where gridlaunch ran (primary interface).
private  String m_hostname
          Symbolic hostname where gridlaunch ran (primary interface).
private  String m_interface
          Symbolic name of primary interface we used to determine host-name and -address.
private  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  String m_resource
          Resource, site or pool at which the jobs was run.
private  Date m_start
          start of gridlaunch timestamp.
private  List m_stat
          Array with stat() and fstat() information about various files.
private  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  String m_user
          symbolical user name of the effective user.
private  String m_version
          protocol version information.
private  String m_wf_label
          Workflow label, currently optional?
private  Date m_wf_stamp
          Workflow timestamp to make the label more unique.
static String SCHEMA_LOCATION
          The "not-so-official" location URL of the invocation record definition.
static String SCHEMA_NAMESPACE
          The "official" namespace URI of the invocation record schema.
 
Constructor Summary
InvocationRecord()
          Default c'tor: Construct a hollow shell and allow further information to be added later.
 
Method Summary
 void addJob(int index, Job job)
          Accessor: Inserts a Job into a specific position of the job list.
 void addJob(Job job)
          Accessor: Appends a job to the list of jobs.
 void addStatCall(int index, StatCall stat)
          Accessor: Inserts a StatCall into a specific position of the stat list.
 void addStatCall(StatCall stat)
          Accessor: Appends a stat to the list of stats.
 Architecture getArchitecture()
          Accessor
 String getDerivation()
          Accessor
 double getDuration()
          Accessor
 Environment getEnvironment()
          Accessor
 int getGID()
          Accessor
 String getGroup()
          Accessor
 InetAddress getHostAddress()
          Accessor
 String getHostname()
          Accessor
 String getInterface()
          Accessor.
 Job getJob(int index)
          Accessor: Obtains a job at a certain position in the job list.
 int getJobCount()
          Accessor: Obtains the size of the job list.
 List getJobList()
          Accessor: Gets an array of all values that constitute the current content.
 Machine getMachine()
          Accessor.
 long getPhysicalMemory()
          Accessor.
 int getPID()
          Accessor
 String getResource()
          Accessor
 Date getStart()
          Accessor
 StatCall getStatCall(int index)
          Accessor: Obtains a stat at a certain position in the stat list.
 int getStatCount()
          Accessor: Obtains the size of the stat list.
 List getStatList()
          Accessor: Gets an array of all values that constitute the current content.
 String getTransformation()
          Accessor
 int getUID()
          Accessor
 int getUMask()
          Accessor
 Usage getUsage()
          Accessor
 String getUser()
          Accessor
 String getVersion()
          Accessor
 String getWorkflowLabel()
          Accessor
 Date getWorkflowTimestamp()
          Accessor
 WorkingDir getWorkingDirectory()
          Accessor
 Iterator iterateJob()
          Accessor: Enumerates the internal values that constitute the content of the job list.
 Iterator iterateStatCall()
          Accessor: Enumerates the internal values that constitute the content of the stat list.
 ListIterator listIterateJob()
          Accessor: Enumerates the internal values that constitute the content of the job list.
 ListIterator listIterateStatCall()
          Accessor: Enumerates the internal values that constitute the content of the stat list.
 void removeAllJob()
          Accessor: Removes all values from the job list.
 void removeAllStatCall()
          Accessor: Removes all values from the stat list.
 Job removeJob(int index)
          Accessor: Removes a specific job from the job list.
 StatCall removeStatCall(int index)
          Accessor: Removes a specific stat from the stat list.
 void setArchitecture(Architecture uname)
          Accessor.
 void setDerivation(String derivation)
          Accessor.
 void setDuration(double duration)
          Accessor.
 void setEnvironment(Environment environment)
          Accessor.
 void setGID(int gid)
          Accessor.
 void setGroup(String group)
          Accessor.
 void setHostAddress(InetAddress hostaddr)
          Accessor.
 void setHostname(String hostname)
          Accessor.
 void setInterface(String p_interface)
          Accessor.
 void setJob(Collection jobs)
          Accessor: Overwrites internal list with an external list representing jobs.
 void setJob(int index, Job job)
          Accessor: Overwrites a job at a certain position.
 void setMachine(Machine machine)
          Accessor.
 void setPhysicalMemory(long pmem)
          Accessor.
 void setPID(int pid)
          Accessor.
 void setResource(String resource)
          Accessor.
 void setStart(Date start)
          Accessor.
 void setStatCall(Collection stats)
          Accessor: Overwrites internal list with an external list representing stats.
 void setStatCall(int index, StatCall stat)
          Accessor: Overwrites a stat at a certain position.
 void setTransformation(String transformation)
          Accessor.
 void setUID(int uid)
          Accessor.
 void setUMask(int umask)
          Accessor.
 void setUsage(Usage usage)
          Accessor.
 void setUser(String user)
          Accessor.
 void setVersion(String version)
          Accessor.
 void setWorkflowLabel(String label)
          Accessor.
 void setWorkflowTimestamp(Date stamp)
          Accessor.
 void setWorkingDirectory(String cwd)
          Accessor.
 void setWorkingDirectory(WorkingDir cwd)
          Accessor.
 void toString(Writer stream)
          Converts the active state into something meant for human consumption.
 void toXML(Writer stream, String indent, String namespace)
          Dump the state of the current element as XML output.
 void writeXMLHeader(Writer stream, String indent, String namespace)
          Writes the header of the XML output.
 
Methods inherited from class org.griphyn.vdl.Chimera
escape, quote, toString, toXML, toXML, writeAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SCHEMA_NAMESPACE

public static final String SCHEMA_NAMESPACE
The "official" namespace URI of the invocation record schema.

See Also:
Constant Field Values

SCHEMA_LOCATION

public static final String SCHEMA_LOCATION
The "not-so-official" location URL of the invocation record definition.

See Also:
Constant Field Values

m_version

private String m_version
protocol version information.


m_start

private Date m_start
start of gridlaunch timestamp.


m_duration

private double m_duration
total duration of call.


m_transformation

private String m_transformation
Name of the: Transformation that produced this invocation.


m_derivation

private 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 InetAddress m_hostaddr
host address where gridlaunch ran (primary interface).


m_hostname

private String m_hostname
Symbolic hostname where gridlaunch ran (primary interface).


m_interface

private 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 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 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 List m_job
Job records: prejob, main job, postjob


m_stat

private List m_stat
Array with stat() and fstat() information about various files.


m_resource

private String m_resource
Resource, site or pool at which the jobs was run.


m_wf_label

private String m_wf_label
Workflow label, currently optional?


m_wf_stamp

private 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()

getVersion

public String getVersion()
Accessor

See Also:
setVersion(String)

setVersion

public void setVersion(String version)
Accessor.

Parameters:
version -
See Also:
getVersion()

getStart

public Date getStart()
Accessor

See Also:
setStart(Date)

setStart

public void setStart(Date start)
Accessor.

Parameters:
start -
See Also:
getStart()

getDuration

public double getDuration()
Accessor

See Also:
setDuration(double)

setDuration

public void setDuration(double duration)
Accessor.

Parameters:
duration -
See Also:
getDuration()

setMachine

public void setMachine(Machine machine)
Accessor.

Parameters:
machine -
See Also:
getMachine()

getMachine

public Machine getMachine()
Accessor.

Returns:
machine
See Also:
#setMachine(org.griphyn.vdl.invocation.Machine)

getTransformation

public String getTransformation()
Accessor

See Also:
setTransformation(String)

setTransformation

public void setTransformation(String transformation)
Accessor.

Parameters:
transformation -
See Also:
getTransformation()

getDerivation

public String getDerivation()
Accessor

See Also:
setDerivation(String)

setDerivation

public void setDerivation(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()

getHostAddress

public InetAddress getHostAddress()
Accessor

See Also:
setHostAddress(InetAddress)

setHostAddress

public void setHostAddress(InetAddress hostaddr)
Accessor.

Parameters:
hostaddr -
See Also:
getHostAddress()

getHostname

public String getHostname()
Accessor

See Also:
setHostname(String)

setHostname

public void setHostname(String hostname)
Accessor.

Parameters:
hostname -
See Also:
getHostname()

getInterface

public String getInterface()
Accessor.

See Also:
setInterface(String)

setInterface

public void setInterface(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 String getUser()
Accessor

See Also:
setUser(String)

setUser

public void setUser(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 String getGroup()
Accessor

See Also:
setGroup(String)

setGroup

public void setGroup(String group)
Accessor.

Parameters:
group -
See Also:
getGroup()

getUsage

public Usage getUsage()
Accessor

See Also:
setUsage(Usage)

setUsage

public void setUsage(Usage usage)
Accessor.

Parameters:
usage -
See Also:
getUsage()

getArchitecture

public Architecture getArchitecture()
Accessor

See Also:
setArchitecture(Architecture)

setArchitecture

public void setArchitecture(Architecture uname)
Accessor.

Parameters:
uname -
See Also:
getArchitecture()

getResource

public String getResource()
Accessor

See Also:
setResource( String )

setResource

public void setResource(String resource)
Accessor.

Parameters:
resource -
See Also:
getResource()

getWorkflowLabel

public String getWorkflowLabel()
Accessor

See Also:
setWorkflowLabel( String )

setWorkflowLabel

public void setWorkflowLabel(String label)
Accessor.

Parameters:
label -
See Also:
getWorkflowLabel()

getWorkflowTimestamp

public Date getWorkflowTimestamp()
Accessor

See Also:
setWorkflowTimestamp( Date )

setWorkflowTimestamp

public void setWorkflowTimestamp(Date stamp)
Accessor.

Parameters:
stamp -
See Also:
getResource()

getEnvironment

public Environment getEnvironment()
Accessor

See Also:
setEnvironment(Environment)

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 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:
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 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 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 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 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:
IndexOutOfBoundsException - if the position pointed to is invalid.

setJob

public void setJob(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 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:
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 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 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 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 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:
IndexOutOfBoundsException - if the position pointed to is invalid.

setStatCall

public void setStatCall(Collection stats)
Accessor: Overwrites internal list with an external list representing stats.

Parameters:
stats - is the external list of stat to overwrite with.

getWorkingDirectory

public WorkingDir getWorkingDirectory()
Accessor

See Also:
setWorkingDirectory(WorkingDir), setWorkingDirectory(String)

setWorkingDirectory

public void setWorkingDirectory(String cwd)
Accessor.

Parameters:
cwd -
See Also:
getWorkingDirectory(), setWorkingDirectory(WorkingDir)

setWorkingDirectory

public void setWorkingDirectory(WorkingDir cwd)
Accessor.

Parameters:
cwd -
See Also:
getWorkingDirectory(), setWorkingDirectory(String)

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(Writer stream)
              throws 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:
IOException - if something fishy happens to the stream.

writeXMLHeader

public void writeXMLHeader(Writer stream,
                           String indent,
                           String namespace)
                    throws 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:
IOException - if something fishy happens to the stream.

toXML

public void toXML(Writer stream,
                  String indent,
                  String namespace)
           throws 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:
IOException - if something fishy happens to the stream.
See Also:
BufferedWriter


Copyright © 2011 The University of Southern California. All Rights Reserved.