Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2379 - in trunk/perfsonar/src/org/perfsonar/service: measurementArchive/rrdType testHarness

Subject: perfsonar development work

List archive

perfsonar: r2379 - in trunk/perfsonar/src/org/perfsonar/service: measurementArchive/rrdType testHarness


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2379 - in trunk/perfsonar/src/org/perfsonar/service: measurementArchive/rrdType testHarness
  • Date: Mon, 14 May 2007 10:29:28 -0400

Author: roman
Date: 2007-05-14 10:29:27 -0400 (Mon, 14 May 2007)
New Revision: 2379

Modified:

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

trunk/perfsonar/src/org/perfsonar/service/testHarness/RRDStorageManagerTester.java
Log:

cleaning after Maciej's changes (use of only one exception class)




Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
2007-05-14 14:05:48 UTC (rev 2378)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
2007-05-14 14:29:27 UTC (rev 2379)
@@ -16,7 +16,6 @@

import org.perfsonar.service.commons.exceptions.PerfSONARException;

-
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.Key;

Modified:
trunk/perfsonar/src/org/perfsonar/service/testHarness/RRDStorageManagerTester.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/testHarness/RRDStorageManagerTester.java
2007-05-14 14:05:48 UTC (rev 2378)
+++
trunk/perfsonar/src/org/perfsonar/service/testHarness/RRDStorageManagerTester.java
2007-05-14 14:29:27 UTC (rev 2379)
@@ -5,7 +5,7 @@
package org.perfsonar.service.testHarness;


-import org.perfsonar.service.commons.exceptions.RequestException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.NMWGStorageManager;
import org.perfsonar.service.measurementArchive.rrdType.RRDStorageManager;

@@ -14,7 +14,6 @@
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.Datum;
import org.ggf.ns.nmwg.base.v2_0.Key;
-import org.ggf.ns.nmwg.base.v2_0.Parameter;

import java.util.Collection;
import java.util.Iterator;
@@ -68,7 +67,9 @@
System.err.println("RRDStorageManagerTester.test: "
+ "Fetch and Store are the only possible options
"
+ "for test type."
- + "parameter value: " + testType + " has no
associated action");
+ + "parameter value: "
+ + testType
+ + " has no associated action");

}

@@ -80,15 +81,18 @@



- protected void fetch(Map params, NMWGStorageManager storageManager)
throws Exception {
+ protected void fetch(Map params, NMWGStorageManager storageManager)
+ throws Exception {

String file = (String) params.get("file");
if (file.equals(""))
- System.err.println("RRDStorageManagerTester.test: file parameter
is wrong");
+ System.err.println(
+ "RRDStorageManagerTester.test: file parameter is
wrong");

String dataSource = (String) params.get("dataSource");
if (dataSource.equals(""))
- System.err.println("RRDStorageManagerTester.test: dataSource
parameter is wrong");
+ System.err.println(
+ "RRDStorageManagerTester.test: dataSource parameter
is wrong");

String startTime = (String) params.get("startTime");
try {
@@ -157,11 +161,13 @@

String file = (String) params.get("file");
if (file.equals(""))
- System.err.println("RRDStorageManagerTester.test: file parameter
is wrong");
+ System.err.println(
+ "RRDStorageManagerTester.test: file parameter is
wrong");

String dataSource = (String) params.get("dataSource");
if (dataSource.equals(""))
- System.err.println("RRDStorageManagerTester.test: dataSource
parameter is wrong");
+ System.err.println(
+ "RRDStorageManagerTester.test: dataSource parameter
is wrong");

String startTime = (String) params.get("startTime");
try {
@@ -189,9 +195,9 @@
String values = (String) params.get("values");
String[] valuePair = values.split(",");

- if(valuePair.length<2) {
+ if(valuePair.length < 2) {

- throw new RequestException("RRDStorageManagerTester: Missing " +
+ throw new PerfSONARException("RRDStorageManagerTester: Missing "
+
"Parameters in request. Values should contain a " +
"comma separated pair of numbers, the first is for time"
+
"the second is for data value");
@@ -248,7 +254,8 @@
int len = d.getDatumLength();
for (int i = 0; i < len; i++) {
Datum datum = d.getDatum(i);
- System.out.println("Time: " + datum.getTimeValue() + ",
Value: " + datum.getValue());
+ System.out.println("Time: " + datum.getTimeValue()
+ + ", Value: " + datum.getValue());
}

System.out.println("--------");



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

Archive powered by MHonArc 2.6.16.

Top of Page