workflow metrics thread failures
Author: Praveen Adlakha
Reviewers:
Closes from PraveenAdlakha/2305 and squashes the following commits:
[Praveen Adlakha] checkstyle issue fixed
[Praveen Adlakha] Handle workflow Thread Failure
[Praveen Adlakha] comments addressed
@@ -417,9 +417,14 @@ public final class BacklogMetricEmitterService implements FalconService,
iterator.remove();
continue;
}
- InstancesResult status = wfEngine.getStatus(entity, nominalTime,
+ InstancesResult status = null;
+ try {
+ status = wfEngine.getStatus(entity, nominalTime,
new Date(nominalTime.getTime() + 200), PROCESS_LIFE_CYCLE, false);
- if (status.getInstances().length > 0
+ } catch (FalconException e) {
+ LOG.error("Unable to get status for :" + entity.getName(), e);
+ }
+ if (status !=null && status.getInstances().length > 0
&& status.getInstances()[0].status == InstancesResult.
WorkflowStatus.SUCCEEDED) {
LOG.debug("Instance of nominal time {} of entity {} has succeeded, removing "
