You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2024/04/01 01:42:00 UTC

[jira] [Commented] (IMPALA-12216) Print timestamp for impala-shell errors

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

Quanlong Huang commented on IMPALA-12216:
-----------------------------------------

A simple way to reproduce the issue is running a query with sleep and shutdown the impala cluster.
{code:sql}
impala-shell> create table three_rows (i int) stored as textfile;
impala-shell> insert into three_rows values (0),(1),(2);
impala-shell> select count(*) from three_rows where i = sleep(10000); {code}
Then shutdown the impala cluster in another terminal by
{code:bash}
bin/start-impala-cluster.py --kill{code}
You will see the impala-shell quit without any timestamp to indicate when it happens:
{noformat}
[localhost:21050] default> select count(*) from three_rows where i = sleep(10000);
Query: select count(*) from three_rows where i = sleep(10000)
Query submitted at: 2024-04-01 09:37:29 (Coordinator: http://quanlong-OptiPlex-BJ:25000)
Query state can be monitored at: http://quanlong-OptiPlex-BJ:25000/query_plan?query_id=314a87750bffe176:c53e922d00000000
 Scan Progress:[                                                                                       ] 0%
Query Progress:[                                                                                       ] 0%
Caught exception TSocket read 0 bytes, type=<class 'thrift.transport.TTransport.TTransportException'> in GetOperationStatus. 
Error communicating with impalad: TSocket read 0 bytes
[Not connected] > {noformat}
We need to print a timestamp like "Query failed at 2024-04-01 09:40:32".

> Print timestamp for impala-shell errors
> ---------------------------------------
>
>                 Key: IMPALA-12216
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12216
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Clients
>            Reporter: Quanlong Huang
>            Priority: Major
>              Labels: newbie, ramp-up
>
> Impala-shell prints the query submit time. It should also print the timestamp when it encounter failures:
> {noformat}
> default> select ...
> Query: select ...
> Query submitted at: 2023-06-14 18:32:21 (Coordinator: ...)
> Query progress can be monitored at: ...
> Error communicating with impalad: TSocket read 0 bytes{noformat}
> So we know when exactly the connection is closed in client's pespective.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org