[
https://issues.apache.org/jira/browse/BEAM-10869?focusedWorklogId=485459&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-485459
]
ASF GitHub Bot logged work on BEAM-10869:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Sep/20 23:47
Start Date: 16/Sep/20 23:47
Worklog Time Spent: 10m
Work Description: chamikaramj commented on a change in pull request
#12806:
URL: https://github.com/apache/beam/pull/12806#discussion_r489813934
##########
File path: sdks/python/apache_beam/io/gcp/pubsub.py
##########
@@ -290,21 +290,26 @@ def __init__(self,
topic, id_label, with_attributes, timestamp_attribute)
@staticmethod
- def to_proto_str(element):
+ def message_to_proto_str(element):
# type: (PubsubMessage) -> bytes
if not isinstance(element, PubsubMessage):
raise TypeError(
'Unexpected element. Type: %s (expected: PubsubMessage), '
'value: %r' % (type(element), element))
return element._to_proto_str()
+ @staticmethod
+ def bytes_to_proto_str(element):
+ # type: (bytes) -> bytes
+ msg = pubsub.types.pubsub_pb2.PubsubMessage()
+ msg.data = element
+ return msg.SerializeToString()
+
def expand(self, pcoll):
if self.with_attributes:
Review comment:
This is fine but probably means that we'll have to keep the
with_attributes property in PubSubWritePayload to properly reconstruct the
transforms from the proto.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 485459)
Time Spent: 4h 20m (was: 4h 10m)
> Pubsub native write should be supported over fnapi
> --------------------------------------------------
>
> Key: BEAM-10869
> URL: https://issues.apache.org/jira/browse/BEAM-10869
> Project: Beam
> Issue Type: Improvement
> Components: runner-dataflow
> Reporter: Boyuan Zhang
> Priority: P2
> Time Spent: 4h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)