Line | Hits | Source |
---|---|---|
1 | package umich.cac.pbs; | |
2 | ||
3 | import java.util.logging.Logger; | |
4 | ||
5 | import umich.cac.data.Field; | |
6 | import umich.cac.data.FieldName; | |
7 | import umich.cac.data.FieldType; | |
8 | ||
9 | /** | |
10 | * Process the Checkpoint Restart record, "T" record in PBS. | |
11 | * <p> | |
12 | * | |
13 | * An example from PBS accounting file is below | |
14 | * | |
15 | * <pre> | |
16 | * 10/30/2002 15:59:46;T;13195.head; | |
17 | * </pre> | |
18 | * | |
19 | * @author rmach@umich.edu | |
20 | * @version $Header: /cvsroot/pbsaccounting/pbsaccounting/src/umich/cac/pbs/CheckpointRestartRecord.java,v 1.3 2003/10/21 19:07:59 rodmach Exp $ | |
21 | */ | |
22 | ||
23 | 3 | public class CheckpointRestartRecord implements PbsRecordParser { |
24 | ||
25 | /** Logger instance */ | |
26 | 3 | private Logger logger = |
27 | 3 | Logger.getLogger(CheckpointRestartRecord.class.getName()); |
28 | ||
29 | /** | |
30 | * Return the XML representation of an T record, inside | |
31 | * <checkpoint_restart_record> tags. | |
32 | * <p> | |
33 | * | |
34 | * @param rawfields | |
35 | * Array from PBS containing the checkpoint restart record (T | |
36 | * record) | |
37 | * @return The record converted to XML | |
38 | */ | |
39 | public String processRecord(String[] rawfields) { | |
40 | ||
41 | //This field | |
42 | 0 | Field checkpointRestartField = |
43 | new Field( | |
44 | FieldName.CHECKPOINT_RESTART_FIELD, | |
45 | "checkpoint_restart_record", | |
46 | FieldType.GENERIC); | |
47 | ||
48 | //The JOB ID | |
49 | 0 | Field jobIdField = |
50 | FieldFactory.getInstance().getField( | |
51 | FieldName.JOBID, | |
52 | rawfields[RecordPosition.JOB_ID]); | |
53 | 0 | checkpointRestartField.addChild(jobIdField); |
54 | ||
55 | //The DATE | |
56 | 0 | Field dateField = |
57 | FieldFactory.getInstance().getField( | |
58 | FieldName.DATE, | |
59 | rawfields[RecordPosition.DATE_TIME]); | |
60 | 0 | checkpointRestartField.addChild(dateField); |
61 | ||
62 | 0 | return checkpointRestartField.toXML(); |
63 | ||
64 | } | |
65 | ||
66 | } |
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |