EdColeman commented on code in PR #3288:
URL: https://github.com/apache/accumulo/pull/3288#discussion_r1169386378


##########
server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java:
##########
@@ -87,6 +93,24 @@ public void runServer() throws Exception {
     }
   }
 
+  @Override
+  public void registerMetrics(MeterRegistry registry) {
+    lowMemoryMetricGuage =
+        Gauge
+            .builder(METRICS_APP_PREFIX + applicationName + "." + hostname + 
"."
+                + METRICS_APP_LOW_MEMORY, this, this::lowMemDetected)
+            .description(
+                "reports 1 when process memory usage is above threshold, 0 
when memory is okay") // optional
+            .register(registry);
+  }
+
+  private int lowMemDetected(AbstractServer abstractServer) {
+    if (abstractServer.context.getLowMemoryDetector().isRunningLowOnMemory()) {
+      return 1;
+    }
+    return 0;

Review Comment:
   fixed in 674a9da956 (method moved to ProcessMetrics)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to