You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/09/17 00:58:08 UTC

[GitHub] [kafka] kkonstantine commented on a change in pull request #9104: KAFKA-10266: Update the connector config header.converter

kkonstantine commented on a change in pull request #9104:
URL: https://github.com/apache/kafka/pull/9104#discussion_r489834773



##########
File path: connect/runtime/src/main/java/org/apache/kafka/connect/runtime/ConnectorConfig.java
##########
@@ -89,11 +89,16 @@
     public static final String VALUE_CONVERTER_CLASS_DISPLAY = "Value converter class";
 
     public static final String HEADER_CONVERTER_CLASS_CONFIG = WorkerConfig.HEADER_CONVERTER_CLASS_CONFIG;
-    public static final String HEADER_CONVERTER_CLASS_DOC = WorkerConfig.HEADER_CONVERTER_CLASS_DOC;
+    public static final String HEADER_CONVERTER_CLASS_DOC =
+            "HeaderConverter class used to convert between Kafka Connect format and the serialized form that is written to Kafka." +
+            " This controls the format of the header values in messages written to or read from Kafka, and since this is" +
+            " independent of connectors it allows any connector to work with any serialization format." +
+            " Examples of common formats include JSON and Avro. By default, the value will be inherited from" +
+            " the <a href=\"https://kafka.apache.org/documentation/#header.converter\">Connect config</a>.";
     public static final String HEADER_CONVERTER_CLASS_DISPLAY = "Header converter class";
     // The Connector config should not have a default for the header converter, since the absence of a config property means that
     // the worker config settings should be used. Thus, we set the default to null here.
-    public static final String HEADER_CONVERTER_CLASS_DEFAULT = null;
+    public static final String HEADER_CONVERTER_CLASS_DEFAULT = "Inherited from Connect config";

Review comment:
       What concerns me with this approach is that it can only be applied to String properties but not other property types. (The fact that this is not a valid default value is also a bit problematic). 
   
   Is there any other way to fix this?




----------------------------------------------------------------
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:
users@infra.apache.org