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

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

                Author: ASF GitHub Bot
            Created on: 30/Jul/21 20:58
            Start Date: 30/Jul/21 20:58
    Worklog Time Spent: 10m 
      Work Description: aaltay commented on pull request #15090:
URL: https://github.com/apache/beam/pull/15090#issuecomment-890150112


   > Hi @aaltay I've been trying to run `Java KafkaIO Performance Test` but 
keep getting the same error during build:
   > 
   > ```
   > 15:12:09 Error from server (Invalid): error when creating 
"/home/jenkins/jenkins-slave/workspace/beam_PerformanceTests_Kafka_IO/src/.test-infra/kubernetes/kafka-cluster/04-outside-services/outside-0.yml":
 Service "outside-0" is invalid: spec.ports[0].nodePort: Invalid value: 32400: 
provided port is already allocated
   > 15:12:09 Error from server (Invalid): error when creating 
"/home/jenkins/jenkins-slave/workspace/beam_PerformanceTests_Kafka_IO/src/.test-infra/kubernetes/kafka-cluster/04-outside-services/outside-1.yml":
 Service "outside-1" is invalid: spec.ports[0].nodePort: Invalid value: 32401: 
provided port is already allocated
   > 15:12:09 Error from server (Invalid): error when creating 
"/home/jenkins/jenkins-slave/workspace/beam_PerformanceTests_Kafka_IO/src/.test-infra/kubernetes/kafka-cluster/04-outside-services/outside-2.yml":
 Service "outside-2" is invalid: spec.ports[0].nodePort: Invalid value: 32402: 
provided port is already allocated
   > ```
   
   @chamikaramj / @tysonjh - Could you please help?


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 631887)
    Time Spent: 8.5h  (was: 8h 20m)

> KafkaIO does not handle null keys
> ---------------------------------
>
>                 Key: BEAM-12008
>                 URL: https://issues.apache.org/jira/browse/BEAM-12008
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-kafka
>            Reporter: Daniel Collins
>            Assignee: Weiwen Xu
>            Priority: P2
>              Labels: stale-P2
>          Time Spent: 8.5h
>  Remaining Estimate: 0h
>
> Kafka 
> [ConsumerRecord|https://kafka.apache.org/27/javadoc/org/apache/kafka/clients/consumer/ConsumerRecord.html#key--]
>  and 
> [ProducerRecord|https://kafka.apache.org/27/javadoc/org/apache/kafka/clients/producer/ProducerRecord.html#key--]
>  'key' fields are explicitly allowed to be null. In addition, on the producer 
> side, setting a null key is the way that the user indicates that they want a 
> [random partition for their 
> message|[https://github.com/apache/kafka/blob/9adfac280392da0837cfd8d582bc540951e94087/clients/src/main/java/org/apache/kafka/clients/producer/internals/DefaultPartitioner.java#L67].]
>  
> Beam KafkaIO does not support null keys in byte[] mode (read side: 
> [https://github.com/apache/beam/blob/9e0997760cf3320f1a1d0c4342d3dff559a25775/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java#L727|https://github.com/apache/beam/blob/9e0997760cf3320f1a1d0c4342d3dff559a25775/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java#L727)]
> write side: 
> [https://github.com/apache/beam/blob/9e0997760cf3320f1a1d0c4342d3dff559a25775/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaRecordCoder.java#L58])
>  
> since it would defer to ByteArrayCoder which does not support null arrays.
>  
> BeamKafkaTable suffers the same issue 
> https://github.com/apache/beam/blob/9e0997760cf3320f1a1d0c4342d3dff559a25775/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/kafka/BeamKafkaTable.java#L144



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

Reply via email to