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 B93A2200C80 for ; Thu, 11 May 2017 02:24:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B7EB8160BB4; Thu, 11 May 2017 00:24:08 +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 08DE2160B9C for ; Thu, 11 May 2017 02:24:07 +0200 (CEST) Received: (qmail 14827 invoked by uid 500); 11 May 2017 00:24:07 -0000 Mailing-List: contact commits-help@beam.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.apache.org Delivered-To: mailing list commits@beam.apache.org Received: (qmail 14818 invoked by uid 99); 11 May 2017 00:24:07 -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, 11 May 2017 00:24:07 +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 A8F92188A79 for ; Thu, 11 May 2017 00:24:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] 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 vt7INFwY1g_b for ; Thu, 11 May 2017 00:24:05 +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 23FD85F36C for ; Thu, 11 May 2017 00:24:05 +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 72C8DE0069 for ; Thu, 11 May 2017 00:24:04 +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 19ECB21E09 for ; Thu, 11 May 2017 00:24:04 +0000 (UTC) Date: Thu, 11 May 2017 00:24:04 +0000 (UTC) From: "Raghu Angadi (JIRA)" To: commits@beam.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (BEAM-2185) KafkaIO bounded source MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 11 May 2017 00:24:08 -0000 [ https://issues.apache.org/jira/browse/BEAM-2185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16005711#comment-16005711 ] Raghu Angadi edited comment on BEAM-2185 at 5/11/17 12:23 AM: -------------------------------------------------------------- Some more considerations : - Splits: -- Each partition should be split further. -- If we could fetch the size in bytes, it is easier to split. I don't think it is feasible get byte offsets. -- Split could be based on message offsets, but the size could be too large or too small depending on average message size. -- Take a hint from the user if the size is not known? May be not. Read a few sample records? Probably an over kill. - It should support liquid-sharding (dynamic splitting). This does not need average message size. Just the offsets are good enough. was (Author: rangadi): Some more considerations : - Splits: - Each partition should be split further. - If we could fetch the size in bytes, it is easier to split. I don't think it is feasible get byte offsets. - Split could be based on message offsets, but the size could be too large or too small depending on average message size. - Take a hint from the user if the size is not known? May be not. Read a few sample records? Probably an over kill. - It should support liquid-sharding (dynamic splitting). This does not need average message size. Just the offsets are good enough. > KafkaIO bounded source > ---------------------- > > Key: BEAM-2185 > URL: https://issues.apache.org/jira/browse/BEAM-2185 > Project: Beam > Issue Type: New Feature > Components: sdk-java-extensions > Reporter: Raghu Angadi > > KafkaIO could be a useful source for batch applications as well. It could implement a bounded source. The primary question is how the bounds are specified. > One option : Source specifies a time period (say 9am-10am), and KafkaIO fetches appropriate start and end offsets based on time-index in Kafka. This would suite many batch applications that are launched on a scheduled. > Another option is to always read till the end and commit the offsets to Kafka. Handling failures and multiple runs of a task might be complicated. -- This message was sent by Atlassian JIRA (v6.3.15#6346)