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

Method get_pids

tests/common/impala_cluster.py:449–459  ·  view source on GitHub ↗

Gets the PIDs of the process. In some circumstances, a process can run multiple times, e.g. when it forks in the Breakpad crash handler. Returns an empty list if no PIDs can be determined.

(self)

Source from the content-addressed store, hash-verified

447 return pid
448
449 def get_pids(self):
450 """Gets the PIDs of the process. In some circumstances, a process can run multiple
451 times, e.g. when it forks in the Breakpad crash handler. Returns an empty list if no
452 PIDs can be determined."""
453 pids = [proc['pid'] for proc in self.__get_procs()]
454 if pids:
455 LOG.info("Found PIDs %s for %s" % (", ".join(map(str, pids)), " ".join(self.cmd)))
456 else:
457 LOG.info("No PID found for process cmdline: %s. Process is dead?" %
458 " ".join(self.cmd))
459 return pids
460
461 def __procs_str(self, procs):
462 return "\n".join([str(proc) for proc in procs])

Callers 1

Calls 3

__get_procsMethod · 0.95
mapFunction · 0.85
joinMethod · 0.45

Tested by 1