[ 
https://issues.apache.org/jira/browse/BEAM-6207?focusedWorklogId=191084&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-191084
 ]

ASF GitHub Bot logged work on BEAM-6207:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Jan/19 15:56
            Start Date: 28/Jan/19 15:56
    Worklog Time Spent: 10m 
      Work Description: lgajowy commented on pull request #7612: [BEAM-6207] 
Added option to publish synthetic data to Kafka topic.
URL: https://github.com/apache/beam/pull/7612#discussion_r251473502
 
 

 ##########
 File path: 
sdks/java/testing/load-tests/src/main/java/org/apache/beam/sdk/loadtests/SyntheticDataPubSubPublisher.java
 ##########
 @@ -83,14 +97,41 @@ public static void main(String[] args) throws IOException {
 
     Pipeline pipeline = Pipeline.create(options);
 
-    pipeline
-        .apply("Read synthetic data", Read.from(new 
SyntheticBoundedSource(sourceOptions)))
-        .apply("Map to PubSub messages", MapElements.via(new 
MapBytesToPubSubMessage()))
-        .apply("Write to PubSub", 
PubsubIO.writeMessages().to(options.getInsertionPipelineTopic()));
-
+    if (!options.getKafkaBootstrapServerAddress().isEmpty()) {
 
 Review comment:
   Those sinks are somewhat independent and we could let them stay this way. We 
can code it like this (including the division of the methods):
   
   ```
   if (<options for kafka are present) {
         writeToKafka(collection);
   
   if (<options for pubsub are present>)
         writeToPubsub(collection);
   }
   ```
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 191084)
    Time Spent: 1h 10m  (was: 1h)

> extend "Data insertion Pipeline" with Kafka IO
> ----------------------------------------------
>
>                 Key: BEAM-6207
>                 URL: https://issues.apache.org/jira/browse/BEAM-6207
>             Project: Beam
>          Issue Type: Sub-task
>          Components: io-java-kafka, testing
>            Reporter: Lukasz Gajowy
>            Assignee: Michal Walenia
>            Priority: Trivial
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Since now we have the Data insertion pipeline based on PubSubIO, it can be 
> easily extended with KafkaIO if needed. Same data then could be published to 
> any of the sinks leaving out the choice and enabling the data insertion 
> pipeline for Flink.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to