Hello Alexey Serbin, Kudu Jenkins, Adar Dembo,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/14128

to look at the new patch set (#11).

Change subject: [metrics] Add a metric to count merged entities when merge 
metrics
......................................................................

[metrics] Add a metric to count merged entities when merge metrics

When metric entities merged to a new entity, we don't know how many
entities it's merged from.
This patch adds a new metric 'merged_entities_count_of_<entity>' to
entity and set value to 1, then the new merged entity will have the
same metric with value merged.
In Kudu, when we want to check whether tables are balanced or not on
tservers, and how many replicas distributed on each tserver, though
we can use CLI tool like 'kudu cluster rebalance' to check per-table
balance status of a cluster, but we have to fetch balance info table
by table (by add --tables=xx flag), and also we have to "run command"
in thirdparty monitor system and this tool seems not fast enough
because it will call functions like RetrieveAllTablets.
Now we can use this new feature to check whether a table is balanced
or not by thirdparty monitor system efficiently. For example, when
we fetch metrics from tserver by:
http://<host>:<port>/metrics?merge_rules=tablet|table|table_name
we can get merged metrics of table entity from each tserver as
mentioned in commit fe6e5cc0c9c1573de174d1ce7838b449373ae36e, and now
we can get an extra size type gauge metric
"merged_entities_count_of_tablet" that indicate how many replicas this
tserver hold of a table, then compare this metric of each tserver and
judge whether this table is balanced or not.

Change-Id: I652b457a2df73414f95f5d1d5efaa003cc262bd1
---
M src/kudu/master/catalog_manager.cc
M src/kudu/server/server_base.cc
M src/kudu/tablet/tablet.cc
M src/kudu/util/metrics-test.cc
M src/kudu/util/metrics.cc
M src/kudu/util/metrics.h
6 files changed, 52 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/28/14128/11
--
To view, visit http://gerrit.cloudera.org:8080/14128
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I652b457a2df73414f95f5d1d5efaa003cc262bd1
Gerrit-Change-Number: 14128
Gerrit-PatchSet: 11
Gerrit-Owner: Yingchun Lai <405403...@qq.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <405403...@qq.com>

Reply via email to