[
https://issues.apache.org/jira/browse/KAFKA-5230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16009496#comment-16009496
]
ASF GitHub Bot commented on KAFKA-5230:
---------------------------------------
GitHub user ewencp opened a pull request:
https://github.com/apache/kafka/pull/3044
KAFKA-5230: Fix conversion of Class configs to handle nested classes
properly
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ewencp/kafka
kafka-5230-nested-class-recommended-values
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/3044.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 #3044
----
commit 22eafd3e4b4309f988c78aa16a214f5666d2a4b2
Author: Ewen Cheslack-Postava <[email protected]>
Date: 2017-05-13T19:44:24Z
KAFKA-5230: Fix conversion of Class configs to handle nested classes
properly
----
> Recommended values for Connect transformations contain the wrong class name
> ---------------------------------------------------------------------------
>
> Key: KAFKA-5230
> URL: https://issues.apache.org/jira/browse/KAFKA-5230
> Project: Kafka
> Issue Type: Bug
> Components: KafkaConnect
> Affects Versions: 0.10.2.0, 0.10.2.1
> Reporter: Ewen Cheslack-Postava
> Assignee: Ewen Cheslack-Postava
> Labels: newbie
> Fix For: 0.11.0.0, 0.10.2.2
>
>
> If you try to validate a connector config with a transformation, it includes
> suggested values for that config:
> {code}
> curl
> 'http://localhost:8083/connector-plugins/org.apache.kafka.connect.file.FileStreamSourceConnector/config/validate'
> -X PUT -H 'Content-Type: application/json' -H 'Accept: */*' --data-binary
> '{"connector.class":"org.apache.kafka.connect.file.FileStreamSourceConnector","name":"blah-blah","transforms":"something","file":"/tmp/blah.what","topic":"test-topic","tasks.max":1}'
> {code}
> However, some of those recommendations do not contain the correct value:
> {code}
> {
> "definition": {
> "name": "transforms.something.type",
> "type": "CLASS",
> "required": true,
> "default_value": null,
> "importance": "HIGH",
> "documentation": "Class for the 'something' transformation.",
> "group": "Transforms: something",
> "width": "LONG",
> "display_name": "Transformation type for something",
> "dependents": [],
> "order": 0
> },
> "value": {
> "name": "transforms.something.type",
> "value": null,
> "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"
> ],
> "errors": [
> "Missing required configuration \"transforms.something.type\" which
> has no default value.",
> "Invalid value null for configuration transforms.something.type:
> Not a Transformation"
> ],
> "visible": true
> }
> {code}
> In particular, nested classes for Key and Value transformations are being
> returned as, e.g.
> org.apache.kafka.connect.transforms.ReplaceField.Key
> instead of
> org.apache.kafka.connect.transforms.ReplaceField$Key
> It seems this is the difference between the canonical and regular name.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)