You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Nicholas Jiang (Jira)" <ji...@apache.org> on 2019/12/04 03:10:00 UTC

[jira] [Commented] (FLINK-14647) Improve the exception message when required property is not matched

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

Nicholas Jiang commented on FLINK-14647:
----------------------------------------

[~jark]Please assign this improvement to me. I have more interest in this.

> Improve the exception message when required property is not matched
> -------------------------------------------------------------------
>
>                 Key: FLINK-14647
>                 URL: https://issues.apache.org/jira/browse/FLINK-14647
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / API
>            Reporter: Jark Wu
>            Priority: Major
>             Fix For: 1.10.0
>
>
> Currently, all the required properties should exist and match, otherwise, {{NoMatchingTableFactoryException}} will be thrown.
> For example, if we have {{connector.type=hbase,  connector.versions=1.1.1}}, the following exception will be thrown.
> {code}
> org.apache.flink.table.api.NoMatchingTableFactoryException: Could not find a suitable table factory for 'org.apache.flink.addons.hbase.HBaseTableFactory' in
> the classpath.
> Reason: No context matches.
> The following properties are requested:
> connector.type=hbase
> connector.version=1.1.1
> {code}
> It's hard to know the problem is the version is wrong. A quick fixing is move version out of {{requiredContext()}} if we only support one version and throw a readable exception in {{ConnectorDescriptorValidator#validate}}. 
> However, for the multiple-version connectors, e.g. Kafka, maybe we should improve the design of {{TableFactory}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)