You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2020/01/24 11:38:28 UTC

[storm] branch master updated: STORM-3512 Empty implementation for the MetricStore. (#3152)

This is an automated email from the ASF dual-hosted git repository.

srdo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git


The following commit(s) were added to refs/heads/master by this push:
     new 86e5b2c  STORM-3512 Empty implementation for the MetricStore.  (#3152)
86e5b2c is described below

commit 86e5b2c514b0f03fe566d95c1c0f695242d1027f
Author: tit4 <ti...@gmail.com>
AuthorDate: Fri Jan 24 14:38:13 2020 +0300

    STORM-3512 Empty implementation for the MetricStore.  (#3152)
    
    * STORM-3512 Empty implementation for the MetricStore. Intended to be use in the config to disable monitoring.
---
 .../apache/storm/metricstore/NoOpMetricStore.java  | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/storm-server/src/main/java/org/apache/storm/metricstore/NoOpMetricStore.java b/storm-server/src/main/java/org/apache/storm/metricstore/NoOpMetricStore.java
new file mode 100644
index 0000000..c9f67c1
--- /dev/null
+++ b/storm-server/src/main/java/org/apache/storm/metricstore/NoOpMetricStore.java
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with the License.  You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+package org.apache.storm.metricstore;
+
+import java.util.Map;
+import org.apache.storm.metric.StormMetricsRegistry;
+
+@SuppressWarnings("unused")
+public class NoOpMetricStore implements MetricStore {
+
+    @Override
+    public void prepare(Map<String, Object> config, StormMetricsRegistry metricsRegistry) {}
+
+    @Override
+    public void insert(Metric metric) { }
+
+    @Override
+    public boolean populateValue(Metric metric) {
+        return true;
+    }
+
+    @Override
+    public void close() { }
+
+    @Override
+    public void scan(FilterOptions filter, ScanCallback scanCallback) { }
+}
+
+
+
+