19 #include <sys/types.h>
25 using namespace std::string_literals;
30 #include "MapDRelease.h"
76 namespace Catalog_Namespace {
91 log_options_.set_base_path(base_path);
96 help_desc.add_options()(
"help,h",
"Show available options.");
97 help_desc.add_options()(
101 ->implicit_value(
true),
102 R
"(Allow the queries which failed on GPU to retry on CPU, even when watchdog is enabled.)");
103 help_desc.add_options()("allow-loop-joins",
104 po::value<bool>(&allow_loop_joins)
105 ->default_value(allow_loop_joins)
106 ->implicit_value(
true),
107 "Enable loop joins.");
108 help_desc.add_options()(
"bigint-count",
111 ->implicit_value(
true),
112 "Use 64-bit count.");
113 help_desc.add_options()(
"calcite-max-mem",
114 po::value<size_t>(&system_parameters.calcite_max_mem)
115 ->default_value(system_parameters.calcite_max_mem),
116 "Max memory available to calcite JVM.");
118 help_desc.add_options()(
"calcite-port",
119 po::value<int>(&system_parameters.calcite_port)
120 ->default_value(system_parameters.calcite_port),
121 "Calcite port number.");
123 help_desc.add_options()(
"config",
124 po::value<std::string>(&system_parameters.config_file),
125 "Path to server configuration file.");
126 help_desc.add_options()(
"cpu-buffer-mem-bytes",
127 po::value<size_t>(&system_parameters.cpu_buffer_mem_bytes)
128 ->default_value(system_parameters.cpu_buffer_mem_bytes),
129 "Size of memory reserved for CPU buffers, in bytes.");
131 help_desc.add_options()(
"cpu-only",
132 po::value<bool>(&system_parameters.cpu_only)
133 ->default_value(system_parameters.cpu_only)
134 ->implicit_value(
true),
135 "Run on CPU only, even if GPUs are available.");
136 help_desc.add_options()(
"cuda-block-size",
137 po::value<size_t>(&system_parameters.cuda_block_size)
138 ->default_value(system_parameters.cuda_block_size),
139 "Size of block to use on GPU.");
140 help_desc.add_options()(
"cuda-grid-size",
141 po::value<size_t>(&system_parameters.cuda_grid_size)
142 ->default_value(system_parameters.cuda_grid_size),
143 "Size of grid to use on GPU.");
145 help_desc.add_options()(
147 po::value<std::string>(&base_path)->
required()->default_value(
"storage"),
148 "Directory path to HeavyDB data storage (catalogs, raw data, log files, etc).");
149 positional_options.add(
"data", 1);
151 help_desc.add_options()(
"db-query-list",
152 po::value<std::string>(&db_query_file),
153 "Path to file containing HeavyDB warmup queries.");
154 help_desc.add_options()(
156 po::value<bool>(&exit_after_warmup)->default_value(
false)->implicit_value(
true),
157 "Exit after HeavyDB warmup queries.");
158 help_desc.add_options()(
"dynamic-watchdog-time-limit",
159 po::value<unsigned>(&dynamic_watchdog_time_limit)
160 ->default_value(dynamic_watchdog_time_limit)
161 ->implicit_value(10000),
162 "Dynamic watchdog time limit, in milliseconds.");
163 help_desc.add_options()(
"enable-data-recycler",
164 po::value<bool>(&enable_data_recycler)
165 ->default_value(enable_data_recycler)
166 ->implicit_value(
true),
167 "Use data recycler.");
168 help_desc.add_options()(
"use-hashtable-cache",
169 po::value<bool>(&use_hashtable_cache)
170 ->default_value(use_hashtable_cache)
171 ->implicit_value(
true),
172 "Use hashtable cache.");
173 help_desc.add_options()(
"use-query-resultset-cache",
176 ->implicit_value(
true),
177 "Use query resultset cache.");
178 help_desc.add_options()(
"use-chunk-metadata-cache",
181 ->implicit_value(
true),
182 "Use chunk metadata cache.");
183 help_desc.add_options()(
184 "hashtable-cache-total-bytes",
185 po::value<size_t>(&hashtable_cache_total_bytes)
186 ->default_value(hashtable_cache_total_bytes)
187 ->implicit_value(4294967296),
188 "Size of total memory space for hashtable cache, in bytes (default: 4GB).");
189 help_desc.add_options()(
"max-cacheable-hashtable-size-bytes",
190 po::value<size_t>(&max_cacheable_hashtable_size_bytes)
191 ->default_value(max_cacheable_hashtable_size_bytes)
192 ->implicit_value(2147483648),
193 "The maximum size of hashtable that is available to cache, in "
194 "bytes (default: 2GB).");
195 help_desc.add_options()(
196 "query-resultset-cache-total-bytes",
199 "Size of total memory space for query resultset cache, in bytes (default: 4GB).");
200 help_desc.add_options()(
201 "max-query-resultset-size-bytes",
204 "The maximum size of query resultset that is available to cache, in "
205 "bytes (default: 2GB).");
206 help_desc.add_options()(
"allow-auto-query-resultset-caching",
209 ->implicit_value(
true),
210 "Allow automatic query resultset caching when the size of "
211 "query resultset is smaller or equal to the threshold defined "
212 "by `auto-resultset-caching-threshold-bytes`, in bytes (to "
213 "enable this, query resultset recycler "
214 "should be enabled, default: 1048576 bytes (or 1MB)).");
215 help_desc.add_options()(
216 "auto-resultset-caching-threshold-bytes",
219 "A threshold that allows caching query resultset automatically if the size of "
220 "resultset is less than it, in bytes (default: 1MB).");
221 help_desc.add_options()(
"allow-query-step-skipping",
224 ->implicit_value(
true),
225 "Allow query step skipping when multi-step query has at least "
226 "one cached query resultset.");
227 help_desc.add_options()(
"enable-debug-timer",
230 ->implicit_value(
true),
231 "Enable debug timer logging.");
232 help_desc.add_options()(
"enable-dynamic-watchdog",
233 po::value<bool>(&enable_dynamic_watchdog)
234 ->default_value(enable_dynamic_watchdog)
235 ->implicit_value(
true),
236 "Enable dynamic watchdog.");
237 help_desc.add_options()(
"enable-filter-push-down",
240 ->implicit_value(
true),
241 "Enable filter push down through joins.");
242 help_desc.add_options()(
"enable-overlaps-hashjoin",
245 ->implicit_value(
true),
246 "Enable the overlaps hash join framework allowing for range "
247 "join (e.g. spatial overlaps) computation using a hash table.");
248 help_desc.add_options()(
"enable-hashjoin-many-to-many",
251 ->implicit_value(
true),
252 "Enable the overlaps hash join framework allowing for range "
253 "join (e.g. spatial overlaps) computation using a hash table.");
254 help_desc.add_options()(
"enable-distance-rangejoin",
257 ->implicit_value(
true),
258 "Enable accelerating point distance joins with a hash table. "
259 "This rewrites ST_Distance when using an upperbound (<= X).");
260 help_desc.add_options()(
"enable-runtime-query-interrupt",
261 po::value<bool>(&enable_runtime_query_interrupt)
262 ->default_value(enable_runtime_query_interrupt)
263 ->implicit_value(
true),
264 "Enable runtime query interrupt.");
265 help_desc.add_options()(
"enable-non-kernel-time-query-interrupt",
266 po::value<bool>(&enable_non_kernel_time_query_interrupt)
267 ->default_value(enable_non_kernel_time_query_interrupt)
268 ->implicit_value(
true),
269 "Enable non-kernel time query interrupt.");
270 help_desc.add_options()(
"pending-query-interrupt-freq",
271 po::value<unsigned>(&pending_query_interrupt_freq)
272 ->default_value(pending_query_interrupt_freq)
273 ->implicit_value(1000),
274 "A frequency of checking the request of pending query "
275 "interrupt from user (in millisecond).");
276 help_desc.add_options()(
277 "running-query-interrupt-freq",
278 po::value<double>(&running_query_interrupt_freq)
279 ->default_value(running_query_interrupt_freq)
280 ->implicit_value(0.5),
281 "A frequency of checking the request of running query "
282 "interrupt from user (0.0 (less frequent) ~ (more frequent) 1.0).");
283 help_desc.add_options()(
"use-estimator-result-cache",
284 po::value<bool>(&use_estimator_result_cache)
285 ->default_value(use_estimator_result_cache)
286 ->implicit_value(
true),
287 "Use estimator result cache.");
289 help_desc.add_options()(
290 "enable-string-dict-hash-cache",
293 ->implicit_value(
true),
294 "Cache string hash values in the string dictionary server during import.");
296 help_desc.add_options()(
297 "enable-thrift-logs",
300 ->implicit_value(
true),
301 "Enable writing messages directly from thrift to stdout/stderr.");
302 help_desc.add_options()(
"enable-watchdog",
303 po::value<bool>(&enable_watchdog)
304 ->default_value(enable_watchdog)
305 ->implicit_value(
true),
307 help_desc.add_options()(
308 "watchdog-none-encoded-string-translation-limit",
309 po::value<size_t>(&watchdog_none_encoded_string_translation_limit)
310 ->default_value(watchdog_none_encoded_string_translation_limit),
311 "Max number of none-encoded strings allowed to be translated "
312 "to dictionary-encoded with watchdog enabled");
313 help_desc.add_options()(
314 "filter-push-down-low-frac",
318 "Lower threshold for selectivity of filters that are pushed down.");
319 help_desc.add_options()(
320 "filter-push-down-high-frac",
324 "Higher threshold for selectivity of filters that are pushed down.");
325 help_desc.add_options()(
"filter-push-down-passing-row-ubound",
329 "Upperbound on the number of rows that should pass the filter "
330 "if the selectivity is less than "
331 "the high fraction threshold.");
332 help_desc.add_options()(
"from-table-reordering",
335 ->implicit_value(
true),
336 "Enable automatic table reordering in FROM clause.");
337 help_desc.add_options()(
"gpu-buffer-mem-bytes",
338 po::value<size_t>(&system_parameters.gpu_buffer_mem_bytes)
339 ->default_value(system_parameters.gpu_buffer_mem_bytes),
340 "Size of memory reserved for GPU buffers, in bytes, per GPU.");
341 help_desc.add_options()(
"gpu-input-mem-limit",
342 po::value<double>(&system_parameters.gpu_input_mem_limit)
343 ->default_value(system_parameters.gpu_input_mem_limit),
344 "Force query to CPU when input data memory usage exceeds this "
345 "percentage of available GPU memory.");
346 help_desc.add_options()(
347 "hll-precision-bits",
351 "Number of bits used from the hash value used to specify the bucket number.");
353 help_desc.add_options()(
"http-port",
354 po::value<int>(&http_port)->default_value(http_port),
355 "HTTP port number.");
356 help_desc.add_options()(
358 po::value<int>(&http_binary_port)->default_value(http_binary_port),
359 "HTTP binary port number.");
361 help_desc.add_options()(
362 "idle-session-duration",
363 po::value<int>(&idle_session_duration)->default_value(idle_session_duration),
364 "Maximum duration of idle session.");
365 help_desc.add_options()(
"inner-join-fragment-skipping",
368 ->implicit_value(
true),
369 "Enable/disable inner join fragment skipping. This feature is "
370 "considered stable and is enabled by default. This "
371 "parameter will be removed in a future release.");
372 help_desc.add_options()(
373 "max-session-duration",
374 po::value<int>(&max_session_duration)->default_value(max_session_duration),
375 "Maximum duration of active session.");
376 help_desc.add_options()(
"num-sessions",
377 po::value<int>(&system_parameters.num_sessions)
378 ->default_value(system_parameters.num_sessions),
379 "Maximum number of active session.");
380 help_desc.add_options()(
384 ->implicit_value(
true),
385 "Return null on division by zero instead of throwing an exception.");
386 help_desc.add_options()(
387 "num-reader-threads",
388 po::value<size_t>(&num_reader_threads)->default_value(num_reader_threads),
389 "Number of reader threads to use.");
390 help_desc.add_options()(
391 "max-import-threads",
393 "Max number of default import threads to use (num hardware threads will be used "
394 "instead if lower). Can be overriden with copy statement threads option).");
395 help_desc.add_options()(
396 "overlaps-max-table-size-bytes",
399 "The maximum size in bytes of the hash table for an overlaps hash join.");
400 help_desc.add_options()(
"overlaps-target-entries-per-bin",
403 "The target number of hash entries per bin for overlaps join");
405 help_desc.add_options()(
"port,p",
406 po::value<int>(&system_parameters.omnisci_server_port)
407 ->default_value(system_parameters.omnisci_server_port),
410 help_desc.add_options()(
"num-gpus",
411 po::value<int>(&system_parameters.num_gpus)
412 ->default_value(system_parameters.num_gpus),
413 "Number of gpus to use.");
414 help_desc.add_options()(
416 po::value<bool>(&read_only)->default_value(read_only)->implicit_value(
true),
417 "Enable read-only mode.");
419 help_desc.add_options()(
421 po::value<size_t>(&reserved_gpu_mem)->default_value(reserved_gpu_mem),
422 "Reduces GPU memory available to the HeavyDB allocator by this amount. Used for "
423 "compiled code cache and ancillary GPU functions and other processes that may also "
424 "be using the GPU concurrent with HeavyDB.");
426 help_desc.add_options()(
"start-gpu",
427 po::value<int>(&system_parameters.start_gpu)
428 ->default_value(system_parameters.start_gpu),
429 "First gpu to use.");
430 help_desc.add_options()(
"trivial-loop-join-threshold",
433 ->implicit_value(1000),
434 "The maximum number of rows in the inner table of a loop join "
435 "considered to be trivially small.");
436 help_desc.add_options()(
"verbose",
437 po::value<bool>(&verbose_logging)
438 ->default_value(verbose_logging)
439 ->implicit_value(
true),
440 "Write additional debug log messages to server logs.");
441 help_desc.add_options()(
442 "enable-runtime-udf",
443 po::value<bool>(&enable_runtime_udf)
444 ->default_value(enable_runtime_udf)
445 ->implicit_value(
true),
446 "DEPRECATED. Please use `enable-runtime-udfs` instead as this flag will be removed "
447 "in the near future.");
448 help_desc.add_options()(
449 "enable-runtime-udfs",
450 po::value<bool>(&enable_runtime_udfs)
451 ->default_value(enable_runtime_udfs)
452 ->implicit_value(
true),
453 "Enable runtime UDF registration by passing signatures and corresponding LLVM IR "
454 "to the `register_runtime_udf` endpoint. For use with the Python Remote Backend "
455 "Compiler server, packaged separately.");
456 help_desc.add_options()(
"enable-udf-registration-for-all-users",
457 po::value<bool>(&enable_udf_registration_for_all_users)
458 ->default_value(enable_udf_registration_for_all_users)
459 ->implicit_value(
true),
460 "Allow all users, not just superusers, to register runtime "
461 "UDFs/UDTFs. Option only valid if "
462 "`--enable-runtime-udfs` is set to true.");
463 help_desc.add_options()(
"version,v",
"Print Version Number.");
464 help_desc.add_options()(
"enable-string-functions",
467 ->implicit_value(
true),
468 "Enable experimental string functions.");
469 help_desc.add_options()(
"enable-experimental-string-functions",
472 ->implicit_value(
true),
473 "DEPRECATED. String functions are now enabled by default, "
474 "but can still be controlled with --enable-string-functions.");
475 help_desc.add_options()(
478 "Enable foreign storage interface.");
480 help_desc.add_options()(
"enable-legacy-delimited-import",
483 ->implicit_value(
true),
484 "Use legacy importer for delimited sources.");
485 #ifdef ENABLE_IMPORT_PARQUET
486 help_desc.add_options()(
"enable-legacy-parquet-import",
487 po::value<bool>(&g_enable_legacy_parquet_import)
488 ->default_value(g_enable_legacy_parquet_import)
489 ->implicit_value(
true),
490 "Use legacy importer for parquet sources.");
492 help_desc.add_options()(
"enable-fsi-regex-import",
495 ->implicit_value(
true),
496 "Use FSI importer for regex parsed sources.");
498 help_desc.add_options()(
"enable-add-metadata-columns",
501 ->implicit_value(
true),
502 "Enable add_metadata_columns COPY FROM WITH option (Beta).");
504 help_desc.add_options()(
"disk-cache-path",
505 po::value<std::string>(&disk_cache_config.path),
506 "Specify the path for the disk cache.");
508 help_desc.add_options()(
510 po::value<std::string>(&(disk_cache_level))->default_value(
"foreign_tables"),
511 "Specify level of disk cache. Valid options are 'foreign_tables', "
512 "'local_tables', 'none', and 'all'.");
514 help_desc.add_options()(
"disk-cache-size",
515 po::value<size_t>(&(disk_cache_config.size_limit)),
516 "Specify a maximum size for the disk cache in bytes.");
519 help_desc.add_options()(
520 "allow-s3-server-privileges",
523 ->implicit_value(
true),
524 "Allow S3 server privileges, if IAM user credentials are not provided. Credentials "
525 "may be specified with "
526 "environment variables (such as AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, etc), "
527 "an AWS credentials file, or when running on an EC2 instance, with an IAM role "
528 "that is attached to the instance.");
529 #endif // defined(HAVE_AWS_S3)
530 help_desc.add_options()(
531 "enable-interoperability",
534 ->implicit_value(
true),
535 "Enable offloading of query portions to an external execution engine.");
536 help_desc.add_options()(
"enable-union",
539 ->implicit_value(
true),
540 "DEPRECATED. UNION ALL is enabled by default. Please remove "
541 "use of this option, as it may be disabled in the future.");
542 help_desc.add_options()(
543 "calcite-service-timeout",
544 po::value<size_t>(&system_parameters.calcite_timeout)
545 ->default_value(system_parameters.calcite_timeout),
546 "Calcite server timeout (milliseconds). Increase this on systems with frequent "
547 "schema changes or when running large numbers of parallel queries.");
548 help_desc.add_options()(
"calcite-service-keepalive",
549 po::value<size_t>(&system_parameters.calcite_keepalive)
550 ->default_value(system_parameters.calcite_keepalive)
551 ->implicit_value(
true),
552 "Enable keepalive on Calcite connections.");
553 help_desc.add_options()(
554 "stringdict-parallelizm",
557 ->implicit_value(
true),
558 "Allow StringDictionary to parallelize loads using multiple threads");
559 help_desc.add_options()(
563 ->implicit_value(
true),
564 "Log userId integer in place of the userName (when available).");
565 help_desc.add_options()(
"log-user-origin",
566 po::value<bool>(&log_user_origin)
567 ->default_value(log_user_origin)
568 ->implicit_value(
true),
569 "Lookup the origin of inbound connections by IP address/DNS "
570 "name, and print this information as part of stdlog.");
571 help_desc.add_options()(
572 "allowed-import-paths",
573 po::value<std::string>(&allowed_import_paths),
574 "List of allowed root paths that can be used in import operations.");
575 help_desc.add_options()(
576 "allowed-export-paths",
577 po::value<std::string>(&allowed_export_paths),
578 "List of allowed root paths that can be used in export operations.");
579 help_desc.add_options()(
"enable-system-tables",
582 ->implicit_value(
true),
583 "Enable use of system tables.");
584 help_desc.add_options()(
"enable-table-functions",
587 ->implicit_value(
true),
588 "Enable system table functions support.");
589 help_desc.add_options()(
"enable-logs-system-tables",
592 ->implicit_value(
true),
593 "Enable use of logs system tables.");
594 help_desc.add_options()(
"logs-system-tables-refresh-interval",
597 "Refresh interval for logs system tables.");
598 help_desc.add_options()(
599 "logs-system-tables-max-files-count",
602 "Maximum number of log files that will be processed by each logs system table.");
603 #ifdef ENABLE_MEMKIND
604 help_desc.add_options()(
"enable-tiered-cpu-mem",
605 po::value<bool>(&g_enable_tiered_cpu_mem)
606 ->default_value(g_enable_tiered_cpu_mem)
607 ->implicit_value(
true),
608 "Enable additional tiers of CPU memory (PMEM, etc...)");
609 help_desc.add_options()(
"pmem-size", po::value<size_t>(&
g_pmem_size)->default_value(0));
610 help_desc.add_options()(
"pmem-path", po::value<std::string>(&
g_pmem_path));
613 help_desc.add(log_options_.get_options());
617 developer_desc.add_options()(
"dev-options",
"Print internal developer options.");
618 developer_desc.add_options()(
619 "enable-calcite-view-optimize",
620 po::value<bool>(&system_parameters.enable_calcite_view_optimize)
621 ->default_value(system_parameters.enable_calcite_view_optimize)
622 ->implicit_value(
true),
623 "Enable additional calcite (query plan) optimizations when a view is part of the "
625 developer_desc.add_options()(
626 "enable-columnar-output",
629 ->implicit_value(
true),
630 "Enable columnar output for intermediate/final query steps.");
631 developer_desc.add_options()(
632 "enable-left-join-filter-hoisting",
635 ->implicit_value(
true),
636 "Enable hoisting left hand side filters through left joins.");
637 developer_desc.add_options()(
"optimize-row-init",
640 ->implicit_value(
true),
641 "Optimize row initialization.");
642 developer_desc.add_options()(
"enable-legacy-syntax",
643 po::value<bool>(&enable_legacy_syntax)
644 ->default_value(enable_legacy_syntax)
645 ->implicit_value(
true),
646 "Enable legacy syntax.");
647 developer_desc.add_options()(
649 po::value<bool>(&allow_multifrag)
650 ->default_value(allow_multifrag)
651 ->implicit_value(
true),
652 "Enable execution over multiple fragments in a single round-trip to GPU.");
653 developer_desc.add_options()(
"enable-lazy-fetch",
656 ->implicit_value(
true),
657 "Enable lazy fetch columns in query results.");
658 developer_desc.add_options()(
659 "enable-shared-mem-group-by",
662 ->implicit_value(
true),
663 "Enable using GPU shared memory for some GROUP BY queries.");
664 developer_desc.add_options()(
"num-executors",
665 po::value<int>(&system_parameters.num_executors)
666 ->default_value(system_parameters.num_executors),
667 "Number of executors to run in parallel.");
668 developer_desc.add_options()(
669 "gpu-shared-mem-threshold",
671 "GPU shared memory threshold (in bytes). If query requires larger buffers than "
672 "this threshold, we disable those optimizations. 0 (default) means no static cap.");
673 developer_desc.add_options()(
674 "enable-shared-mem-grouped-non-count-agg",
677 ->implicit_value(
true),
678 "Enable using GPU shared memory for grouped non-count aggregate queries.");
679 developer_desc.add_options()(
680 "enable-shared-mem-non-grouped-agg",
683 ->implicit_value(
true),
684 "Enable using GPU shared memory for non-grouped aggregate queries.");
685 developer_desc.add_options()(
"enable-direct-columnarization",
688 ->implicit_value(
true),
689 "Enables/disables a more optimized columnarization method "
690 "for intermediate steps in multi-step queries.");
691 developer_desc.add_options()(
692 "offset-device-by-table-id",
695 ->implicit_value(
true),
696 "Enables/disables offseting the chosen device ID by the table ID for a given "
697 "fragment. This improves balance of fragments across GPUs.");
698 developer_desc.add_options()(
"enable-window-functions",
701 ->implicit_value(
true),
702 "Enable window function support.");
703 developer_desc.add_options()(
704 "enable-parallel-window-partition-compute",
707 ->implicit_value(
true),
708 "Enable parallel window function partition computation.");
709 developer_desc.add_options()(
710 "enable-parallel-window-partition-sort",
713 ->implicit_value(
true),
714 "Enable parallel window function partition sorting.");
715 developer_desc.add_options()(
716 "window-function-frame-aggregation-tree-fanout",
718 "A tree fanout for aggregation tree used to compute aggregation over "
720 developer_desc.add_options()(
"enable-dev-table-functions",
723 ->implicit_value(
true),
724 "Enable dev (test or alpha) table functions. Also "
725 "requires --enable-table-functions to be turned on");
727 developer_desc.add_options()(
728 "enable-geo-ops-on-uncompressed-coords",
731 ->implicit_value(
true),
732 "Enable faster geo operations on uncompressed coords");
733 developer_desc.add_options()(
735 po::value<bool>(&jit_debug)->default_value(jit_debug)->implicit_value(
true),
736 "Enable runtime debugger support for the JIT. Note that this flag is "
738 "with the `ENABLE_JIT_DEBUG` build flag. The generated code can be found at "
739 "`/tmp/mapdquery`.");
740 developer_desc.add_options()(
742 po::value<bool>(&intel_jit_profile)
743 ->default_value(intel_jit_profile)
744 ->implicit_value(
true),
745 "Enable runtime support for the JIT code profiling using Intel VTune.");
746 developer_desc.add_options()(
747 "enable-cpu-sub-tasks",
750 ->implicit_value(
true),
751 "Enable parallel processing of a single data fragment on CPU. This can improve CPU "
752 "load balance and decrease reduction overhead.");
753 developer_desc.add_options()(
756 "Set CPU sub-task size in rows.");
757 developer_desc.add_options()(
758 "skip-intermediate-count",
761 ->implicit_value(
true),
762 "Skip pre-flight counts for intermediate projections with no filters.");
763 developer_desc.add_options()(
764 "strip-join-covered-quals",
767 ->implicit_value(
true),
768 "Remove quals from the filtered count if they are covered by a "
769 "join condition (currently only ST_Contains).");
771 developer_desc.add_options()(
773 po::value<size_t>(&system_parameters.min_cpu_slab_size)
774 ->default_value(system_parameters.min_cpu_slab_size),
775 "Min slab size (size of memory allocations) for CPU buffer pool.");
776 developer_desc.add_options()(
778 po::value<size_t>(&system_parameters.max_cpu_slab_size)
779 ->default_value(system_parameters.max_cpu_slab_size),
780 "Max CPU buffer pool slab size (size of memory allocations). Note if "
781 "there is not enough free memory to accomodate the target slab size, smaller "
782 "slabs will be allocated, down to the minimum size specified by "
783 "min-cpu-slab-size.");
784 developer_desc.add_options()(
786 po::value<size_t>(&system_parameters.min_gpu_slab_size)
787 ->default_value(system_parameters.min_gpu_slab_size),
788 "Min slab size (size of memory allocations) for GPU buffer pools.");
789 developer_desc.add_options()(
791 po::value<size_t>(&system_parameters.max_gpu_slab_size)
792 ->default_value(system_parameters.max_gpu_slab_size),
793 "Max GPU buffer pool slab size (size of memory allocations). Note if "
794 "there is not enough free memory to accomodate the target slab size, smaller "
795 "slabs will be allocated, down to the minimum size speified by "
796 "min-gpu-slab-size.");
798 developer_desc.add_options()(
799 "max-output-projection-allocation-bytes",
802 "Maximum allocation size for a fixed output buffer allocation for projection "
803 "queries with no pre-flight count. Default is the maximum slab size (sizes "
805 "than the maximum slab size have no affect). Requires bump allocator.");
806 developer_desc.add_options()(
807 "min-output-projection-allocation-bytes",
810 "Minimum allocation size for a fixed output buffer allocation for projection "
811 "queries with no pre-flight count. If an allocation of this size cannot be "
812 "obtained, the query will be retried with different execution parameters and/or "
814 "CPU (if allow-cpu-retry is enabled). Requires bump allocator.");
815 developer_desc.add_options()(
"enable-bump-allocator",
818 ->implicit_value(
true),
819 "Enable the bump allocator for projection queries on "
820 "GPU. The bump allocator will "
821 "allocate a fixed size buffer for each query, track the "
822 "number of rows passing the "
823 "kernel during query execution, and copy back only the "
824 "rows that passed the kernel "
825 "to CPU after execution. When disabled, pre-flight "
826 "count queries are used to size "
827 "the output buffer for projection queries.");
828 developer_desc.add_options()(
829 "code-cache-eviction-percent",
832 "Percentage of the GPU code cache to evict if an out of memory error is "
833 "encountered while attempting to place generated code on the GPU.");
835 developer_desc.add_options()(
"ssl-cert",
836 po::value<std::string>(&system_parameters.ssl_cert_file)
837 ->default_value(std::string(
"")),
838 "SSL Validated public certficate.");
840 developer_desc.add_options()(
"ssl-private-key",
841 po::value<std::string>(&system_parameters.ssl_key_file)
842 ->default_value(std::string(
"")),
843 "SSL private key file.");
846 developer_desc.add_options()(
"ssl-trust-store",
847 po::value<std::string>(&system_parameters.ssl_trust_store)
848 ->default_value(std::string(
"")),
849 "SSL public CA certifcates (java trust store) to validate "
850 "TLS connections (passed through to the Calcite server).");
852 developer_desc.add_options()(
853 "ssl-trust-password",
854 po::value<std::string>(&system_parameters.ssl_trust_password)
855 ->default_value(std::string(
"")),
856 "SSL password for java trust store provided via --ssl-trust-store parameter.");
858 developer_desc.add_options()(
860 po::value<std::string>(&system_parameters.ssl_trust_ca_file)
861 ->default_value(std::string(
"")),
862 "SSL public CA certificates to validate TLS connection(as a client).");
864 developer_desc.add_options()(
865 "ssl-trust-ca-server",
866 po::value<std::string>(&authMetadata.ca_file_name)->default_value(std::string(
"")),
867 "SSL public CA certificates to validate TLS connection(as a server).");
869 developer_desc.add_options()(
"ssl-keystore",
870 po::value<std::string>(&system_parameters.ssl_keystore)
871 ->default_value(std::string(
"")),
872 "SSL server credentials as a java key store (passed "
873 "through to the Calcite server).");
875 developer_desc.add_options()(
876 "ssl-keystore-password",
877 po::value<std::string>(&system_parameters.ssl_keystore_password)
878 ->default_value(std::string(
"")),
879 "SSL password for java keystore, provide by via --ssl-keystore.");
881 developer_desc.add_options()(
883 po::value<std::string>(&udf_file_name),
884 "Load user defined extension functions from this file at startup. The file is "
885 "expected to be a C/C++ file with extension .cpp.");
887 developer_desc.add_options()(
889 po::value<std::string>(&udf_compiler_path),
890 "Provide absolute path to clang++ used in udf compilation.");
892 developer_desc.add_options()(
"udf-compiler-options",
893 po::value<std::vector<std::string>>(&udf_compiler_options),
894 "Specify compiler options to tailor udf compilation.");
897 developer_desc.add_options()(
"libgeos-so-filename",
898 po::value<std::string>(&libgeos_so_filename),
899 "Specify libgeos shared object filename to be used for "
900 "geos-backed geo opertations.");
902 developer_desc.add_options()(
903 "large-ndv-threshold",
905 developer_desc.add_options()(
906 "large-ndv-multiplier",
908 developer_desc.add_options()(
"approx_quantile_buffer",
911 developer_desc.add_options()(
"approx_quantile_centroids",
914 developer_desc.add_options()(
915 "bitmap-memory-limit",
917 "Limit for count distinct bitmap memory use. The limit is computed by taking the "
918 "size of the group by buffer (entry count in Query Memory Descriptor) and "
919 "multiplying it by the number of count distinct expression and the size of bitmap "
920 "required for each. For approx_count_distinct this is typically 8192 bytes.");
921 developer_desc.add_options()(
922 "enable-filter-function",
925 ->implicit_value(
true),
926 "Enable the filter function protection feature for the SQL JIT compiler. "
927 "Normally should be on but techs might want to disable for troubleshooting.");
928 developer_desc.add_options()(
929 "enable-idp-temporary-users",
932 ->implicit_value(
true),
933 "Enable temporary users for SAML and LDAP logins on read-only servers. "
934 "Normally should be on but techs might want to disable for troubleshooting.");
935 developer_desc.add_options()(
936 "enable-seconds-refresh-interval",
939 ->implicit_value(
true),
940 "Enable foreign table seconds refresh interval for testing purposes.");
941 developer_desc.add_options()(
"enable-auto-metadata-update",
944 ->implicit_value(
true),
945 "Enable automatic metadata update.");
946 developer_desc.add_options()(
949 "For ResultSets requiring a heap sort, the number of rows necessary to trigger "
950 "parallelTop() to sort.");
951 developer_desc.add_options()(
954 "For ResultSets requiring a heap sort, the maximum number of rows allowed by "
956 developer_desc.add_options()(
957 "streaming-top-n-max",
959 "The maximum number of rows allowing streaming top-N sorting.");
960 developer_desc.add_options()(
"vacuum-min-selectivity",
963 "Minimum selectivity for automatic vacuuming. "
964 "This specifies the percentage (with a value of 0 "
965 "implying 0% and a value of 1 implying 100%) of "
966 "deleted rows in a fragment at which to perform "
967 "automatic vacuuming. A number greater than 1 can "
968 "be used to disable automatic vacuuming.");
969 developer_desc.add_options()(
"enable-automatic-ir-metadata",
972 ->implicit_value(
true),
973 "Enable automatic IR metadata (debug builds only).");
974 developer_desc.add_options()(
977 "The maximum number of characters that a log message can has. If the log message "
978 "is longer than this, we only record \'g_max_log_message_length\' characters.");
979 developer_desc.add_options()(
980 "estimator-failure-max-groupby-size",
983 "Maximum size of the groupby buffer if the estimator fails. By default we use the "
984 "number of tuples in the table up to this value.");
985 developer_desc.add_options()(
"columnar-large-projections",
988 ->implicit_value(
true),
989 "Prefer columnar output if projection size is >= "
990 "threshold set by --columnar-large-projections-threshold "
991 "(default 1,000,000 rows).");
992 developer_desc.add_options()(
993 "columnar-large-projections-threshold",
996 "Threshold (in minimum number of rows) to prefer columnar output for projections. "
997 "Requires --columnar-large-projections to be set.");
999 help_desc.add_options()(
1000 "allow-query-step-cpu-retry",
1003 ->implicit_value(
true),
1004 R
"(Allow certain query steps to retry on CPU, even when allow-cpu-retry is disabled)");
1005 help_desc.add_options()("enable-http-binary-server",
1008 ->implicit_value(
true),
1009 "Enable binary over HTTP Thrift server");
1011 help_desc.add_options()(
"enable-assign-render-groups",
1014 ->implicit_value(
true),
1015 "Enable Render Group assignment");
1017 help_desc.add_options()(
"enable-query-engine-cuda-streams",
1020 ->implicit_value(
true),
1021 "Enable Query Engine CUDA streams");
1028 std::stringstream ss;
1030 while (std::getline(in, line)) {
1032 if (line ==
"[web]") {
1040 if (!filename.empty()) {
1041 boost::algorithm::trim_if(filename, boost::is_any_of(
"\"'"));
1042 if (!boost::filesystem::exists(filename)) {
1043 std::cerr << desc <<
" " << filename <<
" does not exist." << std::endl;
1051 if (!filename.empty()) {
1059 boost::algorithm::trim_if(base_path, boost::is_any_of(
"\"'"));
1060 if (!boost::filesystem::exists(base_path)) {
1061 throw std::runtime_error(
"HeavyDB base directory does not exist at " + base_path);
1066 boost::algorithm::trim_if(base_path, boost::is_any_of(
"\"'"));
1068 if (!boost::filesystem::exists(
data_path)) {
1069 throw std::runtime_error(
"HeavyDB data directory does not exist at '" + base_path +
1080 auto exe_filename = boost::filesystem::path(exe_name).filename().string();
1081 const std::string lock_file =
1082 (boost::filesystem::path(base_path) / std::string(exe_filename +
"_pid.lck"))
1086 VLOG(1) <<
"taking [" << lock_file <<
"] read+write lock until process exit";
1088 VLOG(1) <<
"taking [" << lock_file <<
"] read-only lock until process exit";
1094 throw std::runtime_error(
"failed to open lockfile: " + lock_file +
": " +
1095 std::string(strerror(errno)) +
" (" +
1100 memset(&fl, 0,
sizeof(fl));
1102 fl.l_whence = SEEK_SET;
1111 if (ret == -1 && (errno == EACCES || errno == EAGAIN)) {
1113 throw std::runtime_error(
1114 "another HeavyDB server instance is already using data directory: " +
1116 }
else if (ret == -1) {
1117 auto errno0 = errno;
1119 throw std::runtime_error(
"failed to lock lockfile: " + lock_file +
": " +
1120 std::string(strerror(errno0)) +
" (" +
1126 auto errno0 = errno;
1128 throw std::runtime_error(
"failed to truncate lockfile: " + lock_file +
": " +
1129 std::string(strerror(errno0)) +
" (" +
1133 auto errno0 = errno;
1135 throw std::runtime_error(
"failed to write lockfile: " + lock_file +
": " +
1136 std::string(strerror(errno0)) +
" (" +
1145 boost::algorithm::trim_if(db_query_file, boost::is_any_of(
"\"'"));
1146 if (db_query_file.length() > 0 && !boost::filesystem::exists(db_query_file)) {
1147 throw std::runtime_error(
"File containing DB queries " + db_query_file +
1148 " does not exist.");
1150 const auto db_file = boost::filesystem::path(base_path) /
1152 if (!boost::filesystem::exists(db_file)) {
1154 const auto db_file =
1156 if (!boost::filesystem::exists(db_file)) {
1158 " does not exist.");
1162 if (license_path.length() == 0) {
1167 LOG(
INFO) <<
"HeavyDB started with data directory at '" << base_path <<
"'";
1168 if (vm.count(
"license-path")) {
1169 LOG(
INFO) <<
"License key path set to '" << license_path <<
"'";
1172 LOG(
INFO) <<
" Server read-only mode is " << read_only <<
" (--read-only)";
1175 <<
" (--multi-instance)";
1177 #if DISABLE_CONCURRENCY
1178 LOG(
INFO) <<
" Threading layer: serial";
1180 LOG(
INFO) <<
" Threading layer: TBB";
1182 LOG(
INFO) <<
" Threading layer: std";
1184 LOG(
INFO) <<
" Watchdog is set to " << enable_watchdog;
1185 LOG(
INFO) <<
" Dynamic Watchdog is set to " << enable_dynamic_watchdog;
1186 if (enable_dynamic_watchdog) {
1187 LOG(
INFO) <<
" Dynamic Watchdog timeout is set to " << dynamic_watchdog_time_limit;
1189 LOG(
INFO) <<
" Runtime query interrupt is set to " << enable_runtime_query_interrupt;
1190 if (enable_runtime_query_interrupt) {
1191 LOG(
INFO) <<
" A frequency of checking pending query interrupt request is set to "
1192 << pending_query_interrupt_freq <<
" (in ms.)";
1193 LOG(
INFO) <<
" A frequency of checking running query interrupt request is set to "
1194 << running_query_interrupt_freq <<
" (0.0 ~ 1.0)";
1196 LOG(
INFO) <<
" Non-kernel time query interrupt is set to "
1197 << enable_non_kernel_time_query_interrupt;
1201 LOG(
INFO) <<
" Maximum idle session duration " << idle_session_duration;
1202 LOG(
INFO) <<
" Maximum active session duration " << max_session_duration;
1203 LOG(
INFO) <<
" Maximum number of sessions " << system_parameters.num_sessions;
1206 #ifdef ENABLE_IMPORT_PARQUET
1207 LOG(
INFO) <<
"Legacy parquet import is set to " << g_enable_legacy_parquet_import;
1211 LOG(
INFO) <<
"Allowed import paths is set to " << allowed_import_paths;
1212 LOG(
INFO) <<
"Allowed export paths is set to " << allowed_export_paths;
1214 base_path, allowed_import_paths, allowed_export_paths);
1228 #ifdef ENABLE_IMPORT_PARQUET
1229 !g_enable_legacy_parquet_import ||
1236 if (disk_cache_level ==
"foreign_tables") {
1239 LOG(
INFO) <<
"Disk cache enabled for foreign tables only";
1241 LOG(
INFO) <<
"Cannot enable disk cache for fsi when fsi is disabled. Defaulted to "
1242 "disk cache disabled";
1244 }
else if (disk_cache_level ==
"all") {
1246 LOG(
INFO) <<
"Disk cache enabled for all tables";
1247 }
else if (disk_cache_level ==
"local_tables") {
1249 LOG(
INFO) <<
"Disk cache enabled for non-FSI tables";
1250 }
else if (disk_cache_level ==
"none") {
1252 LOG(
INFO) <<
"Disk cache disabled";
1254 throw std::runtime_error{
1255 "Unexpected \"disk-cache-level\" value: " + disk_cache_level +
1256 ". Valid options are 'foreign_tables', "
1257 "'local_tables', 'none', and 'all'."};
1261 throw std::runtime_error{
"disk-cache-size must be at least " +
1265 if (disk_cache_config.path.empty()) {
1284 throw std::runtime_error{
"vacuum-min-selectivity cannot be less than 0."};
1294 LOG(
INFO) <<
"FSI has been enabled as a side effect of enabling system tables";
1300 static const boost::regex interval_regex{
"^\\d{1,}[SHD]$",
1301 boost::regex::extended | boost::regex::icase};
1303 throw std::runtime_error{
1304 "Invalid interval value provided for the \"logs-system-tables-refresh-interval\" "
1305 "option. Interval should have the following format: nS, nH, or nD"};
1307 LOG(
INFO) <<
"Logs system tables refresh interval set to "
1311 throw std::runtime_error{
1312 "Invalid value provided for the \"logs-system-tables-max-files-count\" "
1313 "option. Value must be greater than 0."};
1315 LOG(
INFO) <<
"Maximum number of logs system table files set to "
1318 #ifdef ENABLE_MEMKIND
1319 if (g_enable_tiered_cpu_mem) {
1321 throw std::runtime_error{
"pmem-path must be set to use tiered cpu memory"};
1324 throw std::runtime_error{
"pmem-size must be set to use tiered cpu memory"};
1326 if (!std::filesystem::exists(
g_pmem_path.c_str())) {
1327 throw std::runtime_error{
"path to PMem directory (" +
g_pmem_path +
1328 ") does not exist."};
1335 const bool enable_runtime_udfs,
1336 const bool enable_udf_registration_for_all_users) {
1337 return enable_runtime_udfs
1338 ? (enable_udf_registration_for_all_users
1347 char const*
const* argv,
1348 const bool should_init_logging) {
1349 po::options_description all_desc(
"All options");
1350 all_desc.add(help_desc).add(developer_desc);
1353 po::store(po::command_line_parser(argc, argv)
1355 .positional(positional_options)
1360 if (vm.count(
"help")) {
1361 std::cerr <<
"Usage: heavydb <data directory path> [-p <port number>] "
1362 "[--http-port <http port number>] [--flush-log] [--version|-v]"
1365 std::cout << help_desc << std::endl;
1368 if (vm.count(
"dev-options")) {
1369 std::cout <<
"Usage: heavydb <data directory path> [-p <port number>] "
1370 "[--http-port <http port number>] [--flush-log] [--version|-v]"
1373 std::cout << developer_desc << std::endl;
1376 if (vm.count(
"version")) {
1377 std::cout <<
"HeavyDB Version: " <<
MAPD_RELEASE << std::endl;
1381 if (vm.count(
"config")) {
1382 std::ifstream settings_file(system_parameters.config_file);
1386 po::store(po::parse_config_file(sanitized_settings, all_desc,
false), vm);
1388 settings_file.close();
1393 <<
"The enable-union option is DEPRECATED and is now enabled by default. "
1394 "Please remove use of this option, as it may be disabled in the future."
1399 boost::algorithm::trim_if(base_path, boost::is_any_of(
"\"'"));
1403 if (!boost::filesystem::exists(lockfiles_path)) {
1404 if (!boost::filesystem::create_directory(lockfiles_path)) {
1405 std::cerr <<
"Cannot create " + shared::kLockfilesDirectoryName +
1406 " subdirectory under "
1407 << base_path << std::endl;
1412 if (!boost::filesystem::exists(lockfiles_path2)) {
1413 if (!boost::filesystem::create_directory(lockfiles_path2)) {
1414 std::cerr <<
"Cannot create " + shared::kLockfilesDirectoryName +
"/" +
1415 shared::kCatalogDirectoryName +
" subdirectory under "
1416 << base_path << std::endl;
1421 if (!boost::filesystem::exists(lockfiles_path3)) {
1422 if (!boost::filesystem::create_directory(lockfiles_path3)) {
1423 std::cerr <<
"Cannot create " + shared::kLockfilesDirectoryName +
"/" +
1424 shared::kDataDirectoryName +
" subdirectory under "
1425 << base_path << std::endl;
1434 if (!vm[
"enable-runtime-udf"].defaulted()) {
1435 if (!vm[
"enable-runtime-udfs"].defaulted()) {
1436 std::cerr <<
"Usage Error: Both enable-runtime-udf and enable-runtime-udfs "
1437 "specified. Please remove use of the enable-runtime-udfs flag, "
1438 "as it will be deprecated in the future."
1442 enable_runtime_udfs = enable_runtime_udf;
1443 std::cerr <<
"The enable-runtime-udf flag has been deprecated and replaced "
1444 "with enable-runtime-udfs. Please remove use of this option "
1445 "as it will be disabled in the future."
1449 system_parameters.runtime_udf_registration_policy =
1451 enable_udf_registration_for_all_users);
1453 if (should_init_logging) {
1464 "ssl trust store")) {
1479 watchdog_none_encoded_string_translation_limit;
1492 }
catch (po::error& e) {
1493 std::cerr <<
"Usage Error: " << e.what() << std::endl;
1497 if (g_hll_precision_bits < 1 || g_hll_precision_bits > 16) {
1498 std::cerr <<
"hll-precision-bits must be between 1 and 16." << std::endl;
1503 LOG(
INFO) <<
" From clause table reordering is disabled";
1507 LOG(
INFO) <<
" Filter push down for JOIN is enabled";
1510 if (vm.count(
"udf")) {
1511 boost::algorithm::trim_if(udf_file_name, boost::is_any_of(
"\"'"));
1513 if (!boost::filesystem::exists(udf_file_name)) {
1514 LOG(
ERROR) <<
" User defined function file " << udf_file_name <<
" does not exist.";
1518 LOG(
INFO) <<
" User provided extension functions loaded from " << udf_file_name;
1521 if (vm.count(
"udf-compiler-path")) {
1522 boost::algorithm::trim_if(udf_compiler_path, boost::is_any_of(
"\"'"));
1525 auto trim_string = [](std::string& s) {
1526 boost::algorithm::trim_if(s, boost::is_any_of(
"\"'"));
1529 if (vm.count(
"udf-compiler-options")) {
1530 std::for_each(udf_compiler_options.begin(), udf_compiler_options.end(), trim_string);
1533 boost::algorithm::trim_if(system_parameters.ha_brokers, boost::is_any_of(
"\"'"));
1534 boost::algorithm::trim_if(system_parameters.ha_group_id, boost::is_any_of(
"\"'"));
1535 boost::algorithm::trim_if(system_parameters.ha_shared_data, boost::is_any_of(
"\"'"));
1536 boost::algorithm::trim_if(system_parameters.ha_unique_server_id,
1537 boost::is_any_of(
"\"'"));
1539 if (!system_parameters.ha_group_id.empty()) {
1540 LOG(
INFO) <<
" HA group id " << system_parameters.ha_group_id;
1541 if (system_parameters.ha_unique_server_id.empty()) {
1542 LOG(
ERROR) <<
"Starting server in HA mode --ha-unique-server-id must be set ";
1545 LOG(
INFO) <<
" HA unique server id " << system_parameters.ha_unique_server_id;
1547 if (system_parameters.ha_brokers.empty()) {
1548 LOG(
ERROR) <<
"Starting server in HA mode --ha-brokers must be set ";
1551 LOG(
INFO) <<
" HA brokers " << system_parameters.ha_brokers;
1553 if (system_parameters.ha_shared_data.empty()) {
1554 LOG(
ERROR) <<
"Starting server in HA mode --ha-shared-data must be set ";
1557 LOG(
INFO) <<
" HA shared data is " << system_parameters.ha_shared_data;
1561 boost::algorithm::trim_if(system_parameters.master_address, boost::is_any_of(
"\"'"));
1562 if (!system_parameters.master_address.empty()) {
1564 LOG(
ERROR) <<
"The master-address setting is only allowed in read-only mode";
1567 LOG(
INFO) <<
" Master Address is " << system_parameters.master_address;
1568 LOG(
INFO) <<
" Master Port is " << system_parameters.master_port;
1573 <<
")." << std::endl;
1579 LOG(
INFO) <<
" cuda block size " << system_parameters.cuda_block_size;
1580 LOG(
INFO) <<
" cuda grid size " << system_parameters.cuda_grid_size;
1581 LOG(
INFO) <<
" Min CPU buffer pool slab size " << system_parameters.min_cpu_slab_size;
1582 LOG(
INFO) <<
" Max CPU buffer pool slab size " << system_parameters.max_cpu_slab_size;
1583 LOG(
INFO) <<
" Min GPU buffer pool slab size " << system_parameters.min_gpu_slab_size;
1584 LOG(
INFO) <<
" Max GPU buffer pool slab size " << system_parameters.max_gpu_slab_size;
1585 LOG(
INFO) <<
" calcite JVM max memory " << system_parameters.calcite_max_mem;
1586 LOG(
INFO) <<
" HeavyDB Server Port " << system_parameters.omnisci_server_port;
1587 LOG(
INFO) <<
" HeavyDB Calcite Port " << system_parameters.calcite_port;
1588 LOG(
INFO) <<
" Enable Calcite view optimize "
1589 << system_parameters.enable_calcite_view_optimize;
1590 LOG(
INFO) <<
" Allow Local Auth Fallback: "
1591 << (authMetadata.allowLocalAuthFallback ?
"enabled" :
"disabled");
1595 LOG(
INFO) <<
" Enable Data Recycler: "
1598 LOG(
INFO) <<
" \t Use hashtable cache: "
1601 LOG(
INFO) <<
" \t\t Total amount of bytes that hashtable cache keeps: "
1603 LOG(
INFO) <<
" \t\t Per-hashtable size limit: "
1606 LOG(
INFO) <<
" \t Use query resultset cache: "
1609 LOG(
INFO) <<
" \t\t Total amount of bytes that query resultset cache keeps: "
1611 LOG(
INFO) <<
" \t\t Per-query resultset size limit: "
1614 LOG(
INFO) <<
" \t\t Use auto query resultset caching: "
1617 LOG(
INFO) <<
" \t\t\t The maximum bytes of a query resultset which is "
1618 "automatically cached: "
1621 LOG(
INFO) <<
" \t\t Use query step skipping: "
1623 LOG(
INFO) <<
" \t Use chunk metadata cache: "
1627 const std::string udf_reg_policy_log_prefix{
1628 " \t\t Runtime UDF/UDTF Registration Policy: "};
1629 switch (system_parameters.runtime_udf_registration_policy) {
1631 LOG(
INFO) << udf_reg_policy_log_prefix <<
" DISALLOWED";
1635 LOG(
INFO) << udf_reg_policy_log_prefix <<
" ALLOWED for superusers only";
1639 LOG(
INFO) << udf_reg_policy_log_prefix <<
" ALLOWED for all users";
1643 UNREACHABLE() <<
"Unrecognized option for Runtime UDF/UDTF registration policy.";
1647 boost::algorithm::trim_if(authMetadata.distinguishedName, boost::is_any_of(
"\"'"));
1648 boost::algorithm::trim_if(authMetadata.uri, boost::is_any_of(
"\"'"));
1649 boost::algorithm::trim_if(authMetadata.ldapQueryUrl, boost::is_any_of(
"\"'"));
1650 boost::algorithm::trim_if(authMetadata.ldapRoleRegex, boost::is_any_of(
"\"'"));
1651 boost::algorithm::trim_if(authMetadata.ldapSuperUserRole, boost::is_any_of(
"\"'"));
int64_t g_large_ndv_threshold
bool g_use_table_device_offset
bool g_enable_parallel_window_partition_sort
bool g_enable_left_join_filter_hoisting
double g_running_query_interrupt_freq
bool g_enable_smem_group_by
size_t g_parallel_top_max
int safe_open(const char *path, int flags, mode_t mode) noexcept
float g_filter_push_down_low_frac
const std::string kDataDirectoryName
bool g_use_query_resultset_cache
size_t g_cpu_sub_task_size
static size_t getMinimumSize()
SystemParameters::RuntimeUdfRegistrationPolicy construct_runtime_udf_registration_policy(const bool enable_runtime_udfs, const bool enable_udf_registration_for_all_users)
bool trim_and_check_file_exists(std::string &filename, const std::string desc)
bool g_strip_join_covered_quals
bool g_enable_logs_system_tables
bool g_enable_direct_columnarization
static void initialize(const std::string &data_dir, const std::string &allowed_import_paths, const std::string &allowed_export_paths)
const std::string kDefaultDiskCacheDirName
bool g_enable_legacy_delimited_import
bool g_skip_intermediate_count
unsigned g_pending_query_interrupt_freq
bool g_allow_query_step_skipping
size_t g_logs_system_tables_max_files_count
bool g_enable_debug_timer
const std::string kDefaultLogDirName
const std::string kSystemCatalogName
bool g_enable_auto_metadata_update
size_t g_filter_push_down_passing_row_ubound
boost::optional< int > parse_command_line(int argc, char const *const *argv, const bool should_init_logging=false)
void addOptionalFileToBlacklist(std::string &filename)
size_t g_streaming_topn_max
bool g_enable_dynamic_watchdog
size_t g_hashtable_cache_total_bytes
unsigned g_trivial_loop_join_threshold
bool g_enable_geo_ops_on_uncompressed_coords
bool g_enable_non_kernel_time_query_interrupt
void fillAdvancedOptions()
bool g_enable_data_recycler
bool g_enable_overlaps_hashjoin
bool g_inner_join_fragment_skipping
bool g_use_chunk_metadata_cache
size_t g_max_cacheable_hashtable_size_bytes
bool g_enable_string_functions
bool g_enable_smem_non_grouped_agg
size_t g_watchdog_none_encoded_string_translation_limit
size_t g_parallel_top_min
bool g_enable_columnar_output
ssize_t safe_write(const int fd, const void *buffer, const size_t buffer_size) noexcept
bool g_enable_idp_temporary_users
bool g_from_table_reordering
size_t g_window_function_aggregation_tree_fanout
static void setDefaultImportPath(const std::string &base_path)
singleton class to handle concurrancy and state for blosc library. A C++ wrapper over a pure C librar...
bool g_enable_assign_render_groups
bool g_enable_hashjoin_many_to_many
bool g_enable_system_tables
void init(LogOptions const &log_opts)
std::string g_logs_system_tables_refresh_interval
bool g_enable_http_binary_server
static bool migrationEnabled()
float g_filter_push_down_high_frac
bool g_enable_distance_rangejoin
int64_t g_bitmap_memory_limit
size_t g_max_memory_allocation_size
double g_overlaps_target_entries_per_bin
size_t g_approx_quantile_buffer
bool g_allow_auto_resultset_caching
size_t g_overlaps_max_table_size_bytes
bool g_enable_dev_table_functions
Global bool for controlling render group assignment, remove along with legacy poly rendering...
size_t g_query_resultset_cache_total_bytes
bool g_enable_window_functions
size_t g_max_cacheable_query_resultset_size_bytes
size_t g_min_memory_allocation_size
static void executeRebrandMigration(const std::string &base_path)
static void takeMigrationLock(const std::string &base_path)
bool g_enable_seconds_refresh
bool g_enable_fsi_regex_import
void validate_base_path()
size_t g_estimator_failure_max_groupby_size
std::stringstream sanitize_config_file(std::ifstream &in)
bool g_enable_smem_grouped_non_count_agg
float g_vacuum_min_selectivity
static const std::string nodeIds_token
bool g_enable_filter_function
const std::string kCatalogDirectoryName
float g_fraction_code_cache_to_evict
bool g_allow_system_dashboard_update
std::string filename(char const *path)
bool g_enable_filter_push_down
bool g_use_estimator_result_cache
const std::string kDefaultLicenseFileName
bool g_enable_bump_allocator
bool g_enable_parallel_window_partition_compute
RuntimeUdfRegistrationPolicy
bool g_enable_cpu_sub_tasks
bool g_allow_query_step_cpu_retry
int32_t ftruncate(const int32_t fd, int64_t length)
size_t g_approx_quantile_centroids
const std::string kLockfilesDirectoryName
static void addToBlacklist(const std::string &path)
bool g_enable_stringdict_parallel
static const std::string MAPD_RELEASE
bool g_optimize_row_initialization
int safe_fcntl(int fd, int cmd, struct flock *fl) noexcept
bool g_columnar_large_projections
int safe_close(int fd) noexcept
unsigned g_dynamic_watchdog_time_limit
size_t g_columnar_large_projections_threshold
bool g_query_engine_cuda_streams
bool g_allow_s3_server_privileges
bool g_enable_thrift_logs
bool g_enable_add_metadata_columns
bool g_enable_runtime_query_interrupt
size_t g_max_import_threads
bool g_use_hashtable_cache
size_t g_auto_resultset_caching_threshold
size_t g_large_ndv_multiplier
bool g_enable_table_functions
std::string cluster_command_line_arg
size_t g_gpu_smem_threshold