flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "manguozhi (Jira)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-22795) Throw better exception when executing remote SQL file in SQL Client
Date Sun, 30 May 2021 13:00:08 GMT

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

manguozhi commented on FLINK-22795:
-----------------------------------

pretty good idea. It would be better if remote files can be supported in subsequent versions

> Throw better exception when executing remote SQL file in SQL Client
> -------------------------------------------------------------------
>
>                 Key: FLINK-22795
>                 URL: https://issues.apache.org/jira/browse/FLINK-22795
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Client
>    Affects Versions: 1.13.0
>         Environment: flink 1.13
> hadoop2.6.0
>            Reporter: manguozhi
>            Assignee: JasonLee
>            Priority: Minor
>             Fix For: 1.14.0, 1.13.2
>
>
> hi, all
> When I executed following command in Flink 1.13
> {code:java}
> bin/sql-client.sh -f hdfs:/user/test.sql
> {code}
> The exception is unclear to me:
>   
> Exception in thread "main" org.apache.flink.table.client.SqlClientException: Unexpected
exception. This is a bug. Please consider filing an issue.
>   at org.apache.flink.table.client.SqlClient.startClient(SqlClient.java:201)
>   at org.apache.flink.table.client.SqlClient.main(SqlClient.java:161)
>   Caused by: org.apache.flink.table.client.gateway.SqlExecutionException: Fail to read
content from the /opt/flink-1.13.0/hdfs:/user/test.sql.
>   at org.apache.flink.table.client.SqlClient.readFromURL(SqlClient.java:250)
>   at org.apache.flink.table.client.SqlClient.readExecutionContent(SqlClient.java:239)
>   at org.apache.flink.table.client.SqlClient.openCli(SqlClient.java:153)
>   at org.apache.flink.table.client.SqlClient.start(SqlClient.java:95)
>   at org.apache.flink.table.client.SqlClient.startClient(SqlClient.java:187)
>   ... 1 more
>  {color:#de350b}  Caused by: java.io.FileNotFoundException: /opt/flink-1.13.0/hdfs:/user/test.sql
(No such file or directory){color}  at java.io.FileInputStream.open0(Native Method)
>   at java.io.FileInputStream.open(FileInputStream.java:195)
>   at java.io.FileInputStream.<init>(FileInputStream.java:138)
>   at java.io.FileInputStream.<init>(FileInputStream.java:93)
>   at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
>   at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
>   at java.net.URL.openStream(URL.java:1045)
>   at org.apache.commons.io.IOUtils.toString(IOUtils.java:2764)
>   at org.apache.flink.table.client.SqlClient.readFromURL(SqlClient.java:247)
>   ... 5 more
>  Shutting down the session...
>   done.
> I think we should improve the exception message at first, and then it's great if we can
support load file from HDFS.



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

Mime
View raw message