[ https://issues.apache.org/jira/browse/KAFKA-4929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15959490#comment-15959490 ]
Gwen Shapira commented on KAFKA-4929: ------------------------------------- I'm cherrypicking this to 0.10.2 branch to be included in 0.10.2.1 bugfix release (the docs and errors are misleading enough to constitute a bug in my opinion). Objections [~ewencp]? > Transformation Key/Value type references should be to class name(), not > canonicalName() > --------------------------------------------------------------------------------------- > > Key: KAFKA-4929 > URL: https://issues.apache.org/jira/browse/KAFKA-4929 > Project: Kafka > Issue Type: Bug > Components: KafkaConnect > Affects Versions: 0.10.2.0 > Reporter: bruce szalwinski > Priority: Minor > Fix For: 0.11.0.0 > > > The docs suggest that referencing the Key/Value transformations is done as > follows: > {code} > "transforms": "replaceFieldValue", > "transforms.replaceFieldValue.type": > "org.apache.kafka.connect.transforms.ReplaceField.Value" > {code} > But that results in a validation failure saying that the class cannot be > found. > {code} > "value": { > "errors": [ > "Invalid value > org.apache.kafka.connect.transforms.ReplaceField.Value for configuration > transforms.replaceFieldValue.type: Class > org.apache.kafka.connect.transforms.ReplaceField.Value could not be found.", > "Invalid value null for configuration > transforms.replaceFieldValue.type: Not a Transformation" > ], > "name": "transforms.replaceFieldValue.type", > "recommended_values": [ > "org.apache.kafka.connect.transforms.ExtractField.Key", > "org.apache.kafka.connect.transforms.ExtractField.Value", > "org.apache.kafka.connect.transforms.HoistField.Key", > "org.apache.kafka.connect.transforms.HoistField.Value", > "org.apache.kafka.connect.transforms.InsertField.Key", > "org.apache.kafka.connect.transforms.InsertField.Value", > "org.apache.kafka.connect.transforms.MaskField.Key", > "org.apache.kafka.connect.transforms.MaskField.Value", > "org.apache.kafka.connect.transforms.RegexRouter", > "org.apache.kafka.connect.transforms.ReplaceField.Key", > "org.apache.kafka.connect.transforms.ReplaceField.Value", > > "org.apache.kafka.connect.transforms.SetSchemaMetadata.Key", > > "org.apache.kafka.connect.transforms.SetSchemaMetadata.Value", > "org.apache.kafka.connect.transforms.TimestampRouter", > "org.apache.kafka.connect.transforms.ValueToKey" > ], > {code} > Since the Key / Value transformations are defined as static nested classes, > the proper notation is > {code} > "transforms": "replaceFieldValue", > "transforms.replaceFieldValue.type": > "org.apache.kafka.connect.transforms.ReplaceField$Value" > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)