dlmarion opened a new pull request, #5012: URL: https://github.com/apache/accumulo/pull/5012
Introduced a new Metrics Thrift API that all server types implement and the foundation for a new Monitor server implementation. This change includes dependencies on Google FlatBuffers (see https://github.com/google/flatbuffers and https://flatbuffers.dev/) and Javalin (see https://github.com/javalin/javalin and https://javalin.io/), both of which are licensed under the Apache License Version 2.0. The flatbuffers IDL file can be used during the Maven build to regenerate the java code using the `flatbuffers` profile without having to install anything locally (on most platforms). I modified all of the Thrift server processors to respond to a new Metrics RPC, which returns a MetricsResponse type. The response object includes identifying information for the server, the timestamp of the response, and a list of byte arrays. Each byte array is a flatbuffer encoding of a Metric (name, type, tags, and value). The new MetricsThriftRpcIT test validates that each of the server types responds to this new Thrift API. I modified the Monitor server to start a new endpoint using Javaln. Javalin is a wrapper on top of Jetty, it provides a nicer API for configuing the server, additional features like debug logging, a route endpoint (see image below), and other plugins for dealing with popular javascript frameworks. When the Monitor server is started a free ephemeral port is acquired for hosting the Javalin-based Jetty endpoint. This port is discoverable in the log and the long term plan would be to remove the current Jetty based monitor and wire up the new Javalin one to the existing properties. The new monitor code periodically retrieves the MetricResponses from the servers and populates some internal datastructures (essentially a Caffeine Cache and some indexes into it). The use of FlatBuffers here is for memory and time efficiency, the metrics are not deserialized unless they are needed (for example to send back to the UI). We could also provide the ability to filter on metric names, which would only require a deserialization of the name and not the type, tags, or value. Route endpoint image:  Related to #4973 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org