[ 
https://issues.apache.org/jira/browse/BEAM-2629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17132381#comment-17132381
 ] 

Beam JIRA Bot commented on BEAM-2629:
-------------------------------------

This issue is assigned but has not received an update in 30 days so it has been 
labeled "stale-assigned". If you are still working on the issue, please give an 
update and remove the label. If you are no longer working on the issue, please 
unassign so someone else may work on it. In 7 days the issue will be 
automatically unassigned.

> Adding timestamp and id attributes to pubsub messages with no other 
> attributes causes an exception.
> ---------------------------------------------------------------------------------------------------
>
>                 Key: BEAM-2629
>                 URL: https://issues.apache.org/jira/browse/BEAM-2629
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-gcp
>    Affects Versions: 2.2.0
>            Reporter: Nigel Kilmer
>            Assignee: Nigel Kilmer
>            Priority: P2
>              Labels: stale-assigned
>
> I'm trying to use PubsubIO.writeProtos along with a timestamp and id 
> attribute. When PubsubIO tries to write the messages to my topic, it throws a 
> PipelineExecutionException with this cause:
> Caused by: java.lang.UnsupportedOperationException
>       at java.util.AbstractMap.put(AbstractMap.java:209)
>       at 
> org.apache.beam.sdk.io.gcp.pubsub.PubsubJsonClient.publish(PubsubJsonClient.java:148)
>       at 
> org.apache.beam.sdk.io.gcp.pubsub.PubsubUnboundedSink$WriterFn.publishBatch(PubsubUnboundedSink.java:249)
>       at 
> org.apache.beam.sdk.io.gcp.pubsub.PubsubUnboundedSink$WriterFn.processElement(PubsubUnboundedSink.java:285)
> Looks like the problem is that PubsubJsonClient attempts to add the timestamp 
> and id attributes to a map which may be empty and immutable if no other 
> attributes are specified on the message. I will submit a pull request with a 
> fix for this bug shortly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to