Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r4240 - in branches/GEANT2-JAVA-RRD-MA-STABLE: . ant conf conf/axis-1.4/WEB-INF conf/wsdd contrib/rrdjtool/java contrib/rrdjtool/java/src contrib/rrdjtool/java/src/rrd doc samples/requests src/main/java/org/perfsonar/service/measurementArchive/rrdType

Subject: perfsonar development work

List archive

perfsonar: r4240 - in branches/GEANT2-JAVA-RRD-MA-STABLE: . ant conf conf/axis-1.4/WEB-INF conf/wsdd contrib/rrdjtool/java contrib/rrdjtool/java/src contrib/rrdjtool/java/src/rrd doc samples/requests src/main/java/org/perfsonar/service/measurementArchive/rrdType


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r4240 - in branches/GEANT2-JAVA-RRD-MA-STABLE: . ant conf conf/axis-1.4/WEB-INF conf/wsdd contrib/rrdjtool/java contrib/rrdjtool/java/src contrib/rrdjtool/java/src/rrd doc samples/requests src/main/java/org/perfsonar/service/measurementArchive/rrdType
  • Date: Fri, 18 Jul 2008 08:28:33 -0400

Author: roman
Date: 2008-07-18 08:28:32 -0400 (Fri, 18 Jul 2008)
New Revision: 4240

Added:
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/axis-1.4/WEB-INF/server-config.wsdd
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/components.properties
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/log4j.properties
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/log4j.syslog.properties
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/service.properties
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/Rrd.java

branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/RrdDemo.java

branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/RrdException.java
branches/GEANT2-JAVA-RRD-MA-STABLE/pom.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/EchoRequest-random-fetch-test.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/EchoRequest-self-test.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/EchoRequest-xmldb-access-test.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/EchoRequest-xmldb-content-test.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/src/main/java/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMARequestHandler.java
Removed:
branches/GEANT2-JAVA-RRD-MA-STABLE/build/
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/axis-1.4/WEB-INF/server-config.wsdd
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/rrd/
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/Rrd.java
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/RrdDemo.java

branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/RrdException.java
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/Rrd.java

branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/RrdDemo.java

branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/RrdException.java
Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/
branches/GEANT2-JAVA-RRD-MA-STABLE/ant/axis-deploy-targets.xml
branches/GEANT2-JAVA-RRD-MA-STABLE/ant/const.properties.template
branches/GEANT2-JAVA-RRD-MA-STABLE/ant/libs-download-targets.xml
branches/GEANT2-JAVA-RRD-MA-STABLE/ant/test-targets.xml
branches/GEANT2-JAVA-RRD-MA-STABLE/ant/webapp-package-targets.xml
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/eventType-map.xml
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/log4j.properties.template
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/rrd-database_TEST.xml
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/service.properties.template
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/service.properties.template-2
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/wizard.properties
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/wsdd/service-deploy.wsdd
branches/GEANT2-JAVA-RRD-MA-STABLE/doc/ChangeLog.txt
branches/GEANT2-JAVA-RRD-MA-STABLE/doc/Functional_Specification.doc

branches/GEANT2-JAVA-RRD-MA-STABLE/doc/Installation_Actions_Specification.doc
branches/GEANT2-JAVA-RRD-MA-STABLE/doc/Interface_Specification.doc

branches/GEANT2-JAVA-RRD-MA-STABLE/doc/Metadata_Configuration_Specification.doc

branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/MetadataKeyRequest-Discards-2.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/MetadataKeyRequest-Errors-2.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/MetadataKeyRequest-Utilization-2.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Discards-2.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Errors-1.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Errors-2.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Utilization-1.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Utilization-3.xml

branches/GEANT2-JAVA-RRD-MA-STABLE/src/main/java/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java

branches/GEANT2-JAVA-RRD-MA-STABLE/src/main/java/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
Log:
merging with the trunk (-r 3765:4239)




Property changes on: branches/GEANT2-JAVA-RRD-MA-STABLE
___________________________________________________________________
Name: svn:ignore
- .project

+ .project
.settings
.classpath
target


Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/ant/axis-deploy-targets.xml
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/ant/axis-deploy-targets.xml
2008-07-18 12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/ant/axis-deploy-targets.xml
2008-07-18 12:28:32 UTC (rev 4240)
@@ -45,8 +45,8 @@
<target name="copy-dep-service-jars"
depends="copy-dep-base-service-jars">

- <copy
file="${basedir}/lib/repository/nmwg/nmwg/1.0.20071008/nmwg-1.0.20071008.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
- <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-base/1.0.20080422/perfsonar-base-1.0.20080422.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/nmwg/nmwg/1.0.20080630/nmwg-1.0.20080630.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-base/1.0.20080630/perfsonar-base-1.0.20080630.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
<copy
file="${basedir}/lib/repository/perfsonar/perfsonar-web-admin/0.8.3b/perfsonar-web-admin-0.8.3b.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>

<copy
file="${basedir}/lib/repository/rrdjtool/rrdjtool/1.0/rrdjtool-1.0.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
@@ -262,11 +262,11 @@

<copy file="${basedir}/${build}/${jarfilename}-${version}.jar"
todir="${tmpdir}/WEB-INF/lib"/>

- <copy
file="${basedir}/lib/repository/nmwg/nmwg/1.0.20071008/nmwg-1.0.20071008.jar"
todir="${tmpdir}/WEB-INF/lib"/>
- <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-base/1.0.20080422/perfsonar-base-1.0.20080422.jar"
todir="${tmpdir}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/nmwg/nmwg/1.0.20080630/nmwg-1.0.20080630.jar"
todir="${tmpdir}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-base/1.0.20080630/perfsonar-base-1.0.20080630.jar"
todir="${tmpdir}/WEB-INF/lib"/>
<copy
file="${basedir}/lib/repository/perfsonar/perfsonar-web-admin/0.8.3b/perfsonar-web-admin-0.8.3b.jar"
todir="${tmpdir}/WEB-INF/lib"/>

- <copy
file="${basedir}/lib/repository/rrdjtool/rrdjtool/1.0/rrdjtool-1.0.jar"
todir="${tmpdir}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/rrdjtool/rrdjtool/1.0/rrdjtool-1.0.jar"
todir="${tmpdir}/WEB-INF/lib"/>

<copy file="${basedir}/conf/eventType-map.xml"
todir="${tmpdir}/WEB-INF/classes/perfsonar/conf"/>
<copy file="${basedir}/conf/eventType-rules.xml"
todir="${tmpdir}/WEB-INF/classes/perfsonar/conf"/>

Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/ant/const.properties.template
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/ant/const.properties.template
2008-07-18 12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/ant/const.properties.template
2008-07-18 12:28:32 UTC (rev 4240)
@@ -11,7 +11,7 @@
service.name=geant2-java-rrd-ma

jarfilename=perfsonar-rrd-ma
-version=3.0rc9
+version=3.1

exist.war.file=exist-1.1.1-newcore.war

exist.war.download.url=http://www.perfsonar.net/download/dependencies/preinstall_download.php?product=exist-war&version=1.1.1

Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/ant/libs-download-targets.xml
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/ant/libs-download-targets.xml
2008-07-18 12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/ant/libs-download-targets.xml
2008-07-18 12:28:32 UTC (rev 4240)
@@ -55,9 +55,9 @@
<artifact:dependencies>

<dependency groupId="rrdjtool" artifactId="rrdjtool"
version="1.0"/>
- <dependency groupId="perfsonar" artifactId="perfsonar-base"
version="1.0.20080422"/>
+ <dependency groupId="perfsonar" artifactId="perfsonar-base"
version="1.0.20080630"/>
<dependency groupId="perfsonar" artifactId="perfsonar-web-admin"
version="0.8.3b"/>
- <dependency groupId="nmwg" artifactId="nmwg"
version="1.0.20071008"/>
+ <dependency groupId="nmwg" artifactId="nmwg"
version="1.0.20080630"/>


