Commit ce0e66c5 authored by Costin Grigoras's avatar Costin Grigoras
Browse files

Stop the periodic reporting of values from completed threads

parent b0257f03
......@@ -143,6 +143,20 @@ public class Monitor implements Runnable {
monitoringObjects.put(key, obj);
}
/**
* Set a new value for a monitoring key
*
* @param key what to modify
* @param obj the new value, or <code>null</code> to remove existing associations
* @return the previous value associated to this key
*/
public MonitoringObject setMonitoring(final String key, final MonitoringObject obj) {
if (obj != null)
return monitoringObjects.put(key, obj);
return monitoringObjects.remove(key);
}
/**
* @param key
* @return the monitoring object for this key
......@@ -253,7 +267,7 @@ public class Monitor implements Runnable {
cm.incrementMisses();
}
// This should not be needed in fact as Monitor objects live as long as the JVM. And shutdown might be delayed too much because of it.
// This should not be needed in fact as Monitor objects live as long as the JVM. And shutdown might be delayed too much because of it.
// @Override
// protected void finalize() throws Throwable {
// run();
......
......@@ -480,6 +480,8 @@ public class JobAgent implements Runnable {
}
setStatus(jaStatus.FINISHING_JA);
monitor.setMonitoring("resource_status", null);
logger.log(Level.INFO, "JobAgent finished, id: " + jobAgentId + " totalJobs: " + totalJobs.get());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment