Returns an ImpalaShellResult produced by the shell process on exit. After this method returns, send_cmd() no longer has any effect.
(self, stdin_input=None)
| 304 | iters += 1 |
| 305 | |
| 306 | def get_result(self, stdin_input=None): |
| 307 | """Returns an ImpalaShellResult produced by the shell process on exit. After this |
| 308 | method returns, send_cmd() no longer has any effect.""" |
| 309 | result = ImpalaShellResult() |
| 310 | result.stdout, result.stderr = self.shell_process.communicate(input=stdin_input) |
| 311 | # We need to close STDIN if we gave it an input, in order to send an EOF that will |
| 312 | # allow the subprocess to exit. |
| 313 | if stdin_input is not None: self.shell_process.stdin.close() |
| 314 | result.rc = self.shell_process.returncode |
| 315 | return result |
| 316 | |
| 317 | def _start_new_shell_process(self, vector, args=None, env=None, stdout_file=None, |
| 318 | stderr_file=None): |