<localRepository refid="local.repository"/>

Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/ant/test-targets.xml
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/ant/test-targets.xml 2008-07-18
12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/ant/test-targets.xml 2008-07-18
12:28:32 UTC (rev 4240)
@@ -43,6 +43,53 @@
</target>


+ <target name="echo-xmldb-access-test"
+ depends="init-test">
+ <java classname="org.perfsonar.client.testHarness.SOAPClient"
+ classpathref="classpath"
+ fork="true">
+ <arg value="${ma.local}"/>
+ <arg
value="${basedir}/samples/requests/EchoRequest-xmldb-access-test.xml"/>
+ <arg value="${basedir}/samples/requests/response-1-xmldb-access.xml"/>
+ </java>
+ </target>
+
+
+ <target name="echo-xmldb-content-test"
+ depends="init-test">
+ <java classname="org.perfsonar.client.testHarness.SOAPClient"
+ classpathref="classpath"
+ fork="true">
+ <arg value="${ma.local}"/>
+ <arg
value="${basedir}/samples/requests/EchoRequest-xmldb-content-test.xml"/>
+ <arg value="${basedir}/samples/requests/response-1-xmldb-content.xml"/>
+ </java>
+ </target>
+
+
+ <target name="echo-random-fetch-test"
+ depends="init-test">
+ <java classname="org.perfsonar.client.testHarness.SOAPClient"
+ classpathref="classpath"
+ fork="true">
+ <arg value="${ma.local}"/>
+ <arg
value="${basedir}/samples/requests/EchoRequest-random-fetch-test.xml"/>
+ <arg value="${basedir}/samples/requests/response-1-random-fetch.xml"/>
+ </java>
+ </target>
+
+
+ <target name="echo-self-test"
+ depends="init-test">
+ <java classname="org.perfsonar.client.testHarness.SOAPClient"
+ classpathref="classpath"
+ fork="true">
+ <arg value="${ma.local}"/>
+ <arg value="${basedir}/samples/requests/EchoRequest-self-test.xml"/>
+ <arg value="${basedir}/samples/requests/response-1-self-test.xml"/>
+ </java>
+ </target>
+
<target name="lookup-info-test"
depends="init-test">
<java classname="org.perfsonar.client.testHarness.SOAPClient"

Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/ant/webapp-package-targets.xml
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/ant/webapp-package-targets.xml
2008-07-18 12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/ant/webapp-package-targets.xml
2008-07-18 12:28:32 UTC (rev 4240)
@@ -83,8 +83,8 @@

<!-- copy jar files -->
<copy file="${basedir}/${build}/${jarfilename}-${version}.jar"
todir="${tmpdir}/WEB-INF/lib"/>
- <copy
file="${basedir}/lib/repository/nmwg/nmwg/1.0.20071008/nmwg-1.0.20071008.jar"
todir="${tmpdir}/WEB-INF/lib"/>
- <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-base/1.0.20080422/perfsonar-base-1.0.20080422.jar"
todir="${tmpdir}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/nmwg/nmwg/1.0.20080630/nmwg-1.0.20080630.jar"
todir="${tmpdir}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-base/1.0.20080630/perfsonar-base-1.0.20080630.jar"
todir="${tmpdir}/WEB-INF/lib"/>
<copy
file="${basedir}/lib/repository/perfsonar/perfsonar-web-admin/0.8.3b/perfsonar-web-admin-0.8.3b.jar"
todir="${tmpdir}/WEB-INF/lib"/>
<copy
file="${basedir}/lib/repository/rrdjtool/rrdjtool/1.0/rrdjtool-1.0.jar"
todir="${tmpdir}/WEB-INF/lib"/>


Deleted:
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/axis-1.4/WEB-INF/server-config.wsdd

Copied:
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/axis-1.4/WEB-INF/server-config.wsdd
(from rev 4239,
trunk/geant2-java-rrd-ma/conf/axis-1.4/WEB-INF/server-config.wsdd)

Copied: branches/GEANT2-JAVA-RRD-MA-STABLE/conf/components.properties (from
rev 4239, trunk/geant2-java-rrd-ma/conf/components.properties)

Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/conf/eventType-map.xml
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/conf/eventType-map.xml 2008-07-18
12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/conf/eventType-map.xml 2008-07-18
12:28:32 UTC (rev 4240)
@@ -12,15 +12,32 @@

<metadataQueryGenerator>org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.UtilizationQueryGenerator</metadataQueryGenerator>

<responseGenerator>org.perfsonar.service.measurementArchive.rrdType.fetch.UtilizationResponseGenerator</responseGenerator>
</eventType>
+
<eventType>
<name>http://ggf.org/ns/nmwg/characteristic/errors/2.0</name>

<metadataQueryGenerator>org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.ErrorsQueryGenerator</metadataQueryGenerator>

<responseGenerator>org.perfsonar.service.measurementArchive.rrdType.fetch.ErrorsResponseGenerator</responseGenerator>
</eventType>
+
<eventType>
<name>http://ggf.org/ns/nmwg/characteristic/discards/2.0</name>

<metadataQueryGenerator>org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.DiscardsQueryGenerator</metadataQueryGenerator>

<responseGenerator>org.perfsonar.service.measurementArchive.rrdType.fetch.DiscardsResponseGenerator</responseGenerator>
</eventType>

+ <eventType>
+
<name>http://schemas.perfsonar.net/tools/admin/selftest/1.0/xmldb-access-test</name>
+
<metadataQueryGenerator>org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.XmlDbAccessTestQueryGenerator</metadataQueryGenerator>
+ </eventType>
+
+ <eventType>
+
<name>http://schemas.perfsonar.net/tools/admin/selftest/1.0/xmldb-content-test</name>
+
<metadataQueryGenerator>org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.XmlDbContentTestQueryGenerator</metadataQueryGenerator>
+ </eventType>
+
+ <eventType>
+
<name>http://schemas.perfsonar.net/tools/admin/selftest/1.0/random-fetch-test</name>
+
<metadataQueryGenerator>org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.RandomFetchTestQueryGenerator</metadataQueryGenerator>
+ </eventType>
+
</eventType-config>

Copied: branches/GEANT2-JAVA-RRD-MA-STABLE/conf/log4j.properties (from rev
4239, trunk/geant2-java-rrd-ma/conf/log4j.properties)

Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/conf/log4j.properties.template
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/conf/log4j.properties.template
2008-07-18 12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/conf/log4j.properties.template
2008-07-18 12:28:32 UTC (rev 4240)
@@ -69,7 +69,7 @@

# Group=Debug message logging
# Description=The log message format.
-log4j.appender.debugAppender.layout.ConversionPattern=%d %5p - %m%n
+log4j.appender.debugAppender.layout.ConversionPattern=%d
%%GEANT2-JAVA-RRD-MA.%p%% %m%n

# Group=Debug message logging
# Description=The maximum size the log file can reach before it replaces the
oldest backup file and a new log file is started.
@@ -97,7 +97,7 @@

# Group=Info message logging
# Description=The log message format.
-log4j.appender.infoAppender.layout.ConversionPattern=%d %5p - %m%n
+log4j.appender.infoAppender.layout.ConversionPattern=%d
%%GEANT2-JAVA-RRD-MA.%p%% %m%n

# Group=Info message logging
# Description=The maximum size the log file can reach before it replaces the
oldest backup file and a new log file is started.
@@ -125,7 +125,7 @@

# Group=Warn message logging
# Description=The log message format.
-log4j.appender.warnAppender.layout.ConversionPattern=%d %5p - %m%n
+log4j.appender.warnAppender.layout.ConversionPattern=%d
%%GEANT2-JAVA-RRD-MA.%p%% %m%n

# Group=Warn message logging
# Description=The maximum size the log file can reach before it replaces the
oldest backup file and a new log file is started.
@@ -153,7 +153,7 @@

# Group=Error message logging
# Description=The log message format.
-log4j.appender.errorAppender.layout.ConversionPattern=%d %5p - %m%n
+log4j.appender.errorAppender.layout.ConversionPattern=%d
%%GEANT2-JAVA-RRD-MA.%p%% %m%n

