[
https://issues.apache.org/jira/browse/KAFKA-4929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15935387#comment-15935387
]
ASF GitHub Bot commented on KAFKA-4929:
---------------------------------------
GitHub user bruce-szalwinski opened a pull request:
https://github.com/apache/kafka/pull/2720
KAFKA-4929: Transformation Key/Value type references should be to class
name(), not canonicalName()
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/CDKGlobal/kafka transforms
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/2720.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2720
----
commit eba0af7a2de00c024095591482f439baa7de9bfd
Author: Bruce Szalwinski <[email protected]>
Date: 2017-03-21T21:28:16Z
Key / Value transformations are static nested classes and so are referenced
using OuterClass$Key and OuterClass$Value.
----
> 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
> Affects Versions: 0.10.2.0
> Reporter: bruce szalwinski
> Priority: Minor
>
> 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)