Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3EBB0200BC4 for ; Sat, 19 Nov 2016 11:44:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3D47D160B09; Sat, 19 Nov 2016 10:44:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AD2FA160AEF for ; Sat, 19 Nov 2016 11:43:59 +0100 (CET) Received: (qmail 45358 invoked by uid 500); 19 Nov 2016 10:43:58 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 45342 invoked by uid 99); 19 Nov 2016 10:43:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Nov 2016 10:43:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 982A92C0AFA for ; Sat, 19 Nov 2016 10:43:58 +0000 (UTC) Date: Sat, 19 Nov 2016 10:43:58 +0000 (UTC) From: "Kostas Kloudas (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-2646) Rich functions should provide a method "closeAfterFailure()" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 19 Nov 2016 10:44:00 -0000 [ https://issues.apache.org/jira/browse/FLINK-2646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15679034#comment-15679034 ] Kostas Kloudas commented on FLINK-2646: --------------------------------------- By the way the {{RichFunction}} is annotated as {{Public}} and maven complains when trying to add a new method. What can be a valid work-around? > Rich functions should provide a method "closeAfterFailure()" > ------------------------------------------------------------ > > Key: FLINK-2646 > URL: https://issues.apache.org/jira/browse/FLINK-2646 > Project: Flink > Issue Type: Improvement > Components: Core > Affects Versions: 0.10.0 > Reporter: Stephan Ewen > Assignee: Liang Chen > Fix For: 1.0.0 > > > Right now, the {{close()}} method of rich functions is invoked in case of proper completion, and in case of canceling in case of error (to allow for cleanup). > In certain cases, the user function needs to know why it is closed, whether the task completed in a regular fashion, or was canceled/failed. > I suggest to add a method {{closeAfterFailure()}} to the {{RichFunction}}. By default, this method calls {{close()}}. The runtime is the changed to call {{close()}} as part of the regular execution and {{closeAfterFailure()}} in case of an irregular exit. > Because by default all cases call {{close()}} the change would not be API breaking. -- This message was sent by Atlassian JIRA (v6.3.4#6332)