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

Method __get_pid

tests/common/impala_cluster.py:464–482  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

462 return "\n".join([str(proc) for proc in procs])
463
464 def __get_pid(self):
465 procs = self.__get_procs()
466 # Return early for containerized environments
467 if len(procs) == 1:
468 return procs[0]['pid']
469
470 result = None
471 # In some circumstances - notably ubsan tests - child processes can be slow to exit.
472 # Only return the original process, i.e. one who's parent has a different cmd.
473 pids = [proc['pid'] for proc in procs]
474 for process in procs:
475 if process['ppid'] not in pids:
476 assert result is None,\
477 "Multiple non-child processes:\n%s" % self.__procs_str(procs)
478 result = process['pid']
479 else:
480 LOG.info("Child process active:\n%s" % self.__procs_str(procs))
481
482 return result
483
484 def __get_procs(self):
485 """

Callers 3

__str__Method · 0.95
get_pidMethod · 0.95
wait_for_exitMethod · 0.95

Calls 2

__get_procsMethod · 0.95
__procs_strMethod · 0.95

Tested by

no test coverage detected