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 NVIDIA 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 NVIDIA GPU.");
144 help_desc.add_options()(
"optimize-cuda-block-and-grid-sizes",
145 po::value<bool>(&optimize_cuda_block_and_grid_sizes)
146 ->default_value(
false)
147 ->implicit_value(
true));
149 help_desc.add_options()(
151 po::value<std::string>(&base_path)->
required()->default_value(
"storage"),
152 "Directory path to HeavyDB data storage (catalogs, raw data, log files, etc).");
153 positional_options.add(
"data", 1);
155 help_desc.add_options()(
"db-query-list",
156 po::value<std::string>(&db_query_file),
157 "Path to file containing HeavyDB warmup queries.");
158 help_desc.add_options()(
160 po::value<bool>(&exit_after_warmup)->default_value(
false)->implicit_value(
true),
161 "Exit after HeavyDB warmup queries.");
162 help_desc.add_options()(
"dynamic-watchdog-time-limit",
163 po::value<unsigned>(&dynamic_watchdog_time_limit)
164 ->default_value(dynamic_watchdog_time_limit)
165 ->implicit_value(10000),
166 "Dynamic watchdog time limit, in milliseconds.");
167 help_desc.add_options()(
"enable-data-recycler",
168 po::value<bool>(&enable_data_recycler)
169 ->default_value(enable_data_recycler)
170 ->implicit_value(
true),
171 "Use data recycler.");
172 help_desc.add_options()(
"use-hashtable-cache",
173 po::value<bool>(&use_hashtable_cache)
174 ->default_value(use_hashtable_cache)
175 ->implicit_value(
true),
176 "Use hashtable cache.");
177 help_desc.add_options()(
"use-query-resultset-cache",
180 ->implicit_value(
true),
181 "Use query resultset cache.");
182 help_desc.add_options()(
"use-chunk-metadata-cache",
185 ->implicit_value(
true),
186 "Use chunk metadata cache.");
187 help_desc.add_options()(
188 "hashtable-cache-total-bytes",
189 po::value<size_t>(&hashtable_cache_total_bytes)
190 ->default_value(hashtable_cache_total_bytes)
191 ->implicit_value(4294967296),
192 "Size of total memory space for hashtable cache, in bytes (default: 4GB).");
193 help_desc.add_options()(
"max-cacheable-hashtable-size-bytes",
194 po::value<size_t>(&max_cacheable_hashtable_size_bytes)
195 ->default_value(max_cacheable_hashtable_size_bytes)
196 ->implicit_value(2147483648),
197 "The maximum size of hashtable that is available to cache, in "
198 "bytes (default: 2GB).");
199 help_desc.add_options()(
200 "query-resultset-cache-total-bytes",
203 "Size of total memory space for query resultset cache, in bytes (default: 4GB).");
204 help_desc.add_options()(
205 "max-query-resultset-size-bytes",
208 "The maximum size of query resultset that is available to cache, in "
209 "bytes (default: 2GB).");
210 help_desc.add_options()(
"allow-auto-query-resultset-caching",
213 ->implicit_value(
true),
214 "Allow automatic query resultset caching when the size of "
215 "query resultset is smaller or equal to the threshold defined "
216 "by `auto-resultset-caching-threshold-bytes`, in bytes (to "
217 "enable this, query resultset recycler "
218 "should be enabled, default: 1048576 bytes (or 1MB)).");
219 help_desc.add_options()(
220 "auto-resultset-caching-threshold-bytes",
223 "A threshold that allows caching query resultset automatically if the size of "
224 "resultset is less than it, in bytes (default: 1MB).");
225 help_desc.add_options()(
"allow-query-step-skipping",
228 ->implicit_value(
true),
229 "Allow query step skipping when multi-step query has at least "
230 "one cached query resultset.");
231 help_desc.add_options()(
"enable-debug-timer",
234 ->implicit_value(
true),
235 "Enable debug timer logging.");
236 help_desc.add_options()(
"enable-dynamic-watchdog",
237 po::value<bool>(&enable_dynamic_watchdog)
238 ->default_value(enable_dynamic_watchdog)
239 ->implicit_value(
true),
240 "Enable dynamic watchdog.");
241 help_desc.add_options()(
"enable-filter-push-down",
244 ->implicit_value(
true),
245 "Enable filter push down through joins.");
246 help_desc.add_options()(
"enable-overlaps-hashjoin",
249 ->implicit_value(
true),
250 "Enable the overlaps hash join framework allowing for range "
251 "join (e.g. spatial overlaps) computation using a hash table.");
252 help_desc.add_options()(
"enable-hashjoin-many-to-many",
255 ->implicit_value(
true),
256 "Enable the overlaps hash join framework allowing for range "
257 "join (e.g. spatial overlaps) computation using a hash table.");
258 help_desc.add_options()(
"enable-distance-rangejoin",
261 ->implicit_value(
true),
262 "Enable accelerating point distance joins with a hash table. "
263 "This rewrites ST_Distance when using an upperbound (<= X).");
264 help_desc.add_options()(
"enable-runtime-query-interrupt",
265 po::value<bool>(&enable_runtime_query_interrupt)
266 ->default_value(enable_runtime_query_interrupt)
267 ->implicit_value(
true),
268 "Enable runtime query interrupt.");
269 help_desc.add_options()(
"enable-non-kernel-time-query-interrupt",
270 po::value<bool>(&enable_non_kernel_time_query_interrupt)
271 ->default_value(enable_non_kernel_time_query_interrupt)
272 ->implicit_value(
true),
273 "Enable non-kernel time query interrupt.");
274 help_desc.add_options()(
"pending-query-interrupt-freq",
275 po::value<unsigned>(&pending_query_interrupt_freq)
276 ->default_value(pending_query_interrupt_freq)
277 ->implicit_value(1000),
278 "A frequency of checking the request of pending query "
279 "interrupt from user (in millisecond).");
280 help_desc.add_options()(
281 "running-query-interrupt-freq",
282 po::value<double>(&running_query_interrupt_freq)
283 ->default_value(running_query_interrupt_freq)
284 ->implicit_value(0.5),
285 "A frequency of checking the request of running query "
286 "interrupt from user (0.0 (less frequent) ~ (more frequent) 1.0).");
287 help_desc.add_options()(
"use-estimator-result-cache",
288 po::value<bool>(&use_estimator_result_cache)
289 ->default_value(use_estimator_result_cache)
290 ->implicit_value(
true),
291 "Use estimator result cache.");
293 help_desc.add_options()(
294 "enable-string-dict-hash-cache",
297 ->implicit_value(
true),
298 "Cache string hash values in the string dictionary server during import.");
300 help_desc.add_options()(
301 "enable-thrift-logs",
304 ->implicit_value(
true),
305 "Enable writing messages directly from thrift to stdout/stderr.");
306 help_desc.add_options()(
"enable-watchdog",
307 po::value<bool>(&enable_watchdog)
308 ->default_value(enable_watchdog)
309 ->implicit_value(
true),
311 help_desc.add_options()(
312 "watchdog-none-encoded-string-translation-limit",
313 po::value<size_t>(&watchdog_none_encoded_string_translation_limit)
314 ->default_value(watchdog_none_encoded_string_translation_limit),
315 "Max number of none-encoded strings allowed to be translated "
316 "to dictionary-encoded with watchdog enabled");
317 help_desc.add_options()(
318 "filter-push-down-low-frac",
322 "Lower threshold for selectivity of filters that are pushed down.");
323 help_desc.add_options()(
324 "filter-push-down-high-frac",
328 "Higher threshold for selectivity of filters that are pushed down.");
329 help_desc.add_options()(
"filter-push-down-passing-row-ubound",
333 "Upperbound on the number of rows that should pass the filter "
334 "if the selectivity is less than "
335 "the high fraction threshold.");
336 help_desc.add_options()(
"from-table-reordering",
339 ->implicit_value(
true),
340 "Enable automatic table reordering in FROM clause.");
341 help_desc.add_options()(
"gpu-buffer-mem-bytes",
342 po::value<size_t>(&system_parameters.gpu_buffer_mem_bytes)
343 ->default_value(system_parameters.gpu_buffer_mem_bytes),
344 "Size of memory reserved for GPU buffers, in bytes, per GPU.");
345 help_desc.add_options()(
"gpu-input-mem-limit",
346 po::value<double>(&system_parameters.gpu_input_mem_limit)
347 ->default_value(system_parameters.gpu_input_mem_limit),
348 "Force query to CPU when input data memory usage exceeds this "
349 "percentage of available GPU memory.");
350 help_desc.add_options()(
351 "hll-precision-bits",
355 "Number of bits used from the hash value used to specify the bucket number.");
357 help_desc.add_options()(
"http-port",
358 po::value<int>(&http_port)->default_value(http_port),
359 "HTTP port number.");
360 help_desc.add_options()(
362 po::value<int>(&http_binary_port)->default_value(http_binary_port),
363 "HTTP binary port number.");
365 help_desc.add_options()(
366 "idle-session-duration",
367 po::value<int>(&idle_session_duration)->default_value(idle_session_duration),
368 "Maximum duration of idle session.");
369 help_desc.add_options()(
"inner-join-fragment-skipping",
372 ->implicit_value(
true),
373 "Enable/disable inner join fragment skipping. This feature is "
374 "considered stable and is enabled by default. This "
375 "parameter will be removed in a future release.");
376 help_desc.add_options()(
377 "max-session-duration",
378 po::value<int>(&max_session_duration)->default_value(max_session_duration),
379 "Maximum duration of active session.");
380 help_desc.add_options()(
"num-sessions",
381 po::value<int>(&system_parameters.num_sessions)
382 ->default_value(system_parameters.num_sessions),
383 "Maximum number of active session.");
384 help_desc.add_options()(
388 ->implicit_value(
true),
389 "Return null on division by zero instead of throwing an exception.");
390 help_desc.add_options()(
391 "num-reader-threads",
392 po::value<size_t>(&num_reader_threads)->default_value(num_reader_threads),
393 "Number of reader threads to use.");
394 help_desc.add_options()(
395 "max-import-threads",
397 "Max number of default import threads to use (num hardware threads will be used "
398 "instead if lower). Can be overriden with copy statement threads option).");
399 help_desc.add_options()(
400 "overlaps-max-table-size-bytes",
403 "The maximum size in bytes of the hash table for an overlaps hash join.");
404 help_desc.add_options()(
"overlaps-target-entries-per-bin",
407 "The target number of hash entries per bin for overlaps join");
409 help_desc.add_options()(
"port,p",
410 po::value<int>(&system_parameters.omnisci_server_port)
411 ->default_value(system_parameters.omnisci_server_port),
414 help_desc.add_options()(
"num-gpus",
415 po::value<int>(&system_parameters.num_gpus)
416 ->default_value(system_parameters.num_gpus),
417 "Number of gpus to use.");
418 help_desc.add_options()(
420 po::value<bool>(&read_only)->default_value(read_only)->implicit_value(
true),
421 "Enable read-only mode.");
423 help_desc.add_options()(
425 po::value<size_t>(&reserved_gpu_mem)->default_value(reserved_gpu_mem),
426 "Reduces GPU memory available to the HeavyDB allocator by this amount. Used for "
427 "compiled code cache and ancillary GPU functions and other processes that may also "
428 "be using the GPU concurrent with HeavyDB.");
430 help_desc.add_options()(
"start-gpu",
431 po::value<int>(&system_parameters.start_gpu)
432 ->default_value(system_parameters.start_gpu),
433 "First gpu to use.");
434 help_desc.add_options()(
"trivial-loop-join-threshold",
437 ->implicit_value(1000),
438 "The maximum number of rows in the inner table of a loop join "
439 "considered to be trivially small.");
440 help_desc.add_options()(
441 "uniform-request-ids-per-thrift-call",
444 ->implicit_value(
true),
445 "If true (default) then assign the same request_id to thrift calls that were "
446 "initiated by the same external thrift call. If false then assign different "
447 "request_ids and log the parent/child relationships.");
448 help_desc.add_options()(
"verbose",
449 po::value<bool>(&verbose_logging)
450 ->default_value(verbose_logging)
451 ->implicit_value(
true),
452 "Write additional debug log messages to server logs.");
453 help_desc.add_options()(
454 "enable-runtime-udf",
455 po::value<bool>(&enable_runtime_udf)
456 ->default_value(enable_runtime_udf)
457 ->implicit_value(
true),
458 "DEPRECATED. Please use `enable-runtime-udfs` instead as this flag will be removed "
459 "in the near future.");
460 help_desc.add_options()(
461 "enable-runtime-udfs",
462 po::value<bool>(&enable_runtime_udfs)
463 ->default_value(enable_runtime_udfs)
464 ->implicit_value(
true),
465 "Enable runtime UDF registration by passing signatures and corresponding LLVM IR "
466 "to the `register_runtime_udf` endpoint. For use with the Python Remote Backend "
467 "Compiler server, packaged separately.");
468 help_desc.add_options()(
"enable-udf-registration-for-all-users",
469 po::value<bool>(&enable_udf_registration_for_all_users)
470 ->default_value(enable_udf_registration_for_all_users)
471 ->implicit_value(
true),
472 "Allow all users, not just superusers, to register runtime "
473 "UDFs/UDTFs. Option only valid if "
474 "`--enable-runtime-udfs` is set to true.");
475 help_desc.add_options()(
"version,v",
"Print Version Number.");
476 help_desc.add_options()(
"enable-string-functions",
479 ->implicit_value(
true),
480 "Enable experimental string functions.");
481 help_desc.add_options()(
"enable-experimental-string-functions",
484 ->implicit_value(
true),
485 "DEPRECATED. String functions are now enabled by default, "
486 "but can still be controlled with --enable-string-functions.");
487 help_desc.add_options()(
490 "Enable foreign storage interface.");
492 help_desc.add_options()(
"enable-legacy-delimited-import",
495 ->implicit_value(
true),
496 "Use legacy importer for delimited sources.");
497 #ifdef ENABLE_IMPORT_PARQUET
498 help_desc.add_options()(
"enable-legacy-parquet-import",
499 po::value<bool>(&g_enable_legacy_parquet_import)
500 ->default_value(g_enable_legacy_parquet_import)
501 ->implicit_value(
true),
502 "Use legacy importer for parquet sources.");
504 help_desc.add_options()(
"enable-fsi-regex-import",
507 ->implicit_value(
true),
508 "Use FSI importer for regex parsed sources.");
510 help_desc.add_options()(
"enable-add-metadata-columns",
513 ->implicit_value(
true),
514 "Enable add_metadata_columns COPY FROM WITH option (Beta).");
516 help_desc.add_options()(
"disk-cache-path",
517 po::value<std::string>(&disk_cache_config.path),
518 "Specify the path for the disk cache.");
520 help_desc.add_options()(
522 po::value<std::string>(&(disk_cache_level))->default_value(
"foreign_tables"),
523 "Specify level of disk cache. Valid options are 'foreign_tables', "
524 "'local_tables', 'none', and 'all'.");
526 help_desc.add_options()(
"disk-cache-size",
527 po::value<size_t>(&(disk_cache_config.size_limit)),
528 "Specify a maximum size for the disk cache in bytes.");
531 help_desc.add_options()(
532 "allow-s3-server-privileges",
535 ->implicit_value(
true),
536 "Allow S3 server privileges, if IAM user credentials are not provided. Credentials "
537 "may be specified with "
538 "environment variables (such as AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, etc), "
539 "an AWS credentials file, or when running on an EC2 instance, with an IAM role "
540 "that is attached to the instance.");
541 #endif // defined(HAVE_AWS_S3)
542 help_desc.add_options()(
543 "enable-interoperability",
546 ->implicit_value(
true),
547 "Enable offloading of query portions to an external execution engine.");
548 help_desc.add_options()(
"enable-union",
551 ->implicit_value(
true),
552 "DEPRECATED. UNION ALL is enabled by default. Please remove "
553 "use of this option, as it may be disabled in the future.");
554 help_desc.add_options()(
555 "calcite-service-timeout",
556 po::value<size_t>(&system_parameters.calcite_timeout)
557 ->default_value(system_parameters.calcite_timeout),
558 "Calcite server timeout (milliseconds). Increase this on systems with frequent "
559 "schema changes or when running large numbers of parallel queries.");
560 help_desc.add_options()(
"calcite-service-keepalive",
561 po::value<size_t>(&system_parameters.calcite_keepalive)
562 ->default_value(system_parameters.calcite_keepalive)
563 ->implicit_value(
true),
564 "Enable keepalive on Calcite connections.");
565 help_desc.add_options()(
566 "stringdict-parallelizm",
569 ->implicit_value(
true),
570 "Allow StringDictionary to parallelize loads using multiple threads");
571 help_desc.add_options()(
575 ->implicit_value(
true),
576 "Log userId integer in place of the userName (when available).");
577 help_desc.add_options()(
"log-user-origin",
578 po::value<bool>(&log_user_origin)
579 ->default_value(log_user_origin)
580 ->implicit_value(
true),
581 "Lookup the origin of inbound connections by IP address/DNS "
582 "name, and print this information as part of stdlog.");
583 help_desc.add_options()(
584 "allowed-import-paths",
585 po::value<std::string>(&allowed_import_paths),
586 "List of allowed root paths that can be used in import operations.");
587 help_desc.add_options()(
588 "allowed-export-paths",
589 po::value<std::string>(&allowed_export_paths),
590 "List of allowed root paths that can be used in export operations.");
591 help_desc.add_options()(
"enable-system-tables",
594 ->implicit_value(
true),
595 "Enable use of system tables.");
596 help_desc.add_options()(
"enable-table-functions",
599 ->implicit_value(
true),
600 "Enable system table functions support.");
601 help_desc.add_options()(
"enable-logs-system-tables",
604 ->implicit_value(
true),
605 "Enable use of logs system tables.");
606 help_desc.add_options()(
607 "logs-system-tables-max-files-count",
610 "Maximum number of log files that will be processed by each logs system table.");
611 #ifdef ENABLE_MEMKIND
612 help_desc.add_options()(
"enable-tiered-cpu-mem",
613 po::value<bool>(&g_enable_tiered_cpu_mem)
614 ->default_value(g_enable_tiered_cpu_mem)
615 ->implicit_value(
true),
616 "Enable additional tiers of CPU memory (PMEM, etc...)");
617 help_desc.add_options()(
"pmem-size", po::value<size_t>(&
g_pmem_size)->default_value(0));
618 help_desc.add_options()(
"pmem-path", po::value<std::string>(&
g_pmem_path));
621 help_desc.add(log_options_.get_options());
625 developer_desc.add_options()(
"dev-options",
"Print internal developer options.");
626 developer_desc.add_options()(
627 "enable-calcite-view-optimize",
628 po::value<bool>(&system_parameters.enable_calcite_view_optimize)
629 ->default_value(system_parameters.enable_calcite_view_optimize)
630 ->implicit_value(
true),
631 "Enable additional calcite (query plan) optimizations when a view is part of the "
633 developer_desc.add_options()(
634 "enable-columnar-output",
637 ->implicit_value(
true),
638 "Enable columnar output for intermediate/final query steps.");
639 developer_desc.add_options()(
640 "enable-left-join-filter-hoisting",
643 ->implicit_value(
true),
644 "Enable hoisting left hand side filters through left joins.");
645 developer_desc.add_options()(
"optimize-row-init",
648 ->implicit_value(
true),
649 "Optimize row initialization.");
650 developer_desc.add_options()(
"enable-legacy-syntax",
651 po::value<bool>(&enable_legacy_syntax)
652 ->default_value(enable_legacy_syntax)
653 ->implicit_value(
true),
654 "Enable legacy syntax.");
655 developer_desc.add_options()(
657 po::value<bool>(&allow_multifrag)
658 ->default_value(allow_multifrag)
659 ->implicit_value(
true),
660 "Enable execution over multiple fragments in a single round-trip to GPU.");
661 developer_desc.add_options()(
"enable-lazy-fetch",
664 ->implicit_value(
true),
665 "Enable lazy fetch columns in query results.");
666 developer_desc.add_options()(
667 "enable-shared-mem-group-by",
670 ->implicit_value(
true),
671 "Enable using GPU shared memory for some GROUP BY queries.");
672 developer_desc.add_options()(
"num-executors",
673 po::value<int>(&system_parameters.num_executors)
674 ->default_value(system_parameters.num_executors),
675 "Number of executors to run in parallel.");
676 developer_desc.add_options()(
677 "gpu-shared-mem-threshold",
679 "GPU shared memory threshold (in bytes). If query requires larger buffers than "
680 "this threshold, we disable those optimizations. 0 (default) means no static cap.");
681 developer_desc.add_options()(
682 "enable-shared-mem-grouped-non-count-agg",
685 ->implicit_value(
true),
686 "Enable using GPU shared memory for grouped non-count aggregate queries.");
687 developer_desc.add_options()(
688 "enable-shared-mem-non-grouped-agg",
691 ->implicit_value(
true),
692 "Enable using GPU shared memory for non-grouped aggregate queries.");
693 developer_desc.add_options()(
"enable-direct-columnarization",
696 ->implicit_value(
true),
697 "Enables/disables a more optimized columnarization method "
698 "for intermediate steps in multi-step queries.");
699 developer_desc.add_options()(
700 "offset-device-by-table-id",
703 ->implicit_value(
true),
704 "Enables/disables offseting the chosen device ID by the table ID for a given "
705 "fragment. This improves balance of fragments across GPUs.");
706 developer_desc.add_options()(
"enable-window-functions",
709 ->implicit_value(
true),
710 "Enable window function support.");
711 developer_desc.add_options()(
712 "enable-parallel-window-partition-compute",
715 ->implicit_value(
true),
716 "Enable parallel window function partition computation.");
717 developer_desc.add_options()(
718 "enable-parallel-window-partition-sort",
721 ->implicit_value(
true),
722 "Enable parallel window function partition sorting.");
723 developer_desc.add_options()(
724 "window-function-frame-aggregation-tree-fanout",
726 "A tree fanout for aggregation tree used to compute aggregation over "
728 developer_desc.add_options()(
"enable-dev-table-functions",
731 ->implicit_value(
true),
732 "Enable dev (test or alpha) table functions. Also "
733 "requires --enable-table-functions to be turned on");
735 developer_desc.add_options()(
736 "enable-geo-ops-on-uncompressed-coords",
739 ->implicit_value(
true),
740 "Enable faster geo operations on uncompressed coords");
741 developer_desc.add_options()(
743 po::value<bool>(&jit_debug)->default_value(jit_debug)->implicit_value(
true),
744 "Enable runtime debugger support for the JIT. Note that this flag is "
746 "with the `ENABLE_JIT_DEBUG` build flag. The generated code can be found at "
747 "`/tmp/mapdquery`.");
748 developer_desc.add_options()(
750 po::value<bool>(&intel_jit_profile)
751 ->default_value(intel_jit_profile)
752 ->implicit_value(
true),
753 "Enable runtime support for the JIT code profiling using Intel VTune.");
754 developer_desc.add_options()(
755 "enable-cpu-sub-tasks",
758 ->implicit_value(
true),
759 "Enable parallel processing of a single data fragment on CPU. This can improve CPU "
760 "load balance and decrease reduction overhead.");
761 developer_desc.add_options()(
764 "Set CPU sub-task size in rows.");
765 developer_desc.add_options()(
768 "Set max CPU concurrent threads. Values <= 0 will use default of 2X the number of "
769 "hardware threads.");
770 developer_desc.add_options()(
771 "skip-intermediate-count",
774 ->implicit_value(
true),
775 "Skip pre-flight counts for intermediate projections with no filters.");
776 developer_desc.add_options()(
777 "strip-join-covered-quals",
780 ->implicit_value(
true),
781 "Remove quals from the filtered count if they are covered by a "
782 "join condition (currently only ST_Contains).");
784 developer_desc.add_options()(
786 po::value<size_t>(&system_parameters.min_cpu_slab_size)
787 ->default_value(system_parameters.min_cpu_slab_size),
788 "Min slab size (size of memory allocations) for CPU buffer pool.");
789 developer_desc.add_options()(
791 po::value<size_t>(&system_parameters.max_cpu_slab_size)
792 ->default_value(system_parameters.max_cpu_slab_size),
793 "Max CPU 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 specified by "
796 "min-cpu-slab-size.");
797 developer_desc.add_options()(
799 po::value<size_t>(&system_parameters.min_gpu_slab_size)
800 ->default_value(system_parameters.min_gpu_slab_size),
801 "Min slab size (size of memory allocations) for GPU buffer pools.");
802 developer_desc.add_options()(
804 po::value<size_t>(&system_parameters.max_gpu_slab_size)
805 ->default_value(system_parameters.max_gpu_slab_size),
806 "Max GPU buffer pool slab size (size of memory allocations). Note if "
807 "there is not enough free memory to accomodate the target slab size, smaller "
808 "slabs will be allocated, down to the minimum size speified by "
809 "min-gpu-slab-size.");
811 developer_desc.add_options()(
812 "max-output-projection-allocation-bytes",
815 "Maximum allocation size for a fixed output buffer allocation for projection "
816 "queries with no pre-flight count. Default is the maximum slab size (sizes "
818 "than the maximum slab size have no affect). Requires bump allocator.");
819 developer_desc.add_options()(
820 "min-output-projection-allocation-bytes",
823 "Minimum allocation size for a fixed output buffer allocation for projection "
824 "queries with no pre-flight count. If an allocation of this size cannot be "
825 "obtained, the query will be retried with different execution parameters and/or "
827 "CPU (if allow-cpu-retry is enabled). Requires bump allocator.");
828 developer_desc.add_options()(
"enable-bump-allocator",
831 ->implicit_value(
true),
832 "Enable the bump allocator for projection queries on "
833 "GPU. The bump allocator will "
834 "allocate a fixed size buffer for each query, track the "
835 "number of rows passing the "
836 "kernel during query execution, and copy back only the "
837 "rows that passed the kernel "
838 "to CPU after execution. When disabled, pre-flight "
839 "count queries are used to size "
840 "the output buffer for projection queries.");
841 developer_desc.add_options()(
842 "code-cache-eviction-percent",
845 "Percentage of the GPU code cache to evict if an out of memory error is "
846 "encountered while attempting to place generated code on the GPU.");
848 developer_desc.add_options()(
"ssl-cert",
849 po::value<std::string>(&system_parameters.ssl_cert_file)
850 ->default_value(std::string(
"")),
851 "SSL Validated public certficate.");
853 developer_desc.add_options()(
"ssl-private-key",
854 po::value<std::string>(&system_parameters.ssl_key_file)
855 ->default_value(std::string(
"")),
856 "SSL private key file.");
859 developer_desc.add_options()(
"ssl-trust-store",
860 po::value<std::string>(&system_parameters.ssl_trust_store)
861 ->default_value(std::string(
"")),
862 "SSL public CA certifcates (java trust store) to validate "
863 "TLS connections (passed through to the Calcite server).");
865 developer_desc.add_options()(
866 "ssl-trust-password",
867 po::value<std::string>(&system_parameters.ssl_trust_password)
868 ->default_value(std::string(
"")),
869 "SSL password for java trust store provided via --ssl-trust-store parameter.");
871 developer_desc.add_options()(
873 po::value<std::string>(&system_parameters.ssl_trust_ca_file)
874 ->default_value(std::string(
"")),
875 "SSL public CA certificates to validate TLS connection(as a client).");
877 developer_desc.add_options()(
878 "ssl-trust-ca-server",
879 po::value<std::string>(&authMetadata.ca_file_name)->default_value(std::string(
"")),
880 "SSL public CA certificates to validate TLS connection(as a server).");
882 developer_desc.add_options()(
"ssl-keystore",
883 po::value<std::string>(&system_parameters.ssl_keystore)
884 ->default_value(std::string(
"")),
885 "SSL server credentials as a java key store (passed "
886 "through to the Calcite server).");
888 developer_desc.add_options()(
889 "ssl-keystore-password",
890 po::value<std::string>(&system_parameters.ssl_keystore_password)
891 ->default_value(std::string(
"")),
892 "SSL password for java keystore, provide by via --ssl-keystore.");
894 developer_desc.add_options()(
896 po::value<std::string>(&udf_file_name),
897 "Load user defined extension functions from this file at startup. The file is "
898 "expected to be a C/C++ file with extension .cpp.");
900 developer_desc.add_options()(
902 po::value<std::string>(&udf_compiler_path),
903 "Provide absolute path to clang++ used in udf compilation.");
905 developer_desc.add_options()(
"udf-compiler-options",
906 po::value<std::vector<std::string>>(&udf_compiler_options),
907 "Specify compiler options to tailor udf compilation.");
910 developer_desc.add_options()(
"libgeos-so-filename",
911 po::value<std::string>(&libgeos_so_filename),
912 "Specify libgeos shared object filename to be used for "
913 "geos-backed geo opertations.");
915 developer_desc.add_options()(
916 "large-ndv-threshold",
918 developer_desc.add_options()(
919 "large-ndv-multiplier",
921 developer_desc.add_options()(
"approx_quantile_buffer",
924 developer_desc.add_options()(
"approx_quantile_centroids",
927 developer_desc.add_options()(
928 "bitmap-memory-limit",
930 "Limit for count distinct bitmap memory use. The limit is computed by taking the "
931 "size of the group by buffer (entry count in Query Memory Descriptor) and "
932 "multiplying it by the number of count distinct expression and the size of bitmap "
933 "required for each. For approx_count_distinct this is typically 8192 bytes.");
934 developer_desc.add_options()(
935 "enable-filter-function",
938 ->implicit_value(
true),
939 "Enable the filter function protection feature for the SQL JIT compiler. "
940 "Normally should be on but techs might want to disable for troubleshooting.");
941 developer_desc.add_options()(
942 "enable-idp-temporary-users",
945 ->implicit_value(
true),
946 "Enable temporary users for SAML and LDAP logins on read-only servers. "
947 "Normally should be on but techs might want to disable for troubleshooting.");
948 developer_desc.add_options()(
949 "enable-seconds-refresh-interval",
952 ->implicit_value(
true),
953 "Enable foreign table seconds refresh interval for testing purposes.");
954 developer_desc.add_options()(
"enable-auto-metadata-update",
957 ->implicit_value(
true),
958 "Enable automatic metadata update.");
959 developer_desc.add_options()(
962 "For ResultSets requiring a heap sort, the number of rows necessary to trigger "
963 "parallelTop() to sort.");
964 developer_desc.add_options()(
967 "For ResultSets requiring a heap sort, the maximum number of rows allowed by "
969 developer_desc.add_options()(
970 "streaming-top-n-max",
972 "The maximum number of rows allowing streaming top-N sorting.");
973 developer_desc.add_options()(
"vacuum-min-selectivity",
976 "Minimum selectivity for automatic vacuuming. "
977 "This specifies the percentage (with a value of 0 "
978 "implying 0% and a value of 1 implying 100%) of "
979 "deleted rows in a fragment at which to perform "
980 "automatic vacuuming. A number greater than 1 can "
981 "be used to disable automatic vacuuming.");
982 developer_desc.add_options()(
"enable-automatic-ir-metadata",
985 ->implicit_value(
true),
986 "Enable automatic IR metadata (debug builds only).");
987 developer_desc.add_options()(
990 "The maximum number of characters that a log message can has. If the log message "
991 "is longer than this, we only record \'g_max_log_message_length\' characters.");
992 developer_desc.add_options()(
993 "estimator-failure-max-groupby-size",
996 "Maximum size of the groupby buffer if the estimator fails. By default we use the "
997 "number of tuples in the table up to this value.");
998 developer_desc.add_options()(
"columnar-large-projections",
1001 ->implicit_value(
true),
1002 "Prefer columnar output if projection size is >= "
1003 "threshold set by --columnar-large-projections-threshold "
1004 "(default 1,000,000 rows).");
1005 developer_desc.add_options()(
1006 "columnar-large-projections-threshold",
1009 "Threshold (in minimum number of rows) to prefer columnar output for projections. "
1010 "Requires --columnar-large-projections to be set.");
1012 help_desc.add_options()(
1013 "allow-query-step-cpu-retry",
1016 ->implicit_value(
true),
1017 R
"(Allow certain query steps to retry on CPU, even when allow-cpu-retry is disabled)");
1018 help_desc.add_options()("enable-http-binary-server",
1021 ->implicit_value(
true),
1022 "Enable binary over HTTP Thrift server");
1024 help_desc.add_options()(
"enable-assign-render-groups",
1027 ->implicit_value(
true),
1028 "Enable Render Group assignment");
1030 help_desc.add_options()(
"enable-query-engine-cuda-streams",
1033 ->implicit_value(
true),
1034 "Enable Query Engine CUDA streams");
1036 help_desc.add_options()(
1037 "allow-invalid-literal-buffer-reads",
1040 ->implicit_value(
true),
1041 "For backwards compatibility. Enabling may cause invalid query results.");
1048 std::stringstream ss;
1050 while (std::getline(in, line)) {
1052 if (line ==
"[web]") {
1060 if (!filename.empty()) {
1061 boost::algorithm::trim_if(filename, boost::is_any_of(
"\"'"));
1062 if (!boost::filesystem::exists(filename)) {
1063 std::cerr << desc <<
" " << filename <<
" does not exist." << std::endl;
1071 if (!filename.empty()) {
1079 boost::algorithm::trim_if(base_path, boost::is_any_of(
"\"'"));
1080 if (!boost::filesystem::exists(base_path)) {
1081 throw std::runtime_error(
"HeavyDB base directory does not exist at " + base_path);
1086 boost::algorithm::trim_if(base_path, boost::is_any_of(
"\"'"));
1088 if (!boost::filesystem::exists(
data_path)) {
1089 throw std::runtime_error(
"HeavyDB data directory does not exist at '" + base_path +
1100 auto exe_filename = boost::filesystem::path(exe_name).filename().string();
1101 const std::string lock_file =
1102 (boost::filesystem::path(base_path) / std::string(exe_filename +
"_pid.lck"))
1106 VLOG(1) <<
"taking [" << lock_file <<
"] read+write lock until process exit";
1108 VLOG(1) <<
"taking [" << lock_file <<
"] read-only lock until process exit";
1114 throw std::runtime_error(
"failed to open lockfile: " + lock_file +
": " +
1115 std::string(strerror(errno)) +
" (" +
1120 memset(&fl, 0,
sizeof(fl));
1122 fl.l_whence = SEEK_SET;
1131 if (ret == -1 && (errno == EACCES || errno == EAGAIN)) {
1133 throw std::runtime_error(
1134 "another HeavyDB server instance is already using data directory: " +
1136 }
else if (ret == -1) {
1137 auto errno0 = errno;
1139 throw std::runtime_error(
"failed to lock lockfile: " + lock_file +
": " +
1140 std::string(strerror(errno0)) +
" (" +
1146 auto errno0 = errno;
1148 throw std::runtime_error(
"failed to truncate lockfile: " + lock_file +
": " +
1149 std::string(strerror(errno0)) +
" (" +
1153 auto errno0 = errno;
1155 throw std::runtime_error(
"failed to write lockfile: " + lock_file +
": " +
1156 std::string(strerror(errno0)) +
" (" +
1165 boost::algorithm::trim_if(db_query_file, boost::is_any_of(
"\"'"));
1166 if (db_query_file.length() > 0 && !boost::filesystem::exists(db_query_file)) {
1167 throw std::runtime_error(
"File containing DB queries " + db_query_file +
1168 " does not exist.");
1170 const auto db_file = boost::filesystem::path(base_path) /
1172 if (!boost::filesystem::exists(db_file)) {
1174 const auto db_file =
1176 if (!boost::filesystem::exists(db_file)) {
1178 " does not exist.");
1182 if (license_path.length() == 0) {
1187 LOG(
INFO) <<
"HeavyDB started with data directory at '" << base_path <<
"'";
1188 if (vm.count(
"license-path")) {
1189 LOG(
INFO) <<
"License key path set to '" << license_path <<
"'";
1192 LOG(
INFO) <<
" Server read-only mode is " << read_only <<
" (--read-only)";
1195 <<
" (--multi-instance)";
1198 throw std::runtime_error(
1199 "You may not use the --read-only and --multi-instance configuration flags "
1203 LOG(
WARNING) <<
" Allowing invalid reads from the literal buffer. May cause invalid "
1204 "query results! (--allow-invalid-literal-buffer-reads)";
1206 #if DISABLE_CONCURRENCY
1207 LOG(
INFO) <<
" Threading layer: serial";
1209 LOG(
INFO) <<
" Threading layer: TBB";
1211 LOG(
INFO) <<
" Threading layer: std";
1213 LOG(
INFO) <<
" Watchdog is set to " << enable_watchdog;
1214 LOG(
INFO) <<
" Dynamic Watchdog is set to " << enable_dynamic_watchdog;
1215 if (enable_dynamic_watchdog) {
1216 LOG(
INFO) <<
" Dynamic Watchdog timeout is set to " << dynamic_watchdog_time_limit;
1218 LOG(
INFO) <<
" Runtime query interrupt is set to " << enable_runtime_query_interrupt;
1219 if (enable_runtime_query_interrupt) {
1220 LOG(
INFO) <<
" A frequency of checking pending query interrupt request is set to "
1221 << pending_query_interrupt_freq <<
" (in ms.)";
1222 LOG(
INFO) <<
" A frequency of checking running query interrupt request is set to "
1223 << running_query_interrupt_freq <<
" (0.0 ~ 1.0)";
1225 LOG(
INFO) <<
" Non-kernel time query interrupt is set to "
1226 << enable_non_kernel_time_query_interrupt;
1230 LOG(
INFO) <<
" Maximum idle session duration " << idle_session_duration;
1231 LOG(
INFO) <<
" Maximum active session duration " << max_session_duration;
1232 LOG(
INFO) <<
" Maximum number of sessions " << system_parameters.num_sessions;
1235 #ifdef ENABLE_IMPORT_PARQUET
1236 LOG(
INFO) <<
"Legacy parquet import is set to " << g_enable_legacy_parquet_import;
1240 LOG(
INFO) <<
"Allowed import paths is set to " << allowed_import_paths;
1241 LOG(
INFO) <<
"Allowed export paths is set to " << allowed_export_paths;
1243 base_path, allowed_import_paths, allowed_export_paths);
1257 #ifdef ENABLE_IMPORT_PARQUET
1258 !g_enable_legacy_parquet_import ||
1263 LOG(
INFO) <<
"FSI has been enabled as a side effect of enabling non-legacy import.";
1266 if (disk_cache_level ==
"foreign_tables") {
1269 LOG(
INFO) <<
"Disk cache enabled for foreign tables only";
1271 LOG(
INFO) <<
"Cannot enable disk cache for fsi when fsi is disabled. Defaulted to "
1272 "disk cache disabled";
1274 }
else if (disk_cache_level ==
"all") {
1276 LOG(
INFO) <<
"Disk cache enabled for all tables";
1277 }
else if (disk_cache_level ==
"local_tables") {
1279 LOG(
INFO) <<
"Disk cache enabled for non-FSI tables";
1280 }
else if (disk_cache_level ==
"none") {
1282 LOG(
INFO) <<
"Disk cache disabled";
1284 throw std::runtime_error{
1285 "Unexpected \"disk-cache-level\" value: " + disk_cache_level +
1286 ". Valid options are 'foreign_tables', "
1287 "'local_tables', 'none', and 'all'."};
1291 throw std::runtime_error{
"disk-cache-size must be at least " +
1295 if (disk_cache_config.path.empty()) {
1314 throw std::runtime_error{
"vacuum-min-selectivity cannot be less than 0."};
1324 LOG(
INFO) <<
"FSI has been enabled as a side effect of enabling system tables";
1331 throw std::runtime_error{
1332 "Invalid value provided for the \"logs-system-tables-max-files-count\" "
1333 "option. Value must be greater than 0."};
1335 LOG(
INFO) <<
"Maximum number of logs system table files set to "
1338 #ifdef ENABLE_MEMKIND
1339 if (g_enable_tiered_cpu_mem) {
1341 throw std::runtime_error{
"pmem-path must be set to use tiered cpu memory"};
1344 throw std::runtime_error{
"pmem-size must be set to use tiered cpu memory"};
1346 if (!std::filesystem::exists(
g_pmem_path.c_str())) {
1347 throw std::runtime_error{
"path to PMem directory (" +
g_pmem_path +
1348 ") does not exist."};
1355 const bool enable_runtime_udfs,
1356 const bool enable_udf_registration_for_all_users) {
1357 return enable_runtime_udfs
1358 ? (enable_udf_registration_for_all_users
1367 char const*
const* argv,
1368 const bool should_init_logging) {
1369 po::options_description all_desc(
"All options");
1370 all_desc.add(help_desc).add(developer_desc);
1373 po::store(po::command_line_parser(argc, argv)
1375 .positional(positional_options)
1380 if (vm.count(
"help")) {
1381 std::cerr <<
"Usage: heavydb <data directory path> [-p <port number>] "
1382 "[--http-port <http port number>] [--flush-log] [--version|-v]"
1385 std::cout << help_desc << std::endl;
1388 if (vm.count(
"dev-options")) {
1389 std::cout <<
"Usage: heavydb <data directory path> [-p <port number>] "
1390 "[--http-port <http port number>] [--flush-log] [--version|-v]"
1393 std::cout << developer_desc << std::endl;
1396 if (vm.count(
"version")) {
1397 std::cout <<
"HeavyDB Version: " <<
MAPD_RELEASE << std::endl;
1401 if (vm.count(
"config")) {
1402 std::ifstream settings_file(system_parameters.config_file);
1406 po::store(po::parse_config_file(sanitized_settings, all_desc,
false), vm);
1408 settings_file.close();
1413 <<
"The enable-union option is DEPRECATED and is now enabled by default. "
1414 "Please remove use of this option, as it may be disabled in the future."
1419 boost::algorithm::trim_if(base_path, boost::is_any_of(
"\"'"));
1423 if (!boost::filesystem::exists(lockfiles_path)) {
1424 if (!boost::filesystem::create_directory(lockfiles_path)) {
1425 std::cerr <<
"Cannot create " + shared::kLockfilesDirectoryName +
1426 " subdirectory under "
1427 << base_path << std::endl;
1432 if (!boost::filesystem::exists(lockfiles_path2)) {
1433 if (!boost::filesystem::create_directory(lockfiles_path2)) {
1434 std::cerr <<
"Cannot create " + shared::kLockfilesDirectoryName +
"/" +
1435 shared::kCatalogDirectoryName +
" subdirectory under "
1436 << base_path << std::endl;
1441 if (!boost::filesystem::exists(lockfiles_path3)) {
1442 if (!boost::filesystem::create_directory(lockfiles_path3)) {
1443 std::cerr <<
"Cannot create " + shared::kLockfilesDirectoryName +
"/" +
1444 shared::kDataDirectoryName +
" subdirectory under "
1445 << base_path << std::endl;
1454 if (!vm[
"enable-runtime-udf"].defaulted()) {
1455 if (!vm[
"enable-runtime-udfs"].defaulted()) {
1456 std::cerr <<
"Usage Error: Both enable-runtime-udf and enable-runtime-udfs "
1457 "specified. Please remove use of the enable-runtime-udfs flag, "
1458 "as it will be deprecated in the future."
1462 enable_runtime_udfs = enable_runtime_udf;
1463 std::cerr <<
"The enable-runtime-udf flag has been deprecated and replaced "
1464 "with enable-runtime-udfs. Please remove use of this option "
1465 "as it will be disabled in the future."
1469 system_parameters.runtime_udf_registration_policy =
1471 enable_udf_registration_for_all_users);
1473 if (should_init_logging) {
1484 "ssl trust store")) {
1499 watchdog_none_encoded_string_translation_limit;
1514 LOG(
INFO) <<
"Disabling FSI and Disk Cache as they are not currently supported "
1515 "with multi-instance.";
1522 #ifdef ENABLE_IMPORT_PARQUET
1523 g_enable_legacy_parquet_import =
true;
1525 disk_cache_level =
"none";
1528 }
catch (po::error& e) {
1529 std::cerr <<
"Usage Error: " << e.what() << std::endl;
1533 if (g_hll_precision_bits < 1 || g_hll_precision_bits > 16) {
1534 std::cerr <<
"hll-precision-bits must be between 1 and 16." << std::endl;
1539 LOG(
INFO) <<
" From clause table reordering is disabled";
1543 LOG(
INFO) <<
" Filter push down for JOIN is enabled";
1546 if (vm.count(
"udf")) {
1547 boost::algorithm::trim_if(udf_file_name, boost::is_any_of(
"\"'"));
1549 if (!boost::filesystem::exists(udf_file_name)) {
1550 LOG(
ERROR) <<
" User defined function file " << udf_file_name <<
" does not exist.";
1554 LOG(
INFO) <<
" User provided extension functions loaded from " << udf_file_name;
1557 if (vm.count(
"udf-compiler-path")) {
1558 boost::algorithm::trim_if(udf_compiler_path, boost::is_any_of(
"\"'"));
1561 auto trim_string = [](std::string& s) {
1562 boost::algorithm::trim_if(s, boost::is_any_of(
"\"'"));
1565 if (vm.count(
"udf-compiler-options")) {
1566 std::for_each(udf_compiler_options.begin(), udf_compiler_options.end(), trim_string);
1569 boost::algorithm::trim_if(system_parameters.ha_brokers, boost::is_any_of(
"\"'"));
1570 boost::algorithm::trim_if(system_parameters.ha_group_id, boost::is_any_of(
"\"'"));
1571 boost::algorithm::trim_if(system_parameters.ha_shared_data, boost::is_any_of(
"\"'"));
1572 boost::algorithm::trim_if(system_parameters.ha_unique_server_id,
1573 boost::is_any_of(
"\"'"));
1575 if (!system_parameters.ha_group_id.empty()) {
1576 LOG(
INFO) <<
" HA group id " << system_parameters.ha_group_id;
1577 if (system_parameters.ha_unique_server_id.empty()) {
1578 LOG(
ERROR) <<
"Starting server in HA mode --ha-unique-server-id must be set ";
1581 LOG(
INFO) <<
" HA unique server id " << system_parameters.ha_unique_server_id;
1583 if (system_parameters.ha_brokers.empty()) {
1584 LOG(
ERROR) <<
"Starting server in HA mode --ha-brokers must be set ";
1587 LOG(
INFO) <<
" HA brokers " << system_parameters.ha_brokers;
1589 if (system_parameters.ha_shared_data.empty()) {
1590 LOG(
ERROR) <<
"Starting server in HA mode --ha-shared-data must be set ";
1593 LOG(
INFO) <<
" HA shared data is " << system_parameters.ha_shared_data;
1597 boost::algorithm::trim_if(system_parameters.master_address, boost::is_any_of(
"\"'"));
1598 if (!system_parameters.master_address.empty()) {
1600 LOG(
ERROR) <<
"The master-address setting is only allowed in read-only mode";
1603 LOG(
INFO) <<
" Master Address is " << system_parameters.master_address;
1604 LOG(
INFO) <<
" Master Port is " << system_parameters.master_port;
1609 <<
")." << std::endl;
1615 if (system_parameters.cuda_block_size) {
1616 LOG(
INFO) <<
" cuda block size " << system_parameters.cuda_block_size;
1618 if (system_parameters.cuda_grid_size) {
1619 LOG(
INFO) <<
" cuda grid size " << system_parameters.cuda_grid_size;
1621 LOG(
INFO) <<
" Min CPU buffer pool slab size " << system_parameters.min_cpu_slab_size;
1622 LOG(
INFO) <<
" Max CPU buffer pool slab size " << system_parameters.max_cpu_slab_size;
1623 LOG(
INFO) <<
" Min GPU buffer pool slab size " << system_parameters.min_gpu_slab_size;
1624 LOG(
INFO) <<
" Max GPU buffer pool slab size " << system_parameters.max_gpu_slab_size;
1625 LOG(
INFO) <<
" calcite JVM max memory " << system_parameters.calcite_max_mem;
1626 LOG(
INFO) <<
" HeavyDB Server Port " << system_parameters.omnisci_server_port;
1627 LOG(
INFO) <<
" HeavyDB Calcite Port " << system_parameters.calcite_port;
1628 LOG(
INFO) <<
" Enable Calcite view optimize "
1629 << system_parameters.enable_calcite_view_optimize;
1630 LOG(
INFO) <<
" Allow Local Auth Fallback: "
1631 << (authMetadata.allowLocalAuthFallback ?
"enabled" :
"disabled");
1635 LOG(
INFO) <<
" Enable Data Recycler: "
1638 LOG(
INFO) <<
" \t Use hashtable cache: "
1641 LOG(
INFO) <<
" \t\t Total amount of bytes that hashtable cache keeps: "
1643 LOG(
INFO) <<
" \t\t Per-hashtable size limit: "
1646 LOG(
INFO) <<
" \t Use query resultset cache: "
1649 LOG(
INFO) <<
" \t\t Total amount of bytes that query resultset cache keeps: "
1651 LOG(
INFO) <<
" \t\t Per-query resultset size limit: "
1654 LOG(
INFO) <<
" \t\t Use auto query resultset caching: "
1657 LOG(
INFO) <<
" \t\t\t The maximum bytes of a query resultset which is "
1658 "automatically cached: "
1661 LOG(
INFO) <<
" \t\t Use query step skipping: "
1663 LOG(
INFO) <<
" \t Use chunk metadata cache: "
1667 const std::string udf_reg_policy_log_prefix{
1668 " \t\t Runtime UDF/UDTF Registration Policy: "};
1669 switch (system_parameters.runtime_udf_registration_policy) {
1671 LOG(
INFO) << udf_reg_policy_log_prefix <<
" DISALLOWED";
1675 LOG(
INFO) << udf_reg_policy_log_prefix <<
" ALLOWED for superusers only";
1679 LOG(
INFO) << udf_reg_policy_log_prefix <<
" ALLOWED for all users";
1683 UNREACHABLE() <<
"Unrecognized option for Runtime UDF/UDTF registration policy.";
1687 boost::algorithm::trim_if(authMetadata.distinguishedName, boost::is_any_of(
"\"'"));
1688 boost::algorithm::trim_if(authMetadata.uri, boost::is_any_of(
"\"'"));
1689 boost::algorithm::trim_if(authMetadata.ldapQueryUrl, boost::is_any_of(
"\"'"));
1690 boost::algorithm::trim_if(authMetadata.ldapRoleRegex, boost::is_any_of(
"\"'"));
1691 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
unsigned g_cpu_threads_override
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)
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...
bool g_optimize_cuda_block_and_grid_sizes
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_invalid_literal_buffer_reads
bool g_allow_system_dashboard_update
bool g_uniform_request_ids_per_thrift_call
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