Skip to Content.
Sympa Menu

perfsonar-dev - r1535 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager

Subject: perfsonar development work

List archive

r1535 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager


Chronological Thread 
  • From:
  • To:
  • Subject: r1535 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager
  • Date: Thu, 10 Aug 2006 08:07:53 -0400

Author: roman
Date: 2006-08-10 08:07:52 -0400 (Thu, 10 Aug 2006)
New Revision: 1535

Modified:

trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager/RRDStorageManager.java
Log:
unit information is taken into consideration in responses from RRD MA

Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager/RRDStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager/RRDStorageManager.java
2006-08-10 12:05:36 UTC (rev 1534)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager/RRDStorageManager.java
2006-08-10 12:07:52 UTC (rev 1535)
@@ -321,6 +321,7 @@
Parameter resolution =
key.getParameterByName("resolution");
Parameter file = key.getParameterByName("file");
Parameter dataSource =
key.getParameterByName("dataSource");
+ Parameter unit = key.getParameterByName("unit");


// ---------------
@@ -331,6 +332,7 @@
String _resolution = null;
String _file = null;
String _dataSource = null;
+ String _unit = null;


try {
@@ -357,10 +359,17 @@
;
}

+ try {
+ _unit = unit.getParameterValue();
+ } catch (Exception ex) {
+ _unit = "unknown";
+ }
+
_file = file.getParameterValue();
_dataSource = dataSource.getParameterValue();


+
// ---------------


@@ -414,7 +423,7 @@
__endTime,
__resolution);

- Data data = getRRDColumn(fdata, _dataSource);
+ Data data = getRRDColumn(fdata, _dataSource, _unit);
rrdDataSet.setData(data);

} catch (RrdException se) {
@@ -522,7 +531,7 @@
* @author romradz
* @author mac
*/
- private Data getRRDColumn(FetchData data, String dataSource)
+ private Data getRRDColumn(FetchData data, String dataSource, String unit)
throws DataFormatException {

int rows = data.getRowCount();
@@ -547,6 +556,7 @@
Datum datum = new Datum();
datum.setTimeValue(Long.toString(data.getTimestamp(i + 1)));
datum.setValue(Double.toString(data.getValue(i, ds)));
+ datum.setValueUnits(unit);
_data.addChild(datum);

}



  • r1535 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager, svnlog, 08/10/2006

Archive powered by MHonArc 2.6.16.

Top of Page