You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Ewen Cheslack-Postava (JIRA)" <ji...@apache.org> on 2017/05/12 16:56:04 UTC

[jira] [Commented] (KAFKA-5204) Connect needs to validate Connector type during instantiation

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

Ewen Cheslack-Postava commented on KAFKA-5204:
----------------------------------------------

Note that if we enforce this check more aggressively we will break some connectors that happen to work today because various validations happen to work even when inheriting from Connector. We might want to consider detecting this, logging a warning, and only enforcing this aggressively in a future version so folks have a chance to clean up the connectors.

> Connect needs to validate Connector type during instantiation
> -------------------------------------------------------------
>
>                 Key: KAFKA-5204
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5204
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>    Affects Versions: 0.10.2.0
>            Reporter: Konstantine Karantasis
>            Assignee: Konstantine Karantasis
>             Fix For: 0.11.0.0
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently Connect will accept to instantiate connectors that extend the {{Connector}} abstract class but not one of its subclasses, {{SourceConnector}} or {{SinkConnector}}. 
> However, in distributed mode as well as in REST, Connect assumes in a few places that there are only two types of connectors, sinks or sources. Based on this assumption it checks the type dynamically, and if it is not a sink it treats it as a source (by constructing the corresponding configs). 
> A connector that implements only the {{Connector}} abstract class does not fit into this classification. Therefore a validation needs to take place early, during the instantiation of the {{Connector}} object. 



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