# Group=Error message logging
# Description=The maximum size the log file can reach before it replaces the
oldest backup file and a new log file is started.
@@ -181,7 +181,7 @@

# Group=Fatal message logging
# Description=The log message format.
-log4j.appender.fatalAppender.layout.ConversionPattern=%d %5p - %m%n
+log4j.appender.fatalAppender.layout.ConversionPattern=%d
%%GEANT2-JAVA-RRD-MA.%p%% %m%n

# Group=Fatal message logging
# Description=The maximum size the log file can reach before it replaces the
oldest backup file and a new log file is started.
@@ -209,7 +209,7 @@

# Group=All message logging
# Description=The log message format.
-log4j.appender.psRootAppender.layout.ConversionPattern=%d %5p - %m%n
+log4j.appender.psRootAppender.layout.ConversionPattern=%d
%%GEANT2-JAVA-RRD-MA.%p%% %m%n

# Group=All message logging
# Description=The maximum size the log file can reach before it replaces the
oldest backup file and a new log file is started.
@@ -229,7 +229,7 @@
#log4j.appender.rootAppender.MaxBackupIndex=11
#log4j.appender.rootAppender.File=_LOGPATH_/perfsonar_root.log
#log4j.appender.rootAppender.layout=org.apache.log4j.PatternLayout
-#log4j.appender.rootAppender.layout.ConversionPattern=%d %5p - %m%n
+#log4j.appender.rootAppender.layout.ConversionPattern=%d
%%GEANT2-JAVA-RRD-MA.%p%% %m%n
#log4j.rootLogger=DEBUG, rootAppender
#log4j.appender.rootAppender.MaxFileSize=500KB
#log4j.appender.rootAppender=org.apache.log4j.RollingFileAppender

Copied: branches/GEANT2-JAVA-RRD-MA-STABLE/conf/log4j.syslog.properties (from
rev 4239, trunk/geant2-java-rrd-ma/conf/log4j.syslog.properties)

Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/conf/rrd-database_TEST.xml
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/conf/rrd-database_TEST.xml
2008-07-18 12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/conf/rrd-database_TEST.xml
2008-07-18 12:28:32 UTC (rev 4240)
@@ -18,19 +18,19 @@
<nmwgt:ifName>test-0</nmwgt:ifName>
<nmwgt:ifDescription>test descripyion</nmwgt:ifDescription>
<nmwgt:direction>in</nmwgt:direction>
- <nmwgt:authRealm>TestRealm</nmwgt:authRealm>
<nmwgt:capacity>1000BaseT</nmwgt:capacity>
</nmwgt:interface>
</netutil:subject>

<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
+ <nmwg:parameters id="params1">
+ <nmwg:parameter name="keyword">project:geant2</nmwg:parameter>
+ </nmwg:parameters>
</nmwg:metadata>

<nmwg:data id="data1" metadataIdRef="meta1">
<nmwg:key>
<nmwg:parameters>
- <!-- __basepath__ string is replaced with the path of
perfsonar package -->
- <!-- when Ant configuration script is run (ant configure)
-->
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">inoctets</nmwg:parameter>
<nmwg:parameter name="valueUnits">Bps</nmwg:parameter>

@@ -55,19 +55,19 @@
<nmwgt:ifName>test-0</nmwgt:ifName>
<nmwgt:ifDescription>test descripyion</nmwgt:ifDescription>
<nmwgt:direction>out</nmwgt:direction>
- <nmwgt:authRealm>TestRealm</nmwgt:authRealm>
<nmwgt:capacity>1000BaseT</nmwgt:capacity>
</nmwgt:interface>
</netutil:subject>

<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
+ <nmwg:parameters id="params1">
+ <nmwg:parameter name="keyword">project:geant2</nmwg:parameter>
+ </nmwg:parameters>
</nmwg:metadata>

<nmwg:data id="data2" metadataIdRef="meta2">
<nmwg:key>
<nmwg:parameters>
- <!-- __basepath__ string is replaced with the path of
perfsonar package -->
- <!-- when Ant configuration script is run (ant configure)
-->
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">outoctets</nmwg:parameter>
<nmwg:parameter name="valueUnits">Bps</nmwg:parameter>

@@ -98,15 +98,16 @@
</nmwgt:interface>
</errors:subject>

<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/errors/2.0</nmwg:eventType>
+ <nmwg:parameters id="params1">
+ <nmwg:parameter name="keyword">project:geant2</nmwg:parameter>
+ </nmwg:parameters>
</nmwg:metadata>


<nmwg:data id="data3" metadataIdRef="meta3">
<nmwg:key>
<nmwg:parameters>
- <!-- __basepath__ string is replaced with the path of
perfsonar package -->
- <!-- when Ant configuration script is run (ant configure)
-->
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">inerrors</nmwg:parameter>
<nmwg:parameter name="valueUnits">Eps</nmwg:parameter>

@@ -137,15 +138,16 @@
</nmwgt:interface>
</discards:subject>

<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/discards/2.0</nmwg:eventType>
+ <nmwg:parameters id="params1">
+ <nmwg:parameter name="keyword">project:geant2</nmwg:parameter>
+ </nmwg:parameters>
</nmwg:metadata>


<nmwg:data id="data4" metadataIdRef="meta4">
<nmwg:key>
<nmwg:parameters>
- <!-- __basepath__ string is replaced with the path of
perfsonar package -->
- <!-- when Ant configuration script is run (ant configure)
-->
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">indiscards</nmwg:parameter>
<nmwg:parameter name="valueUnits">Dps</nmwg:parameter>


Copied: branches/GEANT2-JAVA-RRD-MA-STABLE/conf/service.properties (from rev
4239, trunk/geant2-java-rrd-ma/conf/service.properties)

Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/conf/service.properties.template
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/conf/service.properties.template
2008-07-18 12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/conf/service.properties.template
2008-07-18 12:28:32 UTC (rev 4240)
@@ -1,8 +1,10 @@

service.r.type=ma
+service.name=geant2-java-rrd-ma-3.1


service.ma.class_name=org.perfsonar.service.measurementArchive.rrdType.RRDTypeMAServiceEngine
-service.ma.message_types=MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest,EchoRequest,LookupInfoRequest
+#service.ma.message_types=MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest,EchoRequest,LookupInfoRequest
+service.ma.message_types=MetadataKeyRequest,SetupDataRequest,EchoRequest,LookupInfoRequest


service.ma.base_chaining_mergers=org.perfsonar.service.measurementArchive.rrdType.NMWGInterfaceBaseChaining


Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/conf/service.properties.template-2
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/conf/service.properties.template-2
2008-07-18 12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/conf/service.properties.template-2
2008-07-18 12:28:32 UTC (rev 4240)
@@ -14,12 +14,17 @@
service.r.type=ma

# Group=Internal
+# Description=The service name.
+service.name=geant2-java-rrd-ma-3.1
+
+# Group=Internal
# Description=The java class file which implements the ServiceEngine
interface.

service.ma.class_name=org.perfsonar.service.measurementArchive.rrdType.RRDTypeMAServiceEngine

# Group=Internal
# Description=A CSV of request message types supported by the service.
-service.ma.message_types=MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest,EchoRequest,LookupInfoRequest
+##service.ma.message_types=MetadataKeyRequest,SetupDataRequest,MeasurementArchiveStoreRequest,EchoRequest,LookupInfoRequest
+service.ma.message_types=MetadataKeyRequest,SetupDataRequest,EchoRequest,LookupInfoRequest

# Group=Internal
# Description=The java class file which implements the base chaining of
requests.

Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/conf/wizard.properties
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/conf/wizard.properties 2008-07-18
12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/conf/wizard.properties 2008-07-18
12:28:32 UTC (rev 4240)
@@ -63,9 +63,9 @@
</property>

