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 2016/03/02 18:27:39 UTC

[6/9] storm git commit: 1. revert changes to defaults.yaml 2. add logs to .gitignore 3. add maven-antrun-plugin to delete logs directory generated while running tests 4. remove storm.local.dir property check

1. revert changes to defaults.yaml
2. add logs to .gitignore
3. add maven-antrun-plugin to delete logs directory generated while running tests
4. remove storm.local.dir property check


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/3def2364
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/3def2364
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/3def2364

Branch: refs/heads/master
Commit: 3def2364b37a631a3727ca5353949022e341cc0c
Parents: 9165b60
Author: 卫乐 <we...@taobao.com>
Authored: Wed Mar 2 11:11:05 2016 +0800
Committer: 卫乐 <we...@taobao.com>
Committed: Wed Mar 2 11:11:05 2016 +0800

----------------------------------------------------------------------
 .gitignore                                      |  1 +
 conf/defaults.yaml                              |  1 -
 pom.xml                                         | 20 ++++++++++++++++++++
 .../jvm/org/apache/storm/utils/ConfigUtils.java |  8 +++-----
 4 files changed, 24 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/3def2364/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 08b217a..13427bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,3 +38,4 @@ metastore_db
 .settings/
 .project
 .classpath
+logs

http://git-wip-us.apache.org/repos/asf/storm/blob/3def2364/conf/defaults.yaml
----------------------------------------------------------------------
diff --git a/conf/defaults.yaml b/conf/defaults.yaml
index 28b9af4..9817161 100644
--- a/conf/defaults.yaml
+++ b/conf/defaults.yaml
@@ -23,7 +23,6 @@ java.library.path: "/usr/local/lib:/opt/local/lib:/usr/lib"
 ### storm.* configs are general configurations
 # the local dir is where jars are kept
 storm.local.dir: "storm-local"
-storm.log.dir: "logs"
 storm.log4j2.conf.dir: "log4j2"
 storm.zookeeper.servers:
     - "localhost"

http://git-wip-us.apache.org/repos/asf/storm/blob/3def2364/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ec5d1e7..fce54db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -916,6 +916,26 @@
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-antrun-plugin</artifactId>
+                    <version>1.8</version>
+                    <executions>
+                        <execution>
+                            <phase>install</phase>
+                            <goals>
+                                <goal>run</goal>
+                            </goals>
+                            <configuration>
+                                <tasks>
+                                    <delete quiet="true" includeEmptyDirs="true" failonerror="false">
+                                        <fileset dir="logs"/>
+                                    </delete>
+                                </tasks>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-assembly-plugin</artifactId>
                     <version>2.2.2</version>
                 </plugin>

http://git-wip-us.apache.org/repos/asf/storm/blob/3def2364/storm-core/src/jvm/org/apache/storm/utils/ConfigUtils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/utils/ConfigUtils.java b/storm-core/src/jvm/org/apache/storm/utils/ConfigUtils.java
index 36d4352..7fd61fa 100644
--- a/storm-core/src/jvm/org/apache/storm/utils/ConfigUtils.java
+++ b/storm-core/src/jvm/org/apache/storm/utils/ConfigUtils.java
@@ -66,12 +66,10 @@ public class ConfigUtils {
             dir = System.getProperty("storm.log.dir");
         } else if ((conf = readStormConfig()).get("storm.log.dir") != null) {
             dir = String.valueOf(conf.get("storm.log.dir"));
-        } else if (System.getProperty("storm.local.dir") != null) {
-            dir = System.getProperty("storm.local.dir") + FILE_SEPARATOR + "logs";
-        } else if (conf.get("storm.local.dir") != null) {
-            dir = conf.get("storm.local.dir") + FILE_SEPARATOR + "logs";
+        } else if (System.getProperty("storm.home") != null) {
+            dir = System.getProperty("storm.home") + FILE_SEPARATOR + "logs";
         } else {
-            dir = concatIfNotNull(System.getProperty("storm.home")) + FILE_SEPARATOR + "logs";
+            dir = "logs";
         }
         try {
             return new File(dir).getCanonicalPath();