OmniSciDB  fe05a0c208
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CommandLineOptions.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2020 OmniSci, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include <fcntl.h>
18 #include <sys/stat.h>
19 #include <sys/types.h>
20 
21 #include <iostream>
22 
23 #include "CommandLineOptions.h"
24 #include "LeafHostInfo.h"
25 #include "MapDRelease.h"
27 #include "Shared/Compressor.h"
29 #include "Utils/DdlUtils.h"
30 
31 const std::string CommandLineOptions::nodeIds_token = {"node_id"};
32 
33 extern std::string cluster_command_line_arg;
34 
36 
37 extern bool g_use_table_device_offset;
39 extern bool g_cache_string_hash;
40 
42 extern int64_t g_large_ndv_threshold;
43 extern size_t g_large_ndv_multiplier;
44 extern int64_t g_bitmap_memory_limit;
45 extern bool g_enable_calcite_ddl_parser;
46 extern bool g_enable_seconds_refresh;
47 extern size_t g_approx_quantile_buffer;
48 extern size_t g_approx_quantile_centroids;
49 extern size_t g_parallel_top_min;
50 extern size_t g_parallel_top_max;
51 
52 namespace Catalog_Namespace {
53 extern bool g_log_user_id;
54 }
55 
56 unsigned connect_timeout{20000};
57 unsigned recv_timeout{300000};
58 unsigned send_timeout{300000};
59 bool with_keepalive{false};
60 
64  }
68 }
69 
71  help_desc.add_options()("help,h", "Show available options.");
72  help_desc.add_options()(
73  "allow-cpu-retry",
74  po::value<bool>(&g_allow_cpu_retry)
75  ->default_value(g_allow_cpu_retry)
76  ->implicit_value(true),
77  R"(Allow the queries which failed on GPU to retry on CPU, even when watchdog is enabled.)");
78  help_desc.add_options()("allow-loop-joins",
79  po::value<bool>(&allow_loop_joins)
80  ->default_value(allow_loop_joins)
81  ->implicit_value(true),
82  "Enable loop joins.");
83  help_desc.add_options()("bigint-count",
84  po::value<bool>(&g_bigint_count)
85  ->default_value(g_bigint_count)
86  ->implicit_value(true),
87  "Use 64-bit count.");
88  help_desc.add_options()("calcite-max-mem",
89  po::value<size_t>(&system_parameters.calcite_max_mem)
90  ->default_value(system_parameters.calcite_max_mem),
91  "Max memory available to calcite JVM.");
92  if (!dist_v5_) {
93  help_desc.add_options()("calcite-port",
94  po::value<int>(&system_parameters.calcite_port)
95  ->default_value(system_parameters.calcite_port),
96  "Calcite port number.");
97  }
98  help_desc.add_options()("config",
99  po::value<std::string>(&system_parameters.config_file),
100  "Path to server configuration file.");
101  help_desc.add_options()("cpu-buffer-mem-bytes",
102  po::value<size_t>(&system_parameters.cpu_buffer_mem_bytes)
103  ->default_value(system_parameters.cpu_buffer_mem_bytes),
104  "Size of memory reserved for CPU buffers, in bytes.");
105 
106  help_desc.add_options()("cpu-only",
107  po::value<bool>(&system_parameters.cpu_only)
108  ->default_value(system_parameters.cpu_only)
109  ->implicit_value(true),
110  "Run on CPU only, even if GPUs are available.");
111  help_desc.add_options()("cuda-block-size",
112  po::value<size_t>(&system_parameters.cuda_block_size)
113  ->default_value(system_parameters.cuda_block_size),
114  "Size of block to use on GPU.");
115  help_desc.add_options()("cuda-grid-size",
116  po::value<size_t>(&system_parameters.cuda_grid_size)
117  ->default_value(system_parameters.cuda_grid_size),
118  "Size of grid to use on GPU.");
119  if (!dist_v5_) {
120  help_desc.add_options()(
121  "data",
122  po::value<std::string>(&base_path)->required()->default_value("data"),
123  "Directory path to OmniSci data storage (catalogs, raw data, log files, etc).");
124  positional_options.add("data", 1);
125  }
126  help_desc.add_options()("db-query-list",
127  po::value<std::string>(&db_query_file),
128  "Path to file containing OmniSci warmup queries.");
129  help_desc.add_options()(
130  "exit-after-warmup",
131  po::value<bool>(&exit_after_warmup)->default_value(false)->implicit_value(true),
132  "Exit after OmniSci warmup queries.");
133  help_desc.add_options()("dynamic-watchdog-time-limit",
134  po::value<unsigned>(&dynamic_watchdog_time_limit)
135  ->default_value(dynamic_watchdog_time_limit)
136  ->implicit_value(10000),
137  "Dynamic watchdog time limit, in milliseconds.");
138  help_desc.add_options()("enable-debug-timer",
139  po::value<bool>(&g_enable_debug_timer)
140  ->default_value(g_enable_debug_timer)
141  ->implicit_value(true),
142  "Enable debug timer logging.");
143  help_desc.add_options()("enable-dynamic-watchdog",
144  po::value<bool>(&enable_dynamic_watchdog)
145  ->default_value(enable_dynamic_watchdog)
146  ->implicit_value(true),
147  "Enable dynamic watchdog.");
148  help_desc.add_options()("enable-filter-push-down",
149  po::value<bool>(&g_enable_filter_push_down)
150  ->default_value(g_enable_filter_push_down)
151  ->implicit_value(true),
152  "Enable filter push down through joins.");
153  help_desc.add_options()("enable-overlaps-hashjoin",
154  po::value<bool>(&g_enable_overlaps_hashjoin)
155  ->default_value(g_enable_overlaps_hashjoin)
156  ->implicit_value(true),
157  "Enable the overlaps hash join framework allowing for range "
158  "join (e.g. spatial overlaps) computation using a hash table.");
159  help_desc.add_options()("enable-hashjoin-many-to-many",
160  po::value<bool>(&g_enable_hashjoin_many_to_many)
161  ->default_value(g_enable_hashjoin_many_to_many)
162  ->implicit_value(true),
163  "Enable the overlaps hash join framework allowing for range "
164  "join (e.g. spatial overlaps) computation using a hash table.");
165  help_desc.add_options()("enable-runtime-query-interrupt",
166  po::value<bool>(&enable_runtime_query_interrupt)
167  ->default_value(enable_runtime_query_interrupt)
168  ->implicit_value(true),
169  "Enable runtime query interrupt.");
170  help_desc.add_options()("enable-non-kernel-time-query-interrupt",
173  ->implicit_value(true),
174  "Enable non-kernel time query interrupt.");
175  help_desc.add_options()("pending-query-interrupt-freq",
176  po::value<unsigned>(&pending_query_interrupt_freq)
177  ->default_value(pending_query_interrupt_freq)
178  ->implicit_value(1000),
179  "A frequency of checking the request of pending query "
180  "interrupt from user (in millisecond).");
181  help_desc.add_options()(
182  "running-query-interrupt-freq",
183  po::value<double>(&running_query_interrupt_freq)
184  ->default_value(running_query_interrupt_freq)
185  ->implicit_value(0.5),
186  "A frequency of checking the request of running query "
187  "interrupt from user (0.0 (less frequent) ~ (more frequent) 1.0).");
188  help_desc.add_options()("use-estimator-result-cache",
189  po::value<bool>(&use_estimator_result_cache)
190  ->default_value(use_estimator_result_cache)
191  ->implicit_value(true),
192  "Use estimator result cache.");
193  if (!dist_v5_) {
194  help_desc.add_options()(
195  "enable-string-dict-hash-cache",
196  po::value<bool>(&g_cache_string_hash)
197  ->default_value(g_cache_string_hash)
198  ->implicit_value(true),
199  "Cache string hash values in the string dictionary server during import.");
200  }
201  help_desc.add_options()(
202  "enable-thrift-logs",
203  po::value<bool>(&g_enable_thrift_logs)
204  ->default_value(g_enable_thrift_logs)
205  ->implicit_value(true),
206  "Enable writing messages directly from thrift to stdout/stderr.");
207  help_desc.add_options()("enable-watchdog",
208  po::value<bool>(&enable_watchdog)
209  ->default_value(enable_watchdog)
210  ->implicit_value(true),
211  "Enable watchdog.");
212  help_desc.add_options()(
213  "filter-push-down-low-frac",
214  po::value<float>(&g_filter_push_down_low_frac)
215  ->default_value(g_filter_push_down_low_frac)
216  ->implicit_value(g_filter_push_down_low_frac),
217  "Lower threshold for selectivity of filters that are pushed down.");
218  help_desc.add_options()(
219  "filter-push-down-high-frac",
220  po::value<float>(&g_filter_push_down_high_frac)
221  ->default_value(g_filter_push_down_high_frac)
222  ->implicit_value(g_filter_push_down_high_frac),
223  "Higher threshold for selectivity of filters that are pushed down.");
224  help_desc.add_options()("filter-push-down-passing-row-ubound",
225  po::value<size_t>(&g_filter_push_down_passing_row_ubound)
227  ->implicit_value(g_filter_push_down_passing_row_ubound),
228  "Upperbound on the number of rows that should pass the filter "
229  "if the selectivity is less than "
230  "the high fraction threshold.");
231  help_desc.add_options()("from-table-reordering",
232  po::value<bool>(&g_from_table_reordering)
233  ->default_value(g_from_table_reordering)
234  ->implicit_value(true),
235  "Enable automatic table reordering in FROM clause.");
236  help_desc.add_options()("gpu-buffer-mem-bytes",
237  po::value<size_t>(&system_parameters.gpu_buffer_mem_bytes)
238  ->default_value(system_parameters.gpu_buffer_mem_bytes),
239  "Size of memory reserved for GPU buffers, in bytes, per GPU.");
240  help_desc.add_options()("gpu-input-mem-limit",
241  po::value<double>(&system_parameters.gpu_input_mem_limit)
242  ->default_value(system_parameters.gpu_input_mem_limit),
243  "Force query to CPU when input data memory usage exceeds this "
244  "percentage of available GPU memory.");
245  help_desc.add_options()(
246  "hll-precision-bits",
247  po::value<int>(&g_hll_precision_bits)
248  ->default_value(g_hll_precision_bits)
249  ->implicit_value(g_hll_precision_bits),
250  "Number of bits used from the hash value used to specify the bucket number.");
251  if (!dist_v5_) {
252  help_desc.add_options()("http-port",
253  po::value<int>(&http_port)->default_value(http_port),
254  "HTTP port number.");
255  }
256  help_desc.add_options()(
257  "idle-session-duration",
258  po::value<int>(&idle_session_duration)->default_value(idle_session_duration),
259  "Maximum duration of idle session.");
260  help_desc.add_options()("inner-join-fragment-skipping",
261  po::value<bool>(&g_inner_join_fragment_skipping)
262  ->default_value(g_inner_join_fragment_skipping)
263  ->implicit_value(true),
264  "Enable/disable inner join fragment skipping. This feature is "
265  "considered stable and is enabled by default. This "
266  "parameter will be removed in a future release.");
267  help_desc.add_options()(
268  "max-session-duration",
269  po::value<int>(&max_session_duration)->default_value(max_session_duration),
270  "Maximum duration of active session.");
271  help_desc.add_options()("num-sessions",
272  po::value<int>(&system_parameters.num_sessions)
273  ->default_value(system_parameters.num_sessions),
274  "Maximum number of active session.");
275  help_desc.add_options()(
276  "null-div-by-zero",
277  po::value<bool>(&g_null_div_by_zero)
278  ->default_value(g_null_div_by_zero)
279  ->implicit_value(true),
280  "Return null on division by zero instead of throwing an exception.");
281  help_desc.add_options()(
282  "num-reader-threads",
283  po::value<size_t>(&num_reader_threads)->default_value(num_reader_threads),
284  "Number of reader threads to use.");
285  help_desc.add_options()(
286  "max-import-threads",
287  po::value<size_t>(&g_max_import_threads)->default_value(g_max_import_threads),
288  "Max number of default import threads to use (num hardware threads will be used "
289  "instead if lower). Can be overriden with copy statement threads option).");
290  help_desc.add_options()(
291  "overlaps-max-table-size-bytes",
292  po::value<size_t>(&g_overlaps_max_table_size_bytes)
293  ->default_value(g_overlaps_max_table_size_bytes),
294  "The maximum size in bytes of the hash table for an overlaps hash join.");
295  help_desc.add_options()("overlaps-target-entries-per-bin",
296  po::value<double>(&g_overlaps_target_entries_per_bin)
297  ->default_value(g_overlaps_target_entries_per_bin),
298  "The target number of hash entries per bin for overlaps join");
299  if (!dist_v5_) {
300  help_desc.add_options()("port,p",
301  po::value<int>(&system_parameters.omnisci_server_port)
302  ->default_value(system_parameters.omnisci_server_port),
303  "TCP Port number.");
304  }
305  help_desc.add_options()("num-gpus",
306  po::value<int>(&system_parameters.num_gpus)
307  ->default_value(system_parameters.num_gpus),
308  "Number of gpus to use.");
309  help_desc.add_options()(
310  "read-only",
311  po::value<bool>(&read_only)->default_value(read_only)->implicit_value(true),
312  "Enable read-only mode.");
313 
314  help_desc.add_options()(
315  "res-gpu-mem",
316  po::value<size_t>(&reserved_gpu_mem)->default_value(reserved_gpu_mem),
317  "Reduces GPU memory available to the OmniSci allocator by this amount. Used for "
318  "compiled code cache and ancillary GPU functions and other processes that may also "
319  "be using the GPU concurrent with OmniSciDB.");
320 
321  help_desc.add_options()("start-gpu",
322  po::value<int>(&system_parameters.start_gpu)
323  ->default_value(system_parameters.start_gpu),
324  "First gpu to use.");
325  help_desc.add_options()("trivial-loop-join-threshold",
326  po::value<unsigned>(&g_trivial_loop_join_threshold)
327  ->default_value(g_trivial_loop_join_threshold)
328  ->implicit_value(1000),
329  "The maximum number of rows in the inner table of a loop join "
330  "considered to be trivially small.");
331  help_desc.add_options()("verbose",
332  po::value<bool>(&verbose_logging)
333  ->default_value(verbose_logging)
334  ->implicit_value(true),
335  "Write additional debug log messages to server logs.");
336  help_desc.add_options()(
337  "enable-runtime-udf",
338  po::value<bool>(&enable_runtime_udf)
339  ->default_value(enable_runtime_udf)
340  ->implicit_value(true),
341  "Enable runtime UDF registration by passing signatures and corresponding LLVM IR "
342  "to the `register_runtime_udf` endpoint. For use with the Python Remote Backend "
343  "Compiler server, packaged separately.");
344  help_desc.add_options()("version,v", "Print Version Number.");
345  help_desc.add_options()("enable-experimental-string-functions",
348  ->implicit_value(true),
349  "Enable experimental string functions.");
350  help_desc.add_options()(
351  "enable-fsi",
352  po::value<bool>(&g_enable_fsi)->default_value(g_enable_fsi)->implicit_value(true),
353  "Enable foreign storage interface.");
354  help_desc.add_options()("disk-cache-path",
355  po::value<std::string>(&disk_cache_config.path),
356  "Specify the path for the disk cache.");
357 
358  help_desc.add_options()(
359  "disk-cache-level",
360  po::value<std::string>(&(disk_cache_level))->default_value("foreign_tables"),
361  "Specify level of disk cache. Valid options are 'foreign_tables', "
362  "'local_tables', 'none', and 'all'.");
363 
364  help_desc.add_options()(
365  "enable-interoperability",
366  po::value<bool>(&g_enable_interop)
367  ->default_value(g_enable_interop)
368  ->implicit_value(true),
369  "Enable offloading of query portions to an external execution engine.");
370  help_desc.add_options()("enable-union",
371  po::value<bool>(&g_enable_union)
372  ->default_value(g_enable_union)
373  ->implicit_value(true),
374  "Enable UNION ALL SQL clause.");
375  help_desc.add_options()(
376  "calcite-service-timeout",
377  po::value<size_t>(&system_parameters.calcite_timeout)
378  ->default_value(system_parameters.calcite_timeout),
379  "Calcite server timeout (milliseconds). Increase this on systems with frequent "
380  "schema changes or when running large numbers of parallel queries.");
381  help_desc.add_options()("calcite-service-keepalive",
382  po::value<size_t>(&system_parameters.calcite_keepalive)
383  ->default_value(system_parameters.calcite_keepalive)
384  ->implicit_value(true),
385  "Enable keepalive on Calcite connections.");
386  help_desc.add_options()(
387  "stringdict-parallelizm",
388  po::value<bool>(&g_enable_stringdict_parallel)
389  ->default_value(g_enable_stringdict_parallel)
390  ->implicit_value(true),
391  "Allow StringDictionary to parallelize loads using multiple threads");
392  help_desc.add_options()(
393  "log-user-id",
394  po::value<bool>(&Catalog_Namespace::g_log_user_id)
395  ->default_value(Catalog_Namespace::g_log_user_id)
396  ->implicit_value(true),
397  "Log userId integer in place of the userName (when available).");
398  help_desc.add_options()("log-user-origin",
399  po::value<bool>(&log_user_origin)
400  ->default_value(log_user_origin)
401  ->implicit_value(true),
402  "Lookup the origin of inbound connections by IP address/DNS "
403  "name, and print this information as part of stdlog.");
404  help_desc.add_options()(
405  "allowed-import-paths",
406  po::value<std::string>(&allowed_import_paths),
407  "List of allowed root paths that can be used in import operations.");
408  help_desc.add_options()(
409  "allowed-export-paths",
410  po::value<std::string>(&allowed_export_paths),
411  "List of allowed root paths that can be used in export operations.");
413 }
414 
416  developer_desc.add_options()("dev-options", "Print internal developer options.");
417  developer_desc.add_options()(
418  "enable-calcite-view-optimize",
421  ->implicit_value(true),
422  "Enable additional calcite (query plan) optimizations when a view is part of the "
423  "query.");
424  developer_desc.add_options()(
425  "enable-columnar-output",
426  po::value<bool>(&g_enable_columnar_output)
427  ->default_value(g_enable_columnar_output)
428  ->implicit_value(true),
429  "Enable columnar output for intermediate/final query steps.");
430  developer_desc.add_options()(
431  "enable-left-join-filter-hoisting",
432  po::value<bool>(&g_enable_left_join_filter_hoisting)
433  ->default_value(g_enable_left_join_filter_hoisting)
434  ->implicit_value(true),
435  "Enable hoisting left hand side filters through left joins.");
436  developer_desc.add_options()("optimize-row-init",
437  po::value<bool>(&g_optimize_row_initialization)
438  ->default_value(g_optimize_row_initialization)
439  ->implicit_value(true),
440  "Optimize row initialization.");
441  developer_desc.add_options()("enable-legacy-syntax",
442  po::value<bool>(&enable_legacy_syntax)
443  ->default_value(enable_legacy_syntax)
444  ->implicit_value(true),
445  "Enable legacy syntax.");
446  developer_desc.add_options()(
447  "enable-multifrag",
448  po::value<bool>(&allow_multifrag)
449  ->default_value(allow_multifrag)
450  ->implicit_value(true),
451  "Enable execution over multiple fragments in a single round-trip to GPU.");
452  developer_desc.add_options()("enable-lazy-fetch",
453  po::value<bool>(&g_enable_lazy_fetch)
454  ->default_value(g_enable_lazy_fetch)
455  ->implicit_value(true),
456  "Enable lazy fetch columns in query results.");
457  developer_desc.add_options()(
458  "enable-shared-mem-group-by",
459  po::value<bool>(&g_enable_smem_group_by)
460  ->default_value(g_enable_smem_group_by)
461  ->implicit_value(true),
462  "Enable using GPU shared memory for some GROUP BY queries.");
463  developer_desc.add_options()("num-executors",
464  po::value<int>(&system_parameters.num_executors)
465  ->default_value(system_parameters.num_executors),
466  "Number of executors to run in parallel.");
467  developer_desc.add_options()(
468  "gpu-shared-mem-threshold",
469  po::value<size_t>(&g_gpu_smem_threshold)->default_value(g_gpu_smem_threshold),
470  "GPU shared memory threshold (in bytes). If query requires larger buffers than "
471  "this threshold, we disable those optimizations. 0 (default) means no static cap.");
472  developer_desc.add_options()(
473  "enable-shared-mem-grouped-non-count-agg",
474  po::value<bool>(&g_enable_smem_grouped_non_count_agg)
475  ->default_value(g_enable_smem_grouped_non_count_agg)
476  ->implicit_value(true),
477  "Enable using GPU shared memory for grouped non-count aggregate queries.");
478  developer_desc.add_options()(
479  "enable-shared-mem-non-grouped-agg",
480  po::value<bool>(&g_enable_smem_non_grouped_agg)
481  ->default_value(g_enable_smem_non_grouped_agg)
482  ->implicit_value(true),
483  "Enable using GPU shared memory for non-grouped aggregate queries.");
484  developer_desc.add_options()("enable-direct-columnarization",
485  po::value<bool>(&g_enable_direct_columnarization)
486  ->default_value(g_enable_direct_columnarization)
487  ->implicit_value(true),
488  "Enables/disables a more optimized columnarization method "
489  "for intermediate steps in multi-step queries.");
490  developer_desc.add_options()(
491  "offset-device-by-table-id",
492  po::value<bool>(&g_use_table_device_offset)
493  ->default_value(g_use_table_device_offset)
494  ->implicit_value(true),
495  "Enables/disables offseting the chosen device ID by the table ID for a given "
496  "fragment. This improves balance of fragments across GPUs.");
497  developer_desc.add_options()("enable-window-functions",
498  po::value<bool>(&g_enable_window_functions)
499  ->default_value(g_enable_window_functions)
500  ->implicit_value(true),
501  "Enable experimental window function support.");
502  developer_desc.add_options()("enable-table-functions",
503  po::value<bool>(&g_enable_table_functions)
504  ->default_value(g_enable_table_functions)
505  ->implicit_value(true),
506  "Enable experimental table functions support.");
507  developer_desc.add_options()(
508  "jit-debug-ir",
509  po::value<bool>(&jit_debug)->default_value(jit_debug)->implicit_value(true),
510  "Enable runtime debugger support for the JIT. Note that this flag is "
511  "incompatible "
512  "with the `ENABLE_JIT_DEBUG` build flag. The generated code can be found at "
513  "`/tmp/mapdquery`.");
514  developer_desc.add_options()(
515  "intel-jit-profile",
516  po::value<bool>(&intel_jit_profile)
517  ->default_value(intel_jit_profile)
518  ->implicit_value(true),
519  "Enable runtime support for the JIT code profiling using Intel VTune.");
520  developer_desc.add_options()(
521  "enable-modern-thread-pool",
522  po::value<bool>(&g_use_tbb_pool)
523  ->default_value(g_use_tbb_pool)
524  ->implicit_value(true),
525  "Enable a new thread pool implementation for queuing kernels for execution.");
526  developer_desc.add_options()(
527  "skip-intermediate-count",
528  po::value<bool>(&g_skip_intermediate_count)
529  ->default_value(g_skip_intermediate_count)
530  ->implicit_value(true),
531  "Skip pre-flight counts for intermediate projections with no filters.");
532  developer_desc.add_options()(
533  "strip-join-covered-quals",
534  po::value<bool>(&g_strip_join_covered_quals)
535  ->default_value(g_strip_join_covered_quals)
536  ->implicit_value(true),
537  "Remove quals from the filtered count if they are covered by a "
538  "join condition (currently only ST_Contains).");
539 
540  developer_desc.add_options()(
541  "min-cpu-slab-size",
542  po::value<size_t>(&system_parameters.min_cpu_slab_size)
543  ->default_value(system_parameters.min_cpu_slab_size),
544  "Min slab size (size of memory allocations) for CPU buffer pool.");
545  developer_desc.add_options()(
546  "max-cpu-slab-size",
547  po::value<size_t>(&system_parameters.max_cpu_slab_size)
548  ->default_value(system_parameters.max_cpu_slab_size),
549  "Max CPU buffer pool slab size (size of memory allocations). Note if "
550  "there is not enough free memory to accomodate the target slab size, smaller "
551  "slabs will be allocated, down to the minimum size specified by "
552  "min-cpu-slab-size.");
553  developer_desc.add_options()(
554  "min-gpu-slab-size",
555  po::value<size_t>(&system_parameters.min_gpu_slab_size)
556  ->default_value(system_parameters.min_gpu_slab_size),
557  "Min slab size (size of memory allocations) for GPU buffer pools.");
558  developer_desc.add_options()(
559  "max-gpu-slab-size",
560  po::value<size_t>(&system_parameters.max_gpu_slab_size)
561  ->default_value(system_parameters.max_gpu_slab_size),
562  "Max GPU buffer pool slab size (size of memory allocations). Note if "
563  "there is not enough free memory to accomodate the target slab size, smaller "
564  "slabs will be allocated, down to the minimum size speified by "
565  "min-gpu-slab-size.");
566 
567  developer_desc.add_options()(
568  "max-output-projection-allocation-bytes",
569  po::value<size_t>(&g_max_memory_allocation_size)
570  ->default_value(g_max_memory_allocation_size),
571  "Maximum allocation size for a fixed output buffer allocation for projection "
572  "queries with no pre-flight count. Default is the maximum slab size (sizes "
573  "greater "
574  "than the maximum slab size have no affect). Requires bump allocator.");
575  developer_desc.add_options()(
576  "min-output-projection-allocation-bytes",
577  po::value<size_t>(&g_min_memory_allocation_size)
578  ->default_value(g_min_memory_allocation_size),
579  "Minimum allocation size for a fixed output buffer allocation for projection "
580  "queries with no pre-flight count. If an allocation of this size cannot be "
581  "obtained, the query will be retried with different execution parameters and/or "
582  "on "
583  "CPU (if allow-cpu-retry is enabled). Requires bump allocator.");
584  developer_desc.add_options()("enable-bump-allocator",
585  po::value<bool>(&g_enable_bump_allocator)
586  ->default_value(g_enable_bump_allocator)
587  ->implicit_value(true),
588  "Enable the bump allocator for projection queries on "
589  "GPU. The bump allocator will "
590  "allocate a fixed size buffer for each query, track the "
591  "number of rows passing the "
592  "kernel during query execution, and copy back only the "
593  "rows that passed the kernel "
594  "to CPU after execution. When disabled, pre-flight "
595  "count queries are used to size "
596  "the output buffer for projection queries.");
597  developer_desc.add_options()(
598  "code-cache-eviction-percent",
599  po::value<float>(&g_fraction_code_cache_to_evict)
600  ->default_value(g_fraction_code_cache_to_evict),
601  "Percentage of the GPU code cache to evict if an out of memory error is "
602  "encountered while attempting to place generated code on the GPU.");
603 
604  developer_desc.add_options()("ssl-cert",
605  po::value<std::string>(&system_parameters.ssl_cert_file)
606  ->default_value(std::string("")),
607  "SSL Validated public certficate.");
608 
609  developer_desc.add_options()("ssl-private-key",
610  po::value<std::string>(&system_parameters.ssl_key_file)
611  ->default_value(std::string("")),
612  "SSL private key file.");
613  // Note ssl_trust_store is passed through to Calcite via system_parameters
614  // todo(jack): add ensure ssl-trust-store exists if cert and private key in use
615  developer_desc.add_options()("ssl-trust-store",
616  po::value<std::string>(&system_parameters.ssl_trust_store)
617  ->default_value(std::string("")),
618  "SSL public CA certifcates (java trust store) to validate "
619  "TLS connections (passed through to the Calcite server).");
620 
621  developer_desc.add_options()(
622  "ssl-trust-password",
623  po::value<std::string>(&system_parameters.ssl_trust_password)
624  ->default_value(std::string("")),
625  "SSL password for java trust store provided via --ssl-trust-store parameter.");
626 
627  developer_desc.add_options()(
628  "ssl-trust-ca",
629  po::value<std::string>(&system_parameters.ssl_trust_ca_file)
630  ->default_value(std::string("")),
631  "SSL public CA certificates to validate TLS connection(as a client).");
632 
633  developer_desc.add_options()(
634  "ssl-trust-ca-server",
635  po::value<std::string>(&authMetadata.ca_file_name)->default_value(std::string("")),
636  "SSL public CA certificates to validate TLS connection(as a server).");
637 
638  developer_desc.add_options()("ssl-keystore",
639  po::value<std::string>(&system_parameters.ssl_keystore)
640  ->default_value(std::string("")),
641  "SSL server credentials as a java key store (passed "
642  "through to the Calcite server).");
643 
644  developer_desc.add_options()(
645  "ssl-keystore-password",
646  po::value<std::string>(&system_parameters.ssl_keystore_password)
647  ->default_value(std::string("")),
648  "SSL password for java keystore, provide by via --ssl-keystore.");
649 
650  developer_desc.add_options()(
651  "udf",
652  po::value<std::string>(&udf_file_name),
653  "Load user defined extension functions from this file at startup. The file is "
654  "expected to be a C/C++ file with extension .cpp.");
655 
656  developer_desc.add_options()(
657  "udf-compiler-path",
658  po::value<std::string>(&udf_compiler_path),
659  "Provide absolute path to clang++ used in udf compilation.");
660 
661  developer_desc.add_options()("udf-compiler-options",
662  po::value<std::vector<std::string>>(&udf_compiler_options),
663  "Specify compiler options to tailor udf compilation.");
664 
665 #ifdef ENABLE_GEOS
666  developer_desc.add_options()("libgeos-so-filename",
667  po::value<std::string>(&libgeos_so_filename),
668  "Specify libgeos shared object filename to be used for "
669  "geos-backed geo opertations.");
670 #endif
671  developer_desc.add_options()(
672  "large-ndv-threshold",
673  po::value<int64_t>(&g_large_ndv_threshold)->default_value(g_large_ndv_threshold));
674  developer_desc.add_options()(
675  "large-ndv-multiplier",
676  po::value<size_t>(&g_large_ndv_multiplier)->default_value(g_large_ndv_multiplier));
677  developer_desc.add_options()("approx_quantile_buffer",
678  po::value<size_t>(&g_approx_quantile_buffer)
679  ->default_value(g_approx_quantile_buffer));
680  developer_desc.add_options()("approx_quantile_centroids",
681  po::value<size_t>(&g_approx_quantile_centroids)
682  ->default_value(g_approx_quantile_centroids));
683  developer_desc.add_options()(
684  "bitmap-memory-limit",
685  po::value<int64_t>(&g_bitmap_memory_limit)->default_value(g_bitmap_memory_limit),
686  "Limit for count distinct bitmap memory use. The limit is computed by taking the "
687  "size of the group by buffer (entry count in Query Memory Descriptor) and "
688  "multiplying it by the number of count distinct expression and the size of bitmap "
689  "required for each. For approx_count_distinct this is typically 8192 bytes.");
690  developer_desc.add_options()(
691  "enable-filter-function",
692  po::value<bool>(&g_enable_filter_function)
693  ->default_value(g_enable_filter_function)
694  ->implicit_value(true),
695  "Enable the filter function protection feature for the SQL JIT compiler. "
696  "Normally should be on but techs might want to disable for troubleshooting.");
697  developer_desc.add_options()(
698  "enable-calcite-ddl",
699  po::value<bool>(&g_enable_calcite_ddl_parser)
700  ->default_value(g_enable_calcite_ddl_parser)
701  ->implicit_value(true),
702  "Enable using Calcite for supported DDL parsing when available.");
703  developer_desc.add_options()(
704  "enable-seconds-refresh-interval",
705  po::value<bool>(&g_enable_seconds_refresh)
706  ->default_value(g_enable_seconds_refresh)
707  ->implicit_value(true),
708  "Enable foreign table seconds refresh interval for testing purposes.");
709  developer_desc.add_options()("enable-auto-metadata-update",
710  po::value<bool>(&g_enable_auto_metadata_update)
711  ->default_value(g_enable_auto_metadata_update)
712  ->implicit_value(true),
713  "Enable automatic metadata update.");
714  developer_desc.add_options()(
715  "parallel-top-min",
716  po::value<size_t>(&g_parallel_top_min)->default_value(g_parallel_top_min),
717  "For ResultSets requiring a heap sort, the number of rows necessary to trigger "
718  "parallelTop() to sort.");
719  developer_desc.add_options()(
720  "parallel-top-max",
721  po::value<size_t>(&g_parallel_top_max)->default_value(g_parallel_top_max),
722  "For ResultSets requiring a heap sort, the maximum number of rows allowed by "
723  "watchdog.");
724  developer_desc.add_options()("vacuum-min-selectivity",
725  po::value<float>(&g_vacuum_min_selectivity)
726  ->default_value(g_vacuum_min_selectivity),
727  "Minimum selectivity for automatic vacuuming. "
728  "This specifies the percentage (with a value of 0 "
729  "implying 0% and a value of 1 implying 100%) of "
730  "deleted rows in a fragment at which to perform "
731  "automatic vacuuming. A number greater than 1 can "
732  "be used to disable automatic vacuuming.");
733  developer_desc.add_options()("enable-automatic-ir-metadata",
734  po::value<bool>(&g_enable_automatic_ir_metadata)
735  ->default_value(g_enable_automatic_ir_metadata)
736  ->implicit_value(true),
737  "Enable automatic IR metadata (debug builds only).");
738 }
739 
740 namespace {
741 
742 std::stringstream sanitize_config_file(std::ifstream& in) {
743  // Strip the web section out of the config file so boost can validate program options
744  std::stringstream ss;
745  std::string line;
746  while (std::getline(in, line)) {
747  ss << line << "\n";
748  if (line == "[web]") {
749  break;
750  }
751  }
752  return ss;
753 }
754 
755 bool trim_and_check_file_exists(std::string& filename, const std::string desc) {
756  if (!filename.empty()) {
757  boost::algorithm::trim_if(filename, boost::is_any_of("\"'"));
758  if (!boost::filesystem::exists(filename)) {
759  std::cerr << desc << " " << filename << " does not exist." << std::endl;
760  return false;
761  }
762  }
763  return true;
764 }
765 
767  if (!filename.empty()) {
769  }
770 }
771 
772 } // namespace
773 
775  boost::algorithm::trim_if(base_path, boost::is_any_of("\"'"));
776  if (!boost::filesystem::exists(base_path)) {
777  throw std::runtime_error("OmniSci base directory does not exist at " + base_path);
778  }
779 }
780 
782  boost::algorithm::trim_if(base_path, boost::is_any_of("\"'"));
783  const auto data_path = boost::filesystem::path(base_path) / "mapd_data";
784  if (!boost::filesystem::exists(data_path)) {
785  throw std::runtime_error("OmniSci data directory does not exist at '" + base_path +
786  "'");
787  }
788 
789  {
790  const auto lock_file = boost::filesystem::path(base_path) / "omnisci_server_pid.lck";
791  auto pid = std::to_string(getpid());
792 
793 #ifdef _WIN32
794  int pid_fd = _open(lock_file.string().c_str(), O_RDWR | O_CREAT, 0644);
795 #else
796  int pid_fd = open(lock_file.string().c_str(), O_RDWR | O_CREAT, 0644);
797 #endif
798  if (pid_fd == -1) {
799  auto err = std::string("Failed to open PID file ") + lock_file.string().c_str() +
800  ". " + strerror(errno) + ".";
801  throw std::runtime_error(err);
802  }
803 // TODO: support lock on Windows
804 #ifndef _WIN32
805  if (lockf(pid_fd, F_TLOCK, 0) == -1) {
806  ::close(pid_fd);
807  auto err = std::string("Another OmniSci Server is using data directory ") +
808  base_path + ".";
809  throw std::runtime_error(err);
810  }
811 #endif
812  if (ftruncate(pid_fd, 0) == -1) {
813  ::close(pid_fd);
814  auto err = std::string("Failed to truncate PID file ") +
815  lock_file.string().c_str() + ". " + strerror(errno) + ".";
816  throw std::runtime_error(err);
817  }
818  if (write(pid_fd, pid.c_str(), pid.length()) == -1) {
819  ::close(pid_fd);
820  auto err = std::string("Failed to write PID file ") + lock_file.string().c_str() +
821  ". " + strerror(errno) + ".";
822  throw std::runtime_error(err);
823  }
824  }
825  boost::algorithm::trim_if(db_query_file, boost::is_any_of("\"'"));
826  if (db_query_file.length() > 0 && !boost::filesystem::exists(db_query_file)) {
827  throw std::runtime_error("File containing DB queries " + db_query_file +
828  " does not exist.");
829  }
830  const auto db_file =
831  boost::filesystem::path(base_path) / "mapd_catalogs" / OMNISCI_SYSTEM_CATALOG;
832  if (!boost::filesystem::exists(db_file)) {
833  { // check old system catalog existsense
834  const auto db_file = boost::filesystem::path(base_path) / "mapd_catalogs/mapd";
835  if (!boost::filesystem::exists(db_file)) {
836  throw std::runtime_error("OmniSci system catalog " + OMNISCI_SYSTEM_CATALOG +
837  " does not exist.");
838  }
839  }
840  }
841  if (license_path.length() == 0) {
842  license_path = base_path + "/omnisci.license";
843  }
844 
845  // add all parameters to be displayed on startup
846  LOG(INFO) << "OmniSci started with data directory at '" << base_path << "'";
847  if (vm.count("license-path")) {
848  LOG(INFO) << "License key path set to '" << license_path << "'";
849  }
851  LOG(INFO) << " Server read-only mode is " << read_only;
852  LOG(INFO) << " Watchdog is set to " << enable_watchdog;
853  LOG(INFO) << " Dynamic Watchdog is set to " << enable_dynamic_watchdog;
855  LOG(INFO) << " Dynamic Watchdog timeout is set to " << dynamic_watchdog_time_limit;
856  }
857  LOG(INFO) << " Runtime query interrupt is set to " << enable_runtime_query_interrupt;
859  LOG(INFO) << " A frequency of checking pending query interrupt request is set to "
860  << pending_query_interrupt_freq << " (in ms.)";
861  LOG(INFO) << " A frequency of checking running query interrupt request is set to "
862  << running_query_interrupt_freq << " (0.0 ~ 1.0)";
863  }
864  LOG(INFO) << " Non-kernel time query interrupt is set to "
866 
867  LOG(INFO) << " Debug Timer is set to " << g_enable_debug_timer;
868  LOG(INFO) << " LogUserId is set to " << Catalog_Namespace::g_log_user_id;
869  LOG(INFO) << " Maximum idle session duration " << idle_session_duration;
870  LOG(INFO) << " Maximum active session duration " << max_session_duration;
871  LOG(INFO) << " Maximum number of sessions " << system_parameters.num_sessions;
872 
873  LOG(INFO) << "Allowed import paths is set to " << allowed_import_paths;
874  LOG(INFO) << "Allowed export paths is set to " << allowed_export_paths;
877 
879  ddl_utils::FilePathBlacklist::addToBlacklist(base_path + "/temporary/mapd_catalogs");
882  g_enable_s3_fsi = false;
883 
884  if (disk_cache_level == "foreign_tables") {
885  if (g_enable_fsi) {
887  LOG(INFO) << "Disk cache enabled for foreign tables only";
888  } else {
889  LOG(INFO) << "Cannot enable disk cache for fsi when fsi is disabled. Defaulted to "
890  "disk cache disabled";
891  }
892  } else if (disk_cache_level == "all") {
894  LOG(INFO) << "Disk cache enabled for all tables";
895  } else if (disk_cache_level == "local_tables") {
897  LOG(INFO) << "Disk cache enabled for non-FSI tables";
898  } else if (disk_cache_level == "none") {
900  LOG(INFO) << "Disk cache disabled";
901  } else {
902  throw std::runtime_error{
903  "Unexpected \"disk-cache-level\" value: " + disk_cache_level +
904  ". Valid options are 'foreign_tables', "
905  "'local_tables', 'none', and 'all'."};
906  }
907 
908  if (disk_cache_config.path.empty()) {
909  disk_cache_config.path = base_path + "/omnisci_disk_cache";
910  }
912 
915 
916  // If passed in, blacklist all security config files
925 
926  if (g_vacuum_min_selectivity < 0) {
927  throw std::runtime_error{"vacuum-min-selectivity cannot be less than 0."};
928  }
929  LOG(INFO) << "Vacuum Min Selectivity: " << g_vacuum_min_selectivity;
930 }
931 
933  int argc,
934  char const* const* argv,
935  const bool should_init_logging) {
936  po::options_description all_desc("All options");
937  all_desc.add(help_desc).add(developer_desc);
938 
939  try {
940  po::store(po::command_line_parser(argc, argv)
941  .options(all_desc)
942  .positional(positional_options)
943  .run(),
944  vm);
945  po::notify(vm);
946 
947  if (vm.count("help")) {
948  std::cerr << "Usage: omnisci_server <data directory path> [-p <port number>] "
949  "[--http-port <http port number>] [--flush-log] [--version|-v]"
950  << std::endl
951  << std::endl;
952  std::cout << help_desc << std::endl;
953  return 0;
954  }
955  if (vm.count("dev-options")) {
956  std::cout << "Usage: omnisci_server <data directory path> [-p <port number>] "
957  "[--http-port <http port number>] [--flush-log] [--version|-v]"
958  << std::endl
959  << std::endl;
960  std::cout << developer_desc << std::endl;
961  return 0;
962  }
963  if (vm.count("version")) {
964  std::cout << "OmniSci Version: " << MAPD_RELEASE << std::endl;
965  return 0;
966  }
967 
968  if (vm.count("config")) {
969  std::ifstream settings_file(system_parameters.config_file);
970 
971  auto sanitized_settings = sanitize_config_file(settings_file);
972 
973  po::store(po::parse_config_file(sanitized_settings, all_desc, false), vm);
974  po::notify(vm);
975  settings_file.close();
976  }
977 
978  if (should_init_logging) {
979  init_logging();
980  }
981 
983  return 1;
984  }
985  if (!trim_and_check_file_exists(authMetadata.ca_file_name, "ca file name")) {
986  return 1;
987  }
989  "ssl trust store")) {
990  return 1;
991  }
993  return 1;
994  }
996  return 1;
997  }
999  return 1;
1000  }
1001 
1010  } catch (po::error& e) {
1011  std::cerr << "Usage Error: " << e.what() << std::endl;
1012  return 1;
1013  }
1014 
1015  if (g_hll_precision_bits < 1 || g_hll_precision_bits > 16) {
1016  std::cerr << "hll-precision-bits must be between 1 and 16." << std::endl;
1017  return 1;
1018  }
1019 
1020  if (!g_from_table_reordering) {
1021  LOG(INFO) << " From clause table reordering is disabled";
1022  }
1023 
1025  LOG(INFO) << " Filter push down for JOIN is enabled";
1026  }
1027 
1028  if (vm.count("udf")) {
1029  boost::algorithm::trim_if(udf_file_name, boost::is_any_of("\"'"));
1030 
1031  if (!boost::filesystem::exists(udf_file_name)) {
1032  LOG(ERROR) << " User defined function file " << udf_file_name << " does not exist.";
1033  return 1;
1034  }
1035 
1036  LOG(INFO) << " User provided extension functions loaded from " << udf_file_name;
1037  }
1038 
1039  if (vm.count("udf-compiler-path")) {
1040  boost::algorithm::trim_if(udf_compiler_path, boost::is_any_of("\"'"));
1041  }
1042 
1043  auto trim_string = [](std::string& s) {
1044  boost::algorithm::trim_if(s, boost::is_any_of("\"'"));
1045  };
1046 
1047  if (vm.count("udf-compiler-options")) {
1048  std::for_each(udf_compiler_options.begin(), udf_compiler_options.end(), trim_string);
1049  }
1050 
1051  if (enable_runtime_udf) {
1052  LOG(INFO) << " Runtime user defined extension functions enabled globally.";
1053  }
1054 
1055  boost::algorithm::trim_if(system_parameters.ha_brokers, boost::is_any_of("\"'"));
1056  boost::algorithm::trim_if(system_parameters.ha_group_id, boost::is_any_of("\"'"));
1057  boost::algorithm::trim_if(system_parameters.ha_shared_data, boost::is_any_of("\"'"));
1058  boost::algorithm::trim_if(system_parameters.ha_unique_server_id,
1059  boost::is_any_of("\"'"));
1060 
1061  if (!system_parameters.ha_group_id.empty()) {
1062  LOG(INFO) << " HA group id " << system_parameters.ha_group_id;
1063  if (system_parameters.ha_unique_server_id.empty()) {
1064  LOG(ERROR) << "Starting server in HA mode --ha-unique-server-id must be set ";
1065  return 5;
1066  } else {
1067  LOG(INFO) << " HA unique server id " << system_parameters.ha_unique_server_id;
1068  }
1069  if (system_parameters.ha_brokers.empty()) {
1070  LOG(ERROR) << "Starting server in HA mode --ha-brokers must be set ";
1071  return 6;
1072  } else {
1073  LOG(INFO) << " HA brokers " << system_parameters.ha_brokers;
1074  }
1075  if (system_parameters.ha_shared_data.empty()) {
1076  LOG(ERROR) << "Starting server in HA mode --ha-shared-data must be set ";
1077  return 7;
1078  } else {
1079  LOG(INFO) << " HA shared data is " << system_parameters.ha_shared_data;
1080  }
1081  }
1082 
1083  boost::algorithm::trim_if(system_parameters.master_address, boost::is_any_of("\"'"));
1084  if (!system_parameters.master_address.empty()) {
1085  if (!read_only) {
1086  LOG(ERROR) << "The master-address setting is only allowed in readonly mode";
1087  return 9;
1088  }
1089  LOG(INFO) << " Master Address is " << system_parameters.master_address;
1090  LOG(INFO) << " Master Port is " << system_parameters.master_port;
1091  }
1092 
1093  if (g_max_import_threads < 1) {
1094  std::cerr << "max-import-threads must be >= 1 (was set to " << g_max_import_threads
1095  << ")." << std::endl;
1096  return 8;
1097  } else {
1098  LOG(INFO) << " Max import threads " << g_max_import_threads;
1099  }
1100 
1101  LOG(INFO) << " cuda block size " << system_parameters.cuda_block_size;
1102  LOG(INFO) << " cuda grid size " << system_parameters.cuda_grid_size;
1103  LOG(INFO) << " Min CPU buffer pool slab size " << system_parameters.min_cpu_slab_size;
1104  LOG(INFO) << " Max CPU buffer pool slab size " << system_parameters.max_cpu_slab_size;
1105  LOG(INFO) << " Min GPU buffer pool slab size " << system_parameters.min_gpu_slab_size;
1106  LOG(INFO) << " Max GPU buffer pool slab size " << system_parameters.max_gpu_slab_size;
1107  LOG(INFO) << " calcite JVM max memory " << system_parameters.calcite_max_mem;
1108  LOG(INFO) << " OmniSci Server Port " << system_parameters.omnisci_server_port;
1109  LOG(INFO) << " OmniSci Calcite Port " << system_parameters.calcite_port;
1110  LOG(INFO) << " Enable Calcite view optimize "
1112  LOG(INFO) << " Allow Local Auth Fallback: "
1113  << (authMetadata.allowLocalAuthFallback ? "enabled" : "disabled");
1114  LOG(INFO) << " ParallelTop min threshold: " << g_parallel_top_min;
1115  LOG(INFO) << " ParallelTop watchdog max: " << g_parallel_top_max;
1116 
1117  boost::algorithm::trim_if(authMetadata.distinguishedName, boost::is_any_of("\"'"));
1118  boost::algorithm::trim_if(authMetadata.uri, boost::is_any_of("\"'"));
1119  boost::algorithm::trim_if(authMetadata.ldapQueryUrl, boost::is_any_of("\"'"));
1120  boost::algorithm::trim_if(authMetadata.ldapRoleRegex, boost::is_any_of("\"'"));
1121  boost::algorithm::trim_if(authMetadata.ldapSuperUserRole, boost::is_any_of("\"'"));
1122 
1123  return boost::none;
1124 }
std::string distinguishedName
Definition: AuthMetadata.h:25
DiskCacheLevel enabled_level
int64_t g_large_ndv_threshold
bool g_use_table_device_offset
unsigned connect_timeout
std::string filename(char const *path)
Definition: Logger.cpp:62
bool g_enable_left_join_filter_hoisting
Definition: Execute.cpp:94
double g_running_query_interrupt_freq
Definition: Execute.cpp:118
bool g_enable_smem_group_by
int open(const char *path, int flags, int mode)
Definition: omnisci_fs.cpp:64
size_t g_parallel_top_max
Definition: ResultSet.cpp:48
float g_filter_push_down_low_frac
Definition: Execute.cpp:90
std::string ldapQueryUrl
Definition: AuthMetadata.h:26
bool g_enable_watchdog
bool trim_and_check_file_exists(std::string &filename, const std::string desc)
logger::LogOptions log_options_
bool g_strip_join_covered_quals
Definition: Execute.cpp:100
bool g_enable_direct_columnarization
Definition: Execute.cpp:111
std::string ha_shared_data
static void initialize(const std::string &data_dir, const std::string &allowed_import_paths, const std::string &allowed_export_paths)
Definition: DdlUtils.cpp:690
bool g_enable_lazy_fetch
Definition: Execute.cpp:113
std::string udf_compiler_path
bool g_skip_intermediate_count
unsigned g_pending_query_interrupt_freq
Definition: Execute.cpp:117
po::options_description help_desc
#define LOG(tag)
Definition: Logger.h:194
bool enable_calcite_view_optimize
DiskCacheConfig disk_cache_config
bool g_enable_debug_timer
Definition: Logger.cpp:17
std::string ldapRoleRegex
Definition: AuthMetadata.h:27
const std::string OMNISCI_SYSTEM_CATALOG
Definition: SysCatalog.h:58
bool g_enable_auto_metadata_update
size_t g_filter_push_down_passing_row_ubound
Definition: Execute.cpp:92
boost::optional< int > parse_command_line(int argc, char const *const *argv, const bool should_init_logging=false)
unsigned send_timeout
void addOptionalFileToBlacklist(std::string &filename)
bool g_enable_dynamic_watchdog
Definition: Execute.cpp:77
unsigned g_trivial_loop_join_threshold
Definition: Execute.cpp:83
bool g_enable_non_kernel_time_query_interrupt
Definition: Execute.cpp:115
bool enable_non_kernel_time_query_interrupt
int g_hll_precision_bits
std::string config_file
std::string to_string(char const *&&v)
bool g_enable_overlaps_hashjoin
Definition: Execute.cpp:96
bool g_inner_join_fragment_skipping
Definition: Execute.cpp:85
size_t write(FILE *f, const size_t offset, const size_t size, const int8_t *buf)
Writes the specified number of bytes to the offset position in file f from buf.
Definition: File.cpp:141
boost::program_options::options_description const & get_options() const
Definition: Logger.cpp:79
bool g_enable_smem_non_grouped_agg
Definition: Execute.cpp:127
bool g_null_div_by_zero
Definition: Execute.cpp:82
bool g_enable_interop
std::string ha_brokers
size_t g_parallel_top_min
Definition: ResultSet.cpp:47
std::string ssl_trust_ca_file
bool g_enable_columnar_output
Definition: Execute.cpp:93
void close(const int fd)
Definition: omnisci_fs.cpp:68
std::string ssl_trust_store
int64_t g_bitmap_memory_limit
bool g_enable_s3_fsi
Definition: Catalog.cpp:93
bool g_from_table_reordering
Definition: Execute.cpp:84
singleton class to handle concurrancy and state for blosc library. A C++ wrapper over a pure C librar...
bool g_enable_hashjoin_many_to_many
Definition: Execute.cpp:97
void init(LogOptions const &log_opts)
Definition: Logger.cpp:280
float g_filter_push_down_high_frac
Definition: Execute.cpp:91
bool g_enable_thrift_logs
Definition: initdb.cpp:42
std::string uri
Definition: AuthMetadata.h:24
bool g_bigint_count
size_t g_max_memory_allocation_size
Definition: Execute.cpp:105
double g_overlaps_target_entries_per_bin
Definition: Execute.cpp:99
size_t g_approx_quantile_buffer
Definition: Execute.cpp:133
std::string ha_unique_server_id
std::string allowed_export_paths
size_t g_overlaps_max_table_size_bytes
Definition: Execute.cpp:98
std::string ca_file_name
Definition: AuthMetadata.h:31
std::string ssl_key_file
AuthMetadata authMetadata
bool g_enable_calcite_ddl_parser
Definition: ParserNode.cpp:74
bool g_enable_window_functions
Definition: Execute.cpp:103
size_t g_min_memory_allocation_size
Definition: Execute.cpp:106
bool with_keepalive
std::string ldapSuperUserRole
Definition: AuthMetadata.h:28
bool g_read_only
Definition: File.cpp:38
bool g_enable_seconds_refresh
unsigned pending_query_interrupt_freq
unsigned recv_timeout
std::stringstream sanitize_config_file(std::ifstream &in)
bool g_enable_smem_grouped_non_count_agg
Definition: Execute.cpp:124
bool g_enable_experimental_string_functions
bool g_enable_automatic_ir_metadata
Definition: Execute.cpp:136
std::vector< std::string > udf_compiler_options
float g_vacuum_min_selectivity
static const std::string nodeIds_token
bool g_enable_filter_function
Definition: Execute.cpp:79
bool g_cache_string_hash
float g_fraction_code_cache_to_evict
Severity severity_
Definition: Logger.h:124
std::string ssl_keystore_password
std::string ssl_trust_password
bool g_enable_filter_push_down
Definition: Execute.cpp:89
bool g_use_estimator_result_cache
Definition: Execute.cpp:116
bool g_enable_bump_allocator
Definition: Execute.cpp:109
bool allowLocalAuthFallback
Definition: AuthMetadata.h:32
po::positional_options_description positional_options
void set_base_path(std::string const &base_path)
Definition: Logger.cpp:93
bool g_enable_union
std::string ssl_keystore
bool g_allow_cpu_retry
Definition: Execute.cpp:81
size_t g_approx_quantile_centroids
Definition: Execute.cpp:134
static void addToBlacklist(const std::string &path)
Definition: DdlUtils.cpp:735
po::options_description developer_desc
std::string allowed_import_paths
bool g_enable_stringdict_parallel
static const std::string MAPD_RELEASE
Definition: release.h:43
std::string disk_cache_level
bool g_optimize_row_initialization
Definition: Execute.cpp:95
static bool run
po::variables_map vm
unsigned g_dynamic_watchdog_time_limit
Definition: Execute.cpp:80
bool g_enable_fsi
Definition: Catalog.cpp:92
bool g_use_tbb_pool
Definition: Execute.cpp:78
std::string ha_group_id
bool g_enable_runtime_query_interrupt
Definition: Execute.cpp:114
size_t g_max_import_threads
Definition: Importer.cpp:84
size_t g_large_ndv_multiplier
bool g_enable_table_functions
Definition: Execute.cpp:104
std::string master_address
std::string cluster_command_line_arg
unsigned dynamic_watchdog_time_limit
SystemParameters system_parameters
size_t g_gpu_smem_threshold
Definition: Execute.cpp:119
std::string ssl_cert_file