<property>
- <entry key="service.ma.conf_file"
required="true">__BASEPATH__/classes/perfsonar/conf/rrd-database_TEST.xml</entry>
+ <entry key="service.ma.conf_file"
required="true">/var/lib/tomcat5.5/webapps/geant2-java-rrd-ma/WEB-INF/classes/perfsonar/conf/rrd-database_TEST.xml</entry>
<Comment>Enter the full path of the metadata configuration
file:</Comment>
-
<ProposedValue>__BASEPATH__/classes/perfsonar/conf/rrd-database_TEST.xml</ProposedValue>
+
<ProposedValue>/var/lib/tomcat5.5/webapps/geant2-java-rrd-ma/WEB-INF/classes/perfsonar/conf/rrd-database_TEST.xml</ProposedValue>
<Group order="6">eXist</Group>
</property>


Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/conf/wsdd/service-deploy.wsdd
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/conf/wsdd/service-deploy.wsdd
2008-07-18 12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/conf/wsdd/service-deploy.wsdd
2008-07-18 12:28:32 UTC (rev 4240)
@@ -4,7 +4,8 @@
<service name="MeasurementArchiveService" style="message">
<Documentation>Defines the name of the service and the type of service. The
style if message which for some reason makes communication cleaner and does
not affect anything. It implicitly uses Document style </Documentation>

-<parameter name="className"
value="org.perfsonar.service.base.web.RequestHandler"/>
+<!-- <parameter name="className"
value="org.perfsonar.service.base.web.RequestHandler"/> -->
+<parameter name="className"
value="org.perfsonar.service.measurementArchive.rrdType.RRDTypeMARequestHandler"/>
<Documentation> Define the name of the class to be used for the service.
This will remain the same regardless of the service </Documentation>

<parameter name="allowedMethods" value="acceptCall"/>

Deleted: branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/Rrd.java

Deleted:
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/RrdDemo.java

Deleted:
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/RrdException.java

Copied: branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd
(from rev 4239, trunk/geant2-java-rrd-ma/contrib/rrdjtool/java/src/rrd)

Deleted:
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/Rrd.java

Copied:
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/Rrd.java
(from rev 4239,
trunk/geant2-java-rrd-ma/contrib/rrdjtool/java/src/rrd/Rrd.java)

Deleted:
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/RrdDemo.java

Copied:
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/RrdDemo.java
(from rev 4239,
trunk/geant2-java-rrd-ma/contrib/rrdjtool/java/src/rrd/RrdDemo.java)

Deleted:
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/RrdException.java

Copied:
branches/GEANT2-JAVA-RRD-MA-STABLE/contrib/rrdjtool/java/src/rrd/RrdException.java
(from rev 4239,
trunk/geant2-java-rrd-ma/contrib/rrdjtool/java/src/rrd/RrdException.java)

Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/doc/ChangeLog.txt
===================================================================
--- branches/GEANT2-JAVA-RRD-MA-STABLE/doc/ChangeLog.txt 2008-07-18
12:15:13 UTC (rev 4239)
+++ branches/GEANT2-JAVA-RRD-MA-STABLE/doc/ChangeLog.txt 2008-07-18
12:28:32 UTC (rev 4240)
@@ -1,6 +1,15 @@
RRD MA ChangeLog

+2008-07-17 Version 3.1

+- New: EchoRequest message allows now checking: if eXist database is running
and the count the content of metadata configuration file; access data from
random RRD file. It is also possible to request a self-test including all
above.
+- New: parameter keyword introduced in metadata block to indicate
project/organisation name
+- New: new request MeasurementArchiveStoreRequest switched off by default
+- New: performance improvements for MetadataKeyRequest message which fetches
all metadata elements
+- Change: format of log messages changed
+- Change: use of pSbase v1.0.20080630
+- Change: obsolete authRealm removed from metadata configuration file
+
2008-03-10 Version 3.0

- New: support of ErrorResponse message type (use of perfsonar-base library
version 1.0.20080310)

Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/doc/Functional_Specification.doc
===================================================================
(Binary files differ)

Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/doc/Installation_Actions_Specification.doc
===================================================================
(Binary files differ)

Modified: branches/GEANT2-JAVA-RRD-MA-STABLE/doc/Interface_Specification.doc
===================================================================
(Binary files differ)

Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/doc/Metadata_Configuration_Specification.doc
===================================================================
(Binary files differ)

Copied: branches/GEANT2-JAVA-RRD-MA-STABLE/pom.xml (from rev 4239,
trunk/geant2-java-rrd-ma/pom.xml)

Copied:
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/EchoRequest-random-fetch-test.xml
(from rev 4239,
trunk/geant2-java-rrd-ma/samples/requests/EchoRequest-random-fetch-test.xml)

Copied:
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/EchoRequest-self-test.xml
(from rev 4239,
trunk/geant2-java-rrd-ma/samples/requests/EchoRequest-self-test.xml)

Copied:
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/EchoRequest-xmldb-access-test.xml
(from rev 4239,
trunk/geant2-java-rrd-ma/samples/requests/EchoRequest-xmldb-access-test.xml)

Copied:
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/EchoRequest-xmldb-content-test.xml
(from rev 4239,
trunk/geant2-java-rrd-ma/samples/requests/EchoRequest-xmldb-content-test.xml)

Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/MetadataKeyRequest-Discards-2.xml
===================================================================
---
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/MetadataKeyRequest-Discards-2.xml
2008-07-18 12:15:13 UTC (rev 4239)
+++
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/MetadataKeyRequest-Discards-2.xml
2008-07-18 12:28:32 UTC (rev 4240)
@@ -8,7 +8,7 @@
<nmwg:metadata id="m1" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:key id="k1">
<nmwg:parameters id="p1">
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">indiscards</nmwg:parameter>
<nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/characteristic/discards/2.0</nmwg:parameter>
<nmwg:parameter name="valueUnits">Dps</nmwg:parameter>
@@ -44,7 +44,7 @@
<nmwg:parameters>
<nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/characteristic/discards/2.0</nmwg:parameter>
<nmwg:parameter name="valueUnits">Dps</nmwg:parameter>
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">indiscards</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>

Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/MetadataKeyRequest-Errors-2.xml
===================================================================
---
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/MetadataKeyRequest-Errors-2.xml
2008-07-18 12:15:13 UTC (rev 4239)
+++
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/MetadataKeyRequest-Errors-2.xml
2008-07-18 12:28:32 UTC (rev 4240)
@@ -8,7 +8,7 @@
<nmwg:metadata id="m1" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:key id="k1">
<nmwg:parameters id="p1">
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">inerrors</nmwg:parameter>
<nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/characteristic/errors/2.0</nmwg:parameter>
<nmwg:parameter name="valueUnits">Eps</nmwg:parameter>
@@ -44,7 +44,7 @@
<nmwg:parameters>
<nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/characteristic/errors/2.0</nmwg:parameter>
<nmwg:parameter name="valueUnits">Eps</nmwg:parameter>
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">inerrors</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>

Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/MetadataKeyRequest-Utilization-2.xml
===================================================================
---
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/MetadataKeyRequest-Utilization-2.xml
2008-07-18 12:15:13 UTC (rev 4239)
+++
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/MetadataKeyRequest-Utilization-2.xml
2008-07-18 12:28:32 UTC (rev 4240)
@@ -15,7 +15,7 @@
<nmwg:metadata id="meta1">
<nmwg:key>
<nmwg:parameters id="param1">
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>

<nmwg:parameter name="dataSource">inoctets</nmwg:parameter>
<nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:parameter>
<nmwg:parameter name="valueUnits">Bps</nmwg:parameter>

Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Discards-2.xml
===================================================================
---
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Discards-2.xml
2008-07-18 12:15:13 UTC (rev 4239)
+++
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Discards-2.xml
2008-07-18 12:28:32 UTC (rev 4240)
@@ -8,7 +8,7 @@
<nmwg:metadata id="m1" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:key id="k1">
<nmwg:parameters id="p1">
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">indiscards</nmwg:parameter>
<nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/characteristic/discards/2.0</nmwg:parameter>
<nmwg:parameter name="valueUnits">Dps</nmwg:parameter>
@@ -44,7 +44,7 @@
<nmwg:parameters>
<nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/characteristic/discards/2.0</nmwg:parameter>
<nmwg:parameter name="valueUnits">Dps</nmwg:parameter>
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">indiscards</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>

Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Errors-1.xml
===================================================================
---
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Errors-1.xml
2008-07-18 12:15:13 UTC (rev 4239)
+++
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Errors-1.xml
2008-07-18 12:28:32 UTC (rev 4240)
@@ -6,8 +6,8 @@

