com.bigdata.counters.query
Class CounterSetQuery
java.lang.Object
com.bigdata.counters.query.CounterSetQuery
public class CounterSetQuery
- extends Object
Utility to extract a batch of performance counters from a collection of
logged XML counter set files. This utility accepts file(s) giving the URLs
which would be used to demand the corresponding performance counters against
the live bigdata federation. The URLs listed in that file are parsed. The
host and port information are ignored, but the URL query parameters are
extracted and used to configured a set of URLQueryModels.
A single pass is made through the specified XML counter set files. Each file
is read into memory by itself, and each query implied by a listed URL is run
against the in-memory CounterSet hierarchy. The results are collected
in independent CounterSet provisioned for the specified reporting
units, etc. Once the last XML counter set file has been processed, the
various reports requested by the listed URLs are generated.
For each generated report, the name of the file on which the report will be
written is taken from the name of the counter whose value was extracted for
that report. This filename may be overridden by including the URL query
parameter , which specifies the file on which to
write the report for that query.
- Version:
- $Id: CounterSetQuery.java 4702 2011-06-13 16:25:38Z thompsonbry $
- Author:
- Bryan Thompson
- See Also:
IHostCounters,
IRequiredHostCounters- TODO:
- When rendering HTML output using flot, the flot resources need to be
available in order to view the graphs. They should be written once into
the output directory and the links in the (X)HTML output should resolve
them there., Permit nsamples to be specified in units of minutes, hours, days. E.g.,
3d would be 3 days., Performance for long runs could be improved if we use more efficient
classes for mutable strings in
XMLUtility and perhaps
CounterSet. E.g., mg4j mutable string or
http://javolution.org/.
|
Method Summary |
static void |
main(String[] args)
Utility class for running extracting data from performance counter dumps
and running various kinds of reports on those data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CounterSetQuery
public CounterSetQuery()
main
public static void main(String[] args)
throws IOException,
SAXException,
ParserConfigurationException,
InterruptedException,
ExecutionException
- Utility class for running extracting data from performance counter dumps
and running various kinds of reports on those data.
Usage:
- -outputDir
- The output directory (default is the current working directory).
- -mimeType
- The default MIME type for the rendered reports. The default is
text/plain, but can be overridden on a query by query basis
using URLQueryModel.MIMETYPE.
- -nsamples
- Override for the default #of history samples to be retained. It is an
error if there are more distinct samples in the processed XML counter set
files (that is, if the #of time periods sampled exceeds this many
samples). If there are fewer, then some internal arrays will be
dimensioned larger than is otherwise necessary.
- -events <file>
- A file containing tab-delimited
Events. The Events
are not required for simple performance counter views.
- -queries <file>
- A file, or directory of files, containing a list of URLs, each of
which is interpreted as a
URLQueryModel.
- <file>(s)
- One or more XML counter set files or directories containing such
files. All such files will be processed before the reports are generated.
- Parameters:
args - Command line arguments.
- Throws:
IOException
ParserConfigurationException
SAXException
ExecutionException
InterruptedException
Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.