slem1 commented on a change in pull request #280: FLUME-3327 add useKafkaHeader 
option to convert flume headers as kafk…
URL: https://github.com/apache/flume/pull/280#discussion_r320267738
 
 

 ##########
 File path: 
flume-ng-sources/flume-kafka-source/src/main/java/org/apache/flume/source/kafka/KafkaSource.java
 ##########
 @@ -515,6 +530,14 @@ Properties getConsumerProps() {
     return stringMap;
   }
 
+  private static Map<String, String> toStringMap(Headers kafkaHeaders) {
+    Map<String, String> stringMap = new HashMap<String, String>();
+    for (Header kafkaHeader : kafkaHeaders) {
+      stringMap.put(kafkaHeader.key(), new String(kafkaHeader.value()));
 
 Review comment:
   Should be construct through `public String(byte bytes[], String 
charsetName)` with a configurable Charset value

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to