Skip to content

Commit c04df91

Browse files
authored
solomon: support reading from monitoring (#7903)
1 parent 96075e8 commit c04df91

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

ydb/library/yql/providers/solomon/async_io/dq_solomon_read_actor.cpp

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -69,25 +69,15 @@ struct TDqSolomonReadParams {
6969
NSo::NProto::TDqSolomonSource Source;
7070
};
7171

72-
TString GetReadSolomonUrl(const TString& endpoint, bool useSsl, const TString& project, const ::NYql::NSo::NProto::ESolomonClusterType& type) {
72+
TString GetReadSolomonUrl(const TString& endpoint, bool useSsl, const TString& project) {
7373
TUrlBuilder builder((useSsl ? "https://" : "http://") + endpoint);
7474

75-
switch (type) {
76-
case NSo::NProto::ESolomonClusterType::CT_SOLOMON: {
77-
builder.AddPathComponent("api");
78-
builder.AddPathComponent("v2");
79-
builder.AddPathComponent("projects");
80-
builder.AddPathComponent(project);
81-
builder.AddPathComponent("sensors");
82-
builder.AddPathComponent("data");
83-
break;
84-
}
85-
case NSo::NProto::ESolomonClusterType::CT_MONITORING: {
86-
[[fallthrough]];
87-
}
88-
default:
89-
Y_ENSURE(false, "Invalid cluster type " << ToString<ui32>(type));
90-
}
75+
builder.AddPathComponent("api");
76+
builder.AddPathComponent("v2");
77+
builder.AddPathComponent("projects");
78+
builder.AddPathComponent(project);
79+
builder.AddPathComponent("sensors");
80+
builder.AddPathComponent("data");
9181

9282
return builder.Build();
9383
}
@@ -260,8 +250,7 @@ class TDqSolomonReadActor : public NActors::TActorBootstrapped<TDqSolomonReadAct
260250
TString GetUrl() const {
261251
return GetReadSolomonUrl(ReadParams.Source.GetEndpoint(),
262252
ReadParams.Source.GetUseSsl(),
263-
ReadParams.Source.GetProject(),
264-
ReadParams.Source.GetClusterType());
253+
ReadParams.Source.GetProject());
265254
}
266255

267256
NHttp::THttpOutgoingRequestPtr BuildSolomonRequest(TStringBuf data) {

0 commit comments

Comments
 (0)