Hi There,
I am running a testing DAG with many tasks onto Grid. I also want to
monitor the time it takes to wait in the queue and file staging. The overall
structure of the code is like this
For(each job in the DAG){
MyGramJobThread jobThread = new(job);
jobThread.addListener(this);//register listener call back
jobThread.process();//a new thread is created to run
}
However, my listener's stateChanged(GramJob job) is not called if the thread
quit after submission, therefore, I put a wait() function after the
submission so the process() function would look like this
Process(){
GramJob.submit();
While(!GramJob.finished){
Wait(1000);
}
}
synchronized stateChanged(GramJob job) {
switch(job.status ){
case: DONE
.....
case: Stage
....
}
However, if I submit a big DAG, I notice that I won't get the notification
of many stageOut status change but would get most of the active and finish
status change. I wonder if there are better ways to listen to the status
change from multiple threads? Is there any difference between the stageOut
status and the others? Thanks.
-Ryan