xmlns:errors="http://ggf.org/ns/nmwg/characteristic/errors/2.0/";
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
xmlns:select="http://ggf.org/ns/nmwg/ops/select/2.0/";>
-
-
+
+
<nmwg:metadata id="m1">
<errors:subject id="s1">
<nmwgt:interface>
@@ -18,7 +18,7 @@
</errors:subject>

<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/errors/2.0</nmwg:eventType>
</nmwg:metadata>
-
+
<nmwg:data id="d1" metadataIdRef="m1"/>



Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Errors-2.xml
===================================================================
---
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Errors-2.xml
2008-07-18 12:15:13 UTC (rev 4239)
+++
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Errors-2.xml
2008-07-18 12:28:32 UTC (rev 4240)
@@ -11,7 +11,7 @@
<nmwg:metadata id="m1" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:key id="k1">
<nmwg:parameters id="p1">
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">inerrors</nmwg:parameter>
<nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/characteristic/errors/2.0</nmwg:parameter>
<nmwg:parameter name="valueUnits">Eps</nmwg:parameter>
@@ -47,7 +47,7 @@
<nmwg:parameters>
<nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/characteristic/errors/2.0</nmwg:parameter>
<nmwg:parameter name="valueUnits">Eps</nmwg:parameter>
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">inerrors</nmwg:parameter>
</nmwg:parameters>
</nmwg:key>

Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Utilization-1.xml
===================================================================
---
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Utilization-1.xml
2008-07-18 12:15:13 UTC (rev 4239)
+++
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Utilization-1.xml
2008-07-18 12:28:32 UTC (rev 4240)
@@ -13,7 +13,7 @@
<nmwg:metadata id="meta1">
<nmwg:key>
<nmwg:parameters id="param1">
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>

<nmwg:parameter name="dataSource">inoctets</nmwg:parameter>
<nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:parameter>
<nmwg:parameter name="valueUnits">Bps</nmwg:parameter>

Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Utilization-3.xml
===================================================================
---
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Utilization-3.xml
2008-07-18 12:15:13 UTC (rev 4239)
+++
branches/GEANT2-JAVA-RRD-MA-STABLE/samples/requests/SetupDataRequest-Utilization-3.xml
2008-07-18 12:28:32 UTC (rev 4240)
@@ -14,7 +14,7 @@
<nmwg:metadata id="meta1">
<nmwg:key>
<nmwg:parameters id="param1">
- <nmwg:parameter
name="file">__BASEPATH__/samples/rrd/test.rrd</nmwg:parameter>
+ <nmwg:parameter
name="file">/usr/share/doc/geant2-java-rrd-ma/samples/rrd/test.rrd</nmwg:parameter>

<nmwg:parameter name="dataSource">inoctets</nmwg:parameter>
<nmwg:parameter
name="eventType">http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:parameter>
<nmwg:parameter name="valueUnits">Bps</nmwg:parameter>

Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/src/main/java/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
===================================================================
---
branches/GEANT2-JAVA-RRD-MA-STABLE/src/main/java/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
2008-07-18 12:15:13 UTC (rev 4239)
+++
branches/GEANT2-JAVA-RRD-MA-STABLE/src/main/java/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
2008-07-18 12:28:32 UTC (rev 4240)
@@ -274,17 +274,25 @@

this.updateRRDFile(dataSet);

-
return dataSet;

}


+ public Message remove(Message dataSet) throws PerfSONARException {
+ return null;
+ }

- // ---------------------------------- protected methods

+ public void removeAll() throws PerfSONARException {
+ }


+ public Message update(Message dataSet) throws PerfSONARException {
+ return null;
+ }
+
+
/**
*
* Returns measurement data fetched from rrd file.
@@ -297,7 +305,7 @@
* @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
- *
+ *
* @author romradz
*/
protected Message rrdFetch(Message query)
@@ -465,31 +473,31 @@


try {
- _dataSourceStep = dataSourceStep.getParameterValue();
+ _dataSourceStep = dataSourceStep.getParameterValue();
} catch (Exception ex) {
;
}

try {
- _dataSourceType = dataSourceType.getParameterValue();
+ _dataSourceType = dataSourceType.getParameterValue();
} catch (Exception ex) {
;
}

try {
- _dataSourceHeartbeat =
dataSourceHeartbeat.getParameterValue();
+ _dataSourceHeartbeat =
dataSourceHeartbeat.getParameterValue();
} catch (Exception ex) {
;
}

try {
- _dataSourceMinValue = dataSourceMinValue.getParameterValue();
+ _dataSourceMinValue = dataSourceMinValue.getParameterValue();
} catch (Exception ex) {
;
}

try {
- _dataSourceMaxValue = dataSourceMaxValue.getParameterValue();
+ _dataSourceMaxValue = dataSourceMaxValue.getParameterValue();
} catch (Exception ex) {
;
}
@@ -515,7 +523,7 @@
parameters.addParameter("dataSourceStep",
_dataSourceStep);

if (_dataSourceType != null)
- if (!_dataSourceType.trim().equals(""))
+ if (!_dataSourceType.trim().equals(""))
parameters.addParameter("dataSourceType",
_dataSourceType);

if (_dataSourceHeartbeat != null)
@@ -527,7 +535,7 @@
parameters.addParameter("dataSourceMinValue",
_dataSourceMinValue);

if (_dataSourceMaxValue != null)
- if (!_dataSourceMaxValue.trim().equals(""))
+ if (!_dataSourceMaxValue.trim().equals(""))
parameters.addParameter("dataSourceMaxValue",
_dataSourceMaxValue);

data.setChild(parameters);
@@ -566,14 +574,9 @@
}


-
- // -------------------------------------- private methods
-
-
-
/**
* Runs FETCH command from rrdjtool library
- *
+ *
* @author romradz
* @author mac
*/
@@ -659,15 +662,15 @@

