Revision 37040
Added by Nikon Gasparis about 9 years ago
CrisListener.java | ||
---|---|---|
26 | 26 |
private CacheManager cacheManager = null; |
27 | 27 |
private String cacheName = null; |
28 | 28 |
|
29 |
public void beginCrisReferentialCheck(){ |
|
29 |
public void beginCrisReferentialCheck() {
|
|
30 | 30 |
provider.restartResultSets(); |
31 | 31 |
for (ThreadExecutorSubmitter submiter : this.submittersForReferential) { |
32 | 32 |
executor.submit(submiter); |
... | ... | |
47 | 47 |
} |
48 | 48 |
@Override |
49 | 49 |
public synchronized void finished(int jobId, Map<String, Object> jobContext) { |
50 |
workersFinished ++; |
|
51 |
if (workersFinished == workersFirstPhase) { |
|
52 |
logger.debug("1st phase finished.. Beginning second one.."); |
|
53 |
this.beginCrisReferentialCheck(); |
|
54 |
} |
|
55 |
if (workersFinished == workers) { |
|
56 |
if (cacheName != null) { |
|
57 |
cacheManager.removeCache(cacheName); |
|
58 |
logger.debug("caches after removal of cache: " + cacheName); |
|
50 |
try { |
|
51 |
workersFinished ++; |
|
52 |
if (workersFinished == workersFirstPhase) { |
|
53 |
logger.debug("1st phase finished.. Beginning second one.."); |
|
54 |
this.beginCrisReferentialCheck(); |
|
59 | 55 |
} |
60 |
// for (String cache : cacheManager.getCacheNames()) { |
|
61 |
// logger.debug("name: " + cache); |
|
62 |
// } |
|
56 |
if (workersFinished == workers) { |
|
57 |
if (cacheName != null) { |
|
58 |
cacheManager.removeCache(cacheName); |
|
59 |
logger.debug("caches after removal of cache: " + cacheName); |
|
60 |
} |
|
61 |
// for (String cache : cacheManager.getCacheNames()) { |
|
62 |
// logger.debug("name: " + cache); |
|
63 |
// } |
|
64 |
} |
|
65 |
} catch (Exception e) { |
|
66 |
logger.error("Error while finalizing successful cris job"); |
|
63 | 67 |
} |
64 | 68 |
} |
65 | 69 |
|
66 | 70 |
@Override |
67 | 71 |
public synchronized void failed(int jobId, Map<String, Object> jobContext, |
68 | 72 |
Throwable t) { |
69 |
workersFinished ++; |
|
70 |
if (workersFinished == (workers-workersFirstPhase)) { |
|
71 |
if (cacheName != null) { |
|
72 |
cacheManager.removeCache(cacheName); |
|
73 |
logger.debug("caches after removal of cache: " + cacheName); |
|
73 |
try { |
|
74 |
workersFinished ++; |
|
75 |
if (workersFinished == (workers-workersFirstPhase)) { |
|
76 |
if (cacheName != null) { |
|
77 |
cacheManager.removeCache(cacheName); |
|
78 |
logger.debug("caches after removal of cache: " + cacheName); |
|
79 |
} |
|
80 |
// for (String cache : cacheManager.getCacheNames()) { |
|
81 |
// logger.debug("name: " + cache); |
|
82 |
// } |
|
74 | 83 |
} |
75 |
// for (String cache : cacheManager.getCacheNames()) { |
|
76 |
// logger.debug("name: " + cache);
|
|
77 |
// }
|
|
84 |
|
|
85 |
} catch (Exception e) {
|
|
86 |
logger.error("Error while finalizing failed cris job");
|
|
78 | 87 |
} |
79 | 88 |
} |
80 | 89 |
|
Also available in: Unified diff
*improved logging
*uncompleted jobs are now restarted when validator is deployed. (new property to enable/disable)
*bug fixes
*preparing to release 2.1.0