2021-09-04 17:04:35 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Core/BaseSettings.h>
|
|
|
|
#include <Core/Settings.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
class ASTStorage;
|
|
|
|
|
|
|
|
|
2023-02-01 13:54:03 +00:00
|
|
|
#define FILELOG_RELATED_SETTINGS(M, ALIAS) \
|
2021-09-04 17:04:35 +00:00
|
|
|
/* default is stream_poll_timeout_ms */ \
|
2021-09-30 16:02:17 +00:00
|
|
|
M(Milliseconds, poll_timeout_ms, 0, "Timeout for single poll from StorageFileLog.", 0) \
|
|
|
|
M(UInt64, poll_max_batch_size, 0, "Maximum amount of messages to be polled in a single StorageFileLog poll.", 0) \
|
|
|
|
M(UInt64, max_block_size, 0, "Number of row collected by poll(s) for flushing data from StorageFileLog.", 0) \
|
2021-10-28 07:59:05 +00:00
|
|
|
M(UInt64, max_threads, 0, "Number of max threads to parse files, default is 0, which means the number will be max(1, physical_cpu_cores / 4)", 0) \
|
2021-10-17 14:49:27 +00:00
|
|
|
M(Milliseconds, poll_directory_watch_events_backoff_init, 500, "The initial sleep value for watch directory thread.", 0) \
|
|
|
|
M(Milliseconds, poll_directory_watch_events_backoff_max, 32000, "The max sleep value for watch directory thread.", 0) \
|
|
|
|
M(UInt64, poll_directory_watch_events_backoff_factor, 2, "The speed of backoff, exponential by default", 0)
|
2021-09-04 17:04:35 +00:00
|
|
|
|
2023-02-01 13:54:03 +00:00
|
|
|
#define LIST_OF_FILELOG_SETTINGS(M, ALIAS) \
|
|
|
|
FILELOG_RELATED_SETTINGS(M, ALIAS) \
|
|
|
|
FORMAT_FACTORY_SETTINGS(M, ALIAS)
|
2021-09-04 17:04:35 +00:00
|
|
|
|
2023-02-01 13:54:03 +00:00
|
|
|
DECLARE_SETTINGS_TRAITS(FileLogSettingsTraits, LIST_OF_FILELOG_SETTINGS)
|
2021-09-04 17:04:35 +00:00
|
|
|
|
|
|
|
|
2021-10-17 14:49:27 +00:00
|
|
|
/** Settings for the FileLog engine.
|
2021-09-04 17:04:35 +00:00
|
|
|
* Could be loaded from a CREATE TABLE query (SETTINGS clause).
|
|
|
|
*/
|
|
|
|
struct FileLogSettings : public BaseSettings<FileLogSettingsTraits>
|
|
|
|
{
|
|
|
|
void loadFromQuery(ASTStorage & storage_def);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|