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

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_r181512585
 
 

 ##########
 File path: 
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/ConsumerSpEL.java
 ##########
 @@ -37,47 +38,55 @@
 import org.springframework.expression.spel.support.StandardEvaluationContext;
 
 /**
- * ConsumerSpEL to handle multiple of versions of Consumer API between Kafka 
0.9 and 0.10.
- * It auto detects the input type List/Collection/Varargs,
- * to eliminate the method definition differences.
+ * ConsumerSpEL to handle multiple of versions of Consumer API between Kafka 
0.9 and 0.10. It auto
+ * detects the input type List/Collection/Varargs, to eliminate the method 
definition differences.
  */
 class ConsumerSpEL {
+
   private static final Logger LOG = 
LoggerFactory.getLogger(ConsumerSpEL.class);
 
   private SpelParserConfiguration config = new SpelParserConfiguration(true, 
true);
   private ExpressionParser parser = new SpelExpressionParser(config);
 
-  private Expression seek2endExpression =
-      parser.parseExpression("#consumer.seekToEnd(#tp)");
+  private Expression seek2endExpression = 
parser.parseExpression("#consumer.seekToEnd(#tp)");
 
-  private Expression assignExpression =
-      parser.parseExpression("#consumer.assign(#tp)");
+  private Expression assignExpression = 
parser.parseExpression("#consumer.assign(#tp)");
 
   private boolean hasRecordTimestamp = false;
   private boolean hasOffsetsForTimes = false;
+  private boolean hasHeaders = false;
 
   public ConsumerSpEL() {
     try {
       // It is supported by Kafka Client 0.10.0.0 onwards.
-      hasRecordTimestamp = ConsumerRecord
-        .class
-        .getMethod("timestamp", (Class<?>[]) null)
-        .getReturnType()
-        .equals(Long.TYPE);
+      hasRecordTimestamp =
 
 Review comment:
   Please avoid auto-reindenting the file. There should be an option in your 
editor not to reindent on each save of a file.

----------------------------------------------------------------
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: 91017)
    Time Spent: 0.5h  (was: 20m)

> 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: 0.5h
>  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)

Reply via email to