hi, sql gateway目前支持获取作业状态(要求jm还能查询到该作业)。如果要获取作业异常可以通过jm提供的REST API [1]
[1] https://ci.apache.org/projects/flink/flink-docs-stable/monitoring/rest_api.html#jobs-jobid-exceptions Best, Godfrey 111 <[email protected]> 于2020年3月25日周三 上午10:38写道: > Hi, > 确实是执行报错….那如果是执行报错,flink本身是否有提供获取exception的机制呢? > > > | | > xinghalo > | > | > [email protected] > | > 签名由网易邮箱大师定制 > > > 在2020年03月25日 10:32,godfrey he<[email protected]> 写道: > 目前sql gateway只负责提交作业,不负责跟踪作业的状态。如果作业没提交成功,sql gateway会返回相关的错误;如果是执行时报错,sql > gateway不会返回错误。你看看flink web ui作业是否提交成功 > > Best, > Godfrey > > 111 <[email protected]> 于2020年3月25日周三 上午10:29写道: > > > > Hi, > 我试过了,insert into是不行的…sql-gateway的后台日志也没有任何报错。 > 怀疑是不是我使用的jdbc sink connector,内部是流的方式。流不会把异常抛给sql-gateway? > > > 在2020年03月25日 10:26,godfrey he<[email protected]> 写道: > hi, sql gateway当前会把服务端的完整异常栈返回给用户, > 例如: > Caused by: java.util.concurrent.ExecutionException: > org.apache.flink.runtime.rest.util.RestClientException: [Internal server > error., <Exception on server side: > com.ververica.flink.table.gateway.SqlExecutionException: xxx > > 你可以检查一下sql gateway的日志,看看是否相关的错误 > > Best, > Godfrey > > 111 <[email protected]> 于2020年3月25日周三 上午8:47写道: > > Hi, > 最近在使用sql-gateway,当使用 > StatementExecuteResponseBody body = getInstance().sendRequest( > host,port,StatementExecuteHeaders.getInstance(), > new SessionMessageParameters(sessionId), > new StatementExecuteRequestBody(stmt, timeout)).get(); > 提交insert语句时,当任务失败,无法返回对应的异常信息;是目前版本暂时不支持这种特性吗? > >
