com.bigdata.counters.httpd
Class CounterSetHTTPDServer

java.lang.Object
  extended by com.bigdata.counters.httpd.CounterSetHTTPDServer
All Implemented Interfaces:
Runnable

public class CounterSetHTTPDServer
extends Object
implements Runnable

An httpd server exposing a CounterSet. This may be used either for testing the CounterSetHTTPD class or for post-mortem analysis of a saved CounterSet.

Version:
$Id: CounterSetHTTPDServer.java 5012 2011-08-03 11:29:33Z thompsonbry $
Author:
Bryan Thompson
See Also:
main(String[])

Field Summary
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
CounterSetHTTPDServer(int port, ICounterSetAccess counterSet, IService service)
           
 
Method Summary
static void main(String[] args)
          Runs the httpd server.
 void run()
           
 void shutdownNow()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final transient org.apache.log4j.Logger log
Constructor Detail

CounterSetHTTPDServer

public CounterSetHTTPDServer(int port,
                             ICounterSetAccess counterSet,
                             IService service)
                      throws Exception
Parameters:
port -
Throws:
Exception
Method Detail

main

public static void main(String[] args)
                 throws Exception
Runs the httpd server. When the optional file(s) are given, they will be read into a CounterSet on startup. This is useful for post-mortem analysis. The usage is
 [-p port] [-d {debug,info,warn,error,fatal}] [-filter filter]* [-regex regex]* [-events file] file(s)
 
where
-p
The port at which httpd server will answer queries
-filter
Each instance of this argument specifies a string to be matched and is used to generate a Pattern which will filter the counters read from the file(s). If there are multiple instances they are combined together by an OR.
-regex
Each instance of this argument specifies a regular expression to be matched and is used to generate a Pattern which will filter the counters read from the file(s). If there are multiple instances they are combined together by an OR.
-events
An optional file of Event s logged in a tab-delimited format
-events
An optional file of Event s logged in a tab-delimited format
file(s)
XML representations of logged CounterSets

Parameters:
args - The command line arguments.
Throws:
IOException
Exception

run

public void run()
Specified by:
run in interface Runnable

shutdownNow

public void shutdownNow()


Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.