[Saga-devel] saga-projects SVN commit 856: /applications/MapReduce/source/master/

amerzky at cct.lsu.edu amerzky at cct.lsu.edu
Sat Jan 17 15:54:36 CST 2009


User: amerzky
Date: 2009/01/17 03:54 PM

Modified:
 /applications/MapReduce/source/master/
  Master.hpp

Log:
 add a define 'JOBS_PER_SERVICE' to allow multiple job instances
 per job service.  might be a good candidate for the config file?
 A

File Changes:

Directory: /applications/MapReduce/source/master/
=================================================

File [modified]: Master.hpp
Delta lines: +8 -3
===================================================================
--- applications/MapReduce/source/master/Master.hpp	2009-01-16 20:26:38 UTC (rev 855)
+++ applications/MapReduce/source/master/Master.hpp	2009-01-17 21:54:27 UTC (rev 856)
@@ -16,6 +16,8 @@
 #include "HandleReduces.hpp"
 #include "parseCommand.hpp"
 
+#define JOBS_PER_SERVICE 2
+
 /***********************************
  * This is the Master class that   *
  * handles all details of the      *
@@ -316,9 +318,12 @@
                         // jd.set_attribute(saga::job::attributes::description_interactive, saga::attributes::common_true);
                         jd.set_vector_attribute(saga::job::attributes::description_arguments, args);
                         saga::job::service js(hostListIT->rmURL);
-                        saga::job::job agentJob= js.create_job(jd);
-                        agentJob.run();
-                        jobs_.push_back(agentJob); // Hack to prevent destructor of job object from being called
+                        for ( int i = 0; i < JOBS_PER_SERVICE; i++ )
+                        {
+                          saga::job::job agentJob= js.create_job(jd);
+                          agentJob.run();
+                          jobs_.push_back(agentJob); // Hack to prevent destructor of job object from being called
+                        }
                         message += "SUCCESS";
                         log->write(message, LOGLEVEL_INFO);
                         successCounter++;



More information about the saga-devel mailing list