You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by Dhruv Mahajan <dh...@gmail.com> on 2015/09/03 21:53:18 UTC

Using FailedContexts field in IFailedEvaluator

Hi

I want to check if Evaluator failed before submitting context and service
or before that I..e it ever reached IAllocatedEvaluator stage or not. How
can I do that using FailedContects field. Is just checking if it is empty
enough?

Dhruv

Re: Using FailedContexts field in IFailedEvaluator

Posted by Markus Weimer <ma...@weimo.de>.
On 2015-09-03 12:53, Dhruv Mahajan wrote:
> I want to check if Evaluator failed before submitting context and 
> service or before that I..e it ever reached IAllocatedEvaluator stage
> or not. How can I do that using FailedContects field. Is just 
> checking if it is empty enough?

Yes, `IFailedEvaluator.FailedContexts` will be null or empty when there
were no contexts active. Whether null or empty is the right return value
currently escapes me :-( Similarly, `IFailedEvaluator.FailedTask` will
be empty if there was no Task running at the time of failure.

Also, you can determine whether or not a context was in fact
instantiated by whether or not you have received an `IActiveContext` for
it before.

Markus