Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r3259 - in trunk/rnp_java-cl-mp: ant conf src/main/java/org/perfsonar/service/measurementPoint/commandLine

Subject: perfsonar development work

List archive

perfsonar: r3259 - in trunk/rnp_java-cl-mp: ant conf src/main/java/org/perfsonar/service/measurementPoint/commandLine


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r3259 - in trunk/rnp_java-cl-mp: ant conf src/main/java/org/perfsonar/service/measurementPoint/commandLine
  • Date: Tue, 22 Jan 2008 12:33:01 -0500

Author: fernandes
Date: 2008-01-22 12:33:00 -0500 (Tue, 22 Jan 2008)
New Revision: 3259

Modified:
trunk/rnp_java-cl-mp/ant/axis-deploy-targets.xml
trunk/rnp_java-cl-mp/conf/components.properties.template

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineCronComponent.java
Log:


Modified: trunk/rnp_java-cl-mp/ant/axis-deploy-targets.xml
===================================================================
--- trunk/rnp_java-cl-mp/ant/axis-deploy-targets.xml 2008-01-22 16:21:27
UTC (rev 3258)
+++ trunk/rnp_java-cl-mp/ant/axis-deploy-targets.xml 2008-01-22 17:33:00
UTC (rev 3259)
@@ -22,6 +22,7 @@

<psbase:create-deploy-root deploy-path="${service.home}/${deploy.root}"/>
<mkdir dir="@{deploy-path}/WEB-INF/classes/perfsonar/cron"/>
+ <mkdir dir="@{deploy-path}/WEB-INF/classes/perfsonar/cron/local"/>
<touch file="@{deploy-path}/WEB-INF/classes/perfsonar/cron/clmpcron"/>

</target>

Modified: trunk/rnp_java-cl-mp/conf/components.properties.template
===================================================================
--- trunk/rnp_java-cl-mp/conf/components.properties.template 2008-01-22
16:21:27 UTC (rev 3258)
+++ trunk/rnp_java-cl-mp/conf/components.properties.template 2008-01-22
17:33:00 UTC (rev 3259)
@@ -10,7 +10,7 @@

clmprp=org.perfsonar.service.measurementPoint.commandLine.CommandLineResourceProtector

#Simple scheduler
-org.perfsonar.base.auxiliary.components.simplescheduler.Scheduler
+scheduler=org.perfsonar.base.auxiliary.components.simplescheduler.Scheduler

#Cron-Like Scheduler

clmp_cron=org.perfsonar.service.measurementPoint.commandLine.CommandLineCronComponent

Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineCronComponent.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineCronComponent.java
2008-01-22 16:21:27 UTC (rev 3258)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineCronComponent.java
2008-01-22 17:33:00 UTC (rev 3259)
@@ -66,6 +66,8 @@
private int totalEntries;

private String cronPath;
+
+ private String defaultMa;

// ---------------------------------- constructors

@@ -145,7 +147,7 @@
if
(BitManipulation.test(entry.getMonths(), months))
if
(BitManipulation.test(entry.getDow(), dow)) {
(new
Thread(new Job(entry.getAction(), entry
-
.getMa(), cronPath, logger,
+
.getMa(), defaultMa, cronPath, logger,

configuration))).start();
}

@@ -547,12 +549,26 @@
public void loadDatabase() throws PerfSONARException {

cronPath = configuration.getProperty("service.clmp.cron_dir");
- if (cronPath == null)
+ if (cronPath == null){
+ logger.fatal(
+
"CommandLineCronComponent.loadDatabase: "
+ + "Couldn't get
'service.clmp.cron_dir' from configuration.");
throw new PerfSONARException(
"error.mp.clmp.mis_configuration",

"CommandLineCronComponent.loadDatabase: "
+ "Couldn't get
'service.clmp.cron_dir' from configuration.");
-
+ }
+
+ defaultMa =
configuration.getProperty("service.clmp.default_ma");
+ if (defaultMa == null){
+ logger.fatal(
+
"CommandLineCronComponent.loadDatabase: "
+ + "Couldn't get
'service.clmp.default_ma' from configuration.");
+ throw new PerfSONARException(
+
"CommandLineCronComponent.loadDatabase: "
+ + "Couldn't get
'service.clmp.default_ma' from configuration.");
+ }
+
int total = 0;

database = new Entries();
@@ -864,6 +880,8 @@
private String action;

private String ma;
+
+ private String defaultMa;

private String path;

@@ -871,10 +889,11 @@

private ConfigurationComponent configuration;

- public Job(String action, String ma, String path,
+ public Job(String action, String ma, String defaultMa, String
path,
LoggerComponent logger,
ConfigurationComponent configuration) {
this.action = action;
this.ma = ma;
+ this.defaultMa = defaultMa;
this.path = path;
this.logger = logger;
this.configuration = configuration;
@@ -919,6 +938,9 @@
Message responseMessage = clAction

.makeMeasurement(actionMessage);

+ if (ma.equals("default"))
+ ma = defaultMa;
+
if (ma.equals("local")) {
Document responseDocument = XMLUtils

.convertMessageToDOM(responseMessage);



  • perfsonar: r3259 - in trunk/rnp_java-cl-mp: ant conf src/main/java/org/perfsonar/service/measurementPoint/commandLine, svnlog, 01/22/2008

Archive powered by MHonArc 2.6.16.

Top of Page