MCPcopy Create free account
hub / github.com/apache/impala / wait_for_query_start

Method wait_for_query_start

tests/shell/util.py:290–304  ·  view source on GitHub ↗

If this shell was started with the '-q' option, this mathod will block until the query has started running

(self)

Source from the content-addressed store, hash-verified

288 return self
289
290 def wait_for_query_start(self):
291 """If this shell was started with the '-q' option, this mathod will block until the
292 query has started running"""
293 # readline() will block until a line is actually printed, so this loop should always
294 # read something like:
295 # Starting Impala Shell without Kerberos authentication
296 # Connected to localhost:21000
297 # Server version: impalad version...
298 # Query: select sleep(10)
299 # Query submitted at:...
300 # Query state can be monitored at:...
301 # We stop at 10 iterations to prevent an infinite loop if somehting goes wrong.
302 iters = 0
303 while "Query state" not in self.shell_process.stderr.readline() and iters < 10:
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

Callers 1

test_cancellationMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_cancellationMethod · 0.76