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

[jira] [Updated] (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:all-tabpanel ]

Jark Wu updated FLINK-14647:
----------------------------
    Fix Version/s:     (was: 1.10.0)

> 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
>
> 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)