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 A4C26200C79 for ; Thu, 4 May 2017 17:41:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A36C7160B9F; Thu, 4 May 2017 15:41:11 +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 E98E5160BB0 for ; Thu, 4 May 2017 17:41:10 +0200 (CEST) Received: (qmail 62225 invoked by uid 500); 4 May 2017 15:41:10 -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 62215 invoked by uid 99); 4 May 2017 15:41:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 May 2017 15:41:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id BD21BC12A8 for ; Thu, 4 May 2017 15:41:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id GqZUpofHq-Rw for ; Thu, 4 May 2017 15:41:08 +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 0F06960D9F for ; Thu, 4 May 2017 15:41:08 +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 E61DBE0D99 for ; Thu, 4 May 2017 15:41:06 +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 5934621DFC for ; Thu, 4 May 2017 15:41:05 +0000 (UTC) Date: Thu, 4 May 2017 15:41:05 +0000 (UTC) From: "Daniel Halperin (JIRA)" To: commits@beam.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (BEAM-2170) PubsubIO.readStrings should handle messages without metadata MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 04 May 2017 15:41:11 -0000 [ https://issues.apache.org/jira/browse/BEAM-2170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Halperin reassigned BEAM-2170: ------------------------------------- Assignee: (was: Reuven Lax) > PubsubIO.readStrings should handle messages without metadata > ------------------------------------------------------------ > > Key: BEAM-2170 > URL: https://issues.apache.org/jira/browse/BEAM-2170 > Project: Beam > Issue Type: Bug > Components: sdk-java-gcp > Reporter: Alexandre Crayssac > Fix For: First stable release > > > When I use PubsubIO.readStrings with messages that does not contain any metadata I got the following error: > {noformat} > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.RuntimeException: org.apache.beam.sdk.coders.CoderException: cannot encode a null Map > at org.apache.beam.runners.direct.ImmutabilityCheckingBundleFactory$ImmutabilityEnforcingBundle.add(ImmutabilityCheckingBundleFactory.java:113) > at org.apache.beam.runners.direct.UnboundedReadEvaluatorFactory$UnboundedReadEvaluator.processElement(UnboundedReadEvaluatorFactory.java:134) > at org.apache.beam.runners.direct.TransformExecutor.processElements(TransformExecutor.java:138) > at org.apache.beam.runners.direct.TransformExecutor.run(TransformExecutor.java:106) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > ... 1 more > Caused by: org.apache.beam.sdk.coders.CoderException: cannot encode a null Map > at org.apache.beam.sdk.coders.MapCoder.encode(MapCoder.java:90) > at org.apache.beam.sdk.coders.MapCoder.encode(MapCoder.java:43) > at org.apache.beam.sdk.io.gcp.pubsub.PubsubMessageWithAttributesCoder.encode(PubsubMessageWithAttributesCoder.java:53) > at org.apache.beam.sdk.io.gcp.pubsub.PubsubMessageWithAttributesCoder.encode(PubsubMessageWithAttributesCoder.java:33) > at org.apache.beam.sdk.util.CoderUtils.encodeToSafeStream(CoderUtils.java:91) > at org.apache.beam.sdk.util.CoderUtils.encodeToByteArray(CoderUtils.java:75) > at org.apache.beam.sdk.util.CoderUtils.encodeToByteArray(CoderUtils.java:60) > at org.apache.beam.sdk.util.MutationDetectors$CodedValueMutationDetector.(MutationDetectors.java:106) > at org.apache.beam.sdk.util.MutationDetectors.forValueWithCoder(MutationDetectors.java:44) > at org.apache.beam.runners.direct.ImmutabilityCheckingBundleFactory$ImmutabilityEnforcingBundle.add(ImmutabilityCheckingBundleFactory.java:111) > ... 8 more > {noformat} > When I add some metadata the problem disappears. You should be able to reproduce the problem with a very simple pipeline consisting of only one PubsubIO.readStrings. > Tell me if you need more information -- This message was sent by Atlassian JIRA (v6.3.15#6346)