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

Function _validate_options

bin/run-workload.py:232–250  ·  view source on GitHub ↗

Basic validation for some commandline options

()

Source from the content-addressed store, hash-verified

230
231
232def _validate_options():
233 """Basic validation for some commandline options"""
234 # the sasl module must be importable on a secure setup.
235 if options.use_kerberos: import sasl
236
237 # If Hive is the exec engine, hs2 is the only suported interface.
238 if options.exec_engine.lower() == "hive" and options.client_type != "hs2":
239 raise RuntimeError("The only supported client type for Hive engine is hs2")
240
241 # Check for duplicate workload/scale_factor combinations
242 workloads = split_and_strip(options.workloads)
243 if not len(set(workloads)) == len(workloads):
244 raise RuntimeError("Duplicate workload/scale factor combinations are not allowed")
245
246 # The list of Impalads must be provided as a comma separated list of either host:port
247 # combination or just host.
248 for impalad in split_and_strip(options.impalads):
249 if len(impalad.split(":")) not in [1, 2]:
250 raise RuntimeError("Impalads must be of the form host:port or host.")
251
252
253if __name__ == "__main__":

Callers 1

run-workload.pyFile · 0.85

Calls 2

RuntimeErrorFunction · 0.85
split_and_stripFunction · 0.85

Tested by

no test coverage detected