perfsonar-dev - perfsonar: r2473 - in branches/JAVA-RRD-MA-STABLE: contrib/mapi-jni/java/src/si/arnes/jra1/perfsonar/jni/mapijni contrib/mapi-jni/native/src schema/example-instances/perfSONAR src/org/perfsonar/service/measurementArchive/rrdType src/org/perfsonar/service/measurementArchive/sqlType
Subject: perfsonar development work
List archive
perfsonar: r2473 - in branches/JAVA-RRD-MA-STABLE: contrib/mapi-jni/java/src/si/arnes/jra1/perfsonar/jni/mapijni contrib/mapi-jni/native/src schema/example-instances/perfSONAR src/org/perfsonar/service/measurementArchive/rrdType src/org/perfsonar/service/measurementArchive/sqlType
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2473 - in branches/JAVA-RRD-MA-STABLE: contrib/mapi-jni/java/src/si/arnes/jra1/perfsonar/jni/mapijni contrib/mapi-jni/native/src schema/example-instances/perfSONAR src/org/perfsonar/service/measurementArchive/rrdType src/org/perfsonar/service/measurementArchive/sqlType
- Date: Thu, 14 Jun 2007 08:56:09 -0400
Author: roman
Date: 2007-06-14 08:56:09 -0400 (Thu, 14 Jun 2007)
New Revision: 2473
Modified:
branches/JAVA-RRD-MA-STABLE/contrib/mapi-jni/java/src/si/arnes/jra1/perfsonar/jni/mapijni/MAPIMonitorRequest.java
branches/JAVA-RRD-MA-STABLE/contrib/mapi-jni/java/src/si/arnes/jra1/perfsonar/jni/mapijni/MonitorRequest.java
branches/JAVA-RRD-MA-STABLE/contrib/mapi-jni/native/src/mapijni.c
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/MetadataKey-Filter-Resp.xml
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/SetupDataRequest-FilterRRDSelect-3.xml
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/SetupDataResponse-FilterRRDSelect-3.xml
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
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:
Recent changes in trunk merged with stable branch.
svn merge -r 2412:2469
https://svn.internet2.edu/svn/perfsonar/trunk/perfsonar
Modified:
branches/JAVA-RRD-MA-STABLE/contrib/mapi-jni/java/src/si/arnes/jra1/perfsonar/jni/mapijni/MAPIMonitorRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/contrib/mapi-jni/java/src/si/arnes/jra1/perfsonar/jni/mapijni/MAPIMonitorRequest.java
2007-06-14 12:49:14 UTC (rev 2472)
+++
branches/JAVA-RRD-MA-STABLE/contrib/mapi-jni/java/src/si/arnes/jra1/perfsonar/jni/mapijni/MAPIMonitorRequest.java
2007-06-14 12:56:09 UTC (rev 2473)
@@ -27,6 +27,12 @@
* MAPI flow descriptor.
*/
protected int flowDescr = -1;
+
+
+ /**
+ * Default sleep time, when waiting for the flow to finish
+ */
+ private static final long FLOW_WAIT_SLEEP_TIME = 1000; // ms
// ---------------------------------- public methods
@@ -131,19 +137,42 @@
}
/**
- * Wait for MAPI flow until specified Date.
+ * Wait for MAPI flow until specified Date or number of packets
+ * captured superseeds pktLimit (whichever comes first).
*
* @param time wait until this time is reached
+ * @param fid function id of the PKT_COUNTER function on current flow
+ * (used for checking when the packet count limit is reached)
+ * set to -1 if not in use,
+ * in which case pktLimit is ignored also
+ * @param pktLimit when this number is reached (checked by peeking into
+ * fid PKT_COUNTER function on current flow)
*/
- public void mapiWaitFlow(Date time) {
+ public void mapiWaitFlow(Date time, int fid, BigInteger pktLimit) {
// Wait until stop is reached, then call mapiCloseFlow()
long endTime = time.getTime();
long curTime = System.currentTimeMillis();
+
+ BigInteger pktDiff = new BigInteger("-1");
- while (endTime > curTime) {
+ // Wait as long as both endTime > curTime and pktDiff < 0 hold true.
+ // pktDiff is taken into account only if fid is not -1.
+ while (endTime > curTime && pktDiff.signum() == -1) {
- try { Thread.sleep(endTime - curTime); } catch
(InterruptedException ie) {}
+ try {
+ if (fid != -1) {
+ Thread.sleep(
+ Math.min(endTime - curTime,
FLOW_WAIT_SLEEP_TIME));
+ try {
+ BigInteger capturedPackets =
+ (BigInteger)mapiReadResults(fid);
+ pktDiff = capturedPackets.subtract(pktLimit);
+ } catch (MAPIException me) {}
+ } else {
+ Thread.sleep(endTime - curTime);
+ }
+ } catch (InterruptedException ie) {}
curTime = System.currentTimeMillis();
}
@@ -198,7 +227,7 @@
mmReq.mapiConnect();
System.out.println("Connected to the flow (flowDescr=" + fd +
")");
- mmReq.mapiWaitFlow(new Date(System.currentTimeMillis() + 3000L));
+ mmReq.mapiWaitFlow(new Date(System.currentTimeMillis() + 3000L),
-1, null);
BigInteger pc = (BigInteger)mmReq.mapiReadResults(pcid);
BigInteger bc = (BigInteger)mmReq.mapiReadResults(bcid);
Modified:
branches/JAVA-RRD-MA-STABLE/contrib/mapi-jni/java/src/si/arnes/jra1/perfsonar/jni/mapijni/MonitorRequest.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/contrib/mapi-jni/java/src/si/arnes/jra1/perfsonar/jni/mapijni/MonitorRequest.java
2007-06-14 12:49:14 UTC (rev 2472)
+++
branches/JAVA-RRD-MA-STABLE/contrib/mapi-jni/java/src/si/arnes/jra1/perfsonar/jni/mapijni/MonitorRequest.java
2007-06-14 12:56:09 UTC (rev 2473)
@@ -6,6 +6,7 @@
package si.arnes.jra1.perfsonar.jni.mapijni;
import java.util.Date;
+import java.math.BigInteger;
/**
* Interface to different implementations of MAPI
@@ -294,9 +295,16 @@
public MAPIPacket mapiGetNextPkt(int fid) throws MAPIException;
/**
- * Wait for MAPI flow until specified Date.
+ * Wait for MAPI flow until specified Date or number of packets
+ * captured superseeds pktLimit (whichever comes first).
*
* @param time wait until this time is reached
+ * @param fid function id of the PKT_COUNTER function on current flow
+ * (used for checking when the packet count limit is reached)
+ * set to -1 if not in use,
+ * in which case pktLimit is ignored also
+ * @param pktLimit when this number is reached (checked by peeking into
+ * fid PKT_COUNTER function on current flow)
*/
- public void mapiWaitFlow(Date time);
+ public void mapiWaitFlow(Date time, int fid, BigInteger pktLimit);
}
Modified: branches/JAVA-RRD-MA-STABLE/contrib/mapi-jni/native/src/mapijni.c
===================================================================
--- branches/JAVA-RRD-MA-STABLE/contrib/mapi-jni/native/src/mapijni.c
2007-06-14 12:49:14 UTC (rev 2472)
+++ branches/JAVA-RRD-MA-STABLE/contrib/mapi-jni/native/src/mapijni.c
2007-06-14 12:56:09 UTC (rev 2473)
@@ -2409,7 +2409,7 @@
jint fd,
jint fid)
{
- void *ret;
+ mapi_results_t* ret;
jobject oret = 0;
char errbuf[512];
mapi_function_info_t mfi;
@@ -2502,14 +2502,14 @@
/* Nothing to return, so return null */
} else if (! strcmp("PKT_COUNTER", mfi.name)) {
/* ret should be a pointer to unsigned long long */
- if (! (oret = jlongToUBigInteger(env, (jlong*)ret))) goto cleanup;
+ if (! (oret = jlongToUBigInteger(env, (jlong*)ret->res))) goto
cleanup;
DEBUG_PRINT("%016llx DEBUG: \tUnsigned long long return value:
%llu\n",
- (unsigned long long)getCurrentJVMThreadID(env), *(unsigned
long long*)ret);
+ (unsigned long long)getCurrentJVMThreadID(env), *(unsigned
long long*)ret->res);
} else if (! strcmp("BYTE_COUNTER", mfi.name)) {
/* ret should be a pointer to unsigned long long */
- if (! (oret = jlongToUBigInteger(env, (jlong*)ret))) goto cleanup;
+ if (! (oret = jlongToUBigInteger(env, (jlong*)ret->res))) goto
cleanup;
DEBUG_PRINT("%016llx DEBUG: \tUnsigned long long return value:
%llu\n",
- (unsigned long long)getCurrentJVMThreadID(env), *(unsigned
long long*)ret);
+ (unsigned long long)getCurrentJVMThreadID(env), *(unsigned
long long*)ret->res);
} else if (! strcmp("STR_SEARCH", mfi.name)) {
/* Nothing to return, so return null */
} else if (! strcmp("TO_BUFFER", mfi.name)) {
@@ -2518,7 +2518,7 @@
/* Nothing to return, so return null */
} else if (! strcmp("HASHSAMP", mfi.name)) {
/* ret should be a pointer to the struct sample */
- smplPtr = (struct sample*)ret;
+ smplPtr = (struct sample*)ret->res;
/* Convert it to MAPISample */
oret = (*env)->NewObject(env, mapiSampleCls, mapiSampleConstr,
(jint)smplPtr->source_ip, (jint)smplPtr->dest_ip,
@@ -2535,15 +2535,16 @@
smplPtr->protocol, smplPtr->timestamp);
} else if (! strcmp("TO_FILE", mfi.name)) {
/* ret should be a pointer to the integer with current status */
- if (! (oret = jintToInteger(env, (jint*)ret))) goto cleanup;
- DEBUG_PRINT("%016llx DEBUG: \tInteger return value: %d\n", (unsigned
long long)getCurrentJVMThreadID(env), *(int*)ret);
+ if (! (oret = jintToInteger(env, (jint*)ret->res))) goto cleanup;
+ DEBUG_PRINT("%016llx DEBUG: \tInteger return value: %d\n",
+ (unsigned long long)getCurrentJVMThreadID(env),
*(int*)ret->res);
} else if (! strcmp("ETHEREAL", mfi.name)) {
/* Nothing to return, so return null */
} else if (! strcmp("COOKING", mfi.name)) {
/* Nothing to return, so return null */
} else if (! strcmp("BUCKET", mfi.name)) {
/* ret should be a pointer to the struct bucket_data */
- buckDataPtr = (struct bucket_data*)ret;
+ buckDataPtr = (struct bucket_data*)ret->res;
/* Convert it to MAPIBucketData */
oret = (*env)->NewObject(env, mapiBucketDataCls,
mapiBucketDataConstr,
(jlong)buckDataPtr->timestamp, (jlong)buckDataPtr->data);
@@ -2555,9 +2556,9 @@
/* Nothing to return, so return null */
} else if (! strcmp("HASH", mfi.name)) {
/* ret should be a pointer to unsigned long long */
- if (! (oret = jlongToUBigInteger(env, (jlong*)ret))) goto cleanup;
+ if (! (oret = jlongToUBigInteger(env, (jlong*)ret->res))) goto
cleanup;
DEBUG_PRINT("%016llx DEBUG: \tUnsigned long long return value:
%llu\n",
- (unsigned long long)getCurrentJVMThreadID(env), *(unsigned
long long*)ret);
+ (unsigned long long)getCurrentJVMThreadID(env), *(unsigned
long long*)ret->res);
} else if (! strcmp("ANONYMIZE", mfi.name)) {
/* Nothing to return, so return null */
} else {
Modified:
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/MetadataKey-Filter-Resp.xml
===================================================================
---
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/MetadataKey-Filter-Resp.xml
2007-06-14 12:49:14 UTC (rev 2472)
+++
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/MetadataKey-Filter-Resp.xml
2007-06-14 12:56:09 UTC (rev 2473)
@@ -29,11 +29,13 @@
<nmwg:parameters id="param1">
<nmwg:parameter
name="file">/data/sonar/Abilene/atla-hstn.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">output</nmwg:parameter>
+ </nmwg:parameters>
+ <select:parameters id="param2">
<nmwg:parameter name="startTime">1124250480</nmwg:parameter>
<nmwg:parameter name="endTime">1124250840</nmwg:parameter>
<nmwg:parameter name="consolidationFunction">AVERAGE</nmwg:parameter>
<nmwg:parameter name="resolution">60</nmwg:parameter>
- </nmwg:parameters>
+ </select:parameters>
</nmwg:key>
</nmwg:data>
Modified:
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/SetupDataRequest-FilterRRDSelect-3.xml
===================================================================
---
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/SetupDataRequest-FilterRRDSelect-3.xml
2007-06-14 12:49:14 UTC (rev 2472)
+++
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/SetupDataRequest-FilterRRDSelect-3.xml
2007-06-14 12:56:09 UTC (rev 2473)
@@ -7,7 +7,8 @@
<nmwg:message id="msg5"
type="SetupDataRequest"
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" >
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"
+ xmlns:select="http://ggf.org/ns/nmwg/ops/select/2.0/">
<!-- Optional message level parameters -->
<nmwg:parameters id="msgparam1">
@@ -21,11 +22,13 @@
<nmwg:parameters id="param1">
<nmwg:parameter
name="file">__BASEPATH__/data/rrd/test/test.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">bytes</nmwg:parameter>
+ </nmwg:parameters>
+ <select:parameters id="param2">
<nmwg:parameter name="startTime">1121472000</nmwg:parameter>
<nmwg:parameter name="endTime">1121904000</nmwg:parameter>
<nmwg:parameter name="consolidationFunction">AVERAGE</nmwg:parameter>
<nmwg:parameter name="resolution">60</nmwg:parameter>
- </nmwg:parameters>
+ </select:parameters>
</nmwg:key>
</nmwg:metadata>
Modified:
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/SetupDataResponse-FilterRRDSelect-3.xml
===================================================================
---
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/SetupDataResponse-FilterRRDSelect-3.xml
2007-06-14 12:49:14 UTC (rev 2472)
+++
branches/JAVA-RRD-MA-STABLE/schema/example-instances/perfSONAR/SetupDataResponse-FilterRRDSelect-3.xml
2007-06-14 12:56:09 UTC (rev 2473)
@@ -8,7 +8,8 @@
messageIdRef="msg5"
type="SetupDataRequest"
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/"
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"
+ xmlns:select="http://ggf.org/ns/nmwg/ops/select/2.0/">
<!-- Optional message level parameters -->
<nmwg:parameters id="msgparam1">
@@ -22,11 +23,13 @@
<nmwg:parameters id="param1">
<nmwg:parameter
name="file">/data/sonar/Abilene/atla-hstn.rrd</nmwg:parameter>
<nmwg:parameter name="dataSource">output</nmwg:parameter>
+ </nmwg:parameters>
+ <select:parameters id="param2">
<nmwg:parameter name="startTime">1124250480</nmwg:parameter>
<nmwg:parameter name="endTime">1124250840</nmwg:parameter>
<nmwg:parameter name="consolidationFunction">AVERAGE</nmwg:parameter>
<nmwg:parameter name="resolution">60</nmwg:parameter>
- </nmwg:parameters>
+ </select:parameters>
</nmwg:key>
</nmwg:metadata>
Modified:
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
===================================================================
---
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
2007-06-14 12:49:14 UTC (rev 2472)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
2007-06-14 12:56:09 UTC (rev 2473)
@@ -316,20 +316,23 @@
Metadata md = (Metadata) it.next();
Key key = md.getKey();
- Parameter startTime =
key.getParameterByName("startTime");
- Parameter endTime =
key.getParameterByName("endTime");
- Parameter consolidationFunction =
key.getParameterByName("consolidationFunction");
- Parameter resolution =
key.getParameterByName("resolution");
- Parameter file = key.getParameterByName("file");
- Parameter dataSource =
key.getParameterByName("dataSource");
- Parameter valueUnits =
key.getParameterByName("valueUnits");
+ //select parameter elements
+ Parameter startTime =
key.getParameterByName("http://ggf.org/ns/nmwg/ops/select/2.0/", "startTime");
+ Parameter endTime =
key.getParameterByName("http://ggf.org/ns/nmwg/ops/select/2.0/", "endTime");
+ Parameter consolidationFunction =
key.getParameterByName("http://ggf.org/ns/nmwg/ops/select/2.0/",
"consolidationFunction");
+ Parameter resolution =
key.getParameterByName("http://ggf.org/ns/nmwg/ops/select/2.0/",
"resolution");
- 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");
+ //nmwg parameter elements
+ Parameter file =
key.getParameterByName("http://ggf.org/ns/nmwg/base/2.0/", "file");
+ Parameter dataSource =
key.getParameterByName("http://ggf.org/ns/nmwg/base/2.0/", "dataSource");
+ Parameter valueUnits =
key.getParameterByName("http://ggf.org/ns/nmwg/base/2.0/", "valueUnits");
+ Parameter dataSourceStep =
key.getParameterByName("http://ggf.org/ns/nmwg/base/2.0/", "dataSourceStep");
+ Parameter dataSourceType =
key.getParameterByName("http://ggf.org/ns/nmwg/base/2.0/", "dataSourceType");
+ Parameter dataSourceHeartbeat =
key.getParameterByName("http://ggf.org/ns/nmwg/base/2.0/",
"dataSourceHeartbeat");
+ Parameter dataSourceMinValue =
key.getParameterByName("http://ggf.org/ns/nmwg/base/2.0/",
"dataSourceMinValue");
+ Parameter dataSourceMaxValue =
key.getParameterByName("http://ggf.org/ns/nmwg/base/2.0/",
"dataSourceMaxValue");
+
// ---------------
String _startTime = null;
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-06-14 12:49:14 UTC (rev 2472)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2007-06-14 12:56:09 UTC (rev 2473)
@@ -431,13 +431,12 @@
for (Object d : message.getDataMap().values()) {
- if (((Data)d).getKey() != null) {
+ Key key = null;
+ if ((key = ((Data)d).getKey()) != null) {
- Key k = ((Data)d).getKey();
+ key = ((Data)d).getKey();
+ key.setParameters(params);
- for (Object p : params.getParameterMap().values())
- k.addParameter((Parameter)p);
-
}
}
@@ -446,14 +445,10 @@
} else {
- if (metadata.getKey() != null) {
+ Key key = null;
- Key k = metadata.getKey();
- Key key2 = new Key();
+ if ((key = metadata.getKey()) != null) {
- Parameter[] params = k.getParameters().getParameterArray();
- for (int i = 0; i < params.length; i++)
- key2.addParameter(params[i]);
if (data == null) {
@@ -463,7 +458,7 @@
// this new metadata is created to not corrupt
// already existed id
Metadata metadata2 = new Metadata();
- metadata2.setKey(key2);
+ metadata2.setKey(key);
//long seed = (new Date()).getTime();
//int intId = (new Random(seed)).nextInt();
@@ -476,7 +471,7 @@
}
- data.addChild(key2);
+ data.addChild(key);
}
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-06-14 12:49:14 UTC (rev 2472)
+++
branches/JAVA-RRD-MA-STABLE/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
2007-06-14 12:56:09 UTC (rev 2473)
@@ -116,54 +116,59 @@
for (Metadata md : collection) {
Key key = md.getKey();
- Parameters params = key.getParameters();
- Parameter[] paramsArray = params.getParameterArray();
- Map ibatisParams = new HashMap();
+ Map ibatisParams = new HashMap();
- for (int i = 0; i < paramsArray.length; i++) {
+ Map parametersMap = key.getParametersMap();
+ for (Object o : parametersMap.values()) {
- Parameter p = paramsArray[i];
- String pname = p.getParameterName();
- //String pvalue = p.getParameterValue();
- String pvalue = "";
+ Parameters params = (Parameters) o;
+ Parameter[] paramsArray = params.getParameterArray();
+
+ for (int i = 0; i < paramsArray.length; i++) {
- //logger.debug("SQLStorageManager.fetch: param [name,
value]: ["
- // + pname + ", " + pvalue + "]");
+ Parameter p = paramsArray[i];
+ String pname = p.getParameterName();
+ //String pvalue = p.getParameterValue();
+ String pvalue = "";
- if (pname.equals("startTime")) {
- long startTime = 0;
- pvalue = TimeDateUtil.getUnixTime(p);
- try {
- startTime = Long.parseLong(pvalue);
- } catch (NumberFormatException nfex) {
- throw new PerfSONARException(
- "error.ma.query",
- "SQLStorageManager.fetch: "
- + "startTime parameter in the request "
- + "has wrong format");
- }
- ibatisParams.put(pname, startTime);
+ //logger.debug("SQLStorageManager.fetch: param [name,
value]: ["
+ // + pname + ", " + pvalue + "]");
- } else if (pname.equals("endTime")) {
- long endTime = 0;
- pvalue = TimeDateUtil.getUnixTime(p);
- try {
- endTime = Long.parseLong(pvalue);
- } catch (NumberFormatException nfex) {
- throw new PerfSONARException(
- "error.ma.query",
- "SQLStorageManager.fetch: "
- + "endTime parameter in the request "
- + "has wrong format");
- }
- ibatisParams.put(pname, endTime);
+ if (pname.equals("startTime")) {
+ long startTime = 0;
+ pvalue = TimeDateUtil.getUnixTime(p);
+ try {
+ startTime = Long.parseLong(pvalue);
+ } catch (NumberFormatException nfex) {
+ throw new PerfSONARException(
+ "error.ma.query",
+
"SQLStorageManager.fetch: "
+ + "startTime
parameter in the request "
+ + "has wrong format");
+ }
+ ibatisParams.put(pname, startTime);
- } else {
- pvalue = p.getParameterValue();
- ibatisParams.put(pname, pvalue);
- }
+ } else if (pname.equals("endTime")) {
+ long endTime = 0;
+ pvalue = TimeDateUtil.getUnixTime(p);
+ try {
+ endTime = Long.parseLong(pvalue);
+ } catch (NumberFormatException nfex) {
+ throw new PerfSONARException(
+ "error.ma.query",
+
"SQLStorageManager.fetch: "
+ + "endTime parameter
in the request "
+ + "has wrong format");
+ }
+ ibatisParams.put(pname, endTime);
+ } else {
+ pvalue = p.getParameterValue();
+ ibatisParams.put(pname, pvalue);
+ }
+
+ }
}
Data data = null;
- perfsonar: r2473 - in branches/JAVA-RRD-MA-STABLE: contrib/mapi-jni/java/src/si/arnes/jra1/perfsonar/jni/mapijni contrib/mapi-jni/native/src schema/example-instances/perfSONAR src/org/perfsonar/service/measurementArchive/rrdType src/org/perfsonar/service/measurementArchive/sqlType, svnlog, 06/14/2007
Archive powered by MHonArc 2.6.16.