@@ -21,12 +21,6 @@ static constexpr TDuration ACL_SUCCESS_RETRY_TIMEOUT = TDuration::Seconds(30);
21
21
static constexpr TDuration ACL_ERROR_RETRY_TIMEOUT = TDuration::Seconds(5 );
22
22
static constexpr TDuration ACL_EXPIRATION_TIMEOUT = TDuration::Minutes(5 );
23
23
24
- NKikimrPQ::EConsumerScalingSupport DefaultScalingSupport () {
25
- // TODO fix me after support of paremeter ConsumerScalingSupport
26
- return AppData ()->FeatureFlags .GetEnableTopicSplitMerge () ? NKikimrPQ::EConsumerScalingSupport::FULL_SUPPORT
27
- : NKikimrPQ::EConsumerScalingSupport::NOT_SUPPORT;
28
- }
29
-
30
24
TString EncodeAnchor (const TString& v) {
31
25
auto r = Base64Encode (v);
32
26
while (r.EndsWith (' =' )) {
@@ -197,46 +191,95 @@ TString TPersQueueReadBalancer::GenerateStat() {
197
191
198
192
TStringStream str;
199
193
HTML (str) {
200
- TAG (TH2) { str << " PersQueueReadBalancer Tablet " ;}
201
- TAG (TH3) {str << " Topic: " << Topic;}
202
- TAG (TH3) {str << " Generation: " << Generation;}
203
- TAG (TH3) {str << " Inited: " << Inited;}
204
- TAG (TH3) {str << " ActivePipes: " << balancerStatistcs. Sessions . size ();}
205
- if (Inited) {
206
- TAG (TH3) {str << " Active partitions: " << NumActiveParts;}
207
- TAG (TH3) {str << " [Total/Max/Avg]WriteSpeedSec: " << metrics. TotalAvgWriteSpeedPerSec << " / " << metrics. MaxAvgWriteSpeedPerSec << " / " << metrics. TotalAvgWriteSpeedPerSec / NumActiveParts ;}
208
- TAG (TH3) {str << " [Total/Max/Avg]WriteSpeedMin: " << metrics. TotalAvgWriteSpeedPerMin << " / " << metrics. MaxAvgWriteSpeedPerMin << " / " << metrics. TotalAvgWriteSpeedPerMin / NumActiveParts;}
209
- TAG (TH3) {str << " [Total/Max/Avg]WriteSpeedHour: " << metrics. TotalAvgWriteSpeedPerHour << " / " << metrics. MaxAvgWriteSpeedPerHour << " / " << metrics. TotalAvgWriteSpeedPerHour / NumActiveParts;}
210
- TAG (TH3 ) {str << " [Total/Max/Avg]WriteSpeedDay: " << metrics. TotalAvgWriteSpeedPerDay << " / " << metrics. MaxAvgWriteSpeedPerDay << " / " << metrics. TotalAvgWriteSpeedPerDay / NumActiveParts;}
211
- TAG (TH3 ) {str << " TotalDataSize: " << AggregatedStats. TotalDataSize ;}
212
- TAG (TH3 ) {str << " ReserveSize: " << PartitionReserveSize (); }
213
- TAG (TH3) {str << " TotalUsedReserveSize: " << AggregatedStats. TotalUsedReserveSize ; }
214
- }
194
+ str << " <style> "
195
+ << " .properties { border-bottom-style: solid; border-top-style: solid; border-width: 1px; border-color: darkgrey; padding-bottom: 10px; } "
196
+ << " .properties>tbody>tr>td { padding-left: 10px; padding-right: 10px; } "
197
+ << " .tgrid { width: 100%; border: 0; } "
198
+ << " .tgrid>tbody>tr>td { vertical-align: top; } "
199
+ << " </style> " ;
200
+
201
+ TAG (TH3) {str << " PersQueueReadBalancer " << TabletID () << " ( " << Path << " ) " ;}
202
+
203
+ auto property = [&]( const TString& name, const auto value) {
204
+ TABLER ( ) {
205
+ TABLED ( ) { str << name ;}
206
+ TABLED ( ) { str << value; }
207
+ }
208
+ };
215
209
216
210
UL_CLASS (" nav nav-tabs" ) {
217
211
LI_CLASS (" active" ) {
218
- str << " <a href=\" #main\" data-toggle=\" tab\" >partitions</a>" ;
212
+ str << " <a href=\" #generic\" data-toggle=\" tab\" >Generic Info</a>" ;
213
+ }
214
+ LI () {
215
+ str << " <a href=\" #partitions\" data-toggle=\" tab\" >Partitions</a>" ;
219
216
}
220
217
for (auto & consumer : balancerStatistcs.Consumers ) {
221
218
LI () {
222
219
str << " <a href=\" #c_" << EncodeAnchor (consumer.ConsumerName ) << " \" data-toggle=\" tab\" >" << NPersQueue::ConvertOldConsumerName (consumer.ConsumerName ) << " </a>" ;
223
220
}
224
221
}
225
222
}
223
+
226
224
DIV_CLASS (" tab-content" ) {
227
- DIV_CLASS_ID (" tab-pane fade in active" , " main" ) {
228
- TABLE_SORTABLE_CLASS (" table" ) {
225
+ DIV_CLASS_ID (" tab-pane fade in active" , " generic" ) {
226
+ TABLE_CLASS (" tgrid" ) {
227
+ TABLEBODY () {
228
+ TABLER () {
229
+ TABLED () {
230
+ TABLE_CLASS (" properties" ) {
231
+ CAPTION () { str << " Tablet info" ; }
232
+ TABLEBODY () {
233
+ property (" Topic" , Topic);
234
+ property (" Path" , Path);
235
+ property (" Initialized" , Inited ? " yes" : " no" );
236
+ property (" SchemeShard" , TStringBuilder () << " <a href=\" ?TabletID=" << SchemeShardId << " \" >" << SchemeShardId << " </a>" );
237
+ property (" PathId" , PathId);
238
+ property (" Version" , Version);
239
+ property (" Generation" , Generation);
240
+ }
241
+ }
242
+ }
243
+ TABLED () {
244
+ if (Inited) {
245
+ TABLE_CLASS (" properties" ) {
246
+ CAPTION () { str << " Statistics" ; }
247
+ TABLEBODY () {
248
+ property (" Active pipes" , balancerStatistcs.Sessions .size ());
249
+ property (" Active partitions" , NumActiveParts);
250
+ property (" Total data size" , AggregatedStats.TotalDataSize );
251
+ property (" Reserve size" , PartitionReserveSize ());
252
+ property (" Used reserve size" , AggregatedStats.TotalUsedReserveSize );
253
+ property (" [Total/Max/Avg]WriteSpeedSec" , TStringBuilder () << metrics.TotalAvgWriteSpeedPerSec << " /" << metrics.MaxAvgWriteSpeedPerSec << " /" << metrics.TotalAvgWriteSpeedPerSec / NumActiveParts);
254
+ property (" [Total/Max/Avg]WriteSpeedMin" , TStringBuilder () << metrics.TotalAvgWriteSpeedPerMin << " /" << metrics.MaxAvgWriteSpeedPerMin << " /" << metrics.TotalAvgWriteSpeedPerMin / NumActiveParts);
255
+ property (" [Total/Max/Avg]WriteSpeedHour" , TStringBuilder () << metrics.TotalAvgWriteSpeedPerHour << " /" << metrics.MaxAvgWriteSpeedPerHour << " /" << metrics.TotalAvgWriteSpeedPerHour / NumActiveParts);
256
+ property (" [Total/Max/Avg]WriteSpeedDay" , TStringBuilder () << metrics.TotalAvgWriteSpeedPerDay << " /" << metrics.MaxAvgWriteSpeedPerDay << " /" << metrics.TotalAvgWriteSpeedPerDay / NumActiveParts);
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }
263
+ }
264
+ }
265
+
266
+ DIV_CLASS_ID (" tab-pane fade" , " partitions" ) {
267
+ TABLE_CLASS (" table" ) {
229
268
TABLEHEAD () {
230
269
TABLER () {
231
270
TABLEH () {str << " partition" ;}
232
271
TABLEH () { str << " tabletId" ;}
272
+ TABLEH () { str << " Size" ;}
233
273
}
234
274
}
235
275
TABLEBODY () {
236
- for (auto & p : PartitionsInfo) {
276
+ for (auto & [partitionId, partitionInfo] : PartitionsInfo) {
277
+ const auto & stats = AggregatedStats.Stats [partitionId];
278
+
237
279
TABLER () {
238
- TABLED () { str << p.first ;}
239
- TABLED () { HREF (TStringBuilder () << " ?TabletID=" << p.second .TabletId ) { str << p.second .TabletId ; } }
280
+ TABLED () { str << partitionId;}
281
+ TABLED () { HREF (TStringBuilder () << " ?TabletID=" << partitionInfo.TabletId ) { str << partitionInfo.TabletId ; } }
282
+ TABLED () { str << stats.DataSize ;}
240
283
}
241
284
}
242
285
}
@@ -659,6 +702,7 @@ void TPersQueueReadBalancer::Handle(TEvPersQueue::TEvStatusResponse::TPtr& ev, c
659
702
660
703
if (AggregatedStats.Cookies .empty ()) {
661
704
CheckStat (ctx);
705
+ Balancer->ProcessPendingStats (ctx);
662
706
}
663
707
}
664
708
@@ -762,7 +806,6 @@ void TPersQueueReadBalancer::CheckStat(const TActorContext& ctx) {
762
806
763
807
NTabletPipe::SendData (ctx, GetPipeClient (SchemeShardId, ctx), ev);
764
808
765
-
766
809
UpdateCounters (ctx);
767
810
}
768
811
0 commit comments