Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13891 )
Change subject: WIP KUDU-2780: create thread for auto-rebalancing (1/n) ...................................................................... Patch Set 1: (1 comment) http://gerrit.cloudera.org:8080/#/c/13891/1/src/kudu/master/autorebalancer-test.cc File src/kudu/master/autorebalancer-test.cc: http://gerrit.cloudera.org:8080/#/c/13891/1/src/kudu/master/autorebalancer-test.cc@69 PS1, Line 69: TEST_F(AutoRebalancerTest, ViewReports) { > This test keeps a cluster around for at least a couple polling intervals, a For initial POC testing that approach might be OK. However, in the long run the tests should provide coverage to automatically verify the required functionality: nobody is going to peer at the output of those tests unless something is reported to be broken. Probably, we want to represent auto-relabancer stats as a set of metrics which are programmatically retrievable from master. As for the latter, in Kudu there is a standardized way to do so: take a look at so-called metric counters and gauges: grep for METRIC_DEFINE_counter and METRIC_DEFINE_gauge_int64 in the code and see how it's used there and in corresponding tests (grep for METRIC_DECLARE_counter macros and FindOrCreateCounter). From what I remember, I recently worked with those somewhere in src/kudu/util/ttl_cache.h and src/kudu/util/ttl_cache-test.cc In addition to be able to retrieve the metrics from within a process, those are exposed via debug web server as well, so it's possible to retrieve them in JSON format via HTTP. -- To view, visit http://gerrit.cloudera.org:8080/13891 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibc829d14dc8636287bf3a4faa4ba76e86ab6885c Gerrit-Change-Number: 13891 Gerrit-PatchSet: 1 Gerrit-Owner: Hannah Nguyen <hannah.ngu...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Hannah Nguyen <hannah.ngu...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Tue, 23 Jul 2019 02:55:27 +0000 Gerrit-HasComments: Yes