kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-4709) Error message from Struct.validate() should include the name of the offending field.
Date Thu, 09 Feb 2017 08:34:42 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-4709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15859203#comment-15859203
] 

ASF GitHub Bot commented on KAFKA-4709:
---------------------------------------

GitHub user Aegeaner opened a pull request:

    https://github.com/apache/kafka/pull/2521

    KAFKA-4709:Error message from Struct.validate() should include the name of the offending
field.

    
    https://issues.apache.org/jira/browse/KAFKA-4709

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Aegeaner/kafka KAFKA-4709

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/2521.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 #2521
    
----
commit dce515ebbcf4a6488121629e6d76c1c85bec653c
Author: Aegeaner <xihuke@gmail.com>
Date:   2017-02-09T08:29:37Z

    KAFKA-4709

----


> Error message from Struct.validate() should include the name of the offending field.
> ------------------------------------------------------------------------------------
>
>                 Key: KAFKA-4709
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4709
>             Project: Kafka
>          Issue Type: Improvement
>          Components: KafkaConnect
>            Reporter: Jeremy Custenborder
>            Assignee: Jeremy Custenborder
>            Priority: Minor
>
> Take a look at this repro.
> {code}
>   @Test
>   public void structValidate() {
>     Schema schema = SchemaBuilder.struct()
>         .field("one", Schema.STRING_SCHEMA)
>         .field("two", Schema.STRING_SCHEMA)
>         .field("three", Schema.STRING_SCHEMA)
>         .build();
>     Struct struct = new Struct(schema);
>     struct.validate();
>   }
> {code}
> Any one of the fields could be causing the issue. The following exception is thrown.
This makes troubleshooting missing fields in connectors much more difficult.
> {code}
> org.apache.kafka.connect.errors.DataException: Invalid value: null used for required
field
> {code}
> The error message should include the field or fields in the error message.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message