Github user harshach commented on a diff in the pull request:
https://github.com/apache/storm/pull/1881#discussion_r96559764
--- Diff:
storm-core/src/jvm/org/apache/storm/metric/ClusterMetricsConsumerExecutor.java
---
@@ -40,31 +39,49 @@ public ClusterMetricsConsumerExecutor(String
consumerClassName, Object registrat
public void prepare() {
try {
metricsConsumer =
(IClusterMetricsConsumer)Class.forName(consumerClassName).newInstance();
+ metricsConsumer.prepare(registrationArgument);
} catch (Exception e) {
- throw new RuntimeException("Could not instantiate a class
listed in config under section " +
- Config.STORM_CLUSTER_METRICS_CONSUMER_REGISTER + "
with fully qualified name " + consumerClassName, e);
- }
+ LOG.error("Could not instantiate or prepare Cluster Metrics
Consumer with fully qualified name " +
+ consumerClassName, e);
- metricsConsumer.prepare(registrationArgument);
+ if (metricsConsumer != null) {
--- End diff --
do we want to move this to finally clause
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---