Skip to Content.
Sympa Menu

perfsonar-dev - r2012 - in branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive: rrdType sqlType

Subject: perfsonar development work

List archive

r2012 - in branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive: rrdType sqlType


Chronological Thread 
  • From:
  • To:
  • Subject: r2012 - in branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive: rrdType sqlType
  • Date: Wed, 31 Jan 2007 09:00:01 -0500

Author: roman
Date: 2007-01-31 09:00:01 -0500 (Wed, 31 Jan 2007)
New Revision: 2012

Modified:

branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java

branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
Log:


Catching an exception has been fixed when eventType is missing in metadata
element but it should be there.


svn merge -r 1934:2010
https://svn.perfsonar.net/svn/perfsonar/trunk/perfsonar/src/org/perfsonar/service/measurementArchive




Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2007-01-31 13:52:49 UTC (rev 2011)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2007-01-31 14:00:01 UTC (rev 2012)
@@ -322,8 +322,21 @@
Map metadataMap = request.getMetadataMap();
Metadata metadata = (Metadata)
metadataMap.get(data.getMetadataIdRef());

- _getKey(metadata, null, metadataMap, message, metadataConfig);
+ try {

+ _getKey(metadata, null, metadataMap, message, metadataConfig);
+
+ } catch (NullPointerException npex) {
+
+ throw new RequestException(
+ "error.ma.query",
+ "RRDTypeMAServiceEngine.getKey: "
+ + "getting the key is impossible "
+ + "because of some problem with the format of the
request; "
+ + npex.toString());
+
+ }
+
messageVector.add(message);

}
@@ -421,7 +434,7 @@
k.addParameter((Parameter)p);

}
- break;
+
}

}
@@ -583,8 +596,22 @@
Metadata meta = (Metadata)
metadataMap.get(data.getMetadataIdRef());
if (meta == null) continue;

- Key key = getStoreKey(meta);
+ Key key = null;
+ try {

+ key = getStoreKey(meta);
+
+ } catch (NullPointerException npex) {
+
+ throw new RequestException(
+ "error.ma.query",
+ "RRDTypeMAServiceEngine.storeData: "
+ + "getting the store key is impossible "
+ + "because of some problem with the format of the
request; "
+ + npex.toString());
+
+ }
+
Message msg = new Message();
Metadata md = new Metadata();
msg.addChild(md);

Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
2007-01-31 13:52:49 UTC (rev 2011)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
2007-01-31 14:00:01 UTC (rev 2012)
@@ -131,11 +131,29 @@
// + pname + ", " + pvalue + "]");

if (pname.equals("startTime")) {
- long startTime = Long.parseLong(pvalue);
+ long startTime = 0;
+ try {
+ startTime = Long.parseLong(pvalue);
+ } catch (NumberFormatException nfex) {
+ throw new RequestException(
+ "error.ma.query",
+ "SQLStorageManager.fetch: "
+ + "startTime parameter in the request "
+ + "has wrong format");
+ }
ibatisParams.put(pname, startTime);

} else if (pname.equals("endTime")) {
- long endTime = Long.parseLong(pvalue);
+ long endTime = 0;
+ try {
+ endTime = Long.parseLong(pvalue);
+ } catch (NumberFormatException nfex) {
+ throw new RequestException(
+ "error.ma.query",
+ "SQLStorageManager.fetch: "
+ + "endTime parameter in the request "
+ + "has wrong format");
+ }
ibatisParams.put(pname, endTime);

} else {



  • r2012 - in branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive: rrdType sqlType, svnlog, 01/31/2007

Archive powered by MHonArc 2.6.16.

Top of Page