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 326E1200C0F for ; Thu, 2 Feb 2017 10:56:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 311BA160B57; Thu, 2 Feb 2017 09:56:03 +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 DEBDE160B54 for ; Thu, 2 Feb 2017 10:56:01 +0100 (CET) Received: (qmail 22907 invoked by uid 500); 2 Feb 2017 09:55:59 -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 22898 invoked by uid 99); 2 Feb 2017 09:55:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2017 09:55:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7EED418285E for ; Thu, 2 Feb 2017 09:55:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id SaW0hDuiCjQJ for ; Thu, 2 Feb 2017 09:55:58 +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 711EF5F30B for ; Thu, 2 Feb 2017 09:55:57 +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 65D9CE02A9 for ; Thu, 2 Feb 2017 09:55:56 +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 F192C2528A for ; Thu, 2 Feb 2017 09:55:54 +0000 (UTC) Date: Thu, 2 Feb 2017 09:55:54 +0000 (UTC) From: "Tzu-Li (Gordon) Tai (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (FLINK-3398) Flink Kafka consumer should support auto-commit opt-outs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 02 Feb 2017 09:56:03 -0000 [ https://issues.apache.org/jira/browse/FLINK-3398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15849733#comment-15849733 ] Tzu-Li (Gordon) Tai edited comment on FLINK-3398 at 2/2/17 9:55 AM: -------------------------------------------------------------------- I think we should keep this JIRA instead of merging it into FLINK-4280. They try to address different new features: FLINK-4280 is for more flexible start position configuration independent from Kafka offsets. This JIRA is for opt-out from offset committing on Flink's checkpoints. I'll move the respective proposed API for commit opt-out here: {code} Properties props = new Properties(); ... FlinkKafkaConsumer09 kafka = new FlinkKafkaConsumer09("topic", schema, props); kafka.setEnableOffsetCommittingOnCheckpoints(boolean); // if true (checkpointing should be enabled), overrides periodic checkpointing if "enable.auto.commit" is set in props. {code} So the scenarios breaks down into: 1. {{props.put("auto.commit.enable", "true")}} & {{setEnableOffsetCommittingOnCheckpoints(false)}}: Perform auto committing with the internal client (or in 0.8 case our own periodic committer). 2. {{props.put("auto.commit.enable", "true")}} & {{setEnableOffsetCommittingOnCheckpoints(true)}}: Overrides whatever value in props for "auto.commit.enable", only commit on checkpoints. If checkpointing isn't enabled, the consumer fails due to conflicting configuration. 3. {{props.put("auto.commit.enable", "false")}} & {{setEnableOffsetCommittingOnCheckpoints(false)}}: No offset committing at all. was (Author: tzulitai): I think we should keep this JIRA instead of merging it into FLINK-4280. They try to address different new features: FLINK-4280 is for more flexible start position configuration independent from Kafka offsets. This JIRA is for opt-out from offset committing on Flink's checkpoints. I'll move the respective proposed API for commit opt-out here: {code} Properties props = new Properties(); ... FlinkKafkaConsumer09 kafka = new FlinkKafkaConsumer09("topic", schema, props); kafka.setEnableOffsetCommittingOnCheckpoints(boolean); // if true (checkpointing should be enabled), overrides periodic checkpointing if "enable.auto.commit" is set in props. {code} So the scenarios breaks down into: 1. {{props.put("auto.commit.enable", "true")}} & {{setEnableOffsetCommittingOnCheckpoints(false)}}: Perform auto committing with the internal client (or in 0.8 case our own periodic committer). 2. {{props.put("auto.commit.enable", "true")}} & {{setEnableOffsetCommittingOnCheckpoints(true)}}: Overrides whatever value in props for "auto.commit.enable", only commit on checkpoints. If checkpointing isn't enabled, the consumer fails due to conflicting configuration. > Flink Kafka consumer should support auto-commit opt-outs > -------------------------------------------------------- > > Key: FLINK-3398 > URL: https://issues.apache.org/jira/browse/FLINK-3398 > Project: Flink > Issue Type: Improvement > Components: Kafka Connector > Reporter: Shikhar Bhushan > Assignee: Tzu-Li (Gordon) Tai > Priority: Critical > Fix For: 1.3.0 > > > Currently the Kafka source will commit consumer offsets to Zookeeper, either upon a checkpoint if checkpointing is enabled, otherwise periodically based on {{auto.commit.interval.ms}} > It should be possible to opt-out of committing consumer offsets to Zookeeper. Kafka has this config as {{auto.commit.enable}} (0.8) and {{enable.auto.commit}} (0.9). -- This message was sent by Atlassian JIRA (v6.3.15#6346)