This is an automated email from the ASF dual-hosted git repository.
vogievetsky pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new d78fedd Web console: Don't include realtime segments in size
calculations. (#10482)
d78fedd is described below
commit d78fedd13c2271c04dce4b49d6d123d17228570f
Author: Gian Merlino <[email protected]>
AuthorDate: Tue Oct 6 18:56:54 2020 -0700
Web console: Don't include realtime segments in size calculations. (#10482)
It's always zero, and so it messes up averages, mins, and counts.
---
.../src/views/datasource-view/datasource-view.tsx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/web-console/src/views/datasource-view/datasource-view.tsx
b/web-console/src/views/datasource-view/datasource-view.tsx
index 02397c6..c8aa949 100644
--- a/web-console/src/views/datasource-view/datasource-view.tsx
+++ b/web-console/src/views/datasource-view/datasource-view.tsx
@@ -229,18 +229,18 @@ export class DatasourcesView extends React.PureComponent<
COUNT(*) FILTER (WHERE is_available = 1 AND ((is_published = 1 AND
is_overshadowed = 0) OR is_realtime = 1)) AS num_available_segments,
COUNT(*) FILTER (WHERE is_published = 1 AND is_overshadowed = 0 AND
is_available = 0) AS num_segments_to_load,
COUNT(*) FILTER (WHERE is_available = 1 AND NOT ((is_published = 1 AND
is_overshadowed = 0) OR is_realtime = 1)) AS num_segments_to_drop,
- SUM("size") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) AS total_data_size,
- SUM("size" * "num_replicas") FILTER (WHERE (is_published = 1 AND
is_overshadowed = 0) OR is_realtime = 1) AS replicated_size,
- MIN("size") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) AS min_segment_size,
+ SUM("size") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0)) AS
total_data_size,
+ SUM("size" * "num_replicas") FILTER (WHERE (is_published = 1 AND
is_overshadowed = 0)) AS replicated_size,
+ MIN("size") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0)) AS
min_segment_size,
(
- SUM("size") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) /
- COUNT(*) FILTER (WHERE (is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1)
+ SUM("size") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0)) /
+ COUNT(*) FILTER (WHERE (is_published = 1 AND is_overshadowed = 0))
) AS avg_segment_size,
- MAX("size") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) AS max_segment_size,
+ MAX("size") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0)) AS
max_segment_size,
SUM("num_rows") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) AS total_rows,
(
- SUM("size") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) /
- SUM("num_rows") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0)
OR is_realtime = 1)
+ SUM("size") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0)) /
+ SUM("num_rows") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0))
) AS avg_row_size
FROM sys.segments
GROUP BY 1`;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]