[
https://issues.apache.org/jira/browse/STORM-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15270597#comment-15270597
]
ASF GitHub Bot commented on STORM-1700:
---------------------------------------
Github user HeartSaVioR commented on a diff in the pull request:
https://github.com/apache/storm/pull/1324#discussion_r62035816
--- Diff:
storm-core/src/jvm/org/apache/storm/metric/MetricsConsumerBolt.java ---
@@ -17,24 +17,45 @@
*/
package org.apache.storm.metric;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
import org.apache.storm.Config;
import org.apache.storm.metric.api.IMetricsConsumer;
import org.apache.storm.task.IBolt;
import org.apache.storm.task.OutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.tuple.Tuple;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.util.Collection;
+import java.util.List;
import java.util.Map;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingDeque;
public class MetricsConsumerBolt implements IBolt {
+ public static final Logger LOG =
LoggerFactory.getLogger(MetricsConsumerBolt.class);
+
IMetricsConsumer _metricsConsumer;
String _consumerClassName;
OutputCollector _collector;
Object _registrationArgument;
+ private final int _maxRetainMetricTuples;
+ private Predicate<IMetricsConsumer.DataPoint> _filterPredicate;
+
+ private final BlockingQueue<MetricsTask> _taskQueue = new
LinkedBlockingDeque<>();
+ private Thread _taskExecuteThread;
+ private volatile boolean _running = true;
+
+ public MetricsConsumerBolt(String consumerClassName, Object
registrationArgument, int maxRetainMetricTuples,
+ Predicate<IMetricsConsumer.DataPoint>
filterPredicate) {
- public MetricsConsumerBolt(String consumerClassName, Object
registrationArgument) {
_consumerClassName = consumerClassName;
_registrationArgument = registrationArgument;
+ _maxRetainMetricTuples = maxRetainMetricTuples;
--- End diff --
Sure, and behavior should be documented. I'll address it.
> Introduce 'whitelist' / 'blacklist' option to MetricsConsumer
> -------------------------------------------------------------
>
> Key: STORM-1700
> URL: https://issues.apache.org/jira/browse/STORM-1700
> Project: Apache Storm
> Issue Type: Sub-task
> Components: storm-core
> Affects Versions: 1.0.0, 2.0.0
> Reporter: Jungtaek Lim
> Assignee: Jungtaek Lim
>
> Storm provides various metrics by default, and so on some external modules
> (storm-kafka).
> When we register MetricsConsumer, MetricsConsumer should handle all of
> metrics. If MetricsConsumer cannot keep up with these metrics, only way to
> keep up is increasing parallelism, which seems limited. Furthermore, some
> users don't want to care about some metrics since unintended metrics will
> fill external storage.
> Though MetricsConsumer itself can filter metrics by name, it would be better
> to support filter by Storm side. It will reduce the redundant works for Storm
> community.
> If we provide filter options, it would be great.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)