-
Notifications
You must be signed in to change notification settings - Fork 15
/
config.h
154 lines (131 loc) · 4.45 KB
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#pragma once
#include <contrib/ydb/core/protos/config.pb.h>
#include <contrib/ydb/core/base/event_filter.h>
#include <contrib/ydb/core/cms/console/config_item_info.h>
#include <contrib/ydb/core/driver_lib/cli_config_base/config_base.h>
#include <util/generic/hash.h>
#include <google/protobuf/text_format.h>
namespace NKikimr {
union TBasicKikimrServicesMask {
struct {
bool EnableBasicServices:1;
bool EnableIcbService:1;
bool EnableWhiteBoard:1;
bool EnableBSNodeWarden:1;
bool EnableStateStorageService:1;
bool EnableLocalService:1;
bool EnableSharedCache:1;
bool EnableBlobCache:1;
bool EnableLogger:1;
bool EnableSchedulerActor:1;
bool EnableProfiler:1;
bool EnableResourceBroker:1;
bool EnableTabletResolver:1;
bool EnableTabletMonitoringProxy:1;
bool EnableTabletCountersAggregator:1;
bool EnableRestartsCountPublisher:1;
bool EnableBootstrapper:1;
bool EnableMediatorTimeCastProxy:1;
bool EnableTxProxy:1;
bool EnableMiniKQLCompileService:1;
bool EnableMessageBusServices:1;
bool EnableStatsCollector:1;
bool EnableSelfPing:1;
bool EnableTabletMonitor:1;
bool EnableViewerService:1;
bool EnableLoadService:1;
bool EnableFailureInjectionService:1;
bool EnablePersQueueL2Cache:1;
bool EnableKqp:1;
bool EnableMemoryLog:1;
bool EnableGRpcService:1;
bool EnableNodeIdentifier:1;
bool EnableCms:1;
bool EnableNodeTable:1;
bool EnableGRpcProxyStatus:1;
bool EnablePQ:1;
bool EnableSqs:1;
bool EnableConfigsDispatcher:1;
bool EnableSecurityServices:1;
bool EnableTabletInfo:1;
bool EnableQuoterService:1;
bool EnablePersQueueClusterDiscovery:1;
bool EnableNetClassifier:1;
bool EnablePersQueueClusterTracker:1;
bool EnablePersQueueDirectReadCache:1;
bool EnableSysViewService:1;
bool EnableMeteringWriter:1;
bool EnableAuditWriter:1;
bool EnableSchemeBoardMonitoring:1;
bool EnableConfigsCache:1;
bool EnableLongTxService:1;
bool EnableHealthCheckService:1;
bool EnableYandexQuery:1;
bool EnableSequenceProxyService:1;
bool EnableHttpProxy:1;
bool EnableMetadataProvider:1;
bool EnableReplicationService:1;
bool EnableBackgroundTasks:1;
bool EnableExternalIndex: 1;
bool EnableScanConveyor : 1;
bool EnableCompConveyor : 1;
bool EnableInsertConveyor : 1;
bool EnableLocalPgWire:1;
bool EnableKafkaProxy:1;
bool EnableIcNodeCacheService:1;
bool EnableMemoryTracker:1;
// next 64 flags
bool EnableDatabaseMetadataCache:1;
};
struct {
ui64 Raw1;
ui64 Raw2;
};
void DisableAll() {
Raw1 = 0;
Raw2 = 0;
}
void EnableAll() {
Raw1 = 0xFFFFFFFFFFFFFFFFLL;
Raw2 = 0xFFFFFFFFFFFFFFFFLL;
}
void EnableYQ() {
EnableBasicServices = true;
EnableLogger = true;
EnableSchedulerActor = true;
EnableStatsCollector = true;
EnableSelfPing = true;
EnableMemoryLog = true;
EnableGRpcService = true;
EnableSecurityServices = true;
EnableYandexQuery = true;
EnableViewerService = true;
EnableMeteringWriter = true;
EnableProfiler = true;
}
void SetTinyMode() {
EnableSelfPing = false;
EnableMemoryTracker = false;
// TODO: set EnableStatsCollector to false as well
}
TBasicKikimrServicesMask() {
EnableAll();
}
};
static_assert(sizeof(TBasicKikimrServicesMask) == 16, "expected sizeof(TBasicKikimrServicesMask) == 16");
struct TKikimrRunConfig {
NKikimrConfig::TAppConfig& AppConfig;
ui32 NodeId;
TKikimrScopeId ScopeId;
TString PathToConfigCacheFile;
TString TenantName;
TBasicKikimrServicesMask ServicesMask;
TMap<TString, TString> Labels;
TString ClusterName;
NKikimrConfig::TAppConfig InitialCmsConfig;
NKikimrConfig::TAppConfig InitialCmsYamlConfig;
THashMap<ui32, TConfigItemInfo> ConfigInitInfo;
TKikimrRunConfig(NKikimrConfig::TAppConfig& appConfig,
ui32 nodeId = 0, const TKikimrScopeId& scopeId = {});
};
}