Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/16858 )
Change subject: [server] add 'uptime' metric for server ...................................................................... [server] add 'uptime' metric for server This patch adds a new 'uptime' metric for a Kudu server. The metric's value is reported as the duration of the time interval passed from the start of the server. The interval duration is reported in microseconds as many other time-related metrics. Initially I thought to reuse already existing field that stores server's start time as wall clock time in seconds, but such approach would not produce a reliable result given that the wall clock time can be set any time by a super user, hence a wall-clock-based delta could not reliably provide the actual uptime of a server. I also did a minor refactoring on BaseServer::Init() and BaseServer::Start() methods, moving some steps from Init() to Start() which are belonging more to Start() rather than Init(). The motivation for this patch is the realization that sometimes it's not easy to interpret metric values reported for a server without knowing its uptime. I didn't add any tests for the newly introduced metric, but I manually verified that both kudu-master and kudu-tserver processes report uptime among their metrics at the "/metrics" HTTP endpoint. Change-Id: Idb362a71c625c05a2185b95ec24d3f371dcb4155 Reviewed-on: http://gerrit.cloudera.org:8080/16858 Reviewed-by: Andrew Wong <[email protected]> Tested-by: Kudu Jenkins --- M src/kudu/common/wire_protocol.proto M src/kudu/integration-tests/registration-test.cc M src/kudu/master/master.cc M src/kudu/server/server_base.cc M src/kudu/server/server_base.h M src/kudu/tserver/heartbeater.cc 6 files changed, 58 insertions(+), 27 deletions(-) Approvals: Andrew Wong: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/16858 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Idb362a71c625c05a2185b95ec24d3f371dcb4155 Gerrit-Change-Number: 16858 Gerrit-PatchSet: 6 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120)
