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

ASF subversion and git services commented on IMPALA-13214:
----------------------------------------------------------

Commit e1098a6a02c417ddc63904259fa0abbcc64fcdb7 in impala's branch 
refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=e1098a6a0 ]

IMPALA-13214: Skip wait_until_connected when shell exits

The ImpalaShell class expects to start impala-shell and interact with it
by sending instructions over stdin and reading the results. This
assumption was incorrect when used for impala-shell batch sessions,
where the process exits on its own. If there's a delay in
ImpalaShell.__init__ - between starting the process and polling to see
that it's running - for a batch process, ImpalaShell will fail the
assertion that process_status is None. This can be easily reproduced by
adding a small (0.1s) sleep after starting the new process.

Most batch runs of impala-shell happen through `run_impala_shell_cmd`.
Updated that function to only wait for a successful connection when
stdin input is supplied. Otherwise the command is assumed to be a batch
function and any failures will be detected during `get_result`. Removed
explicit use of `wait_until_connected` as redundant.

Fixed cases in test_config_file that previously ignored WARNING before
the connection string because they did not specify
`wait_until_connected`.

Tested by running shell/test_shell_commandline.py with a 0.1s delay
before ImpalaShell polls.

Change-Id: I24e029b6192a17773760cb44fd7a4f87b71c0aae
Reviewed-on: http://gerrit.cloudera.org:8080/21598
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Jason Fehr <[email protected]>
Reviewed-by: Kurt Deschler <[email protected]>


> test_shell_commandline..test_removed_query_option failed with assertion 
> failure
> -------------------------------------------------------------------------------
>
>                 Key: IMPALA-13214
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13214
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: Impala 4.5.0
>            Reporter: Laszlo Gaal
>            Assignee: Michael Smith
>            Priority: Blocker
>             Fix For: Impala 4.5.0
>
>
> Happened during a recent s3-arm-data-cache build.
> Python backtrace:
> {code}
> /data/jenkins/workspace/impala-asf-master-core-s3-arm-data-cache/repos/Impala/tests/shell/test_shell_commandline.py:305:
>  in test_removed_query_option
>     expect_success=True)
> shell/util.py:135: in run_impala_shell_cmd
>     stderr_file=stderr_file)
> shell/util.py:155: in run_impala_shell_cmd_no_expect
>     stdout_file=stdout_file, stderr_file=stderr_file)
> shell/util.py:271: in __init__
>     "Impala shell exited with return code {0}".format(process_status)
> E   AssertionError: Impala shell exited with return code 0
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to