reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Byung-Gon Chun (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (REEF-1023) Handle Exceptions in Vortex callback
Date Wed, 02 Dec 2015 00:17:11 GMT

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

Byung-Gon Chun commented on REEF-1023:
--------------------------------------

[~afchung90] Please go ahead. {{FutureCallback}} sounds good to me.


> Handle Exceptions in Vortex callback
> ------------------------------------
>
>                 Key: REEF-1023
>                 URL: https://issues.apache.org/jira/browse/REEF-1023
>             Project: REEF
>          Issue Type: Bug
>          Components: Vortex
>            Reporter: Yunseong Lee
>
> REEF-505 added callback feature in Vortex. Client can register {{EventHandler<TOutput>}}
which is called when Tasklets finish. This works well in the normal case.
> However, in REEF-1002 [~bgchun] pointed it out that there is no way for client to notice
Exceptions (I should have noticed before merging the PR).
> We had a discussion to fix this, and I'm copying the most relevant comments from the
thread: 
> 1.([~zpqian]) FYI the API design in .NET threadpool: https://msdn.microsoft.com/en-us/library/hh194741.aspx
> 2. ([~afchung90]) Perhaps, instead of EventHandler, we can use Observer for the callback
instead, and invoke onError onExceptions
> 3. ([~bgchun]) It's better to use a variation of Observer. Since Observer has a specific
contract (zero or more on Next calls followed by onCompleted or onError), we can define a
subclass of Observer like ExactlyOnceObserver (better name?), which calls either onNext or
onError. onCompleted should raise an UnsupportedOperationException. How does this sound?



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

Mime
View raw message