Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

I create a temporary data strcuture ,each time the scoreboarding function is called in JKFlow.pm for a particular flowflile and then for a particular direction , and store the values of $ref->{aggdata}{tuplevalues} as well as certain other important variables representing the state of scoreboard including the $ref-> {count}, $ref->{startperiod}and $ref->{counter} in that data strcuture. It is then marshalled and written to disk using the a module written in C called Storable. The technique i explained on this page

...

This is the top level of the score directory for the 'USATLAS Computing Farm - CERN' direction. There are four checkpoints in this directory. The starting number before the checkpoint is the duration in minutes of the report-type (as defined in JKFlow.xml) for this checkpoint. Thus 1440checkpoint.dat is the checkpoint for the daily aggregate report type and 360checkpoint.dat is the checkpoint for the six-hourly report.

Loading the Checkpoints

The checkpoints only need to be loaded at the start of the program run. For this purpose I have a variable called FIRSTTIME which has module-wide visibility for all objects of JKFlow. THe value of this variable is default to 0 and set to 1 after the first flow-file has been processed. Thus I can load the checkpoint (if present) for the first run of the program.

Once I know that I am in the first run of the program I first check whether a checkpoint is available for the particular type of report. If it is available then I recover the values using the retreive function of the Storable module. Then there are some checks for determining whether this is a valid checkpoint i.e.

  • the checkpoint is after the start-time of the current report.
  • the checkpoint is not after the end time of the current report.