[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-11-02 Thread Fangliang Liu (Jira)


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

Fangliang Liu commented on FLINK-18938:
---

[~jark], understand. Thanks for your reply.

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>  Components: Table SQL / API
>Reporter: Jark Wu
>Assignee: Fangliang Liu
>Priority: Major
>  Labels: pull-request-available
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-11-02 Thread Jark Wu (Jira)


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

Jark Wu commented on FLINK-18938:
-

[~liufangliang] Sure, this is already in my review list. But there is too much 
pull requests to review, it may takes me some time before I can review this. 

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>  Components: Table SQL / API
>Reporter: Jark Wu
>Assignee: Fangliang Liu
>Priority: Major
>  Labels: pull-request-available
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-11-02 Thread Fangliang Liu (Jira)


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

Fangliang Liu commented on FLINK-18938:
---

[~jark], this issue has been finished. please review it. Thanks.

https://github.com/apache/flink/pull/13214

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>  Components: Table SQL / API
>Reporter: Jark Wu
>Assignee: Fangliang Liu
>Priority: Major
>  Labels: pull-request-available
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-09-02 Thread liufangliang (Jira)


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

liufangliang commented on FLINK-18938:
--

[~jark] , i will finish it later.

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Assignee: liufangliang
>Priority: Major
>  Labels: pull-request-available
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-09-01 Thread Jark Wu (Jira)


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

Jark Wu commented on FLINK-18938:
-

Sounds good to me. 

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Assignee: liufangliang
>Priority: Major
>  Labels: pull-request-available
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-09-01 Thread liufangliang (Jira)


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

liufangliang commented on FLINK-18938:
--

Thanks [~twalthr] for your reply.  [~jark]  What do you think ? 

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Assignee: liufangliang
>Priority: Major
>  Labels: pull-request-available
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-09-01 Thread Timo Walther (Jira)


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

Timo Walther commented on FLINK-18938:
--

Sorry, I somehow missed the original mentioning.

In general, having a more helpful message is nice. I just don't like hacking a 
better message into methods that were meant to work generic for all kinds of 
factories. Would it already be helpful enough to list all factories that a 
class implements like:

{code}
datagen (DynamicTableSourceFactory, DynamicTableSinkFactory)
elasticsearch-7 (DynamicTableSinkFactory)
test-connector (DynamicTableSourceFactory)
{code}

This would help in all cases where factories are used, not only sources and 
sink but also formats.

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Assignee: liufangliang
>Priority: Major
>  Labels: pull-request-available
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-09-01 Thread liufangliang (Jira)


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

liufangliang commented on FLINK-18938:
--

Hi [~twalthr], what do you think of this patch ?

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Assignee: liufangliang
>Priority: Major
>  Labels: pull-request-available
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-08-23 Thread Jark Wu (Jira)


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

Jark Wu commented on FLINK-18938:
-

Hi [~twalthr], what do you think about the above proposal that adding the tips 
for the listed identifiers? 


{code}
Available factory identifiers are: 

datagen (source,sink)
elasticsearch-7 (sink-only)
test-connector (source-only)
{code}

Dose that also make sense to you?


> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Assignee: liufangliang
>Priority: Major
>  Labels: pull-request-available
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-08-20 Thread liufangliang (Jira)


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

liufangliang commented on FLINK-18938:
--

[~jark] , Yes , please assign it to me.

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Priority: Major
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-08-20 Thread Jark Wu (Jira)


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

Jark Wu commented on FLINK-18938:
-

[~liufangliang] sounds good to me. 

Do you want to take this issue?

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Priority: Major
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-08-20 Thread liufangliang (Jira)


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

liufangliang commented on FLINK-18938:
--

[~jark] The judgment method is consistent with the judgment method used in the 
FactoryUtil class. Obtain a collection containing all factories according to 
ClassLoader, and then filter out all connectors according to whether they 
implemented from DynamicTableSourceFactory (DynamicTableSinkFactory). At this 
time, it is already known whether each connector supports source (sink). The 
name of the connector obtained through the factoryIdentifier() method of them , 
Combine the above information to get a complete connector tips, and it can 
ensure that the tips content is exactly the same as that automatically 
discovered by Flink.

 

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Priority: Major
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-08-20 Thread Jark Wu (Jira)


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

Jark Wu commented on FLINK-18938:
-

[~liufangliang] How do you infer whether the connector supports source or sink ?

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Priority: Major
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-08-20 Thread liufangliang (Jira)


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

liufangliang commented on FLINK-18938:
--

[~jark] I understand what you mean.

when we are quering a sink-only connector ,

if we don't  have a dependency jar in the classpath ,return the following 
excception message:
{code:java}
Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
factory for identifier 'elasticsearch-7' that implements 
'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
{code}
if we have a dependency jar in the classpath ,return the following excception 
message:  
{code:java}
Caused by: org.apache.flink.table.api.ValidationException: The connector named 
'elasticsearch-7' is only supported as sink,can n't be used as a source.
{code}
Bisides,Tips(support as sink or source) can follow the identifier,For example:
{code:java}
Available factory identifiers are: 

datagen (source,sink)
elasticsearch-7 (sink-only)
test-connector (source-only)
{code}
What do you think of ?

 

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Priority: Major
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-08-20 Thread Jark Wu (Jira)


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

Jark Wu commented on FLINK-18938:
-

The exception is exactly the same if we don't have a dependency jar in the 
classpath. So many people are misled to think it is because of missing 
dependency and not notice the "DynamicTableSourceFactory". What I want to 
improve is to make the exception message explicit for this case. 

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Priority: Major
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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


[jira] [Commented] (FLINK-18938) Throw better exception message for quering sink-only connector

2020-08-20 Thread liufangliang (Jira)


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

liufangliang commented on FLINK-18938:
--

Hi [~jark], Can you assign it to me ? 

The following tips are very complete and precise, I think there is no need to 
optimize.

 
{code:java}
Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
factory for identifier 'elasticsearch-7' that implements 
'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
{code}
Tips(support as sink or source) can follow the identifier. For example:

 

 

 
{code:java}
Available factory identifiers are: 

datagen (source,sink)
elasticsearch-7 (sink-only)
test-connector (source-only)

{code}
[~jark]  [~lzljs3620320] What do you think of my solution? 

 

 

 

 

 

 

 

 

> Throw better exception message for quering sink-only connector
> --
>
> Key: FLINK-18938
> URL: https://issues.apache.org/jira/browse/FLINK-18938
> Project: Flink
>  Issue Type: Improvement
>Reporter: Jark Wu
>Priority: Major
>
> Currently, if we are quering a sink-only connector, for example: {{SELECT * 
> FROM elasticsearch_sink}}, a following exception will be thrown:
> {code}
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factory for identifier 'elasticsearch-7' that implements 
> 'org.apache.flink.table.factories.DynamicTableSourceFactory' in the classpath.
> Available factory identifiers are:
> datagen
> {code}
> The above exception is very misleading, it sounds like that the elasticsearch 
> jar is not loaded, however the elasticsearch jar is in the lib directory of 
> Flink cluster. 
> We can improve the exception that explicitly telling users the found 
> connector only support as sink, can't be used as a source. 



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