perfsonar-dev - perfsonar: r4917 - in trunk/geant2-java-sql-ma: conf src/main/java/org/perfsonar/service/measurementArchive/sqlType src/main/java/org/perfsonar/service/measurementArchive/sqlType/fetch
Subject: perfsonar development work
List archive
perfsonar: r4917 - in trunk/geant2-java-sql-ma: conf src/main/java/org/perfsonar/service/measurementArchive/sqlType src/main/java/org/perfsonar/service/measurementArchive/sqlType/fetch
Chronological Thread
- From:
- To:
- Subject: perfsonar: r4917 - in trunk/geant2-java-sql-ma: conf src/main/java/org/perfsonar/service/measurementArchive/sqlType src/main/java/org/perfsonar/service/measurementArchive/sqlType/fetch
- Date: Thu, 29 Jan 2009 10:32:53 -0500
Author: roman
Date: 2009-01-29 10:32:52 -0500 (Thu, 29 Jan 2009)
New Revision: 4917
Added:
trunk/geant2-java-sql-ma/conf/ibatis-SqlMapConfig-iperf.xml
trunk/geant2-java-sql-ma/conf/ibatis-iperf.xml
trunk/geant2-java-sql-ma/conf/sql-database_iperf_TEST.xml
trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/fetch/IperfResponseGenerator.java
Modified:
trunk/geant2-java-sql-ma/conf/eventType-map.xml
trunk/geant2-java-sql-ma/conf/mysql-sqlma-dbremove.sql
trunk/geant2-java-sql-ma/conf/mysql-sqlma-dbsetup.sql
trunk/geant2-java-sql-ma/conf/sql-database_TEST.xml
trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
Log:
fetching the iperf data added (not finished)
Modified: trunk/geant2-java-sql-ma/conf/eventType-map.xml
===================================================================
--- trunk/geant2-java-sql-ma/conf/eventType-map.xml 2009-01-29 12:10:29
UTC (rev 4916)
+++ trunk/geant2-java-sql-ma/conf/eventType-map.xml 2009-01-29 15:32:52
UTC (rev 4917)
@@ -76,6 +76,16 @@
</eventType>
<eventType>
+ <name>http://ggf.org/ns/nmwg/tools/iperf/2.0</name>
+
<metadataQueryGenerator>org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.IperfQueryGenerator</metadataQueryGenerator>
+
<responseGenerator>org.perfsonar.service.measurementArchive.sqlType.fetch.IperfResponseGenerator</responseGenerator>
+ <!--
+
<storeRequestProcess>org.perfsonar.service.measurementArchive.sqlType.store.IperfStoreRequestProcess</storeRequestProcess>
+ -->
+ </eventType>
+
+
+ <eventType>
<name>http://ggf.org/ns/nmwg/tools/ping/2.0</name>
<metadataQueryGenerator>org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.PingQueryGenerator</metadataQueryGenerator>
<responseGenerator>org.perfsonar.service.measurementArchive.sqlType.fetch.PingResponseGenerator</responseGenerator>
Added: trunk/geant2-java-sql-ma/conf/ibatis-SqlMapConfig-iperf.xml
Added: trunk/geant2-java-sql-ma/conf/ibatis-iperf.xml
Modified: trunk/geant2-java-sql-ma/conf/mysql-sqlma-dbremove.sql
===================================================================
--- trunk/geant2-java-sql-ma/conf/mysql-sqlma-dbremove.sql 2009-01-29
12:10:29 UTC (rev 4916)
+++ trunk/geant2-java-sql-ma/conf/mysql-sqlma-dbremove.sql 2009-01-29
15:32:52 UTC (rev 4917)
@@ -34,11 +34,15 @@
DROP TABLE
+ interdomain_link;
+
+
+DROP TABLE
perfsonar_links;
DROP TABLE
- interdomain_link;
+ perfsonar_iperf;
#DROP TABLE
Modified: trunk/geant2-java-sql-ma/conf/mysql-sqlma-dbsetup.sql
===================================================================
--- trunk/geant2-java-sql-ma/conf/mysql-sqlma-dbsetup.sql 2009-01-29
12:10:29 UTC (rev 4916)
+++ trunk/geant2-java-sql-ma/conf/mysql-sqlma-dbsetup.sql 2009-01-29
15:32:52 UTC (rev 4917)
@@ -87,7 +87,26 @@
alarm_id_set VARCHAR(255),
comments VARCHAR(255));
+CREATE TABLE
+ perfsonar_iperf
+ (metadataId VARCHAR(30) NOT NULL,
+ value FLOAT (16,4) NOT NULL,
+ valueUnits VARCHAR(30) NULL,
+ numBytes INT NULL,
+ numBytesUnits VARCHAR(15) NULL,
+ time INT NOT NULL,
+ format VARCHAR(30) NULL,
+ interv VARCHAR(30) NULL,
+ protocol VARCHAR(10) NULL,
+ bufferLength INT NULL,
+ windowSize INT NULL,
+ windowSizeRequest VARCHAR(30) NULL,
+ timeDuration VARCHAR(30) NULL,
+ arguments VARCHAR(50) NULL,
+ test_session_id VARCHAR(30) NULL,
+ ts TIMESTAMP DEFAULT NOW());
+
############### Create table for OWAMP data ################
#
#CREATE TABLE
@@ -248,3 +267,15 @@
INSERT
INTO perfsonar_links (id, status_oper, time)
VALUES ('PSNC-2-DFN-MUE-Link-1002', 'up', '2006-04-06 12:17:33');
+
+
+
+# insert statements for testing perfsonar_iperf table
+
+INSERT
+ INTO perfsonar_iperf
+ VALUES ('meta1-iperf-test', 93938560, 'bits/sec', 23484640, 'Bytes',
1197642642, NULL, NULL, 'TCP', NULL, NULL, NULL, NULL, NULL, NULL, default);
+
+INSERT
+ INTO perfsonar_iperf
+ VALUES ('meta2-iperf-test', 93938560, 'bits/sec', 23484640, 'Bytes',
1197642662, NULL, NULL, 'UDP', NULL, NULL, NULL, NULL, NULL, NULL, default);
Modified: trunk/geant2-java-sql-ma/conf/sql-database_TEST.xml
===================================================================
--- trunk/geant2-java-sql-ma/conf/sql-database_TEST.xml 2009-01-29 12:10:29
UTC (rev 4916)
+++ trunk/geant2-java-sql-ma/conf/sql-database_TEST.xml 2009-01-29 15:32:52
UTC (rev 4917)
@@ -335,5 +335,56 @@
</nmwg:data>
+ <!-- iperf/bwctl -->
+ <nmwg:metadata id="meta1-iperf-test">
+ <iperf:subject xmlns:iperf="http://ggf.org/ns/nmwg/tools/iperf/2.0/"
id="subject-1">
+ <nmwgt:endPointPair
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/">
+ <nmwgt:src type="ipv4" value="198.32.8.170" port="5433"/>
+ <nmwgt:dst type="ipv4" value="198.32.8.174" port="5433"/>
+ </nmwgt:endPointPair>
+ </iperf:subject>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/tools/iperf/2.0</nmwg:eventType>
+ <nmwg:parameters id="params1">
+ <nmwg:parameter name="keyword">project:geant2</nmwg:parameter>
+ </nmwg:parameters>
+ </nmwg:metadata>
+
+ <nmwg:data id="data1-iperf-test" metadataIdRef="meta1-iperf-test">
+ <nmwg:key>
+ <nmwg:parameters>
+ <nmwg:parameter
name="metadataId">meta1-iperf-test</nmwg:parameter>
+ <nmwg:parameter
name="ibatisConfig">ibatis-SqlMapConfig-iperf.xml</nmwg:parameter>
+ <nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/tools/iperf/2.0</nmwg:parameter>
+ </nmwg:parameters>
+ </nmwg:key>
+ </nmwg:data>
+
+
+
+
+ <nmwg:metadata id="meta2-iperf-test">
+ <iperf:subject xmlns:iperf="http://ggf.org/ns/nmwg/tools/iperf/2.0/"
id="subject-1">
+ <nmwgt:endPointPair
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/">
+ <nmwgt:src type="ipv4" value="150.254.0.1" port="5422"/>
+ <nmwgt:dst type="ipv4" value="150.254.0.2" port="5422"/>
+ </nmwgt:endPointPair>
+ </iperf:subject>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/tools/iperf/2.0</nmwg:eventType>
+ <nmwg:parameters id="params1">
+ <nmwg:parameter name="keyword">project:geant2</nmwg:parameter>
+ </nmwg:parameters>
+ </nmwg:metadata>
+
+ <nmwg:data id="data2-iperf-test" metadataIdRef="meta2-iperf-test">
+ <nmwg:key>
+ <nmwg:parameters>
+ <nmwg:parameter
name="metadataId">meta2-iperf-test</nmwg:parameter>
+ <nmwg:parameter
name="ibatisConfig">ibatis-SqlMapConfig-iperf.xml</nmwg:parameter>
+ <nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/tools/iperf/2.0</nmwg:parameter>
+ </nmwg:parameters>
+ </nmwg:key>
+ </nmwg:data>
+
+
</nmwg:store>
\ No newline at end of file
Added: trunk/geant2-java-sql-ma/conf/sql-database_iperf_TEST.xml
Modified:
trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
===================================================================
---
trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
2009-01-29 12:10:29 UTC (rev 4916)
+++
trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
2009-01-29 15:32:52 UTC (rev 4917)
@@ -94,7 +94,6 @@
public Message fetch(Message dataQuery)
throws PerfSONARException {
-
if (dataQuery == null)
throw new PerfSONARException(
"error.ma.query",
@@ -176,14 +175,12 @@
Reader reader = Resources.getResourceAsReader(resource);
sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
-
List resultList = null;
if (ibatisParams.get("time") != null) {
if
(((String)ibatisParams.get("time")).equalsIgnoreCase("now")) {
resultList = sqlMap.queryForList("getResults2",
ibatisParams);
-
} else {
throw new PerfSONARException(
"error.ma.query",
@@ -196,7 +193,6 @@
resultList = sqlMap.queryForList("getResults2",
ibatisParams);
}
-
//logger.debug("SQLStorageManager.fetch: "
// + "The number of fetched rows from db for
metadata "
// + md.getId() + ": "
Added:
trunk/geant2-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/fetch/IperfResponseGenerator.java
- perfsonar: r4917 - in trunk/geant2-java-sql-ma: conf src/main/java/org/perfsonar/service/measurementArchive/sqlType src/main/java/org/perfsonar/service/measurementArchive/sqlType/fetch, svnlog, 01/29/2009
Archive powered by MHonArc 2.6.16.