Jark Wu created FLINK-14647:
-------------------------------
Summary: 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
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)