1
1
#include " ydb_setup.h"
2
2
3
+ #include < library/cpp/colorizer/colors.h>
4
+
3
5
#include < ydb/core/kqp/common/kqp_script_executions.h>
4
6
#include < ydb/core/kqp/proxy_service/kqp_script_executions.h>
5
7
@@ -112,12 +114,19 @@ class TYdbSetup::TImpl {
112
114
NKikimr::Tests::TServerSettings GetServerSettings () {
113
115
ui32 msgBusPort = PortManager_.GetPort ();
114
116
115
- NKikimr::Tests::TServerSettings serverSettings (msgBusPort);
117
+ NKikimr::Tests::TServerSettings serverSettings (msgBusPort, Settings_. AppConfig . GetAuthConfig (), Settings_. AppConfig . GetPQConfig () );
116
118
serverSettings.SetNodeCount (Settings_.NodeCount );
117
119
118
120
serverSettings.SetDomainName (Settings_.DomainName );
119
121
serverSettings.SetAppConfig (Settings_.AppConfig );
120
122
serverSettings.SetFeatureFlags (Settings_.AppConfig .GetFeatureFlags ());
123
+ serverSettings.SetControls (Settings_.AppConfig .GetImmediateControlsConfig ());
124
+ serverSettings.SetCompactionConfig (Settings_.AppConfig .GetCompactionConfig ());
125
+ serverSettings.PQClusterDiscoveryConfig = Settings_.AppConfig .GetPQClusterDiscoveryConfig ();
126
+ serverSettings.NetClassifierConfig = Settings_.AppConfig .GetNetClassifierConfig ();
127
+
128
+ const auto & kqpSettings = Settings_.AppConfig .GetKQPConfig ().GetSettings ();
129
+ serverSettings.SetKqpSettings ({kqpSettings.begin (), kqpSettings.end ()});
121
130
122
131
serverSettings.SetCredentialsFactory (std::make_shared<TStaticSecuredCredentialsFactory>(Settings_.YqlToken ));
123
132
serverSettings.SetComputationFactory (Settings_.ComputationFactory );
@@ -127,6 +136,10 @@ class TYdbSetup::TImpl {
127
136
SetLoggerSettings (serverSettings);
128
137
SetFunctionRegistry (serverSettings);
129
138
139
+ if (Settings_.MonitoringEnabled ) {
140
+ serverSettings.InitKikimrRunConfig ();
141
+ }
142
+
130
143
return serverSettings;
131
144
}
132
145
@@ -177,13 +190,18 @@ class TYdbSetup::TImpl {
177
190
public:
178
191
explicit TImpl (const TYdbSetupSettings& settings)
179
192
: Settings_(settings)
193
+ , CoutColors_(NColorizer::AutoColors(Cout))
180
194
{
181
195
InitializeYqlLogger ();
182
196
InitializeServer ();
183
197
184
198
if (Settings_.NodeCount > 1 ) {
185
199
WaitResourcesPublishing ();
186
200
}
201
+
202
+ if (Settings_.MonitoringEnabled ) {
203
+ Cout << CoutColors_.Cyan () << " Monitoring port: " << CoutColors_.Default () << Server_->GetRuntime ()->GetMonPort () << Endl;
204
+ }
187
205
}
188
206
189
207
NKikimr::NKqp::TEvKqp::TEvQueryResponse::TPtr SchemeQueryRequest (const TString& query, const TString& traceId) const {
@@ -302,6 +320,7 @@ class TYdbSetup::TImpl {
302
320
303
321
private:
304
322
TYdbSetupSettings Settings_;
323
+ NColorizer::TColors CoutColors_;
305
324
306
325
THolder<NKikimr::Tests::TServer> Server_;
307
326
THolder<NKikimr::Tests::TClient> Client_;
0 commit comments