You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2018/02/13 20:50:15 UTC
[2/3] storm git commit: comment clarifications
comment clarifications
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/23d704a6
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/23d704a6
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/23d704a6
Branch: refs/heads/master
Commit: 23d704a6d9d2af0e2fa35624463b90aa055347e3
Parents: 1eb355e
Author: Aaron Gresch <ag...@yahoo-inc.com>
Authored: Mon Feb 12 16:27:37 2018 -0600
Committer: Aaron Gresch <ag...@yahoo-inc.com>
Committed: Mon Feb 12 16:27:37 2018 -0600
----------------------------------------------------------------------
.../src/main/java/org/apache/storm/DaemonConfig.java | 4 ++--
.../apache/storm/metricstore/MetricStoreConfig.java | 14 +++++++-------
.../storm/metricstore/WorkerMetricsProcessor.java | 4 ++--
3 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/23d704a6/storm-server/src/main/java/org/apache/storm/DaemonConfig.java
----------------------------------------------------------------------
diff --git a/storm-server/src/main/java/org/apache/storm/DaemonConfig.java b/storm-server/src/main/java/org/apache/storm/DaemonConfig.java
index 8e88bef..5080710 100644
--- a/storm-server/src/main/java/org/apache/storm/DaemonConfig.java
+++ b/storm-server/src/main/java/org/apache/storm/DaemonConfig.java
@@ -1031,7 +1031,7 @@ public class DaemonConfig implements Validated {
"storm.supervisor.medium.memory.grace.period.ms";
/**
- * Class implementing MetricStore.
+ * Class implementing MetricStore. Runs on Nimbus.
*/
@NotNull
@isString
@@ -1040,7 +1040,7 @@ public class DaemonConfig implements Validated {
public static final String STORM_METRIC_STORE_CLASS = "storm.metricstore.class";
/**
- * Class implementing WorkerMetricsProcessor.
+ * Class implementing WorkerMetricsProcessor. Runs on Supervisors.
*/
@NotNull
@isString
http://git-wip-us.apache.org/repos/asf/storm/blob/23d704a6/storm-server/src/main/java/org/apache/storm/metricstore/MetricStoreConfig.java
----------------------------------------------------------------------
diff --git a/storm-server/src/main/java/org/apache/storm/metricstore/MetricStoreConfig.java b/storm-server/src/main/java/org/apache/storm/metricstore/MetricStoreConfig.java
index 96bd9e4..ac52bd5 100644
--- a/storm-server/src/main/java/org/apache/storm/metricstore/MetricStoreConfig.java
+++ b/storm-server/src/main/java/org/apache/storm/metricstore/MetricStoreConfig.java
@@ -25,7 +25,7 @@ import org.apache.storm.DaemonConfig;
public class MetricStoreConfig {
/**
- * Configures metrics store to use the class specified in the conf.
+ * Configures metrics store (running on Nimbus) to use the class specified in the conf.
* @param conf Storm config map
* @return MetricStore prepared store
* @throws MetricException on misconfiguration
@@ -37,14 +37,14 @@ public class MetricStoreConfig {
MetricStore store = (MetricStore) (Class.forName(storeClass)).newInstance();
store.prepare(conf);
return store;
- } catch (Throwable t) {
- throw new MetricException("Failed to create metric store", t);
+ } catch (Exception e) {
+ throw new MetricException("Failed to create metric store", e);
}
}
/**
- * Configures metric processor to use the class specified in the conf.
- * @param conf Storm config map
+ * Configures metric processor (running on supervisor) to use the class specified in the conf.
+ * @param conf the supervisor config
* @return WorkerMetricsProcessor prepared processor
* @throws MetricException on misconfiguration
*/
@@ -55,8 +55,8 @@ public class MetricStoreConfig {
WorkerMetricsProcessor processor = (WorkerMetricsProcessor) (Class.forName(processorClass)).newInstance();
processor.prepare(conf);
return processor;
- } catch (Throwable t) {
- throw new MetricException("Failed to create metric processor", t);
+ } catch (Exception e) {
+ throw new MetricException("Failed to create metric processor", e);
}
}
}
http://git-wip-us.apache.org/repos/asf/storm/blob/23d704a6/storm-server/src/main/java/org/apache/storm/metricstore/WorkerMetricsProcessor.java
----------------------------------------------------------------------
diff --git a/storm-server/src/main/java/org/apache/storm/metricstore/WorkerMetricsProcessor.java b/storm-server/src/main/java/org/apache/storm/metricstore/WorkerMetricsProcessor.java
index 72e0ac0..dc1ec4a 100644
--- a/storm-server/src/main/java/org/apache/storm/metricstore/WorkerMetricsProcessor.java
+++ b/storm-server/src/main/java/org/apache/storm/metricstore/WorkerMetricsProcessor.java
@@ -24,8 +24,8 @@ import org.apache.storm.generated.WorkerMetrics;
public interface WorkerMetricsProcessor {
/**
- * Process insertion of worker metrics.
- * @param conf Storm config map
+ * Process insertion of worker metrics. The implementation should be thread-safe.
+ * @param conf the supervisor config
* @param metrics the metrics to process
* @throws MetricException on error
*/