Download D3.2 SANTA-G Design Document

Document related concepts

Database model wikipedia , lookup

Transcript
TASK 3.3 GRID MONITORING
S
A N T A
-G D
E S I G N
D
O C U M E N T
WP3 New Grid Services and Tools
Document Filename:
CG3.3.2-D3.2-v1.2-TCD020-SantaGDesign.doc
Work package:
WP3 New Grid Services and Tools
Partner(s):
TCD, CYFRONET, ICM
Lead Partner:
TCD
Config ID:
CG3.3.2-D3.2-v1.2-TCD020-SantaGDesign
Document classification: PUBLIC
Abstract: This document specifies the detailed software design for the SANTA-G monitoring
tool, part of CrossGrid Task 3.3 ‘Grid Monitoring’.
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
1 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Delivery Slip
Name
From
Partner
WP3, Subtask 3.3.2
TCD
Date
Aug 8th, 2002
Signature
Brian Coghlan
Verified by
Approved by
Document Log
Version
Date
1-0-DRAFT-E
02/08/2002
1-0
08/08/2002
1-1
20/08/2002
1-2
30/08/2002
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
Summary of changes
Draft version
Author
Brian Coghlan, Stuart Kenny
Brian Coghlan, Stuart Kenny
Added query engine description,
added security issues, altered class Brian Coghlan, Stuart Kenny
listings.
Changed with regard to reviewers
Brian Coghlan, Stuart Kenny
comments.
PUBLIC
2 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
CONTENTS
1. EXECUTIVE SUMMARY ............................................................................................................................... 5
2. INTRODUCTION ............................................................................................................................................. 6
2.1. PURPOSE ....................................................................................................................................................... 6
2.2. DEFINITIONS, ABBREVIATIONS, ACRONYMS ................................................................................................. 6
3. REFERENCES .................................................................................................................................................. 8
4. SYSTEM DECOMPOSITION DESCRIPTION ............................................................................................ 9
4.1. THE GRID MONITORING SYSTEM.................................................................................................................... 9
4.2. NON-INVASIVE MONITORING (SANTA-G) ....................................................................................... 10
4.2.1. The Publishing Module....................................................................................................................... 10
4.2.2. The Viewer Module ............................................................................................................................ 14
4.2.3. The Query Engine ............................................................................................................................... 16
5. DEPENDENCY DESCRIPTION .................................................................................................................. 19
6. INTERFACE DESCRIPTION....................................................................................................................... 20
7. SECURITY ISSUES ....................................................................................................................................... 25
8. DETAILED DESIGN...................................................................................................................................... 26
8.1. CLASS DEFINITIONS .................................................................................................................................... 28
8.2. QUERY ENGINE CLASSES ............................................................................................................................ 44
8.3. SENSOR INFORMATION TABLE DESCRIPTIONS ............................................................................................ 67
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
3 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
4 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
1. EXECUTIVE SUMMARY
The following document provides the design description for the SANTA-G Grid monitoring tool,
which forms part of Task 3.3 ‘Grid Monitoring’. The monitoring system to be designed within Task
3.3 will provide information from the three major sources of performance data: applications,
instruments, and infrastructure. An invasive monitoring tool, OCM-G, will obtain application
information. SANTA-G, a non-invasive monitoring tool will obtain monitoring information from
instruments. While a further tool, based on the new Jiro technology will obtain information from the
Grid infrastructure. Please refer to Section 2.1 of the Task 3.3 SRS for a description of the use and
interaction of the three monitoring tools. This document provides a detailed description of the design
of the SANTA-G tool. For clarity the design document for Task 3.3 has been divided into three
separate documents, each dealing with one of the three components, i.e. OCM-G, SANTA-G and Jiro.
Section 2 provides a brief description of the task and each of the components that make up the Grid
Monitoring system. It also gives the definitions of the abbreviations used within the document. Section
3 provides a list of references.
Section 4 provides a decomposition of the SANTA-G tool into modules. UML component and
sequence diagrams are given to show the construction and interaction of the components within these
modules.
Section 5 is a description of the dependencies of SANTA-G to modules, or components, developed in
other tasks. It describes the required input or communication from these.
Section 6 is the interface description. This is a detailed description of the external interface provided
by the SANTA-G system, including APIs and GUIs.
Section 7 provides the detailed design description. UML class diagrams show the internal structure of
the components identified in Section 4. It also contains a detailed description of each of the classes’
methods and attributes.
This design description is a work in progress, and will certainly be subject to change as the
implementation phase progresses. The class structures and descriptions of methods should therefore be
taken as a guide of the current implementation intention, rather than as a description of the completed
system.
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
5 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
2. INTRODUCTION
2.1. PURPOSE
This task will extend the Grid information system content to include three of the major sources of
performance data: applications, instruments and infrastructure.
The products of Task 3.3 are:
(a) an OMIS-based application monitoring system, OCM-G,
(b) additional services, SANTA-G, for ad-hoc non-invasive monitoring, and
(c) Jiro-based services for Grid-infrastructure monitoring.
OCM-G is a distributed monitoring system for obtaining information on and manipulating parallel
distributed applications. The purpose of this system is to provide a basis for building tools supporting
parallel application development
SANTA-G services are a specialized non-invasive complement to other more intrusive monitoring
services. The application of these services will be in validation and calibration of both intrusive
monitoring systems and systemic models, and also for performance analysis. The objectives are to
allow information captured by external monitoring instruments to be introduced into the Grid
information system, and to support analysis of performance using this information
The Jiro-based services for Grid-infrastructure monitoring are intelligent components for obtaining
information from and manipulating Grid hardware devices. The application of the software is to gather
information from hardware devices, make autonomous decisions based on this information, and take
necessary actions. The objectives are to allow the user to specify desirable logic for managing
hardware. The addition of these three components will greatly expand the quality and quantity of the
Grid information system content.
Please refer to Section 2.1 of the Task 3.3 SRS for a more detailed description of the use, and
interaction of these three components.
2.2. DEFINITIONS, ABBREVIATIONS, ACRONYMS
CA
Certificate Authority
CoG
Commodity Grid Kits
CrossGrid
The EU CrossGrid Project IST-2001-32243
DataGrid
The EU DataGrid Project IST-2000-25182
GSI
GUI
Grid Security Infrastructure
Graphical User Interface
HTTP
Hypertext transport protocol
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
6 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
HTTPS
ICMP
Secure hypertext transport protocol
Internet Control Message Protocol
IP
Internet Protocol
JDBC
Java Database Connectivity
Jiro
OCM-G
SUN Jiro, Implementation of the FMA specification
Grid-enabled OMIS-Compliant Monitor
OGSA
Open Grid Services Architecture
OMIS
On-line Monitoring Interface Specification
RDBMS
R-GMA
Relational Database Management System
DataGrid relational Grid monitoring architecture
SANTA
System Area Network Trace Analysis
SANTA-G
Grid-enabled System Area Network Trace Analysis
SCI
Scalable Coherent Interface
SNMP
Simple Network Management Protocol
SQL
Structured query language
SRS
Software Requirements Specification
TCP
UDP
Transmission Control Protocol
User Datagram Protocol
XML
Extensible markup language
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
7 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
3. REFERENCES
CrossGrid
DataGrid
Ethernet
GSI
HTTP
ICMP
IP
Java CoG
JDBC
Jiro
OGSA
CrossGrid Project Technical Annex CROSSGRIDANNEX1_V0.1.DOC
DataGrid Project Technical Annex DataGridPart_B_V2_51.doc
IEEE-802
http://www.globus.org/security
IETF RFC 2616, http://www.ietf.org/rfc/rfc2616.txt?number=2616
IETF RFC 792, http://www.ietf.org/rfc/rfc0792.txt?number=792
IETF RFC 791, http://www.ietf.org/rfc/rfc0791.txt?number=791
http://www.globus.org/cog/java/index.html
http://www.java.sun.com/products/jdbc/
http://www.jiro.com/
The Physiology of the Grid: An Open Grid Services Architecture for Distributed
Systems Integration. I. Foster, C. Kesselman, J. Nick, S. Tuecke, January 2002.
http://www.globus.org/research/papers/ogsa.pdf
OMIS
R-GMA
OMIS – On-line Monitoring Interface Specification. Version 2.0. Lehrstuhl für
Rechnertechnik und Rechnerorganisation Institut für Informatik (LRR-TUM),
Technische Universität München.
http://wwwbode.informatik.tu-muenchen.de/~omis/
DataGrid Project Deliverable 3.2 DataGrid-03-D3.2-0101-1-0
http://hepunx.rl.ac/edg/wp3/documentation/
SANTA
Prototype Trace Probe and Probe Adaptor and Prototype Trace Software,
http://www.cs.tcd.ie/Brian.Coghlan/scieuro/scieuro.html, Esprit Project 25257, SCI
Europe, Deliverables, Trinity College Dublin, 1999
SCI
Spitfire
IEEE 1596, IEEE Standard For Scalable Coherent Interface (SCI), IEEE Std 1596 –
1992, IEEE Computer Society, Aug. 1993
http://hep-proj-spitfire.web.cern.ch/hep-proj-spitfire/server/doc/index.html
SQL
ANSI SQL 99 Standard
Task3.3 SRS
Task3.3 Grid Monitoring Software Requirements Specification
CG-3.3-SRS-0013
Task2.4 SRS
Task2.4 Interactive and semiautomatic performance evaluation tools
TCP
CG-2.4-DOC-0001-1-0-DRAFT-A
IETF RFC 793, http://www.ietf.org/rfc/rfc0793.txt?number=793
TCPDump
http://www.tcpdump.org/
UDP
IETF RFC 768, http://www.ietf.org/rfc/rfc0768.txt?number=768
XML
Fallside, D.C. XML Schema Part O: Primer. W3C, Recommendation, 2001,
http://www.w3.org/TR/xmlschema-0/
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
8 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
4. SYSTEM DECOMPOSITION DESCRIPTION
4.1. THE GRID MONITORING SYSTEM
As stated the Grid Monitoring system will provide information from the three major sources of
performance data: applications, instruments and infrastructure.
Application information will be obtained by OCM-G. Specialised application monitors embedded in
the application address space will provide dynamic application data, such as lists of running processes,
CPU loads etc. It will also allow for the manipulation of applications, starting and stopping processes
etc. Monitors embedded in the application address space in this way, will consume some of the host
system resources. This can affect the monitoring data obtained. The SANTA-G system avoids this, as
it is a non-invasive monitoring system. SANTA-G can be used for ad-hoc experiments, which monitor
the behaviour of grid components from the outside. The data can be used to both validate and calibrate
the OCM-G system. The Jiro tool will monitor infrastructure components. Jiro is a new technology
that aims to simplify the management of extremely large networks by providing intelligent
management services for networked devices. Jiro components will be used to provide information on
Grid Infrastructure components, such as routers, switches (via SNMP) and computers (via kernel
interfaces). In this way Jiro will allow the monitoring of manufacturers equipment from the inside, i.e.
providing access to ‘built-in’ information such as that supplied by SNMP.
Figure 4.1.1 shows the modules that make up the Grid Monitoring system. The following section
describes the SANTA-G module in detail, breaking it into further modules, and each module into its
individual components,
WP3
Static info
MDS info
MDS
(Globus)
input
Information
System
Instruments
Jiro info
Jiro
Services
(3.3.3-CYFRO)
Infrastructure
Non-invasive
Monitoring
(3.3.2-TCD)
input
input
dB
result
Performance
Information
Post-processing
(3.3.1-ICM)
input
input
Applications
OMIS
Application Monitor
+ Local Monitor
(3.3.1-CYFRO)
ctrl/
data
result
OMIS
Service Manager
+ Perf Tools
(3.3.1-CYFRO)
OMIS info
Figure 4.1.1 The Grid Monitoring System
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
9 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
4.2. NON-INVASIVE MONITORING (SANTA-G)
SANTA-G will non-invasively monitor Grid components using software, and create a relational trace
database of this information. As stated in the SRS there are three main functions associated with this
activity:
1. Allow a user to initiate non-invasive tracing of grid resources. Collect the trace data, and
provide access to the data through the Grid information system.
2. Allow a user to select the required subset of trace data, by way of the Grid information system,
persistently store this subset of data in a relational trace database, and provide access to this
stored data for further analyses.
3. Provide information required by dependent subsystems within the Grid services and Tools
system i.e.: Task 3.2, and Task 3.4, and to external subsystems i.e.: Task 2.4.
The SANTA-G system can be broken down into two main modules (see Figure 4.2.1) that provide
these functions: a publishing module, and a viewer module.
Circular
Queue Of
Trace Files
Publishing Module
Grid Information
System (R-GMA)
Viewer Module
Figure 4.2.1 SANTA-G System Modules
4.2.1. The Publishing Module
The purpose of the publishing module is to take the trace data created by the trace instrument and to
import the data into the Grid Information System. It essentially provides the three functions listed
above by making the trace data available through the Grid Information System. Once the data is
entered in the system, users (including dependent tasks) can access it for further analyses by using
other R-GMA components such as Consumers and Archivers. The publishing module can itself be
broken down into several components, as can be seen in Figure 4.2.2:
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
10 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Config
File
Sensor
File Info Store
DBProducer
Grid Information
System (R-GMA)
Trace
Files
Canonical
Producer
Canonical
Query Engine
Figure 4.2.2 Components of the Publishing Module
In the case of network monitoring a Sensor will be run on a separate network tracing instrument.
These instruments will be ordinary PC’s with network monitoring cards. Each node that is to be
monitored will require a separate network monitoring instrument, or alternatively, a switch can be
monitored, if it has the required monitoring facilities. In the general case the placement of the Sensors
will be determined by the ad-hoc experiment being conducted. A Sensor is configured by changing
entries in a sensor configuration file. This file contains entries such as, traces archive directory, and
JDBC username and password (for accessing the File and Trace information tables maintained by the
DBProducer). The Sensor must be run with the privileges necessary to start TCPDump. For example
with Linux it must be run as root, or alternatively TCPDump can be installed setuid equal to root. The
Sensor is started at boot up and runs continuously, collecting network traffic. If a failure occurs it is
restarted. On initialisation the Sensor reads in the configuration values from the configuration file and
instantiates the DBProducer; it also instantiates the necessary Canonical Producers (one for each table)
to represent the database structure. The Canonical Producers are instantiated by specifying a SQL
create table statement, that defines the table the producer provides. Each Canonical Producer shall
register itself with the Canonical Producer Servlet. The R-GMA will then enter each
CanonicalProducer in a R-GMA registry, which shall allow consumers to locate it. This action is
hidden within the R-GMA.
A main directory, the Traces_Archive, contains a number of subdirectories (see Figure 4.2.3). Each of
these subdirectories is a Trace Directory, containing a circular queue of files. It is these files that
actually store the raw trace data. The number of files in a Trace Directory is the queue length,
controlled by a variable stored in the sensor’s configuration file.
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
11 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Traces_Archive
Trace_Directory
Trace_Directory
Trace Circular Queue
Trace Circular Queue
Figure 4.2.3 Traces Archive Directory Structure
The Sensor maintains two tables of information relating to the traces available. The first is the Trace
Information table. It contains the URI of the directory used to store the trace circular queue, the start
time of the trace, the number of slots used in the circular queue and a description of the trace. The
second table, the File Information table contains information relating to the files used to store the raw
trace data within the trace directory. This table stores again, the URI of the directory used to store the
trace circular queue, a file ID, which identifies an individual file within the trace circular queue, the
start time of this file, the number of packets within the file, and the status of the file, either open or
closed, repeated for each file in the queue. The combination of these two tables forms an index into a
trace circular queue. These two tables are stored in the DBProducer.
The Sensor initiates a trace. The Trace Directory to use within the Traces Archive, and the number of
slots (or files) to use for the circular queue is specified and a new thread is started to run the trace.
Once the trace is started an entry is made in the Trace Information table for the new trace. Entries are
also made in the File Information table. The File Information table contains an entry for each file
within the circular queue for this trace. For example a trace with a slot length of ten will have ten files
within the circular queue, and a corresponding ten entries in the File Information table. In the
CrossGrid demonstrator, where the external instrumentation example is a network packet tracer, the
Sensor starts TCPDump, which begins writing to the indicated file, the first file in the queue. The row,
within the File Information table, corresponding to this file is updated by the Sensor to reflect the
current state, i.e. the start time of the file is updated to the time at which TCPDump started writing to
the file and the status of the file is set as open, indicating that it is being written to. Thus the status
field also provides a pointer into the queue - the file currently being written to is the head of the queue.
When the file is full (a predetermined level is reached, either number of packets or file size) the Sensor
stops TCPDump and restarts it writing to the next file in the queue. The previous file entry in the File
Information table is now updated with the number of packets and the status is changed to closed. The
new file’s start time is updated and its status set to open. A separate thread carries out the table
updates. If the previous file was the end of the queue then the queue is wrapped around and TCPDump
is set to write to the start of the queue once more. The sequence diagram, Figure 4.2.4, shows the
interaction between the components in the Publishing Module during initialisation of the Sensor and
during the creation of a new trace.
Note that SANTA-G is specifically designed to NOT depend on modifying the instrument software.
Instead it provides a generic template for introducing information from third-party instruments into the
grid information system. While here the focus is on instruments that monitor grid components, the
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
12 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
instruments could of course be of any type (e.g. fish sonars or PCR analysers). SANTA-G is
particularly oriented to those instruments that generate large volumes of data.
Trace Directory
Sensor
configure(configFile)
DataBase
Producer
createD ataB asePr oducer ()
add(InfoTables)
createCanonicalProducers()
new CanonicalProducer(sqlStatement)
startNewTrace()
CanonicalProdu
cer
Register()
Trace Thread
UpdateTable
Thread
register trace
update(TraceInfo)
startTcpDump
Open file, write to file
update File_Info Table
update(FileInfo)
Figure 4.2.4 Publishing trace data process
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
13 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
4.2.2. The Viewer Module
The viewer module allows a user to view the traces stored in the Grid information system. Interaction
with the viewer module will be through the Viewer GUI. For the net tracer demonstrator, the Viewer
will have a number of controls for direct or query based navigation through a trace and selection of a
particular trace or packet (see section 6.2). The Viewer module is composed of several components,
see Figure 4.2.5:
Viewer
Consumer
Grid Information
System (R-GMA)
Archiver
Trace Database
Figure 4.2.5 Components of the Viewer Module
A user can choose a trace to view. This information is gathered from the Trace Information table
maintained by a SANTA-G Sensor, as described above. The trace can be viewed on a packet-to-packet
basis. In the spirit of R-GMA, a SQL query statement shall be used to define what data is to be
acquired. The Viewer, by using its own Consumer interface, will contact a Consumer Servlet, which in
turn contacts a R-GMA registry in order to locate the required producers of the information. The
information is returned through the same mechanisms to the Viewer in the form of a ResultSet. The
individual fields of the packet are then extracted from this ResultSet and displayed graphically in the
Viewer. The sequence diagram below, Figure 4.2.6 shows this process. Refer to Section 6.2 for a
description of the Viewer GUI.
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
14 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
SA N TA -G
C o n s u m e rS e r vl e t
s t a rt V ie w e r
n e w V ie w e r()
V ie w e r
g e t F i l e In fo ( )
g e t P a c k e t D a t a ( fi le ID , p a c k e t I D )
n e w C o n s u m e r( s q l )
Co ns um er
C o n s u m e r. e x e c u t e ()
g e t d a t a fr o m p r o d u c e r s
R e s u lt S e t
R e s u lt S e t
d is p l a y ( )
Figure 4.2.6 Viewing data, Interaction between the Viewer and ConsumerServlet
Figure 4.2.7 shows the interaction between the CanonicalProducer Servlet, the CanonicalProducer, the
QueryEngine and a trace file within a trace circular queue in response to a query. An application that
requires trace data does so by using a Consumer interface. As described above the Consumer contacts
a ConsumerServlet, sending it a SQL SELECT statement that defines the data required. The
ConsumerServlet uses a R-GMA registry to find the Producers that can satisfy the query. Once found
the query is forwarded to these Producers. The CanonicalProducer servlet will receive the query and in
turn forward it to the CanonicalProducer that holds the information needed. The CanonicalProducer
now uses the QueryEngine to collect the data from the raw trace file by performing seek operations.
Before accessing the file the QueryEngine consults the index to obtain the location and FileID of the
required file within the trace circular queue. Once the trace data is found it is returned to the
QueryEngine, which constructs a ResultSet from the data and returns it to the CanonicalProducer. The
ResultSet is then sent by the same mechanism back to the Consumer. The Consumer can be any type
of application, a custom coded Consumer, an Archiver or a compound Consumer/Producer. Refer to
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
15 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
the DataGrid ‘Information and Monitoring (WP3) Architecture Report’ for a description of these
components. However, for the net tracer demonstrator it is a standard R-GMA Consumer that will
query either the information in the CanonicalProducer or aggregated information that has been filtered
by an R-GMA Archiver.
Cons um er
S e rvle t
C a n o n ic a l
P ro d u c e r S e rvle t
C a n o n ic a l
P ro d u c e r
C a n o n ic a l
Q u e ry E n g in e
Se n s o r F il e
In fo rm a t io n Ta b l e
Tra c e F ile
q u e ry ( SQ L )
q u e ry (S Q L )
q u e ry (S Q L )
g e tF ile ID (Tra c e _ D ir)
F il e ID
s e a rc h (F ile ID )
tra c e d a ta
Re s u lt S e t
R e s u ltS e t
R e s u ltS e t
Figure 4.2.7 Interaction between ConsumerServlet and Trace File
4.2.3. The Query Engine
The Query Engine itself is quite complex and requires further explanation. The Query Engine is not a
single class, but is composed of several classes, necessary to provide the functionality discussed
above. The structure of the Query Engine is shown in the component diagram below (Figure 4.2.8).
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
16 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
PseudoResponse
Thread
Engine
Thread
File
Manager
Trace
Files
Search
SQLParser
SelectQuery
Figure 4.2.8 Components of the Query Engine
Within the Query Engine a list of pending jobs is stored. These jobs contain queries that must be
carried out. CanonicalProducers connect to a server by way of a socket. The Server listens to the
socket and upon receiving a connection it creates and starts a response thread. A
PseudoResponseThread reads the query from the socket and places itself on the list of jobs, which is
maintained and serviced by an EngineThread, started by the Server upon initialisation. An
EngineThread uses an instance of the Search class to carry out the query on a trace file. The Search
class first queries the File Information table maintained by the Sensor to find the files necessary to
satisfy the query. The Search class can then use the File Manager to obtain pointers to these files. The
SQLParser takes the query and creates an instance of a SelectQuery. This breaks the query down into
three separate linked lists, each representing a section of the SQL SELECT statement, i.e. a select list,
a from list and a where list. The Search class can then search the trace file, loading each packet into a
buffer and checking to see if the packet satisfies the query given. If it does it is added to a result set
object created by the Search class and returned to the waiting PseudoResponseThread, and once this is
done the ResultSet can then be returned to the client. This process is shown in Figure 4.2.9.
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
17 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
P seudoR esponse
T h re a d
E n g in e T h re a d
J o b L is t
S e a rc h
F il e M a n a g e r
n e w J o b L is t
M o n it o r J o b L is t
S Q L P a rs e r
n e w F ile M a n a g e r
n e w S Q L P a rs e r
R e c e ive q u e ry
p la c e s e lf o n J o b L is t
get Job
Job
e x e c u te (J o b .q u e ry )
q u e r y F ile _ In fo t a b le
g e t F i le P t r
F ile P t r
a d d Q u e ry T o L is t (q u e ry )
S e l e c t Q u e ry
n e w S e le c t Q u e ry
S e le c t Q u e ry
S e le c t Q u e ry
d o F ile S e a rc h
a c c u m u la t e R e s u lt s
R e s u lt s
Figure 4.2.9 Query Engine sequence diagram
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
18 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
5. DEPENDENCY DESCRIPTION
Interaction with SANTA-G will be through the Grid Information System (R-GMA), which will allow
clients to access the non-invasive trace data that SANTA-G provides. There is therefore no direct input
or communication required with other modules or components.
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
19 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
6. INTERFACE DESCRIPTION
SANTA-G provides a Viewer GUI, which allows users to navigate a trace and view specific packets.
A GUI for viewing SCI traces stored in a local relational database has already been constructed by
TCD. It is intended for the Ethernet Viewer to provide similar functionality. The Viewer will provide
at least two panels, possibly a third. The main panel is the Packet View panel. It is here that the
selected packet is displayed. Each field of the packet is shown. This panel also contains controls for
selecting a trace to view and navigating the trace. The second panel allows for direct SQL querying of
the trace data. A text panel allows the user to type the SQL query. Once submitted, the results are
obtained and displayed in a table beneath the text panel. The third panel, in the SCI Viewer, shows the
packets within the trace surrounding the current packet. This panel may be provided in the Ethernet
Viewer.
The following screen shots (Figure 6.2.1 and 6.2.2) are taken from the SCI Viewer. It is intended that
the Ethernet Viewer will provide a similar interface.
Figure 6.2.1 The Packet View Panel of the SCI Viewer
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
20 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Figure 6.2.2 The Query Panel of the SCI Viewer
The only interface offered by the SANTA-G system to other tools is through the information it
provides by way of the Grid Information system, R-GMA. It is the schema of this information that
provides the interface. Any tool that requires specific data does so by using the R-GMA to access the
information.
There are a number of approaches that can be used in order to obtain information from the R-GMA,
simple consumers, archivers, consumer/producers. Consumers are created by specifying a SQL
SELECT statement in their constructor:
Consumer c = new Consumer(“SELECT * FROM table WHERE …”);
The statement can then by executed by calling the Consumers execute method. The Consumer will
then collect the required data from the appropriate Producers, and return the data in the form of a result
set.
Archivers can be used to persistently store data. By using one or more internal Consumers they collect
the required subset of the available data, and by way of an internal DBProducer persistently store the
data in a database. The Archiver then in turn publishes this data so that further Consumers can access
it.
A joint Consumer/Producer is a way of producing a specific subset of the available information. A
Consumer can be created that will collect only some information from a number of available
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
21 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Producers. This Consumer can then create a further Producer to make this subset of information
available.
The API’s for these classes can be seen in the DataGrid ‘Information and Monitoring (WP3)
Architecture Report’ and also on the web at:
http://hepunx.rl.ac.uk/edg/wp3
The following schema shows the structure of the Ethernet trace database that is used to store the
relational trace data. As stated it is this schema that forms the interface to the SANTA-G system. For
each of these tables a CanonicalProducer is created.
Ethernet Trace Database Schema
Each of the attributes in the following schema relates to a field in the particular type of packet. A short
description of these fields is given. For a more detailed description please refer to the IETF RFC’s
listed in Section 3.
PKT
pkt_id
Identifies the packet within the file.
file_id
Identifies the file within the circular queue
ts_s
The seconds part of the timestamp of the time at which the packet
was captured.
ts_us
The microsecond part of the timestamp
cap_len
The length of the packet captured. Within TCPDump you can specify
the maximum size to capture.
act_len
The actual length of the packet.
ETH
pkt_id
file_id
destination_add
The destination address of the packet.
source_add
The source address of the packet
pkt_type
The type of packet, e.g. IP, TCP etc.
IP4
pkt_id
file_id
version
The IP version, indicates the format of the internet header, i.e. IPv4,
IPv6
hw_len
Length of the internet header, thus this points to the start of the data.
serv_type
Service type, provides an indication of the abstract parameters of the
quality of service required.
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
22 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
length
Total length of the datagram including header and data.
id
Identifying value assigned by the sender to aid in assembling the
fragments of a datagram.
flags
Control Flags, specifies whether fragmentation is allowed or not.
frag_offset
Fragment Offset, indicates where in the datagram this fragment
belongs.
time_to_live
Maximum time the datagram is allowed to remain in the internet.
protocol
Field indicates the next level protocol used in the data portion of the
internet datagram.
header_chksum
Checksum on the header only.
source_ip
The IP address of the source of the packet
dest_ip
The IP address of the destination of the packet
ICMP
pkt_id
file_id
type
The type of ICMP packet. Determines the format of the remaining
data.
code
The message associated with the packet, e.g. for a type three ICMP
packet code 0 indicates network unreachable.
chk_sum
The packet checksum.
TCP
pkt_id
file_id
src_port
The source port number.
dst_port
The destination port number.
seq_num
The sequence number of the first data octet in this segment.
ack_num
If the acknowledge control bit is set this field contains the value of the
next sequence number the sender of the segment is expecting to
receive.
h_len
The header length of the packet.
reserved
Reserved for future use, must be 0.
code
window
The number of data octets beginning with the one indictaed in the ack
field which the sender of this segment is willing to accept
chk_sum
The checksum.
urg_ptr
Urgent Pointer, this field communicates the current value of the urgent
pointer as a positive offset from the sequence number in this segment.
The urgent pointer points to the sequnce number of the octet following
the urgent data.
UDP
pkt_id
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
23 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
file_id
src_port
The source port number.
dst_port
The destination port number.
mes_len
Length in octets of this user datagram including header and data.
chk_sum
The checksum.
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
24 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
7. SECURITY ISSUES
It is intended that for security the R-GMA will use a security component built as part of the Spitfire
project. Spitfire is a project of DataGrid WP2. It provides a Grid enabled middleware service for
access to relational databases. Spitfire uses encrypted communication to the Tomcat server via
HTTPS, which in turn uses the Java Secure Sockets Extension (JSSE). In JSSE there is a keystore
which stores the public key and a truststore that stores the public keys of the CAs you trust. The keys
and store are in a Java format. Spitfire uses Grid certificates to build a keystore and truststore. The
HTTPS configuration is fully GSI compatible due to internal reuse of CoG, the Java port of the Globus
toolkit.
Through the use of R-GMA, SANTA-G will therefore ensure security, as well as GSI and DataGrid
compatibility.
It is not intended for this release to encrypt communication between SANTA-G modules. This may be
added in future releases.
There are some security issues that are yet to be dealt with. The protection of the trace data and also of
ensuring that a user can only trace packets from processes that they own, are two such issues. These
are very interesting and also very complicate issues and will have to be subject to further consideration
before proposals can be brought forward.
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
25 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
8. DETAILED DESIGN
The following provides a detailed description of the two modules that make up the SANTA-G system,
i.e. the Publishing module, and the Viewer module. The following two figures (Figures 7.2.1, 7.2.2)
show the class diagrams for the two modules:
Figure 7.2.1 Publishing Module Class Diagram
Figure 7.2.2 Viewer Module Class Diagram
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
26 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
The CanonicalQueryEngine shown in Figure 7.2.1 is actually a collection of classes, as described in
Section 4. A separate class diagram is used to show this, see Figure 7.2.3.
Figure 7.2.3 Query Engine class diagram
A detailed description of each of the classes follows:
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
27 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
8.1. CLASS DEFINITIONS
ie.tcd.santag.ethernet
Class Sensor
java.lang.Object
|
+--ie.tcd.santag.ethernet.Sensor
All Implemented Interfaces:
java.lang.Runnable
public class Sensor
extends java.lang.Object
implements java.lang.Runnable
On initialisation the Sensor class creates a DatabaseProducer to store information on available
traces, it also creates CanonicalProducers necessary to represent the database structure.
Field Summary
java.lang.String configFilePath
Path to the configuration file
java.lang.String dbPassWord
Password to use to access the database used by the Sensor
java.lang.String dbUserName
Username to use to access the database used by the Sensor
java.lang.String maxSlotSize
Maximum size to which a slot (file) can grow. File size that that
triggers a slot change.
noOfSlots
int
Number of files to use in a circular queue
java.lang.String tracesArchive
Path to the parent directory which contains the trace subdirectories
Constructor Summary
Sensor(java.lang.String configFilePath)
Class Constructor, reads in the config file and sets the appropriate attributes.
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
28 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Method Summary
java.lang.Boolean deleteTraceInfo(java.lang.String traceArchive,
java.lang.String traceDirectory)
Deletes details of the specified trace from the trace information table.
java.lang.Boolean enterTraceInfo(java.lang.String traceArchive,
java.lang.String traceDirectory, int noOfSlots,
java.lang.String description)
Inserts details of a new trace into the trace information table.
Timestamp
getTime()
Gets the current time
java.lang.Boolean resetConfig(java.lang.String configFilePath)
Resets the configuration variables by rereading the config file.
void
run()
Does the work of the Sensor.
java.lang.Boolean setSlotLength(int newSlotLength)
Sets the slot length for the all traces in the trace information table.
java.lang.Boolean setSlotLength(java.lang.String traceDirectory,
int newSlotLength)
Sets the slot length for the specified trace.
void
startNewTrace(java.lang.String traceArchive,
java.lang.String traceDirectory, int noOfSlots,
java.lang.String description)
Initiates a new trace, using the specified traceDirectory to store the
circular queue.
java.lang.Boolean updateFileInfo(java.lang.String traceDirectory,
java.lang.String fileID, Timestamp startTime,
java.lang.Long noOfPackets, java.lang.String status)
Updates a row in the file information table
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
wait, wait, wait
Field Detail
tracesArchive
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
29 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
public java.lang.String tracesArchive
Path to the parent directory which contains the trace subdirectories
maxSlotSize
public java.lang.String maxSlotSize
Maximum size to which a slot (file) can grow.
noOfSlots
public int noOfSlots
Number of files to use in a circular queue
dbUserName
public java.lang.String dbUserName
Username to use to access the database used by the Sensor
dbPassWord
public java.lang.String dbPassWord
Password to use to access the database used by the Sensor
configFilePath
public java.lang.String configFilePath
Path to the configuration file
Constructor Detail
Sensor
public Sensor(java.lang.String configFilePath)
Class Constructor, reads in the config file and sets the appropriate attributes. Also creates the
DatabaseProducer and CanonicalProducers.
Method Detail
resetConfig
public java.lang.Boolean resetConfig(java.lang.String configFilePath)
Resets the configuration variables by rereading the config file.
Parameters:
configFilePath - path to the config file
Returns:
Boolean true if the file is successfully found and read
setSlotLength
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
30 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
public java.lang.Boolean setSlotLength(java.lang.String traceDirectory,
int newSlotLength)
Sets the slot length for the specified trace.
Parameters:
traceDirectory - identifies the required trace.
newSlotLength - the new slot length of the trace circular queue
Returns:
Boolean, true if table update is successful
setSlotLength
public java.lang.Boolean setSlotLength(int newSlotLength)
Sets the slot length for the all traces in the trace information table.
Parameters:
newSlotLength - the new slot length of the trace circular queues
Returns:
Boolean, true if table update is successful
startNewTrace
public void startNewTrace(java.lang.String traceArchive,
java.lang.String traceDirectory,
int noOfSlots,
java.lang.String description)
Initiates a new trace, using the specified traceDirectory to store the circular queue.
Parameters:
traceArchive - the parent directory that stores the traces sub directories
traceDirectory - trace subdirectory which stores the trace circular queue
noOfSlots - number of files to use in the circular queue
description - description of the trace experiment
enterTraceInfo
public java.lang.Boolean enterTraceInfo(java.lang.String traceArchive,
java.lang.String traceDirectory,
int noOfSlots,
java.lang.String description)
Inserts details of a new trace into the trace information table.
Parameters:
traceArchive - the parent directory that stores the traces subdirectories
traceDirectory - trace subdirectory which stores the trace circular queue
noOfSlots - number of files to use in the circular queue
Returns:
Boolean, true if the table insertion is successful.
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
31 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
deleteTraceInfo
public java.lang.Boolean deleteTraceInfo(java.lang.String traceArchive,
java.lang.String traceDirectory)
Deletes details of the specified trace from the trace information table.
Parameters:
traceArchive - the parent directory that stores the traces subdirectories
Returns:
Boolean, true if deletion is successful
updateFileInfo
public java.lang.Boolean updateFileInfo(java.lang.String traceDirectory,
java.lang.String fileID,
Timestamp startTime,
java.lang.Long noOfPackets,
java.lang.String status)
Updates a row in the file information table
Parameters:
fileID - identifies the file within the table
startTime - the time the file is written to
noOfPackets - number of packets in the file
status - current status of the file, open or closed
Returns:
Boolean, true if table is successfully updated
getTime
public Timestamp getTime()
Gets the current time
Returns:
Timestamp, the current time
run
public void run()
Does the work of the Sensor.
Specified by:
run in interface java.lang.Runnable
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
32 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
ie.tcd.santag.ethernet
Class TableRow
java.lang.Object
|
+--ie.tcd.santag.ethernet.TableRow
public class TableRow
extends java.lang.Object
Object to represent a row in the trace/file information table
Constructor Summary
TableRow(java.lang.String tableType, java.lang.String Trace_Directory,
java.lang.String File_ID, java.lang.String Start_Time, int No_Of_Slots,
int No_Of_Packets, java.lang.String description, java.lang.String status)
Class constructor, creates a row of either a Trace or File information table.
Method Summary
java.lang.String getTableType()
Returns the type of table this TableRow object represents
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
wait, wait, wait
Constructor Detail
TableRow
public TableRow(java.lang.String tableType,
java.lang.String Trace_Directory,
java.lang.String File_ID,
java.lang.String Start_Time,
int No_Of_Slots,
int No_Of_Packets,
java.lang.String description,
java.lang.String status)
Class constructor, creates a row of either a Trace or File information table.
Parameters:
tableType - Either Trace or File
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
33 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Trace_Directory - Subdirectory of the Traces_Archive directory used to store the trace
circular queue.
File_ID - Identifies a file within the circular queue
Start_Time - Start time of the file/trace
No_Of_Slots - Number of files to use within the circular queue
No_Of_Packets - Number of packets in the file
description - Description of the trace experiment
status - Current status of the file (open or closed)
Method Detail
getTableType
public java.lang.String getTableType()
Returns the type of table this TableRow object represents
Returns:
The type of the table, currently either Trace_Info or File_Info
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
34 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
ie.tcd.santag.ethernet
Class UpdateTableThread
java.lang.Object
|
+--java.lang.Thread
|
+--ie.tcd.santag.ethernet.UpdateTableThread
All Implemented Interfaces:
java.lang.Runnable
public class UpdateTableThread
extends java.lang.Thread
Thread that handles Trace/File Information table updates
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor Summary
UpdateTableThread(ie.tcd.santag.ethernet.TableRow row)
Class constructor
Method Summary
void run()
Run method, actually carries out the table insertions
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy,
dumpStack, enumerate, getContextClassLoader, getName, getPriority,
getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon,
isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon,
setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString,
yield
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
35 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait,
wait
Constructor Detail
UpdateTableThread
public UpdateTableThread(ie.tcd.santag.ethernet.TableRow row)
Class constructor
Method Detail
run
public void run()
Run method, actually carries out the table insertions
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
Returns:
void
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
36 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
ie.tcd.santag.ethernet
Class Viewer
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
|
+--javax.swing.JFrame
|
+--ie.tcd.santag.ethernet.Viewer
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer,
javax.swing.RootPaneContainer, java.lang.Runnable, java.io.Serializable,
javax.swing.WindowConstants
public class Viewer
extends javax.swing.JFrame
implements java.lang.Runnable
Provides the GUI for the Viewer component, allows the user to view a trace packet by packet.
See Also:
Serialized Form
Nested Class Summary
Nested classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
37 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent,
java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
java.lang.String dbDriverClass
The JDBC driver class name
java.lang.String dbDriverPrefix
The JDBC driver prefix URL
java.lang.String dbName
The name of the local database to access
java.lang.String dbPassWord
Password used to access the local database
java.lang.String dbUserName
Username to use to access the local database
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED,
MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR,
N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR,
S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR,
W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT,
TOP_ALIGNMENT
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
38 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Viewer()
Class constructor, builds the GUI components, and also creates a consumer to query for the
Trace Information table, this information is then used to populate a drop down menu to allow users to
select a trace to view.
Method Summary
java.sql.Connection connect(java.lang.String dbDriverClass,
java.lang.String dbDriverPrefix,
java.lang.String dbName, java.lang.String dbUserName,
java.lang.String dbPassWord)
Creates a connection to a local database
java.sql.ResultSet
getPacketData(java.lang.String FileID, int PacketID)
Returns the data for a particular packet within a file in the form of a
result set.
java.sql.ResultSet
getTraceInfo()
Returns the Trace Information table from the R-GMA
void
run()
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane,
getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane,
getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled,
paramString, processWindowEvent, remove, setContentPane,
setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane,
setJMenuBar, setLayeredPane, setLayout, setRootPane,
setRootPaneCheckingEnabled, update
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
39 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames,
getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle,
isResizable, isUndecorated, remove, removeNotify, setCursor,
setExtendedState, setIconImage, setMaximizedBounds, setMenuBar,
setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener,
addWindowFocusListener, addWindowListener, addWindowStateListener,
applyResourceBundle, applyResourceBundle, createBufferStrategy,
createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState,
getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys,
getGraphicsConfiguration, getInputContext, getListeners, getLocale,
getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit,
getWarningString, getWindowFocusListeners, getWindowListeners,
getWindowStateListeners, hide, isActive, isFocusableWindow,
isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent,
processWindowFocusEvent, processWindowStateEvent,
removeWindowFocusListener, removeWindowListener, removeWindowStateListener,
setCursor, setFocusableWindowState, setFocusCycleRoot,
setLocationRelativeTo, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation,
areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout,
findComponentAt, findComponentAt, getAlignmentX, getAlignmentY,
getComponent, getComponentAt, getComponentAt, getComponentCount,
getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets,
getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets,
invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet,
layout, list, list, locate, minimumSize, paint, paintComponents,
preferredSize, print, printComponents, processContainerEvent, remove,
removeAll, removeContainerListener, setFocusTraversalKeys,
setFocusTraversalPolicy, setFont, transferFocusBackward,
transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener,
addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener,
addKeyListener, addMouseListener, addMouseMotionListener,
addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents,
contains, contains, createImage, createImage, createVolatileImage,
createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable,
enableEvents, enableInputMethods, firePropertyChange, firePropertyChange,
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
40 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
firePropertyChange, getBackground, getBounds, getBounds, getColorModel,
getComponentListeners, getComponentOrientation, getCursor, getDropTarget,
getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics,
getForeground, getGraphics, getHeight, getHierarchyBoundsListeners,
getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners,
getInputMethodRequests, getKeyListeners, getLocation, getLocation,
getLocationOnScreen, getMouseListeners, getMouseMotionListeners,
getMouseWheelListeners, getName, getParent, getPeer,
getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize,
getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus,
imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable,
isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable,
isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible,
keyDown, keyUp, list, list, list, location, lostFocus, mouseDown,
mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus,
paintAll, prepareImage, prepareImage, printAll, processComponentEvent,
processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent,
processInputMethodEvent, processKeyEvent, processMouseEvent,
processMouseMotionEvent, processMouseWheelEvent, removeComponentListener,
removeFocusListener, removeHierarchyBoundsListener,
removeHierarchyListener, removeInputMethodListener, removeKeyListener,
removeMouseListener, removeMouseMotionListener, removeMouseWheelListener,
removePropertyChangeListener, removePropertyChangeListener, repaint,
repaint, repaint, repaint, requestFocus, requestFocus,
requestFocusInWindow, requestFocusInWindow, reshape, resize, resize,
setBackground, setBounds, setBounds, setComponentOrientation,
setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled,
setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation,
setName, setSize, setSize, setVisible, show, size, toString, transferFocus,
transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Field Detail
dbName
public java.lang.String dbName
The name of the local database to access
dbDriverPrefix
public java.lang.String dbDriverPrefix
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
41 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
The JDBC driver prefix URL
dbDriverClass
public java.lang.String dbDriverClass
The JDBC driver class name
dbUserName
public java.lang.String dbUserName
Username to use to access the local database
dbPassWord
public java.lang.String dbPassWord
Password used to access the local database
Constructor Detail
Viewer
public Viewer()
Class constructor, builds the GUI components, and also creates a consumer to query for the
Trace Information table, this information is then used to populate a drop down menu to allow
users to select a trace to view.
Method Detail
getTraceInfo
public java.sql.ResultSet getTraceInfo()
Returns the Trace Information table from the R-GMA
Returns:
ResultSet containing Trace Information table
getPacketData
public java.sql.ResultSet getPacketData(java.lang.String FileID,
int PacketID)
Returns the data for a particular packet within a file in the form of a result set.
Parameters:
FileID - identifies a file within the currently viewed trace
PacketID - identifies a packet within the file
Returns:
ResultSet, containing the data of this packet
connect
public java.sql.Connection connect(java.lang.String dbDriverClass,
java.lang.String dbDriverPrefix,
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
42 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
java.lang.String dbName,
java.lang.String dbUserName,
java.lang.String dbPassWord)
Creates a connection to a local database
Parameters:
dbDriverClass - The JDBC driver class name
dbDriverPrefix - The JDBC driver prefix URL
dbUserName - Username to use to access the local database
dbPassWord - Password used to access local database
run
public void run()
Specified by:
run in interface java.lang.Runnable
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
43 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
8.2. QUERY ENGINE CLASSES
ie.tcd.pseudo
Class engineThread
java.lang.Object
|
+--ie.tcd.pseudo.engineThread
All Implemented Interfaces:
java.lang.Runnable
public class engineThread
extends java.lang.Object
implements java.lang.Runnable
The EngineThread class services jobs placed on the job queue
Constructor Summary
engineThread(java.lang.String configFile, java.util.LinkedList jobList,
timestamp ts)
Class constructor, creates an instance of the Search class using the specified configFile
Method Summary
void run()
monitors the job queue, when a job is received the query is extracted from the job and
then run by calling the Search class execute method
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
wait, wait, wait
Constructor Detail
engineThread
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
44 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
public engineThread(java.lang.String configFile,
java.util.LinkedList jobList,
timestamp ts)
Class constructor, creates an instance of the Search class using the specified configFile
Parameters:
configFile - Search class configuration file
jobList - the job queue
ts - a timestamp
Method Detail
run
public void run()
Monitors the job queue, when a job is received the query is extracted from the job and then
run by calling the Search class execute method
Specified by:
run in interface java.lang.Runnable
Returns:
void
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
45 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
ie.tcd.pseudo
Class FileManager
java.lang.Object
|
+--ie.tcd.pseudo.FileManager
public class FileManager
extends java.lang.Object
Handles loading of the configuration files and also the schema files, used by the Search class
to obtain the trace files to be searched
Constructor Summary
FileManager(java.io.File Config)
Method Summary
void
AddFile(java.lang.String FileName)
void
AddFileAndToRecordsAlso(java.lang.String FileName)
java.io.File GetASearchFile(int FileNo)
Gets a particular trace file
java.io.File GetRschemaFile()
Returns the Rschema file
java.io.File GetSchemaFile()
Returns the schema file
void
Initialise()
Called by the constructor to load in the config and schema files
int
NoClosedSearchFiles()
int
NoSearchFiles()
void
SetConfigFile(java.io.File Conf)
Sets the configuration file to be the file given
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
46 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
wait, wait, wait
Constructor Detail
FileManager
public FileManager(java.io.File Config)
Method Detail
Initialise
public void Initialise()
Called by the constructor to load in the config and schema files
SetConfigFile
public void SetConfigFile(java.io.File Conf)
Sets the configuration file to be the file given
Parameters:
Conf - the file to use for the configuration
GetASearchFile
public java.io.File GetASearchFile(int FileNo)
Gets a particular trace file
NoSearchFiles
public int NoSearchFiles()
NoClosedSearchFiles
public int NoClosedSearchFiles()
AddFile
public void AddFile(java.lang.String FileName)
AddFileAndToRecordsAlso
public void AddFileAndToRecordsAlso(java.lang.String FileName)
GetSchemaFile
public java.io.File GetSchemaFile()
Returns the schema file
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
47 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
GetRschemaFile
public java.io.File GetRschemaFile()
Returns the Rschema file
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
48 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
ie.tcd.pseudo
Class filter
java.lang.Object
|
+--ie.tcd.pseudo.filter
Direct Known Subclasses:
search
public class filter
extends java.lang.Object
Superclass of the Search class, provides methods for loading packets from the raw trace file.
Constructor Summary
filter()
Class constructor
Method Summary
boolean
CheckConstraints(int Table, int Field)
Checks the packet for the table and field parameters
boolean
CheckTableConstraints(int Table)
Return true if the packet contains the fields we want. ONLY interested
in the IP ICMP TCP UDP tables as there are tables for eth, file & pkt headers
java.lang.String getField(int Table, int Field)
Get the field at the table and field identifiers given
long
GetField(int Table, int Field)
Get the field at the table and field identifiers given
int
LoadNextPacket()
Load the next packet into the buffer
int
My_filter(java.io.File fd)
Create a new filter object that can search packets in the file - File
void
PrintCurrPktData()
int
Reset(java.io.File fd)
Change the file to be searched
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
49 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
wait, wait, wait
Constructor Detail
filter
public filter()
Class constructor
Method Detail
My_filter
public int My_filter(java.io.File fd)
Create a new filter object that can search packets in the file - File
Parameters:
fd - This file descriptor gives the location of the log file to be searched
Reset
public int Reset(java.io.File fd)
Change the file to be searched
Parameters:
fd - The file descriptor of a new file
Returns:
0 On failure 1 On success
LoadNextPacket
public int LoadNextPacket()
Load the next packet into the buffer
Returns:
1 On successfully loading the next packet, 0 On failure, -1 On end of file
CheckTableConstraints
public boolean CheckTableConstraints(int Table)
Return true if the packet contains the fields we want. ONLY interested in the IP ICMP TCP
UDP tables as there are tables for eth, file & pkt headers
CheckConstraints
public boolean CheckConstraints(int Table,
int Field)
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
50 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Checks the packet for the table and field parameters
Parameters:
Table - Table Id
Field - Field Id
Returns:
False if this packet doesn't contain these fields
GetField
public long GetField(int Table,
int Field)
Get the field at the table and field identifiers given
Parameters:
Table - The table identifier
Field - The field identifier
Returns:
The value of the field
getField
public java.lang.String getField(int Table,
int Field)
Get the field at the table and field identifiers given
Parameters:
Table - The table identifier
Field - The field identifier
Returns:
The value of the field
PrintCurrPktData
public void PrintCurrPktData()
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
51 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
ie.tcd.pseudo
Class pseudoResponseThread
java.lang.Object
|
+--ie.tcd.pseudo.pseudoResponseThread
All Implemented Interfaces:
java.lang.Runnable
public class pseudoResponseThread
extends java.lang.Object
implements java.lang.Runnable
Listens on a socket for queries sent from the Server, once received this object adds itself to
the list of pending jobs, which the Engine Thread monitors.
Field Summary
java.lang.String My_Query
The query received from the Server
java.util.Vector my_Results
Vector to store the results received
Constructor Summary
pseudoResponseThread(java.net.Socket cclient, int clientIdentifier,
timestamp time_stmp, java.util.LinkedList ll,
javax.swing.JTextArea textArea)
Class constructor, creates the BufferedReader to read from the socket and a PrintWriter to
write to it.
Method Summary
java.lang.String
getClientData()
Reads in the query from the socket using the BufferedReader
java.io.PrintWriter getPrintWriter()
Returns this objects PrintWriter
java.util.Vector
getResults()
Returns the Vector which is used to store the set of results
void
run()
Listens on the socket for a query, once received this instance places
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
52 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
itself on the job queue maintained by the engineThread, it then waits for
results to be returned.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
wait, wait, wait
Field Detail
my_Results
public java.util.Vector my_Results
Vector to store the results received
My_Query
public java.lang.String My_Query
The query received from the Server
Constructor Detail
pseudoResponseThread
public pseudoResponseThread(java.net.Socket cclient,
int clientIdentifier,
timestamp time_stmp,
java.util.LinkedList ll,
javax.swing.JTextArea textArea)
Class constructor, creates the BufferedReader to read from the socket and a PrintWriter to
write to it.
Parameters:
cclient - Socket to listen for queries
clientIdentifier time_stmp - timestamp at which the Server was started
textArea - JTextArea used to display status messages
Method Detail
getClientData
public java.lang.String getClientData()
Reads in the query from the socket using the BufferedReader
run
public void run()
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
53 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Listens on the socket for a query, once received this instance places itself on the job queue
maintained by the engineThread, it then waits for results to be returned.
Specified by:
run in interface java.lang.Runnable
getResults
public java.util.Vector getResults()
Returns the Vector which is used to store the set of results
getPrintWriter
public java.io.PrintWriter getPrintWriter()
Returns this objects PrintWriter
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
54 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
ie.tcd.pseudo
Class search
java.lang.Object
|
+--ie.tcd.pseudo.filter
|
+--ie.tcd.pseudo.search
All Implemented Interfaces:
java.lang.Runnable
public class search
extends filter
implements java.lang.Runnable
Search class queues queries received from the EngineThread and executes them in parallel
(concurrently).
Constructor Summary
search(java.lang.String ConfigFileHome)
Class constructor, creates a new instance of the FileManager and SQLParser
search(java.lang.String ConfigFileHome, timestamp ts)
Class constructor, sets a timestamp
Method Summary
int
AccumulateResult(int filepacketcount,
ie.tcd.pseudo.SelectQuery a_query)
Collects the results from the query
int
DoFileSearch(java.io.File SearchFile)
Performs the search on a trace file, each packet is loaded and
checked to see if it matches the WHERE clause.
java.util.LinkedList Execute(java.lang.String query)
Executes a single query
java.util.LinkedList Execute(java.lang.String[] query)
Executes an array of queries
java.util.LinkedList Execute(java.lang.String[] query,
java.io.PrintWriter[] fos, int[] bufsize)
java.util.LinkedList Execute(java.lang.String query,
java.io.PrintWriter fos, int bufsize)
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
55 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
java.util.LinkedList Execute(java.lang.String query,
java.io.PrintWriter fos, java.util.Vector res)
NewQueryLists()
void
Clears the query queue and removes any currently stacked queries
void
PrintResults(java.util.LinkedList ll, int from,
int to, java.io.PrintWriter out)
void
PrintResults(java.io.PrintWriter out)
void
PrintResults(ie.tcd.pseudo.SelectQuery q_uery,
java.io.PrintWriter out)
void
run()
Methods inherited from class ie.tcd.pseudo.filter
CheckConstraints, CheckTableConstraints, getField, GetField,
LoadNextPacket, My_filter, PrintCurrPktData, Reset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
wait, wait, wait
Constructor Detail
search
public search(java.lang.String ConfigFileHome)
throws java.lang.Exception,
java.io.FileNotFoundException
Class constructor, creates a new instance of the FileManager and SQLParser
Parameters:
ConfigFileHome - is the location of the file containing configuration information
search
public search(java.lang.String ConfigFileHome,
timestamp ts)
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
56 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
throws java.lang.Exception,
java.io.FileNotFoundException
Class constructor, sets a timestamp
Method Detail
NewQueryLists
public void NewQueryLists()
Clears the query queue and removes any currently stacked queries
run
public void run()
Specified by:
run in interface java.lang.Runnable
Execute
public java.util.LinkedList Execute(java.lang.String query)
Executes a single query
Parameters:
query - the SQL query
Execute
public java.util.LinkedList Execute(java.lang.String[] query)
Excutes an array of queries
Parameters:
query - an array of queries
Execute
public java.util.LinkedList Execute(java.lang.String query,
java.io.PrintWriter fos,
int bufsize)
Execute
public java.util.LinkedList Execute(java.lang.String[] query,
java.io.PrintWriter[] fos,
int[] bufsize)
Execute
public java.util.LinkedList Execute(java.lang.String query,
java.io.PrintWriter fos,
java.util.Vector res)
DoFileSearch
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
57 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
public int DoFileSearch(java.io.File SearchFile)
Performs the search on a trace file, each packet is loaded and checked to see if it matches the
WHERE clause.
Parameters:
SearchFile - the trace file to be searched
AccumulateResult
public int AccumulateResult(int filepacketcount,
ie.tcd.pseudo.SelectQuery a_query)
Collects the results from the query
Parameters:
filepacketcount - the number of packets searched in the file
a_query - the query that was carried out
PrintResults
public void PrintResults(java.io.PrintWriter out)
PrintResults
public void PrintResults(java.util.LinkedList ll,
int from,
int to,
java.io.PrintWriter out)
PrintResults
public void PrintResults(ie.tcd.pseudo.SelectQuery q_uery,
java.io.PrintWriter out)
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
58 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
ie.tcd.pseudo
Class SelectQuery
java.lang.Object
|
+--ie.tcd.pseudo.SelectQuery
public class SelectQuery
extends java.lang.Object
Class used to represent a SQL select statement
Field Summary
boolean
All
java.lang.Object[] Expression
int[]
From
int[]
From_Table_Ids
int
holdBufferSize
int
No_Entries
int
No_Results
int
No_Tables
java.lang.String[] Ops
java.util.Vector
Results
boolean[]
SelAll
int[]
Select_Field_Ids
java.lang.String
select_str
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
59 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
int[]
Select_Table_Ids
int[]
Size
int
type
int[]
Where_Field_Ids
int
Where_No_Entries
int[]
Where_Table_Ids
Constructor Summary
SelectQuery(java.lang.String Sel_Str)
Class constructor
SelectQuery(java.lang.String Sel_Str, java.io.PrintWriter my_fos,
int buff)
SelectQuery(java.lang.String Sel_Str, java.io.PrintWriter my_fos,
int buff, java.util.Vector d_results)
SelectQuery(java.lang.String Sel_Str, java.io.PrintWriter my_fos,
java.util.Vector d_results)
Method Summary
void
AddMetaDataInformation(java.lang.String[] meta)
void
AddResult(java.util.Vector result)
int
AddSelectEntry(java.lang.String metaData, int tableId, int fieldId)
Add an entry to the SELECT list
int
AddWhereEntry(int tableId, int fieldId, java.lang.String op,
java.lang.Object exp)
Add an entry to the WHERE list
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
60 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
int[] AllTablesRequired()
void
clear()
Clears the Linked lists used to store the query parts
void
DumpResults()
void
finalise()
int
NumEntries()
int[] ReturnFieldsByTableId(int tableId)
void
SelectAll(int tableId, java.lang.String tableName,
java.util.Vector metaData)
void
vecResultsInit()
Initialises the Vector that is used to store the query results
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
wait, wait, wait
Field Detail
select_str
public java.lang.String select_str
No_Results
public int No_Results
Results
public java.util.Vector Results
No_Entries
public int No_Entries
type
public int type
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
61 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
Select_Table_Ids
public int[] Select_Table_Ids
Select_Field_Ids
public int[] Select_Field_Ids
All
public boolean All
From
public int[] From
Size
public int[] Size
SelAll
public boolean[] SelAll
No_Tables
public int No_Tables
From_Table_Ids
public int[] From_Table_Ids
Where_No_Entries
public int Where_No_Entries
Where_Table_Ids
public int[] Where_Table_Ids
Where_Field_Ids
public int[] Where_Field_Ids
Expression
public java.lang.Object[] Expression
Ops
public java.lang.String[] Ops
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
62 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
holdBufferSize
public int holdBufferSize
Constructor Detail
SelectQuery
public SelectQuery(java.lang.String Sel_Str)
Class constructor
Parameters:
Sel_Str - the SQL select statement
SelectQuery
public SelectQuery(java.lang.String Sel_Str,
java.io.PrintWriter my_fos,
int buff)
SelectQuery
public SelectQuery(java.lang.String Sel_Str,
java.io.PrintWriter my_fos,
java.util.Vector d_results)
SelectQuery
public SelectQuery(java.lang.String Sel_Str,
java.io.PrintWriter my_fos,
int buff,
java.util.Vector d_results)
Method Detail
clear
public void clear()
Clears the Linked lists used to store the query parts
vecResultsInit
public void vecResultsInit()
Initialises the Vector that is used to store the query results
SelectAll
public void SelectAll(int tableId,
java.lang.String tableName,
java.util.Vector metaData)
NumEntries
public int NumEntries()
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
63 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
AllTablesRequired
public int[] AllTablesRequired()
AddSelectEntry
public int AddSelectEntry(java.lang.String metaData,
int tableId,
int fieldId)
Add an entry to the SELECT list
AddWhereEntry
public int AddWhereEntry(int tableId,
int fieldId,
java.lang.String op,
java.lang.Object exp)
Add an entry to the WHERE list
ReturnFieldsByTableId
public int[] ReturnFieldsByTableId(int tableId)
AddMetaDataInformation
public void AddMetaDataInformation(java.lang.String[] meta)
AddResult
public void AddResult(java.util.Vector result)
finalise
public void finalise()
DumpResults
public void DumpResults()
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
64 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
ie.tcd.pseudo
Class SQLParser
java.lang.Object
|
+--ie.tcd.pseudo.SQLParser
public class SQLParser
extends java.lang.Object
Takes in queries and creates new SelectQueries, ie it breaks the queries into three seperate list,
a SELECT list, a FROM list and a WHERE list
Constructor Summary
SQLParser(ie.tcd.pseudo.FileManager FM)
Class constructor, reads in the Schema and Rschema files by using a FileManager
Method Summary
ie.tcd.pseudo.SelectQuery AddQueryToList(java.lang.String SelectString)
Breaks the query into three linked-lists, a select list, a from
list and a where list.
ie.tcd.pseudo.SelectQuery AddQueryToList(java.lang.String SelectString,
java.io.PrintWriter fos, int bufsize)
ie.tcd.pseudo.SelectQuery AddQueryToList(java.lang.String SelectString,
java.io.PrintWriter fos, int bufsize,
java.util.Vector d_results)
ie.tcd.pseudo.SelectQuery AddQueryToList(java.lang.String SelectString,
java.io.PrintWriter fos, java.util.Vector res)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
wait, wait, wait
Constructor Detail
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
65 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
SQLParser
public SQLParser(ie.tcd.pseudo.FileManager FM)
Class constructor, reads in the Schema and Rschema files by using a FileManager
Parameters:
FM - the filemanager used to handle the files
Method Detail
AddQueryToList
public ie.tcd.pseudo.SelectQuery
AddQueryToList(java.lang.String SelectString)
Breaks the query into three linked-lists, a select list, a from list and a where list.
Parameters:
SelectString - the SQL SELECT statement
Returns:
SelectQuery the query now broken into three lists
AddQueryToList
public ie.tcd.pseudo.SelectQuery
AddQueryToList(java.lang.String SelectString,
java.io.PrintWriter fos,
java.util.Vector res)
AddQueryToList
public ie.tcd.pseudo.SelectQuery
AddQueryToList(java.lang.String SelectString,
java.io.PrintWriter fos,
int bufsize)
AddQueryToList
public ie.tcd.pseudo.SelectQuery
AddQueryToList(java.lang.String SelectString,
java.io.PrintWriter fos,
int bufsize,
java.util.Vector d_results)
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
66 / 67
TASK 3.3 GRID MONITORING
SANTA-G Design Document
8.3. SENSOR INFORMATION TABLE DESCRIPTIONS
The Sensor class has to maintain information about the available traces and also the files used to store
the raw trace data within these traces. This is done by using a DBProducer, which publishes the
following tables:
Trace_Info
Trace_Directory
The URI of the subdirectory within the Traces Archive that stores the
circular queue for this trace.
Start_Time
The time the trace was started.
No_Of_Slots
The number of files to use to create the circular queue.
Description
A description of the trace experiment.
File_Info
Trace_Directory
File_ID
The URI of the subdirectory within the Traces Archive that stores the
circular queue for this trace.
The ID of an individual file within the circular queue
Start_Time
The time at which the file was first written too.
No_Of_Packets
The number of packets in the file
Status
The current status of the file, i.e. is it currently being written too
(open) or not (closed).
CG3.3.2-D3.2-v1.2-TCD020SantaGDesign
PUBLIC
67 / 67