Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2374 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType

Subject: perfsonar development work

List archive

perfsonar: r2374 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2374 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType
  • Date: Mon, 14 May 2007 07:30:05 -0400

Author: roman
Date: 2007-05-14 07:30:05 -0400 (Mon, 14 May 2007)
New Revision: 2374

Modified:

trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
Log:

Support of additional set of parameters (describing rrd file) in key elements
in the metadata configuration:

example:

<nmwg:parameter name="dataSourceStep">300</nmwg:parameter>
<nmwg:parameter name="dataSourceType">ABSOLUTE</nmwg:parameter>
<nmwg:parameter name="dataSourceHeartbeat">400</nmwg:parameter>
<nmwg:parameter name="dataSourceMinValue">0</nmwg:parameter>
<nmwg:parameter name="dataSourceMaxValue">10000000</nmwg:parameter>


example data element in the response from Java RRD MA:

<nmwg:data id="localhost.59269024:1128a48864b:-7fd8"
metadataIdRef="meta1">
<nmwg:datum timeType="unix" timeValue="1121558400"
value="189.25857952114652" valueUnits="Bps"/>
<nmwg:datum timeType="unix" timeValue="1121644800"
value="157.6300922870065" valueUnits="Bps"/>
<nmwg:datum timeType="unix" timeValue="1121731200"
value="341.2686134412051" valueUnits="Bps"/>
<nmwg:datum timeType="unix" timeValue="1121817600"
value="376.50555043698813" valueUnits="Bps"/>
<nmwg:datum timeType="unix" timeValue="1121904000"
value="320.4919869209144" valueUnits="Bps"/>
<nmwg:datum timeType="unix" timeValue="1121990400" value="NaN"
valueUnits="Bps"/>
<nmwg:parameters id="localhost.59269024:1128a48864b:-7fd9">
<nmwg:parameter name="dataSourceMaxValue" value="10000000"/>
<nmwg:parameter name="dataSourceStep" value="300"/>
<nmwg:parameter name="dataSourceMinValue" value="0"/>
<nmwg:parameter name="dataSourceType" value="ABSOLUTE"/>
<nmwg:parameter name="dataSourceHeartbeat" value="400"/>
</nmwg:parameters>
</nmwg:data>






Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
2007-05-11 12:18:35 UTC (rev 2373)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
2007-05-14 11:30:05 UTC (rev 2374)
@@ -326,6 +326,11 @@
Parameter dataSource =
key.getParameterByName("dataSource");
Parameter valueUnits =
key.getParameterByName("valueUnits");

+ Parameter dataSourceStep =
key.getParameterByName("dataSourceStep");
+ Parameter dataSourceType =
key.getParameterByName("dataSourceType");
+ Parameter dataSourceHeartbeat =
key.getParameterByName("dataSourceHeartbeat");
+ Parameter dataSourceMinValue =
key.getParameterByName("dataSourceMinValue");
+ Parameter dataSourceMaxValue =
key.getParameterByName("dataSourceMaxValue");

// ---------------

@@ -337,6 +342,11 @@
String _dataSource = null;
String _valueUnits = null;

+ String _dataSourceStep = null;
+ String _dataSourceType = null;
+ String _dataSourceHeartbeat = null;
+ String _dataSourceMinValue = null;
+ String _dataSourceMaxValue = null;

try {
_startTime = TimeDateUtil.getUnixTime(startTime);
@@ -417,6 +427,39 @@
}


+ // ---------------
+
+
+ try {
+ _dataSourceStep = dataSourceStep.getParameterValue();
+ } catch (Exception ex) {
+ ;
+ }
+
+ try {
+ _dataSourceType = dataSourceType.getParameterValue();
+ } catch (Exception ex) {
+ ;
+ }
+
+ try {
+ _dataSourceHeartbeat =
dataSourceHeartbeat.getParameterValue();
+ } catch (Exception ex) {
+ ;
+ }
+
+ try {
+ _dataSourceMinValue = dataSourceMinValue.getParameterValue();
+ } catch (Exception ex) {
+ ;
+ }
+
+ try {
+ _dataSourceMaxValue = dataSourceMaxValue.getParameterValue();
+ } catch (Exception ex) {
+ ;
+ }
+
// now we completed all required rrdtool parameters
// and can use them to fetch data from rrd file

@@ -430,6 +473,31 @@
__resolution);

Data data = getRRDColumn(fdata, _dataSource, _valueUnits);
+
+ Parameters parameters = new Parameters();
+
+ if (_dataSourceStep != null)
+ if (!_dataSourceStep.trim().equals(""))
+ parameters.addParameter("dataSourceStep",
_dataSourceStep);
+
+ if (_dataSourceType != null)
+ if (!_dataSourceType.trim().equals(""))
+ parameters.addParameter("dataSourceType",
_dataSourceType);
+
+ if (_dataSourceHeartbeat != null)
+ if (!_dataSourceHeartbeat.trim().equals(""))
+ parameters.addParameter("dataSourceHeartbeat",
_dataSourceHeartbeat);
+
+ if (_dataSourceMinValue != null)
+ if (!_dataSourceMinValue.trim().equals(""))
+ parameters.addParameter("dataSourceMinValue",
_dataSourceMinValue);
+
+ if (_dataSourceMaxValue != null)
+ if (!_dataSourceMaxValue.trim().equals(""))
+ parameters.addParameter("dataSourceMaxValue",
_dataSourceMaxValue);
+
+ data.setChild(parameters);
+
rrdDataSet.setData(data);

} catch (RrdException se) {



  • perfsonar: r2374 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType, svnlog, 05/14/2007

Archive powered by MHonArc 2.6.16.

Top of Page