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

Function is_core_dump

lib/python/impala_py_lib/helpers.py:70–78  ·  view source on GitHub ↗

Determine whether given file is a core file. Works on CentOS and Ubuntu. Args: file_path: full path to a possible core file

(file_path)

Source from the content-addressed store, hash-verified

68
69
70def is_core_dump(file_path):
71 """
72 Determine whether given file is a core file. Works on CentOS and Ubuntu.
73
74 Args:
75 file_path: full path to a possible core file
76 """
77 file_std_out = exec_local_command("file %s" % file_path)
78 return "core file" in file_std_out and 'ELF' in file_std_out

Callers 4

cluster_setupMethod · 0.90
cluster_teardownMethod · 0.90
setup_methodMethod · 0.90
teardown_methodMethod · 0.90

Calls 1

exec_local_commandFunction · 0.85

Tested by 4

cluster_setupMethod · 0.72
cluster_teardownMethod · 0.72
setup_methodMethod · 0.72
teardown_methodMethod · 0.72