You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by fj...@apache.org on 2019/07/10 15:29:16 UTC

[incubator-druid] branch master updated: added replicated size (#8043)

This is an automated email from the ASF dual-hosted git repository.

fjy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 1712158  added replicated size (#8043)
1712158 is described below

commit 17121587342f03be78ec3551d0521276ea01adb0
Author: Vadim Ogievetsky <va...@gmail.com>
AuthorDate: Wed Jul 10 08:29:05 2019 -0700

    added replicated size (#8043)
---
 .../__snapshots__/datasource-view.spec.tsx.snap              |  9 +++++++++
 web-console/src/views/datasource-view/datasource-view.tsx    | 12 ++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/web-console/src/views/datasource-view/__snapshots__/datasource-view.spec.tsx.snap b/web-console/src/views/datasource-view/__snapshots__/datasource-view.spec.tsx.snap
index c2f33f2..b619181 100755
--- a/web-console/src/views/datasource-view/__snapshots__/datasource-view.spec.tsx.snap
+++ b/web-console/src/views/datasource-view/__snapshots__/datasource-view.spec.tsx.snap
@@ -30,6 +30,7 @@ exports[`data source view matches snapshot 1`] = `
           "Retention",
           "Compaction",
           "Size",
+          "Replicated size",
           "Num rows",
           "Actions",
         ]
@@ -145,6 +146,14 @@ exports[`data source view matches snapshot 1`] = `
         },
         Object {
           "Cell": [Function],
+          "Header": "Replicated size",
+          "accessor": "replicated_size",
+          "filterable": false,
+          "show": true,
+          "width": 100,
+        },
+        Object {
+          "Cell": [Function],
           "Header": "Num rows",
           "accessor": "num_rows",
           "filterable": false,
diff --git a/web-console/src/views/datasource-view/datasource-view.tsx b/web-console/src/views/datasource-view/datasource-view.tsx
index 9a4ae18..8297a71 100644
--- a/web-console/src/views/datasource-view/datasource-view.tsx
+++ b/web-console/src/views/datasource-view/datasource-view.tsx
@@ -57,6 +57,7 @@ const tableColumns: string[] = [
   'Retention',
   'Compaction',
   'Size',
+  'Replicated size',
   'Num rows',
   ActionCell.COLUMN_LABEL,
 ];
@@ -100,6 +101,7 @@ interface DatasourceQueryResultRow {
   num_segments_to_load: number;
   num_segments_to_drop: number;
   size: number;
+  replicated_size: number;
   num_rows: number;
 }
 
@@ -138,6 +140,7 @@ export class DatasourcesView extends React.PureComponent<
   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 size,
+  SUM("size" * "num_replicas") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0) OR is_realtime = 1) AS replicated_size,
   SUM("num_rows") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0) OR is_realtime = 1) AS num_rows
 FROM sys.segments
 GROUP BY 1`;
@@ -201,6 +204,7 @@ GROUP BY 1`;
                 num_segments_to_load: segmentsToLoad,
                 num_segments_to_drop: 0,
                 size: d.properties.segments.size,
+                replicated_size: -1,
                 num_rows: -1,
               };
             },
@@ -762,6 +766,14 @@ GROUP BY 1`;
               show: hiddenColumns.exists('Size'),
             },
             {
+              Header: 'Replicated size',
+              accessor: 'replicated_size',
+              filterable: false,
+              width: 100,
+              Cell: row => formatBytes(row.value),
+              show: hiddenColumns.exists('Replicated size'),
+            },
+            {
               Header: 'Num rows',
               accessor: 'num_rows',
               filterable: false,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org