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

Method __init__

tests/stress/query_runner.py:70–96  ·  view source on GitHub ↗

Creates a new instance, but does not start the process.

(self, impalad, results_dir, use_kerberos, common_query_options,
               test_admission_control, check_if_mem_was_spilled=False)

Source from the content-addressed store, hash-verified

68 BATCH_SIZE = 1024
69
70 def __init__(self, impalad, results_dir, use_kerberos, common_query_options,
71 test_admission_control, check_if_mem_was_spilled=False):
72 """Creates a new instance, but does not start the process. """
73 self.impalad = impalad
74 self.use_kerberos = use_kerberos
75 self.results_dir = results_dir
76 self.check_if_mem_was_spilled = check_if_mem_was_spilled
77 self.common_query_options = common_query_options
78 self.test_admission_control = test_admission_control
79 # proc is filled out by caller
80 self.proc = None
81 # impalad_conn is initialised in connect()
82 self.impalad_conn = None
83
84 # All these values are shared values between processes. We want these to be accessible
85 # by the parent process that started this QueryRunner, for operational purposes.
86 self._metrics = {
87 NUM_QUERIES_DEQUEUED: Value("i", 0),
88 NUM_QUERIES_SUBMITTED: Value("i", 0),
89 NUM_QUERIES_STARTED_RUNNING_OR_CANCELLED: Value("i", 0),
90 NUM_QUERIES_FINISHED: Value("i", 0),
91 NUM_QUERIES_EXCEEDED_MEM_LIMIT: Value("i", 0),
92 NUM_QUERIES_AC_REJECTED: Value("i", 0),
93 NUM_QUERIES_AC_TIMEDOUT: Value("i", 0),
94 NUM_QUERIES_CANCELLED: Value("i", 0),
95 NUM_RESULT_MISMATCHES: Value("i", 0),
96 NUM_OTHER_ERRORS: Value("i", 0)}
97
98 def connect(self):
99 """Connect to the server and start the query runner thread."""

Callers

nothing calls this directly

Calls 1

ValueClass · 0.50

Tested by

no test coverage detected