You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Andrew Chung (JIRA)" <ji...@apache.org> on 2015/12/01 10:17:11 UTC
[jira] [Commented] (REEF-1023) Handle Exceptions in Vortex callback
[ https://issues.apache.org/jira/browse/REEF-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15033384#comment-15033384 ]
Andrew Chung commented on REEF-1023:
------------------------------------
Should we move ahead and use {{Observer}} here? What does everyone else think? If so, I would like to take a crack at this. Thanks!
> 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)
Re: [jira] [Commented] (REEF-1023) Handle Exceptions in Vortex callback
Posted by Zhengping Qian <uu...@gmail.com>.
Is that something like
http://google.github.io/guava/releases/snapshot/api/docs/com/google/common/util/concurrent/FutureCallback.html
will
do for our purpose?
On Tue, Dec 1, 2015 at 5:17 PM Andrew Chung (JIRA) <ji...@apache.org> wrote:
>
> [
> https://issues.apache.org/jira/browse/REEF-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15033384#comment-15033384
> ]
>
> Andrew Chung commented on REEF-1023:
> ------------------------------------
>
> Should we move ahead and use {{Observer}} here? What does everyone else
> think? If so, I would like to take a crack at this. Thanks!
>
> > 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)
>