perfsonar-dev - perfsonar: r2376 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType
Subject: perfsonar development work
List archive
perfsonar: r2376 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2376 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType
- Date: Mon, 14 May 2007 09:39:19 -0400
Author: roman
Date: 2007-05-14 09:39:19 -0400 (Mon, 14 May 2007)
New Revision: 2376
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
Log:
1) Use of new key parameters while storing new data in RRD MA service
example:
<nmwg:parameters>
<nmwg:parameter name="dataSourceStep">300</nmwg:parameter>
<nmwg:parameter name="dataSourceType">COUNTER</nmwg:parameter>
<nmwg:parameter name="dataSourceHeartbeat">1800</nmwg:parameter>
<nmwg:parameter name="dataSourceMinValue">0</nmwg:parameter>
<nmwg:parameter
name="dataSourceMaxValue">10000000000000</nmwg:parameter>
</nmwg:parameters>
2) Using new eventType http://ggf.org/ns/nmwg/characteristic/utilization/2.0
was causing a problem while storing new data in
RRD MA. Fixed.
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2007-05-14 11:34:38 UTC (rev 2375)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2007-05-14 13:39:19 UTC (rev 2376)
@@ -741,13 +741,19 @@
if (dir == null)
dir = "";
- Parameter f = null;
- Parameter ds = null;
+ Parameter f = null;
+ Parameter ds = null;
+ Parameter dss = null;
+ Parameter dst = null;
+ Parameter dsh = null;
+ Parameter dsminv = null;
+ Parameter dsmaxv = null;
// getting parameters from metadata
Parameters ps = metadata.getParameters();
if (ps != null) {
+ // checking file name parameter
Parameter _f = ps.getParameterByName("file");
if (_f != null) {
f = new Parameter();
@@ -755,13 +761,30 @@
f.setParameterValue(dir + _f.getParameterValue());
}
+ //checking data source parameter
Parameter _ds = ps.getParameterByName("dataSource");
- if (_ds != null) {
- ds = new Parameter();
- ds.setParameterName("dataSource");
- ds.setParameterValue(_ds.getParameterValue());
- }
+ if (_ds != null) ds = _ds;
+ //checking rrd source step parameter
+ Parameter _dss = ps.getParameterByName("dataSourceStep");
+ if (_dss != null) dss = _dss;
+
+ //checking rrd source type parameter
+ Parameter _dst = ps.getParameterByName("dataSourceType");
+ if (_dst != null) dst = _dst;
+
+ //checking rrd source heartbeat parameter
+ Parameter _dsh =
ps.getParameterByName("dataSourceHeartbeat");
+ if (_dsh != null) dsh = _dsh;
+
+ //checking rrd source min value parameter
+ Parameter _dsminv =
ps.getParameterByName("dataSourceMinValue");
+ if (_dsminv != null) dsminv = _dsminv;
+
+ //checking rrd source max value parameter
+ Parameter _dsmaxv =
ps.getParameterByName("dataSourceMaxValue");
+ if (_dsmaxv != null) dsmaxv = _dsmaxv;
+
}
@@ -780,10 +803,7 @@
if (metadata.getEventType() != null) {
- if (metadata.getEventType().getEventType().trim() !=
"")
-
ds.setParameterValue(metadata.getEventType().getEventType().trim());
- else
- ds.setParameterValue("ds");
+ ds.setParameterValue("ds");
Parameters params = new Parameters();
params.addParameter(
@@ -805,6 +825,12 @@
params.addChild(f);
params.addChild(ds);
+ if (dss != null) params.addChild(dss);
+ if (dst != null) params.addChild(dst);
+ if (dsh != null) params.addChild(dsh);
+ if (dsminv != null) params.addChild(dsminv);
+ if (dsmaxv != null) params.addChild(dsmaxv);
+
key = k;
- perfsonar: r2376 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType, svnlog, 05/14/2007
Archive powered by MHonArc 2.6.16.