Repository: airavata Updated Branches: refs/heads/master d1d8759fd -> 87c0ee207
removing logic when unknown state came during monitoring Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/59d66754 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/59d66754 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/59d66754 Branch: refs/heads/master Commit: 59d66754474dfc4e6e3218a0a8e4b2295c65912c Parents: 2207ece Author: lahiru <[email protected]> Authored: Mon Sep 15 11:02:55 2014 -0400 Committer: lahiru <[email protected]> Committed: Mon Sep 15 11:02:55 2014 -0400 ---------------------------------------------------------------------- .../airavata/gfac/core/monitor/MonitorID.java | 42 +++++--------------- 1 file changed, 9 insertions(+), 33 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/59d66754/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java index 2270db4..5344232 100644 --- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java +++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java @@ -190,40 +190,16 @@ public class MonitorID { // because in some machines job state vanishes quicckly when the job is done // during that case job state comes as unknown.so we handle it here. if (this.state != null && status.equals(JobState.UNKNOWN)) { - if (getFailedCount() >= 2) { - switch (this.state) { - case ACTIVE: -// this.state = JobState.COMPLETE; - logger.info("Failed count is high and old status is ACTIVE so we mark this as COMPLETE"); - break; - case QUEUED: - logger.info("Failed count is high and old status is QUEUED so we mark this as COMPLETE"); -// this.state = JobState.COMPLETE; - break; - default: - int loginfo = getFailedCount()+1; - logger.info("JobId:" + this.getJobID()+" Increasing the failed count to:"+loginfo+""); - setFailedCount(getFailedCount() + 1); - try { - // when state becomes unknown we sleep for a while - Thread.sleep(10000); - } catch (InterruptedException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - break; - } - } else { - try { - // when state becomes unknown we sleep for a while - Thread.sleep(10000); - } catch (InterruptedException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - int loginfo = getFailedCount()+1; - logger.info("JobId:" + this.getJobID()+" Increasing the failed count to:"+loginfo+""); - setFailedCount(getFailedCount() + 1); + try { + // when state becomes unknown we sleep for a while + Thread.sleep(10000); // we do not do with this failed count currently because it created more issues. + } catch (InterruptedException e) { + e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } - } else { + int loginfo = getFailedCount() + 1; + logger.info("JobId:" + this.getJobID() + " Increasing the failed count to:" + loginfo + ""); + setFailedCount(getFailedCount() + 1); + }else { // normal scenario logger.info("Resetting failed count to 0 because correct state came in"); setFailedCount(0);
