[ https://issues.apache.org/jira/browse/BEAM-4038?focusedWorklogId=91018&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-91018 ]
ASF GitHub Bot logged work on BEAM-4038: ---------------------------------------- Author: ASF GitHub Bot Created on: 13/Apr/18 23:28 Start Date: 13/Apr/18 23:28 Worklog Time Spent: 10m Work Description: rangadi commented on a change in pull request #5111: [BEAM-4038] Support Kafka Headers in KafkaIO URL: https://github.com/apache/beam/pull/5111#discussion_r181529808 ########## File path: sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaHeader.java ########## @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.beam.sdk.io.kafka; + +/** + * This is a copy of Kafka's {@link org.apache.kafka.common.header.Header}. Included here in order + * to support older Kafka versions (0.9.x). + */ +public interface KafkaHeader { Review comment: I think strictly we don't need to our own versions `Header`, `Headers` etc. How about this: - Add 'Headers' field to KafkaRecord. We ensure the field is accessed only if the `consumerSpEL.hasHeaders` is true. - add `Headers getHeaders()` method to KafkaRecord, which throws an exception if `hasHeaders` is false. I think we could have done something like this with `TimestampType` too. WDYT. It is a bit hacky, but I guess it is better than replicating more of ConsumerRecord functionality. ---------------------------------------------------------------- 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: 91018) Time Spent: 40m (was: 0.5h) > Support Kafka Headers in KafkaIO > -------------------------------- > > Key: BEAM-4038 > URL: https://issues.apache.org/jira/browse/BEAM-4038 > Project: Beam > Issue Type: New Feature > Components: io-java-kafka > Reporter: Geet Kumar > Assignee: Raghu Angadi > Priority: Minor > Time Spent: 40m > Remaining Estimate: 0h > > Headers have been added to Kafka Consumer/Producer records (KAFKA-4208). The > purpose of this JIRA is to support this feature in KafkaIO. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)