Return-Path: X-Original-To: apmail-reef-dev-archive@minotaur.apache.org Delivered-To: apmail-reef-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6E5E4188D4 for ; Wed, 2 Dec 2015 00:17:14 +0000 (UTC) Received: (qmail 20347 invoked by uid 500); 2 Dec 2015 00:17:11 -0000 Delivered-To: apmail-reef-dev-archive@reef.apache.org Received: (qmail 20278 invoked by uid 500); 2 Dec 2015 00:17:11 -0000 Mailing-List: contact dev-help@reef.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@reef.apache.org Delivered-To: mailing list dev@reef.apache.org Received: (qmail 20205 invoked by uid 99); 2 Dec 2015 00:17:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Dec 2015 00:17:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1BA4D2C1F6B for ; Wed, 2 Dec 2015 00:17:11 +0000 (UTC) Date: Wed, 2 Dec 2015 00:17:11 +0000 (UTC) From: "Byung-Gon Chun (JIRA)" To: dev@reef.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (REEF-1023) Handle Exceptions in Vortex callback MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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}} 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)