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

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

                Author: ASF GitHub Bot
            Created on: 05/Apr/18 09:41
            Start Date: 05/Apr/18 09:41
    Worklog Time Spent: 10m 
      Work Description: echauchot commented on a change in pull request #5019: 
[BEAM-2852] Add support for Kafka as source/sink on Nexmark
URL: https://github.com/apache/beam/pull/5019#discussion_r179405497
 
 

 ##########
 File path: 
sdks/java/nexmark/src/main/java/org/apache/beam/sdk/nexmark/NexmarkLauncher.java
 ##########
 @@ -764,6 +774,68 @@ public void processElement(ProcessContext c) {
       }));
   }
 
+  static final DoFn<Event, byte[]> EVENT_TO_BYTEARRAY =
+          new DoFn<Event, byte[]>() {
+            @ProcessElement
+            public void processElement(ProcessContext c) {
+              try {
+                byte[] encodedEvent = 
CoderUtils.encodeToByteArray(Event.CODER, c.element());
+                c.output(encodedEvent);
+              } catch (CoderException e1) {
+                LOG.error("Error while sending Event {} to Kafka: 
serialization error",
+                        c.element().toString());
+              }
+            }
+          };
+
+  /**
+   * Send {@code events} to Kafka.
+   */
+  private void sinkEventsToKafka(PCollection<Event> events) {
 
 Review comment:
   what is important in the connection with MOM: 
   - have the ability to keep a track of the generated events that lead to a 
benchmark result
   - be able to read events from a topic
   - write benchmark results to topic

----------------------------------------------------------------
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: 87965)
    Time Spent: 2h 50m  (was: 2h 40m)

> Add support for Kafka as source/sink on Nexmark
> -----------------------------------------------
>
>                 Key: BEAM-2852
>                 URL: https://issues.apache.org/jira/browse/BEAM-2852
>             Project: Beam
>          Issue Type: Improvement
>          Components: testing
>            Reporter: Ismaël Mejía
>            Assignee: Kai Jiang
>            Priority: Minor
>              Labels: newbie, nexmark, starter
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>




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

Reply via email to