umich.cac.xml
Class PbsToGrid

java.lang.Object
  extended byumich.cac.xml.PbsToGrid

public class PbsToGrid
extends java.lang.Object

Converts PBS XML file to UsageRecord GGF WG format. Before the conversion is done this program will insert two elements: /pbs_jobfile/ppn -- the number of processors on each node. /pbs_jobfile/machine_name -- the name of the machine. This should be the same as the URWG MachineName element.

Additionally, the timestamps will be converted from epoch time to xsd:dateTime format. This is done for the elements: ctime, etime, qtime, start, end. Each of these elements will be restructured as: <time_element>/epoch -- The value in epoch time <time_element>/datetime -- the value in xsd:dateTime format.

Further, the <nodegroup> elements will have an extra attribute added called 'processors' which is the product of the numnodes attribute and ppn (the attribute or the default value if the attribute is not present).

Note this borrowed heavily from PbsToJoblog.java. The usage is

 java umich.cac.xml.PbsToGrid <pbs xml file> <output file>
 <machine name> <ppn>
 

Version:
$Header: /cvsroot/pbsaccounting/pbsaccounting/doc/javadoc/umich/cac/xml/PbsToGrid.html,v 1.2 2003/10/21 20:33:48 rodmach Exp $
Author:
devink@sdsc.edu

Constructor Summary
PbsToGrid()
           
 
Method Summary
 void convertToGrid()
           
 org.w3c.dom.Document getOutput()
           
static void main(java.lang.String[] args)
          Main.
 void setInputDOM(org.w3c.dom.Document doc)
           
 boolean setInputFile(java.lang.String xmlFile)
           
 void setMachineName(java.lang.String name)
           
 void setPPN(int ppn)
           
static void usage()
          Prints the usage to STDOUT and exits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PbsToGrid

public PbsToGrid()
Method Detail

usage

public static void usage()
Prints the usage to STDOUT and exits


setPPN

public void setPPN(int ppn)

setMachineName

public void setMachineName(java.lang.String name)

setInputFile

public boolean setInputFile(java.lang.String xmlFile)

setInputDOM

public void setInputDOM(org.w3c.dom.Document doc)

getOutput

public org.w3c.dom.Document getOutput()

main

public static void main(java.lang.String[] args)
Main. Usage is
 java umich.cac.xml.PbsToGrid  
 

Parameters:
args - argument one is XML file, argument two is output file

convertToGrid

public void convertToGrid()
                   throws javax.xml.transform.TransformerException
Throws:
javax.xml.transform.TransformerException