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 99959200C32 for ; Thu, 9 Mar 2017 08:15:44 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 981AF160B84; Thu, 9 Mar 2017 07:15:44 +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 E36AF160B64 for ; Thu, 9 Mar 2017 08:15:43 +0100 (CET) Received: (qmail 6020 invoked by uid 500); 9 Mar 2017 07:15:43 -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 6011 invoked by uid 99); 9 Mar 2017 07:15:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2017 07:15:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 919E7C1446 for ; Thu, 9 Mar 2017 07:15:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.652 X-Spam-Level: X-Spam-Status: No, score=0.652 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id p_QQX2O7PeUD for ; Thu, 9 Mar 2017 07:15:41 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 5DC285FCED for ; Thu, 9 Mar 2017 07:15:41 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 904ADE086A for ; Thu, 9 Mar 2017 07:15:38 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2B769243AC for ; Thu, 9 Mar 2017 07:15:38 +0000 (UTC) Date: Thu, 9 Mar 2017 07:15:38 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-3679) Allow Kafka consumer to skip corrupted messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 09 Mar 2017 07:15:44 -0000 [ https://issues.apache.org/jira/browse/FLINK-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15902597#comment-15902597 ] ASF GitHub Bot commented on FLINK-3679: --------------------------------------- Github user haohui commented on the issue: https://github.com/apache/flink/pull/3314 Yes totally agree. Thanks very much for taking the time to review the PRs. Will do it next time. > Allow Kafka consumer to skip corrupted messages > ----------------------------------------------- > > Key: FLINK-3679 > URL: https://issues.apache.org/jira/browse/FLINK-3679 > Project: Flink > Issue Type: Bug > Components: DataStream API, Kafka Connector > Reporter: Jamie Grier > Assignee: Haohui Mai > Fix For: 1.3.0 > > > There are a couple of issues with the DeserializationSchema API that I think should be improved. This request has come to me via an existing Flink user. > The main issue is simply that the API assumes that there is a one-to-one mapping between input and outputs. In reality there are scenarios where one input message (say from Kafka) might actually map to zero or more logical elements in the pipeline. > Particularly important here is the case where you receive a message from a source (such as Kafka) and say the raw bytes don't deserialize properly. Right now the only recourse is to throw IOException and therefore fail the job. > This is definitely not good since bad data is a reality and failing the job is not the right option. If the job fails we'll just end up replaying the bad data and the whole thing will start again. > Instead in this case it would be best if the user could just return the empty set. > The other case is where one input message should logically be multiple output messages. This case is probably less important since there are other ways to do this but in general it might be good to make the DeserializationSchema.deserialize() method return a collection rather than a single element. > Maybe we need to support a DeserializationSchema variant that has semantics more like that of FlatMap. -- This message was sent by Atlassian JIRA (v6.3.15#6346)