[
https://issues.apache.org/jira/browse/IMPALA-9953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17163137#comment-17163137
]
ASF subversion and git services commented on IMPALA-9953:
---------------------------------------------------------
Commit ea95691b775ef0edd032a2590a119e6841cc2129 in impala's branch
refs/heads/master from Sahil Takiar
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=ea95691 ]
IMPALA-9953: Shell should continue fetching even when 0 rows are returned
The Impala shell stops fetching rows if it receives a batch that
contains 0 rows. This is incorrect because a batch with 0 rows can be
returned if the fetch request hits a timeout. Instead, the shell should
rely on the value of has_rows / hasMoreRows to determine when to stop
issuing fetch requests.
Tests:
* Added a regression test to test_shell_commandline.py
* Ran all shell tests
Change-Id: I5f8527aea9e433f8cf426435c0ba41355bbf9d88
Reviewed-on: http://gerrit.cloudera.org:8080/16222
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Shell does not return all rows if a fetch times out in FINISHED state
> ---------------------------------------------------------------------
>
> Key: IMPALA-9953
> URL: https://issues.apache.org/jira/browse/IMPALA-9953
> Project: IMPALA
> Issue Type: Bug
> Components: Clients
> Reporter: Tim Armstrong
> Assignee: Sahil Takiar
> Priority: Blocker
> Labels: correctness
>
> I noticed that if a fetch times out, impala-shell will stop returning rows
> and close the query. It looks like this happens if the query transitions to
> FINISHED state, then the fetch times out
> I ran into this on an experimental branch where a sort deadlocked. I haven't
> been able to repro on master yet but I thought I should report it.
> The bug is here:
> {noformat}
> diff --git a/shell/impala_shell.py b/shell/impala_shell.py
> index e0d802626..323aee6c9 100755
> --- a/shell/impala_shell.py
> +++ b/shell/impala_shell.py
> @@ -1182,8 +1182,7 @@ class ImpalaShell(cmd.Cmd, object):
>
> for rows in rows_fetched:
> # IMPALA-4418: Break out of the loop to prevent printing an
> unnecessary empty line.
> - if len(rows) == 0:
> - break
> + if len(rows) == 0: continue
> self.output_stream.write(rows)
> num_rows += len(rows)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]