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

Function create_workload_config

bin/run-workload.py:210–229  ·  view source on GitHub ↗

Parse command line inputs. Some user inputs needs to be transformed from delimited strings to lists in order to be consumed by the performacne framework. Additionally, plugin_names are converted into objects, and need to be added to the config.

()

Source from the content-addressed store, hash-verified

208
209
210def create_workload_config():
211 """Parse command line inputs.
212
213 Some user inputs needs to be transformed from delimited strings to lists in order to be
214 consumed by the performacne framework. Additionally, plugin_names are converted into
215 objects, and need to be added to the config.
216 """
217 config = deepcopy(vars(options))
218 # We don't need workloads and query_names in the config map as they're already specified
219 # in the workload object.
220 del config['workloads']
221 del config['query_names']
222 config['plugin_runner'] = plugin_runner
223 # transform a few options from strings to lists
224 config['table_formats'] = split_and_strip(config['table_formats'])
225 impalads = split_and_strip(config['impalads'])
226 # Randomize the order of impalads.
227 shuffle(impalads)
228 config['impalads'] = deque(impalads)
229 return WorkloadConfig(**config)
230
231
232def _validate_options():

Callers 1

run-workload.pyFile · 0.85

Calls 3

split_and_stripFunction · 0.85
shuffleFunction · 0.85
WorkloadConfigClass · 0.85

Tested by

no test coverage detected