You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ki...@apache.org on 2016/02/05 21:25:29 UTC
[10/11] storm git commit: Fixing java docs
Fixing java docs
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/2b8c8424
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/2b8c8424
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/2b8c8424
Branch: refs/heads/1.x-branch
Commit: 2b8c8424ec80b75c37bea46f75b8c44a8c095198
Parents: 137efb1
Author: Kishor Patil <kp...@yahoo-inc.com>
Authored: Thu Feb 4 22:12:59 2016 -0600
Committer: Kishor Patil <kp...@yahoo-inc.com>
Committed: Fri Feb 5 20:24:44 2016 +0000
----------------------------------------------------------------------
.../src/clj/org/apache/storm/daemon/common.clj | 4 ++--
storm-core/src/jvm/org/apache/storm/Config.java | 2 +-
.../storm/daemon/metrics/MetricsUtils.java | 19 ++++++++++++++++---
3 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/2b8c8424/storm-core/src/clj/org/apache/storm/daemon/common.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/daemon/common.clj b/storm-core/src/clj/org/apache/storm/daemon/common.clj
index 3c9eaca..c1e261f 100644
--- a/storm-core/src/clj/org/apache/storm/daemon/common.clj
+++ b/storm-core/src/clj/org/apache/storm/daemon/common.clj
@@ -19,9 +19,9 @@
InvalidTopologyException GlobalStreamId]
[org.apache.storm.utils ThriftTopologyUtils])
(:import [org.apache.storm.utils Utils])
- (:import [org.apache.storm.statistics.reporters PreparableReporter]
+ (:import [org.apache.storm.daemon.metrics.reporters PreparableReporter]
[com.codahale.metrics MetricRegistry]
- [org.apache.storm.statistics StatisticsUtils])
+ [org.apache.storm.daemon.metrics MetricsUtils])
(:import [org.apache.storm.task WorkerTopologyContext])
(:import [org.apache.storm Constants])
(:import [org.apache.storm.metric SystemBolt])
http://git-wip-us.apache.org/repos/asf/storm/blob/2b8c8424/storm-core/src/jvm/org/apache/storm/Config.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/Config.java b/storm-core/src/jvm/org/apache/storm/Config.java
index df0e64c..74231a0 100644
--- a/storm-core/src/jvm/org/apache/storm/Config.java
+++ b/storm-core/src/jvm/org/apache/storm/Config.java
@@ -140,7 +140,7 @@ public class Config extends HashMap<String, Object> {
public static final String STORM_META_SERIALIZATION_DELEGATE = "storm.meta.serialization.delegate";
/**
- * A list of daemon metrics reporter plugin class names. The classes should implement
+ * A list of daemon metrics reporter plugin class names.
* These plugins must implement {@link org.apache.storm.daemon.metrics.reporters.PreparableReporter} interface.
*/
@isStringList
http://git-wip-us.apache.org/repos/asf/storm/blob/2b8c8424/storm-core/src/jvm/org/apache/storm/daemon/metrics/MetricsUtils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/daemon/metrics/MetricsUtils.java b/storm-core/src/jvm/org/apache/storm/daemon/metrics/MetricsUtils.java
index aa5ce28..56b920b 100644
--- a/storm-core/src/jvm/org/apache/storm/daemon/metrics/MetricsUtils.java
+++ b/storm-core/src/jvm/org/apache/storm/daemon/metrics/MetricsUtils.java
@@ -20,7 +20,6 @@ package org.apache.storm.daemon.metrics;
import org.apache.storm.Config;
import org.apache.storm.daemon.metrics.reporters.JmxPreparableReporter;
import org.apache.storm.daemon.metrics.reporters.PreparableReporter;
-import org.apache.storm.utils.ConfigUtils;
import org.apache.storm.utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -86,8 +85,8 @@ public class MetricsUtils {
public static File getCsvLogDir(Map stormConf) {
String csvMetricsLogDirectory = Utils.getString(stormConf.get(Config.STORM_DAEMON_METRICS_REPORTER_CSV_LOG_DIR), null);
if (csvMetricsLogDirectory == null) {
- csvMetricsLogDirectory = ConfigUtils.absoluteHealthCheckDir(stormConf);
- csvMetricsLogDirectory = csvMetricsLogDirectory + ConfigUtils.FILE_SEPARATOR + "csvmetrics";
+ csvMetricsLogDirectory = absoluteStormLocalDir(stormConf);
+ csvMetricsLogDirectory = csvMetricsLogDirectory + File.separator + "csvmetrics";
}
File csvMetricsDir = new File(csvMetricsLogDirectory);
validateCreateOutputDir(csvMetricsDir);
@@ -105,4 +104,18 @@ public class MetricsUtils {
throw new IllegalStateException(dir.getName() + " is not a directory.");
}
}
+
+ public static String absoluteStormLocalDir(Map conf) {
+ String stormHome = System.getProperty("storm.home");
+ String localDir = (String) conf.get(Config.STORM_LOCAL_DIR);
+ if (localDir == null) {
+ return (stormHome + File.separator + "storm-local");
+ } else {
+ if (new File(localDir).isAbsolute()) {
+ return localDir;
+ } else {
+ return (stormHome + File.separator + localDir);
+ }
+ }
+ }
}