Runs the Impala shell on the commandline. 'shell_args' is a string which represents the commandline options. Returns a ImpalaShellResult.
(vector, shell_args, env=None, expect_success=True,
stdin_input=None, stdout_file=None, stderr_file=None)
| 122 | |
| 123 | |
| 124 | def run_impala_shell_cmd(vector, shell_args, env=None, expect_success=True, |
| 125 | stdin_input=None, stdout_file=None, stderr_file=None): |
| 126 | """Runs the Impala shell on the commandline. |
| 127 | |
| 128 | 'shell_args' is a string which represents the commandline options. |
| 129 | Returns a ImpalaShellResult. |
| 130 | """ |
| 131 | result = run_impala_shell_cmd_no_expect(vector, shell_args, env, stdin_input, |
| 132 | wait_until_connected=expect_success, |
| 133 | stdout_file=stdout_file, |
| 134 | stderr_file=stderr_file) |
| 135 | if expect_success: |
| 136 | assert result.rc == 0, "Cmd %s was expected to succeed: %s" % (shell_args, |
| 137 | result.stderr) |
| 138 | else: |
| 139 | assert result.rc != 0, "Cmd %s was expected to fail" % shell_args |
| 140 | return result |
| 141 | |
| 142 | |
| 143 | def run_impala_shell_cmd_no_expect(vector, shell_args, env=None, stdin_input=None, |