com.bigdata.service.jini.util
Class DumpFederation.ScheduledDumpTask
java.lang.Object
com.bigdata.service.jini.util.DumpFederation.ScheduledDumpTask
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- DumpFederation
public static class DumpFederation.ScheduledDumpTask
- extends Object
- implements Runnable
A task that produces dumps of the indices in the federation on a
scheduled basis. Often you will want to use two or more schedules since
much of the most interesting activity will occur when the application
first creates its indices and begins to write heavily on those indices.
Assuming a steady application write load, you may want to see the dump
for t0 (when the indices were first created so that you have a record of
where they were placed) and then at t+1m, t+2m, ... t+5m, and then at
t+10m, t+20m, ... t+50m, and then perhaps at t+1h, t+2h, ....
Schedules such as this are readily created by submitting one task for
each of the desired delay periods using
ScheduledExecutorService.scheduleWithFixedDelay(Runnable, long, long, java.util.concurrent.TimeUnit)
and specifying the maximum #of times that each task should run.
- Version:
- $Id$
- Author:
- Bryan Thompson
|
Method Summary |
void |
run()
Runs until nruns and then throws an exception to prevent
re-execution thereafter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DumpFederation.ScheduledDumpTask
public DumpFederation.ScheduledDumpTask(JiniFederation<?> fed,
String namespace,
int nruns,
File path,
String basename,
TimeUnit unit)
- Parameters:
fed - The connected federation.namespace - The namespace of the indices to be included in each
report.path - The path of the directory where the generated reports will
be written.nruns - The #of runs to make -or- zero to run until cancelled.basename - The basename of the file to be written for the generated
reports.unit - The reporting period. Use TimeUnit.MINUTES,
TimeUnit.HOURS or TimeUnit.DAYS to have
the dumped files labeled with the appropriate unit.
run
public void run()
- Runs until
nruns and then throws an exception to prevent
re-execution thereafter.
- Specified by:
run in interface Runnable
Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.