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 RERUN record, "R" record in PBS. | |
11 | * <p> | |
12 | * | |
13 | * An example from PBS accounting file is below | |
14 | * | |
15 | * <pre> | |
16 | * 01/01/2003 17:55:15;R;15312.head; | |
17 | * </pre> | |
18 | * | |
19 | * @author rmach@umich.edu | |
20 | * @version $Header: /cvsroot/pbsaccounting/pbsaccounting/src/umich/cac/pbs/RerunRecord.java,v 1.3 2003/10/21 19:07:59 rodmach Exp $ | |
21 | */ | |
22 | ||
23 | 3 | public class RerunRecord implements PbsRecordParser { |
24 | ||
25 | /** Logger instance */ | |
26 | 6 | private Logger logger = Logger.getLogger(RerunRecord.class.getName()); |
27 | ||
28 | /** | |
29 | * Return the XML representation of an R record, inside <rerun_record> | |
30 | * tags. | |
31 | * <p> | |
32 | * | |
33 | * @param rawfields | |
34 | * Array from PBS containing the rerun record (R record) | |
35 | * @return The rerun record converted to XML | |
36 | */ | |
37 | public String processRecord(String[] rawfields) { | |
38 | ||
39 | //This field | |
40 | 0 | Field rerunField = |
41 | new Field(FieldName.RERUN_FIELD, "rerun_record", FieldType.GENERIC); | |
42 | ||
43 | //The JOB ID | |
44 | 0 | Field jobIdField = |
45 | FieldFactory.getInstance().getField( | |
46 | FieldName.JOBID, | |
47 | rawfields[RecordPosition.JOB_ID]); | |
48 | 0 | rerunField.addChild(jobIdField); |
49 | ||
50 | //The DATE | |
51 | 0 | Field dateField = |
52 | FieldFactory.getInstance().getField( | |
53 | FieldName.DATE, | |
54 | rawfields[RecordPosition.DATE_TIME]); | |
55 | 0 | rerunField.addChild(dateField); |
56 | ||
57 | 0 | return rerunField.toXML(); |
58 | ||
59 | } | |
60 | ||
61 | } |
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |