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 75A0E200C6F for ; Tue, 9 May 2017 21:47:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 743B6160B9A; Tue, 9 May 2017 19:47: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 BAB46160BC8 for ; Tue, 9 May 2017 21:47:07 +0200 (CEST) Received: (qmail 48100 invoked by uid 500); 9 May 2017 19:47: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 48089 invoked by uid 99); 9 May 2017 19:47:06 -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; Tue, 09 May 2017 19:47:06 +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 81312C0254 for ; Tue, 9 May 2017 19:47:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id bXWsluLjviqe for ; Tue, 9 May 2017 19:47: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 1A1D25F4EE for ; Tue, 9 May 2017 19:47: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 6C1D3E0BDF for ; Tue, 9 May 2017 19:47: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 1DF0421E0B for ; Tue, 9 May 2017 19:47:04 +0000 (UTC) Date: Tue, 9 May 2017 19:47:04 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: commits@beam.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BEAM-2221) Make KafkaIO coder specification less awkward MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 09 May 2017 19:47:08 -0000 [ https://issues.apache.org/jira/browse/BEAM-2221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16003400#comment-16003400 ] ASF GitHub Bot commented on BEAM-2221: -------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/beam/pull/2986 > Make KafkaIO coder specification less awkward > --------------------------------------------- > > Key: BEAM-2221 > URL: https://issues.apache.org/jira/browse/BEAM-2221 > Project: Beam > Issue Type: Improvement > Components: sdk-java-extensions > Reporter: Eugene Kirpichov > Assignee: Raghu Angadi > Fix For: 2.0.0 > > > readWithCoders and writeWithCoders functions are awkward because they don't emphasize enough that coders are a poor choice for interpreting wire format. > The only reason to specify coders in KafkaIO is when coder inference from Deserializer fails. To emphasize that, let's change the API to be withKeyDeserializer(Deserializer) as the default choice and withKeyDeserializerAndCoder(Deserializer,Coder) if inference fails; likewise for value. > Remove functions using coders to interpret wire format from the API. A common case of that is Avro and Proto - for that, introduce special helper functions, I guess like withAvro/ProtoKey/Value(...), which under the hood may be allowed to reuse Avro/ProtoCoder as a utility, but do not expose this fact. -- This message was sent by Atlassian JIRA (v6.3.15#6346)