reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Weimer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (REEF-1415) Deprecate JavaTaskException and set AsError to null on FailedTask for FailedEvaluators
Date Fri, 03 Jun 2016 15:01:02 GMT

    [ https://issues.apache.org/jira/browse/REEF-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15314245#comment-15314245
] 

Markus Weimer commented on REEF-1415:
-------------------------------------

The Java exception hierarchy should not be the model. It is messy, and we made several attempts
to clean it up which didn't succeed. Mostly for lack of focus on the issue.

I'm fine with returning {{null}} as long as that is communicated to the user of this API.
In Java, I'd say return an {{Optional}}, but that seems foolish in C# with its wonderful {{?.}}
operator. Is there a way for us to document the potential of returning {{null}}, preferably
in the language? If not, maybe we can use custom attributes or at worst XML docs to make this
clear to the caller of these APIs.

> Deprecate JavaTaskException and set AsError to null on FailedTask for FailedEvaluators
> --------------------------------------------------------------------------------------
>
>                 Key: REEF-1415
>                 URL: https://issues.apache.org/jira/browse/REEF-1415
>             Project: REEF
>          Issue Type: Bug
>          Components: REEF.NET, REEF.NET Driver
>            Reporter: Andrew Chung
>            Assignee: Andrew Chung
>
> Non-existent Task Exceptions can occur when an Evaluator fails unexpectedly. The Task
itself does not throw an Exception, so the FailedTask therefore should not contain an Exception
object.
> Java Task Exceptions are currently generated when {{AvroFailedTask.Data}} is set to a
{{null}} byte array. Provided that the Avro schema of FailedTask does not union with {{null}},
this will never occur.
> Now that C# Task Exceptions support serialization such that even when a user's Exception
is not serializable we wrap a {{NonSerializableTaskException}} around it, we can assume that
an empty {{AvroFailedTask.Data}} only occurs when the Evaluator fails. We should thus return
{{null}} when the user calls {{AsError()}} on a {{FailedTask}} that comes from a {{FailedEvaluator}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message