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