if (ds > -1) {

- ResponseGenerator responseGenerator = null;
- Data data = null;
+ ResponseGenerator responseGenerator = null;
+ Data data = null;

- if (eventType == null) {
- responseGenerator = new GenericResponseGenerator();
- } else {
+ if (eventType == null) {
+ responseGenerator = new GenericResponseGenerator();
+ } else {
responseGenerator =
ResponseGeneratorFactory.getResponseGenerator(eventType);
- }
- data = responseGenerator.getResponse(fetchData, ds, rows,
valueUnits);
+ }
+ data = responseGenerator.getResponse(fetchData, ds, rows,
valueUnits);

return data;


Copied:
branches/GEANT2-JAVA-RRD-MA-STABLE/src/main/java/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMARequestHandler.java
(from rev 4239,
trunk/geant2-java-rrd-ma/src/main/java/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMARequestHandler.java)

Modified:
branches/GEANT2-JAVA-RRD-MA-STABLE/src/main/java/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
===================================================================
---
branches/GEANT2-JAVA-RRD-MA-STABLE/src/main/java/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2008-07-18 12:15:13 UTC (rev 4239)
+++
branches/GEANT2-JAVA-RRD-MA-STABLE/src/main/java/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2008-07-18 12:28:32 UTC (rev 4240)
@@ -13,12 +13,14 @@
import java.util.Set;
import java.util.Vector;

+import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.Key;
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.base.v2_0.Parameter;
import org.ggf.ns.nmwg.base.v2_0.Parameters;
+import org.ggf.ns.nmwg.base.v2_0.EventType;

import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
@@ -48,11 +50,9 @@
public class RRDTypeMAServiceEngine implements ServiceEngine {


-
// ---------------------------------- class fields


-
/**
* Type of service angine.
*/
@@ -78,77 +78,45 @@
protected NMWGStorageManager metadataConfig = null;


+ protected String dbStatus = null;
+ protected String dbStore = null;
+
+
+ /**
+ * This variable is used to detect if there is more than one
+ * data triggers in the request.
+ */
+ protected boolean firstRunDone = false;
+
+
public static final String SELECT_NAMESPACE =
"http://ggf.org/ns/nmwg/ops/select/2.0";;

+ public static final String ECHO_SELF_TEST_NAMESPACE =
"http://schemas.perfsonar.net/tools/admin/selftest/";;
+ public static final String ECHO_XMLDB_ACCESS_TEST_NAMESPACE =
"http://schemas.perfsonar.net/tools/admin/selftest/1.0/xmldb-access-test";;
+ public static final String ECHO_XMLDB_CONTENT_TEST_NAMESPACE =
"http://schemas.perfsonar.net/tools/admin/selftest/1.0/xmldb-content-test";;
+ public static final String ECHO_RANDOM_FETCH_TEST_NAMESPACE =
"http://schemas.perfsonar.net/tools/admin/selftest/1.0/random-fetch-test";;


// ---------------------------------- constructors


-
/**
* Construction for the service engine
* @throws PerfSONARException
*/
public RRDTypeMAServiceEngine() throws PerfSONARException {

-
this.serviceEngineType = "service.MeasurementArchive.RRDType";
-
- try {
-
- this.logger = (LoggerComponent)
- AuxiliaryComponentManager.
- getInstance().
- getComponent(ComponentNames.LOGGER);
-
- } catch (PerfSONARException e) {
-
- throw new PerfSONARException(
- "error.common.no_logger",
- "RRDTypeMAServiceEngine.constructor: "
- + "Cannot get logger component");
-
- }
-
- try {
-
- this.configuration = (ConfigurationComponent)
- AuxiliaryComponentManager.
- getInstance().
- getComponent(ComponentNames.CONFIG);
-
- } catch (PerfSONARException e) {
-
- throw new PerfSONARException(
- "error.common.no_configuration",
- "RRDTypeMAServiceEngine.constructor: "
- + "Cannot get config component");
-
- }
-
-
- // checking if using xml db is allowed
- String dbStatus =
- configuration.getProperty("component.ma.xmldb.db_status");
-
- if (dbStatus.trim().equalsIgnoreCase("on")) {
- // xmldb is present
- metadataConfig = new MetadataConfigurationStorageManager();
- } else {
- // xmldb is not present
- metadataConfig = new SimpleMetadataConfigurationStorageManager();
- }
- metadataConfig.initStorage(null);
-
+ this.logger = getLogger();
+ this.configuration = getConfiguration();
+ setProperties();
+ getMetadataConfigurationStorageManager();
}


+ // ---------------------------------- methods

- // ---------------------------------- public methods

-
-
/**
* Method which provides access the type of ServiceEngine.
* It implements the method definition in ServiceEngine Interface
@@ -156,15 +124,18 @@
* It does not return null
* @return String containing ServiceEngine Type
*
- * @see org.perfsonar.service.commons.engine.ServiceEngine#getType()
+ * @see org.perfsonar.service.base.engine.ServiceEngine#getType()
*/
public String getType() {
-
return this.serviceEngineType;
+ }

+
+ protected boolean isFirstRunDone() {
+ return firstRunDone;
}

-
+
/**
* Method to accept requests for action. It implements
* the method definition in ServiceEngine Interface.
@@ -176,10 +147,8 @@
* @return Message object containing the response
*
* @throws PerfSONARException
- * @throws RequestException
- * @throws DataFormatException
*
- * @see org.perfsonar.service.commons.engine.ServiceEngine
+ * @see org.perfsonar.service.base.engine.ServiceEngine
*/
public Message takeAction(String actionType, Message request)
throws PerfSONARException {
@@ -190,83 +159,40 @@

Message response = null;

-
if (actionType.equals(ActionType.GET_KEY)) {

// handle GET_KEY
-
+ // message type: MetadataKeyRequest
response = getKey(request);

} else if (actionType.equals(ActionType.GET_DATA)) {

// handle GET_DATA
-
+ // message type: SetupDataRequest
response = getData(request);

} else if (actionType.equals(ActionType.STORE_DATA)) {

// handle STORE_DATA
+ // message type: MeasurementArchiveStoreRequest
+ checkXmlDbAccessProprties();
+ response = storeData(request);

- String storeStatus =
- configuration.getProperty("service.ma.xmldb.db_store");
- String dbStatus =
- configuration.getProperty("component.ma.xmldb.db_status");
-
- if (!storeStatus.trim().equalsIgnoreCase("on")) {
-
- response = storeData(request, false);
-
- logger.debug(
- "RRDTypeMAServiceEngine.takeAction: "
- + "writing data into MA is switched off "
- + "(see 'service.ma.xmldb.db_store' property)");
-
- } else if (!dbStatus.trim().equalsIgnoreCase("on")) {
-
- response = storeData(request, false);
-
- logger.debug(
- "RRDTypeMAServiceEngine.takeAction: "
- + "xmldb is not setup in the configuration "
- + "(see 'component.ma.xmldb.db_status' property)");
-
- } else {
-
- response = storeData(request, true);
- }
-
} else if (actionType.equals(ActionType.STORE_KEY)) {

// handle STORE_KEY
+ checkXmlDbAccessProprties();
+ response = storeKey(request);

- String storeStatus =
- configuration.getProperty("service.ma.xmldb.db_store");
- String dbStatus =
- configuration.getProperty("component.ma.xmldb.db_status");

- if (!storeStatus.trim().equalsIgnoreCase("on")) {
+ } else if
(actionType.equals(ActionType.STORE_METADATA_CONFIGURATION)) {

- response = storeData(request, false);
+ // handle STORE_METADATA_CONFIGURATION
+ // replace complete metadata configuration file
+ // message type: CompleteMetadataStoreRequest
+ checkXmlDbAccessProprties();
+ response = replaceMetadataConfiguration(request);

- logger.debug(
- "RRDTypeMAServiceEngine.takeAction: "
- + "writing data into MA is switched off "
- + "(see 'service.ma.xmldb.db_store' property)");
-
- } else if (!dbStatus.trim().equalsIgnoreCase("on")) {
-
- response = storeData(request, false);
-
- logger.debug(
- "RRDTypeMAServiceEngine.takeAction: "
- + "xmldb is not setup in the configuration "
- + "(see 'component.ma.xmldb.db_status' property)");
-
- } else {
-
- response = storeKey(request);
- }
-
} else if (actionType.equals(ActionType.ECHO)) {

response = getEcho(request);
@@ -288,40 +214,122 @@

}

-
+ firstRunDone = true;
return response;

}


+ protected void checkXmlDbAccessProprties() throws PerfSONARException {

- // ---------------------------------- public static methods
+ if (!dbStatus.trim().equalsIgnoreCase("on")) {

+ logger.info(
+ "RRDTypeMAServiceEngine.checkXmlDbAccessProprties: "
+ + "xmldb is not setup in the configuration "
+ + "(see 'component.ma.xmldb.db_status' property)");
+ throw new PerfSONARException(
+ "error.ma.rrd.writing",
+ "RRDTypeMAServiceEngine.checkXmlDbAccessProprties: "
+ + "Reading data from xmldb is switched off in the MA "
+ + "(check the configuration)");

+ } else if (!dbStore.trim().equalsIgnoreCase("on")) {

+ logger.info(
+ "RRDTypeMAServiceEngine.checkXmlDbAccessProprties: "
+ + "writing data into MA is switched off "
+ + "(see 'service.ma.xmldb.db_store' property)");
+ throw new PerfSONARException(
+ "error.ma.rrd.writing",
+ "RRDTypeMAServiceEngine.checkXmlDbAccessProprties: "
+ + "Writing data or xmldb is switched off in the MA.");
+
+ }
+
+ }
+
+
private static long seq = 0;

public static String getSeq() {

- String strSeq = null;
- try {
- seq = seq + 1;
- strSeq = Long.toString(seq);
- } catch (Exception ex) {
- strSeq = "0";
- seq = 0;
+ String strSeq = null;
+ try {
+ seq = seq + 1;
+ strSeq = Long.toString(seq);
+ } catch (Exception ex) {
+ strSeq = "0";
+ seq = 0;
+ }
+
+ return strSeq;
}

- return strSeq;

+ protected LoggerComponent getLogger() throws PerfSONARException {
+
+ try {
+ return (LoggerComponent)AuxiliaryComponentManager.getInstance().
+ getComponent(ComponentNames.LOGGER);
+ } catch (PerfSONARException e) {
+ throw new PerfSONARException(
+ "error.common.no_logger",
+ "RRDTypeMAServiceEngine.getLogger: "
+ + "Cannot get logger component");
+ }
}


+ protected ConfigurationComponent getConfiguration() throws
PerfSONARException {

- // ---------------------------------- protected methods
+ try {
+ return configuration =
(ConfigurationComponent)AuxiliaryComponentManager.getInstance().
+ getComponent(ComponentNames.CONFIG);
+ } catch (PerfSONARException e) {
+ throw new PerfSONARException(
+ "error.common.no_configuration",
+ "RRDTypeMAServiceEngine.getConfiguration: "
+ + "Cannot get config component");
+ }
+ }


+ protected void setProperties() throws PerfSONARException {

+ // checking if using xml db is allowed
+ dbStatus = configuration.getProperty("component.ma.xmldb.db_status");
+ dbStore = configuration.getProperty("service.ma.xmldb.db_store");
+
+ }
+
+
+ protected NMWGStorageManager getMetadataConfigurationStorageManager()
+ throws PerfSONARException {
+
+ if (dbStatus.trim().equalsIgnoreCase("on")) {
+ // xmldb is present
+ metadataConfig = new MetadataConfigurationStorageManager();
+ } else {
+ // xmldb is not present
+ //metadataConfig = new
SimpleMetadataConfigurationStorageManager();
+ //
+ // XML FILE IS NOT SUPPORTED NOW AS A METADATA CONFIGURATION
STORAGE !!!!!!!!
+ logger.error(
+
"RRDTypeMAServiceEngine.getMetadataConfigurationStorageManager: "
+ + "Xml database is not set up in the service
configuration "
+ + "(see 'component.ma.xmldb.db_status' property)");
+ throw new PerfSONARException(
+ "error.ma.rrd.writing",
+
"RRDTypeMAServiceEngine.getMetadataConfigurationStorageManager: "
+ + "Xml database is not set up in the service
configuration.");
+ }
+
+ metadataConfig.initStorage(null);
+ return metadataConfig;
+ }
+
+
/**
* Returns a key for a request message.
*
@@ -329,11 +337,8 @@
* @return Message object containing the response with a key
*
* @throws PerfSONARException
- * @throws RequestException
- * @throws DataFormatException
*/
- protected Message getKey(Message request)
- throws PerfSONARException {
+ protected Message getKey(Message request) throws PerfSONARException {

//process the base chaining
request = messageProcess(request);
@@ -398,7 +403,7 @@

String mergerNames = null;
try {
- mergerNames =
+ mergerNames =

configuration.getProperty("service.ma.base_chaining_mergers");
} catch (Exception ex) {;}

@@ -409,7 +414,7 @@
BaseChainingMergerFactory.getBaseChainingMergers(mergerNames);

if (baseChainingMergers == null)
- return message;
+ return message;

BaseChaining baseChaining = null;

@@ -421,7 +426,7 @@

}

- return message;
+ return message;

}

@@ -430,8 +435,6 @@
* Method used in getKey method. Helps to find a key for a request
message.
*
* @throws PerfSONARException
- * @throws RequestException
- * @throws DataFormatException
*/
protected void _getKey(Metadata metadata,
Data data,
@@ -467,17 +470,17 @@

} else {

- String eventType = null;
- try {
- eventType = metadata.getEventType().getEventType().trim();
- } catch (Exception ex) {
- throw new PerfSONARException(
+ String eventType = null;
+ try {
+ eventType =
metadata.getEventType().getEventType().trim();
+ } catch (Exception ex) {
+ throw new PerfSONARException(
"error.ma.query",
"RRDTypeMAServiceEngine._getKey: "
+ "something wrong with eventType in metadata
id=" + metadata.getId());
- }
+ }

- if
(metadata.getEventType().getEventType().trim().equals(SELECT_NAMESPACE)) {
+ if
(metadata.getEventType().getEventType().trim().equals(SELECT_NAMESPACE)) {
Parameters params = metadata.getParameters();
String metadataIdRef =
metadata.getSubject().getMetadataIdRef();
Metadata m = (Metadata) metadataMap.get(metadataIdRef);
@@ -486,7 +489,7 @@

for (Object d : message.getDataMap().values()) {

- Key key = null;
+ Key key = null;
if ((key = ((Data)d).getKey()) != null) {
key = ((Data)d).getKey();
key.setParameters(params);
@@ -494,21 +497,21 @@

}

- } else {
+ } else {

- throw new PerfSONARException(
+ throw new PerfSONARException(
"error.ma.query",
"RRDTypeMAServiceEngine._getKey: "
+ "eventType " + eventType + " in metadata id="
+ metadata.getId()
+ " is not supported");

- }
+ }

}

} else {

- Key key = null;
+ Key key = null;

if ((key = metadata.getKey()) != null) {

@@ -557,7 +560,7 @@

} else if (key == null) {

- throw new PerfSONARException(
+ throw new PerfSONARException(
"error.ma.query",
"RRDTypeMAServiceEngine._getKey: "
+ "no eventType or key element in metadata id="
@@ -578,8 +581,6 @@
* @return Message object containing the response with measurement data
*
* @throws PerfSONARException
- * @throws RequestException
- * @throws DataFormatException
*/
protected Message getData(Message request)
throws PerfSONARException {
@@ -637,26 +638,11 @@
* @return Message object containing the response
*
* @throws PerfSONARException
- * @throws RequestException
- * @throws DataFormatException
*/
- protected Message storeData(Message request, boolean status)
- throws PerfSONARException {
+ protected Message storeData(Message request) throws PerfSONARException {

-
Message response = new Message();

- if (status == false) {
-
- throw new PerfSONARException(
- "error.ma.rrd.writing",
- "RRDTypeMAServiceEngine.storeData: "
- + "Writing data or xmldb is switched off in the MA "
- + "(check the configuration)");
-
- }
-
-
RRDStorageManager rrdStorageManager = new RRDStorageManager();

Map metadataMap = request.getMetadataMap();
@@ -714,8 +700,6 @@
* Returns a key for the request with data to be stored in MA.
*
* @throws PerfSONARException
- * @throws RequestException
- * @throws DataFormatException
*/
protected Key getStoreKey(Metadata metadata)
throws PerfSONARException {
@@ -797,7 +781,7 @@
Parameters ps = metadata.getParameters();
if (ps != null) {

- // checking file name parameter
+ // checking file name parameter
Parameter _f = ps.getParameterByName("file");
if (_f != null) {
f = new Parameter();
@@ -896,52 +880,230 @@
}

return key;
-
}


- protected Message getEcho(Message request) {
+ protected Message replaceMetadataConfiguration(Message request)
+ throws PerfSONARException {

- Message response = new Message();
+ String desc = "This functionality isn't implemented in RRD-MA yet.";
+ return generateResultCodeResponse("error.request", desc);
+ }

- PerfSONARException pex =
- new PerfSONARException(
- "error.request",
- "This eventType in echo request is not supported");

+ protected Message getEcho(Message request) throws PerfSONARException {
+
// this method will be used for advanced types of echo request

- ResultCodesUtil.createResultCodeMetadata(response, pex);
+ Data data = request.getDataArray()[0];
+ Metadata metadata = request.getMetadata(data.getMetadataIdRef());

+ EventType eventType = metadata.getEventType();
+ String eventTypeStr = eventType.getEventType().trim();
+
+ String testName = null;
+ try {
+ testName =
eventTypeStr.substring(eventTypeStr.lastIndexOf("/")+1,
eventTypeStr.length());
+ } catch (Exception ex) {
+ testName = "test";
+ }
+
+ Message response = null;
+
+ if (eventTypeStr.equals(ECHO_XMLDB_ACCESS_TEST_NAMESPACE)
+ || eventTypeStr.equals(ECHO_XMLDB_CONTENT_TEST_NAMESPACE))
+ response = executeXmlDBSimpleTest(request, testName);
+ else if (eventTypeStr.equals(ECHO_RANDOM_FETCH_TEST_NAMESPACE))
+ response = executeRandomFetchTest(request, testName);
+ else if (eventTypeStr.equals(ECHO_SELF_TEST_NAMESPACE + "1.0"))
+ response = executeSelfTest(request);
+ else
+ return generateResultCodeResponse(
+ "error.request", "This eventType in echo request is not
supported");
+
return response;
+ }

+
+ protected Message executeXmlDBSimpleTest(Message request, String
testName) throws PerfSONARException {
+
+ String serviceType =
configuration.getProperty("service.r.service_type");
+ String serviceName = null;
+ try { serviceName = configuration.getProperty("service.name"); }
catch (Exception ex) {;}
+ if (serviceName == null) serviceName = "pS" + serviceType;
+
+ Message response = null;
+ Data data = null;
+ String eventTypeStr = null;
+
+ try {
+
+ response = metadataConfig.fetch(request);
+ eventTypeStr = ECHO_SELF_TEST_NAMESPACE + serviceType + "/" +
serviceName + "/" + testName + "/success/1.0";
+ data = ((Data[])response.getDataArray())[0];
+
+ } catch (PerfSONARException psEx) {
+
+ eventTypeStr = ECHO_SELF_TEST_NAMESPACE + serviceType + "/" +
serviceName + "/" + testName + "/failure/1.0";
+ return generateResultCodeResponse(eventTypeStr,
psEx.getResultDescription());
+ }
+
+ EventType eventType = new EventType();
+ eventType.setEventType(eventTypeStr);
+
+ Metadata metadata = new Metadata();
+ metadata.setEventType(eventType);
+
+ response.setMetadata(metadata);
+ data.setMetadataIdRef(metadata.getId());
+
+ return response;
}


+
+ protected String _codeResponse1 = "Fetching data from rrd file is
correct.";
+
+ protected Message executeRandomFetchTest(Message request, String
testName) throws PerfSONARException {
+
+ String serviceType =
configuration.getProperty("service.r.service_type");
+ String serviceName = null;
+ try { serviceName = configuration.getProperty("service.name"); }
catch (Exception ex) {;}
+ if (serviceName == null) serviceName = "pS" + serviceType;
+
+ Message keyMessage = null;
+ try {
+ keyMessage = metadataConfig.fetch(request);
+ } catch (PerfSONARException psEx) {
+ return generateResultCodeResponse(
+ ECHO_SELF_TEST_NAMESPACE + serviceType + "/" +
serviceName + "/" + testName + "/failure/1.0",
+ psEx.getResultDescription());
+ }
+
+ Data keyData = null;
+ try {
+ keyData = keyMessage.getDataArray()[0];
+ } catch (Exception ex) {
+ return generateResultCodeResponse(
+ ECHO_SELF_TEST_NAMESPACE + serviceType + "/" +
serviceName + "/" + testName + "/failure/1.0",
+ "No data elements in the metadata configuration");
+ }
+ Key key = keyData.getKey();
+ if (key == null)
+ return generateResultCodeResponse(
+ ECHO_SELF_TEST_NAMESPACE + serviceType + "/" +
serviceName + "/" + testName + "/failure/1.0",
+ "No key in data element with id='"
+ + keyData.getId()
+ + "' in the metadata configuration");
+
+ Metadata metadata = new Metadata();
+ metadata.setKey(key);
+ Data data = new Data();
+ data.setMetadataIdRef(metadata.getId());
+ Message dataRequest = new Message();
+ dataRequest.setMetadata(metadata);
+ dataRequest.setData(data);
+
+ try {
+ getData(dataRequest);
+ } catch (PerfSONARException psEx) {
+ return generateResultCodeResponse(
+ ECHO_SELF_TEST_NAMESPACE + serviceType + "/" +
serviceName + "/" + testName + "/failure/1.0",
+ psEx.getResultDescription());
+ }
+
+ return generateResultCodeResponse(
+ ECHO_SELF_TEST_NAMESPACE + serviceType + "/" +
serviceName + "/" + testName + "/success/1.0",
+ _codeResponse1);
+
+ //return getData(dataRequest);
+ }
+
+
+ protected Message executeSelfTest(Message request) throws
PerfSONARException {
+
+ Message responseMessage = new Message();
+
+ Metadata metadata = new Metadata();
+ EventType eventType = new EventType();
+ eventType.setEventType(ECHO_SELF_TEST_NAMESPACE + "1.0");
+ metadata.setEventType(eventType);
+
+ Data data = new Data();
+ data.setMetadataIdRef(metadata.getId());
+
+ Message testMessage = null;
+ testMessage =
getEcho(getTestEchoRequest(ECHO_XMLDB_ACCESS_TEST_NAMESPACE));
+ buildSelfTestResponseMessage(testMessage.getMetadataIterator(),
data);
+ buildSelfTestResponseMessage(testMessage.getDataIterator(), data);
+
+ testMessage =
getEcho(getTestEchoRequest(ECHO_XMLDB_CONTENT_TEST_NAMESPACE));
+ buildSelfTestResponseMessage(testMessage.getMetadataIterator(),
data);
+ buildSelfTestResponseMessage(testMessage.getDataIterator(), data);
+
+ testMessage =
getEcho(getTestEchoRequest(ECHO_RANDOM_FETCH_TEST_NAMESPACE));
+ buildSelfTestResponseMessage(testMessage.getMetadataIterator(),
data);
+ buildSelfTestResponseMessage(testMessage.getDataIterator(), data);
+
+ responseMessage.setMetadata(metadata);
+ responseMessage.setData(data);
+
+ return responseMessage;
+ }
+
+
+ protected Message getTestEchoRequest(String eventType) throws
PerfSONARException {
+
+ Message message = new Message();
+ message.setType("EchoRequest");
+ Metadata m = new Metadata();
+ Data d = new Data();
+ EventType et = new EventType();
+ et.setEventType(eventType);
+ m.setEventType(et);
+ d.setMetadataIdRef(m.getId());
+ message.setMetadata(m);
+ message.setData(d);
+
+ return message;
+ }
+
+
+ protected void buildSelfTestResponseMessage(Iterator it, Data data) {
+
+ while (it.hasNext()) {
+ data.setChild((Element)it.next());
+ }
+ }
+
+
/**
* Method used by SQL-MA to store dynamic metadata keys.
*
* @throws PerfSONARException
*/
protected Message storeKey(Message request)
- throws PerfSONARException{
-
- Message response = new Message();
+ throws PerfSONARException {

+ String desc = "This functionality isn't implemented in RRD-MA yet.";
+ return generateResultCodeResponse("error.request", desc);
+ }
+
+
+ protected Message generateResultCodeResponse(String resultCodeId, String
resultCodeDescription)
+ throws PerfSONARException {
+
+ Message response = new Message();
+
PerfSONARException pex =
- new PerfSONARException(
- "error.request",
- "This functionality isn't implemented in RRD-MA yet.");
-
+ new PerfSONARException(resultCodeId, resultCodeDescription);
ResultCodesUtil.createResultCodeMetadata(response, pex);

return response;
+
}

- //---------------------------------- private methods

-
-
private String getEventType(Metadata metadata, Message msg) {

String eventType = null;



  • perfsonar: r4240 - in branches/GEANT2-JAVA-RRD-MA-STABLE: . ant conf conf/axis-1.4/WEB-INF conf/wsdd contrib/rrdjtool/java contrib/rrdjtool/java/src contrib/rrdjtool/java/src/rrd doc samples/requests src/main/java/org/perfsonar/service/measurementArchive/rrdType, svnlog, 07/18/2008

Archive powered by MHonArc 2.6.16.

Top of Page