Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix conflict

  • Loading branch information...
commit 288c72e1d811aad0c33318d1e800f3690f97e484 2 parents 2b868fe + 93178da
@nathanmarz authored
Showing with 193 additions and 124 deletions.
  1. +2 −0  .gitignore
  2. +19 −13 bin/build_release.sh
  3. +14 −11 bin/storm
  4. +26 −18 bin/to_maven.sh
  5. +0 −10 conf/log4j.properties
  6. +13 −0 conf/logback.xml
  7. +0 −9 log4j/storm.log.properties
  8. +24 −0 logback/cluster.xml
  9. +31 −19 project.clj
  10. +1 −1  src/clj/backtype/storm/bootstrap.clj
  11. +1 −1  src/clj/backtype/storm/daemon/supervisor.clj
  12. +1 −1  src/clj/backtype/storm/daemon/worker.clj
  13. +1 −1  src/clj/backtype/storm/util.clj
  14. +3 −2 src/jvm/backtype/storm/StormSubmitter.java
  15. +3 −2 src/jvm/backtype/storm/coordination/BatchBoltExecutor.java
  16. +3 −2 src/jvm/backtype/storm/coordination/CoordinatedBolt.java
  17. +3 −2 src/jvm/backtype/storm/drpc/DRPCSpout.java
  18. +3 −2 src/jvm/backtype/storm/drpc/JoinResult.java
  19. +3 −2 src/jvm/backtype/storm/drpc/ReturnResults.java
  20. +3 −2 src/jvm/backtype/storm/serialization/SerializationFactory.java
  21. +3 −2 src/jvm/backtype/storm/spout/ShellSpout.java
  22. +3 −2 src/jvm/backtype/storm/task/ShellBolt.java
  23. +3 −2 src/jvm/backtype/storm/testing/TestAggregatesCounter.java
  24. +3 −2 src/jvm/backtype/storm/testing/TestGlobalCount.java
  25. +3 −2 src/jvm/backtype/storm/testing/TestWordCounter.java
  26. +3 −2 src/jvm/backtype/storm/testing/TestWordSpout.java
  27. +3 −2 src/jvm/backtype/storm/topology/BasicBoltExecutor.java
  28. +3 −2 src/jvm/backtype/storm/transactional/TransactionalSpoutBatchExecutor.java
  29. +3 −2 src/jvm/backtype/storm/transactional/TransactionalSpoutCoordinator.java
  30. +3 −2 src/jvm/backtype/storm/utils/Time.java
  31. +3 −2 src/jvm/storm/trident/spout/TridentSpoutCoordinator.java
  32. +3 −2 src/jvm/storm/trident/spout/TridentSpoutExecutor.java
  33. +3 −2 src/jvm/storm/trident/topology/MasterBatchCoordinator.java
View
2  .gitignore
@@ -22,3 +22,5 @@ _release
.lein-deps-sum
*.iml
+/.project/
+/.lein-plugins/
View
32 bin/build_release.sh
@@ -1,29 +1,35 @@
#!/bin/bash
+function quit {
+ exit 1
+}
+trap quit 1 2 3 15 #Ctrl+C exits.
RELEASE=`head -1 project.clj | awk '{print $3}' | sed -e 's/\"//' | sed -e 's/\"//'`
+LEIN=`which lein2 || which lein`
+export LEIN_ROOT=1
echo Making release $RELEASE
DIR=_release/storm-$RELEASE
rm -rf _release
-export LEIN_ROOT=1
-rm *.zip
-rm *jar
-rm -rf lib
-rm -rf classes
-lein deps
-lein jar
-mkdir -p $DIR
-mkdir $DIR/lib
-cp storm*jar $DIR/
-cp lib/*.jar $DIR/lib
+rm -f *.zip
+$LEIN with-profile release clean
+$LEIN with-profile release deps
+$LEIN with-profile release jar
+$LEIN with-profile release pom
+mvn dependency:copy-dependencies
+
+mkdir -p $DIR/lib
+cp target/storm-*.jar $DIR/storm-${RELEASE}.jar
+cp target/dependency/*.jar $DIR/lib
cp CHANGELOG.md $DIR/
echo $RELEASE > $DIR/RELEASE
-cp -R log4j $DIR/
-mkdir $DIR/logs
+mkdir -p $DIR/logback
+mkdir -p $DIR/logs
+cp -R logback/cluster.xml $DIR/logback/cluster.xml
mkdir $DIR/conf
cp conf/storm.yaml.example $DIR/conf/storm.yaml
View
25 bin/storm
@@ -239,10 +239,10 @@ def nimbus(klass="backtype.storm.daemon.nimbus"):
See Setting up a Storm cluster for more information.
(https://github.com/nathanmarz/storm/wiki/Setting-up-a-Storm-cluster)
"""
- cppaths = [STORM_DIR + "/log4j", STORM_DIR + "/conf"]
+ cppaths = [STORM_DIR + "/conf"]
jvmopts = parse_args(confvalue("nimbus.childopts", cppaths)) + [
"-Dlogfile.name=nimbus.log",
- "-Dlog4j.configuration=storm.log.properties",
+ "-Dlogback.configurationFile=" + STORM_DIR + "/logback/cluster.xml",
]
exec_storm_class(
klass,
@@ -259,10 +259,10 @@ def supervisor(klass="backtype.storm.daemon.supervisor"):
See Setting up a Storm cluster for more information.
(https://github.com/nathanmarz/storm/wiki/Setting-up-a-Storm-cluster)
"""
- cppaths = [STORM_DIR + "/log4j", STORM_DIR + "/conf"]
+ cppaths = [STORM_DIR + "/conf"]
jvmopts = parse_args(confvalue("supervisor.childopts", cppaths)) + [
"-Dlogfile.name=supervisor.log",
- "-Dlog4j.configuration=storm.log.properties",
+ "-Dlogback.configurationFile=" + STORM_DIR + "/logback/cluster.xml",
]
exec_storm_class(
klass,
@@ -280,16 +280,16 @@ def ui():
See Setting up a Storm cluster for more information.
(https://github.com/nathanmarz/storm/wiki/Setting-up-a-Storm-cluster)
"""
- cppaths = [STORM_DIR + "/log4j", STORM_DIR + "/conf"]
+ cppaths = [STORM_DIR + "/conf"]
jvmopts = parse_args(confvalue("ui.childopts", cppaths)) + [
"-Dlogfile.name=ui.log",
- "-Dlog4j.configuration=storm.log.properties",
+ "-Dlogback.configurationFile=" + STORM_DIR + "/logback/cluster.xml",
]
exec_storm_class(
"backtype.storm.ui.core",
jvmtype="-server",
jvmopts=jvmopts,
- extrajars=[STORM_DIR + "/log4j", STORM_DIR, STORM_DIR + "/conf"])
+ extrajars=[STORM_DIR, STORM_DIR + "/conf"])
def drpc():
"""Syntax: [storm drpc]
@@ -300,12 +300,15 @@ def drpc():
See Distributed RPC for more information.
(https://github.com/nathanmarz/storm/wiki/Distributed-RPC)
"""
- jvmopts = ["-Xmx768m", "-Dlogfile.name=drpc.log", "-Dlog4j.configuration=storm.log.properties"]
+ jvmopts = ["-Xmx768m",
+ "-Dlogfile.name=drpc.log",
+ "-Dlogback.configurationFile=" + STORM_DIR + "/logback/cluster.xml"
+ ]
exec_storm_class(
"backtype.storm.daemon.drpc",
jvmtype="-server",
jvmopts=jvmopts,
- extrajars=[STORM_DIR + "/log4j", STORM_DIR + "/conf"])
+ extrajars=[STORM_DIR + "/conf"])
def dev_zookeeper():
"""Syntax: [storm dev-zookeeper]
@@ -314,11 +317,11 @@ def dev_zookeeper():
"storm.zookeeper.port" as its port. This is only intended for development/testing, the
Zookeeper instance launched is not configured to be used in production.
"""
- cppaths = [STORM_DIR + "/log4j", STORM_DIR + "/conf"]
+ cppaths = [STORM_DIR + "/conf"]
exec_storm_class(
"backtype.storm.command.dev_zookeeper",
jvmtype="-server",
- extrajars=[STORM_DIR + "/log4j", STORM_DIR + "/conf"])
+ extrajars=[STORM_DIR + "/conf"])
def version():
"""Syntax: [storm version]
View
44 bin/to_maven.sh
@@ -1,22 +1,30 @@
-#!/bin/bash
+#!/bin/bash
+function quit {
+ exit 1
+}
+trap quit 1 2 3 15 #Ctrl+C exits.
RELEASE=`head -1 project.clj | awk '{print $3}' | sed -e 's/\"//' | sed -e 's/\"//'`
+LEIN=`which lein2 || which lein`
+
+echo ==== Storm Jar ====
+$LEIN with-profile release clean
+$LEIN with-profile release jar
+$LEIN with-profile release pom
+scp target/storm*jar pom.xml clojars@clojars.org:
+rm -Rf target *.xml
+
+echo ==== Storm-Lib Jar ====
+rm conf/logback.xml
+$LEIN with-profile lib clean
+$LEIN with-profile lib jar
+$LEIN with-profile lib pom
+sed -i '' -e 's/artifactId\>storm/artifactId\>storm-lib/g' pom.xml
+mv target/storm-$RELEASE.jar target/storm-lib-$RELEASE.jar
+scp target/storm*jar pom.xml clojars@clojars.org:
+rm -Rf target *.xml
+
+git checkout conf/logback.xml
+
-rm -rf classes
-rm *jar
-rm *xml
-lein jar
-lein pom
-scp storm*jar pom.xml clojars@clojars.org:
-rm *jar
-rm -rf classes
-rm conf/log4j.properties
-lein jar
-mv pom.xml old-pom.xml
-sed 's/artifactId\>storm/artifactId\>storm-lib/g' old-pom.xml > pom.xml
-mv storm-$RELEASE.jar storm-lib-$RELEASE.jar
-scp storm*jar pom.xml clojars@clojars.org:
-rm *xml
-rm *jar
-git checkout conf/log4j.properties
View
10 conf/log4j.properties
@@ -1,10 +0,0 @@
-#This file should be deleted when deployed to server (workaround to leiningen classpath putting dev resources on path)
-#This file is needed for tests
-
-log4j.rootLogger=INFO, A1
-
-log4j.appender.A1=org.apache.log4j.ConsoleAppender
-
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
-log4j.category.org.apache.zookeeper=warn
View
13 conf/logback.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<configuration scan="true" scanPeriod="30 seconds">
+ <appender name="A1" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>%-4r [%t] %-5p %c - %m%n</pattern>
+ </encoder>
+ </appender>
+ <logger name="org.apache.zookeeper" level="WARN"/>
+ <root level="INFO">
+ <appender-ref ref="A1"/>
+ </root>
+</configuration>
View
9 log4j/storm.log.properties
@@ -1,9 +0,0 @@
-log4j.rootLogger=INFO, A1
-
-
-log4j.appender.A1 = org.apache.log4j.DailyRollingFileAppender
-log4j.appender.A1.File = ${storm.home}/logs/${logfile.name}
-log4j.appender.A1.Append = true
-log4j.appender.A1.DatePattern = '.'yyy-MM-dd
-log4j.appender.A1.layout = org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n
View
24 logback/cluster.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<configuration scan="true" scanPeriod="60 seconds">
+ <appender name="A1" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${storm.home}/logs/${logfile.name}</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${storm.home}/logs/${logfile.name}.%i</fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>9</maxIndex>
+ </rollingPolicy>
+
+ <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+
+ <encoder>
+ <pattern>%d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n</pattern>
+ </encoder>
+ </appender>
+
+ <root level="INFO">
+ <appender-ref ref="A1"/>
+ </root>
+</configuration>
View
50 project.clj
@@ -1,18 +1,16 @@
-(defproject storm "0.8.2-wip1"
- :source-path "src/clj"
- :test-path "test/clj"
- :java-source-path "src/jvm"
- :javac-options {:debug "true" :fork "true"}
- :resources-path "conf"
- :dev-resources-path "src/dev"
- :repositories {"sonatype" "http://oss.sonatype.org/content/groups/public/"}
+
+(defproject storm/storm "0.9.0-SNAPSHOT"
+ :url "http://storm-project.clj"
+ :description "Distributed and fault-tolerant realtime computation"
+ :license {:name "Eclipse Public License - Version 1.0" :url "https://github.com/nathanmarz/storm/blob/master/LICENSE.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[commons-io "1.4"]
[org.apache.commons/commons-exec "1.1"]
- [storm/libthrift7 "0.7.0"]
+ [storm/libthrift7 "0.7.0"
+ :exclusions [org.slf4j/slf4j-api]]
[clj-time "0.4.1"]
- [log4j/log4j "1.2.16"]
- [com.netflix.curator/curator-framework "1.0.1"]
+ [com.netflix.curator/curator-framework "1.0.1"
+ :exclusions [log4j/log4j]]
[backtype/jzmq "2.1.0"]
[com.googlecode.json-simple/json-simple "1.1"]
[compojure "0.6.4"]
@@ -20,19 +18,33 @@
[ring/ring-jetty-adapter "0.3.11"]
[org.clojure/tools.logging "0.2.3"]
[org.clojure/math.numeric-tower "0.0.1"]
- [org.slf4j/slf4j-log4j12 "1.5.8"]
[storm/carbonite "1.5.0"]
[org.yaml/snakeyaml "1.9"]
[org.apache.httpcomponents/httpclient "4.1.1"]
[storm/tools.cli "0.2.2"]
[com.googlecode.disruptor/disruptor "2.10.1"]
[storm/jgrapht "0.8.3"]
- [com.google.guava/guava "13.0"]
- ]
- :dev-dependencies [
- [swank-clojure "1.4.0-SNAPSHOT" :exclusions [org.clojure/clojure]]
- ]
+ [com.google.guava/guava "13.0"]]
+
+ :source-paths ["src/clj"]
+ :java-source-paths ["src/jvm"]
+ :test-paths ["test/clj"]
+ :resource-paths ["conf"]
+
+ :profiles {:dev {:resource-paths ["src/dev"]
+ :dependencies [[ch.qos.logback/logback-classic "1.0.6"]
+ [org.slf4j/log4j-over-slf4j "1.6.6"]]}
+ :release {:dependencies [[ch.qos.logback/logback-classic "1.0.6"]
+ [org.slf4j/log4j-over-slf4j "1.6.6"]]}
+ :lib {:dependencies [[log4j/log4j "1.2.16"]]}}
+
+ :plugins [[lein-swank "1.4.4"]]
+
+ :repositories {"sonatype"
+ "http://oss.sonatype.org/content/groups/public/"}
+
+ :javac-options {:debug true}
:jvm-opts ["-Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib"]
- :extra-classpath-dirs ["src/ui"]
+
:aot :all
-)
+ :min-lein-version "2.0.0")
View
2  src/clj/backtype/storm/bootstrap.clj
@@ -28,7 +28,7 @@
[event :as event] [process-simulator :as psim]]))
(require (quote [clojure.set :as set]))
(require (quote [backtype.storm [stats :as stats] [disruptor :as disruptor]]))
- (import (quote [org.apache.log4j PropertyConfigurator Logger]))
+ (import (quote [org.slf4j Logger]))
(import (quote [backtype.storm.generated Nimbus Nimbus$Processor
Nimbus$Iface StormTopology ShellComponent
View
2  src/clj/backtype/storm/daemon/supervisor.clj
@@ -411,7 +411,7 @@
" -Djava.library.path=" (conf JAVA-LIBRARY-PATH)
" -Dlogfile.name=" logfilename
" -Dstorm.home=" (System/getProperty "storm.home")
- " -Dlog4j.configuration=storm.log.properties"
+ " -Dlogback.configurationFile=logback/cluster.xml"
" -cp " classpath " backtype.storm.daemon.worker "
(java.net.URLEncoder/encode storm-id) " " (:supervisor-id supervisor)
" " port " " worker-id)]
View
2  src/clj/backtype/storm/daemon/worker.clj
@@ -324,7 +324,7 @@
(log-message "Launching worker for " storm-id " on " supervisor-id ":" port " with id " worker-id
" and conf " conf)
(if-not (local-mode? conf)
- (redirect-stdio-to-log4j!))
+ (redirect-stdio-to-slf4j!))
;; because in local mode, its not a separate
;; process. supervisor will register it in this case
(when (= :distributed (cluster-mode conf))
View
2  src/clj/backtype/storm/util.clj
@@ -675,7 +675,7 @@
(defn throw-runtime [& strs]
(throw (RuntimeException. (apply str strs))))
-(defn redirect-stdio-to-log4j! []
+(defn redirect-stdio-to-slf4j! []
;; set-var-root doesn't work with *out* and *err*, so digging much deeper here
;; Unfortunately, this code seems to work at the REPL but not when spawned as worker processes
;; it might have something to do with being a child process
View
5 src/jvm/backtype/storm/StormSubmitter.java
@@ -7,7 +7,8 @@
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift7.TException;
import org.json.simple.JSONValue;
@@ -17,7 +18,7 @@
* submit your topologies.
*/
public class StormSubmitter {
- public static Logger LOG = Logger.getLogger(StormSubmitter.class);
+ public static Logger LOG = LoggerFactory.getLogger(StormSubmitter.class);
private static Nimbus.Iface localNimbus = null;
View
5 src/jvm/backtype/storm/coordination/BatchBoltExecutor.java
@@ -11,10 +11,11 @@
import backtype.storm.utils.Utils;
import java.util.HashMap;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class BatchBoltExecutor implements IRichBolt, FinishedCallback, TimeoutCallback {
- public static Logger LOG = Logger.getLogger(BatchBoltExecutor.class);
+ public static Logger LOG = LoggerFactory.getLogger(BatchBoltExecutor.class);
byte[] _boltSer;
Map<Object, IBatchBolt> _openTransactions;
View
5 src/jvm/backtype/storm/coordination/CoordinatedBolt.java
@@ -23,7 +23,8 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import static backtype.storm.utils.Utils.get;
/**
@@ -31,7 +32,7 @@
* in the case of retries.
*/
public class CoordinatedBolt implements IRichBolt {
- public static Logger LOG = Logger.getLogger(CoordinatedBolt.class);
+ public static Logger LOG = LoggerFactory.getLogger(CoordinatedBolt.class);
public static interface FinishedCallback {
void finishedId(Object id);
View
5 src/jvm/backtype/storm/drpc/DRPCSpout.java
@@ -16,12 +16,13 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift7.TException;
import org.json.simple.JSONValue;
public class DRPCSpout extends BaseRichSpout {
- public static Logger LOG = Logger.getLogger(DRPCSpout.class);
+ public static Logger LOG = LoggerFactory.getLogger(DRPCSpout.class);
SpoutOutputCollector _collector;
List<DRPCInvocationsClient> _clients = new ArrayList<DRPCInvocationsClient>();
View
5 src/jvm/backtype/storm/drpc/JoinResult.java
@@ -11,11 +11,12 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class JoinResult extends BaseRichBolt {
- public static Logger LOG = Logger.getLogger(JoinResult.class);
+ public static Logger LOG = LoggerFactory.getLogger(JoinResult.class);
String returnComponent;
Map<Object, Tuple> returns = new HashMap<Object, Tuple>();
View
5 src/jvm/backtype/storm/drpc/ReturnResults.java
@@ -13,13 +13,14 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.thrift7.TException;
import org.json.simple.JSONValue;
public class ReturnResults extends BaseRichBolt {
- public static final Logger LOG = Logger.getLogger(ReturnResults.class);
+ public static final Logger LOG = LoggerFactory.getLogger(ReturnResults.class);
OutputCollector _collector;
boolean local;
View
5 src/jvm/backtype/storm/serialization/SerializationFactory.java
@@ -22,10 +22,11 @@
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class SerializationFactory {
- public static final Logger LOG = Logger.getLogger(SerializationFactory.class);
+ public static final Logger LOG = LoggerFactory.getLogger(SerializationFactory.class);
public static class KryoSerializableDefault extends Kryo {
boolean _override = false;
View
5 src/jvm/backtype/storm/spout/ShellSpout.java
@@ -7,12 +7,13 @@
import java.util.Map;
import java.util.List;
import java.io.IOException;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.json.simple.JSONObject;
public class ShellSpout implements ISpout {
- public static Logger LOG = Logger.getLogger(ShellSpout.class);
+ public static Logger LOG = LoggerFactory.getLogger(ShellSpout.class);
private SpoutOutputCollector _collector;
private String[] _command;
View
5 src/jvm/backtype/storm/task/ShellBolt.java
@@ -14,7 +14,8 @@
import java.util.List;
import java.util.Map;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.json.simple.JSONObject;
/**
@@ -45,7 +46,7 @@
* </pre>
*/
public class ShellBolt implements IBolt {
- public static Logger LOG = Logger.getLogger(ShellBolt.class);
+ public static Logger LOG = LoggerFactory.getLogger(ShellBolt.class);
Process _subprocess;
OutputCollector _collector;
Map<String, Tuple> _inputs = new ConcurrentHashMap<String, Tuple>();
View
5 src/jvm/backtype/storm/testing/TestAggregatesCounter.java
@@ -8,12 +8,13 @@
import java.util.Map;
import backtype.storm.task.TopologyContext;
import java.util.HashMap;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import static backtype.storm.utils.Utils.tuple;
public class TestAggregatesCounter extends BaseRichBolt {
- public static Logger LOG = Logger.getLogger(TestWordCounter.class);
+ public static Logger LOG = LoggerFactory.getLogger(TestWordCounter.class);
Map<String, Integer> _counts;
OutputCollector _collector;
View
5 src/jvm/backtype/storm/testing/TestGlobalCount.java
@@ -8,11 +8,12 @@
import java.util.Map;
import backtype.storm.task.TopologyContext;
import backtype.storm.tuple.Values;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class TestGlobalCount extends BaseRichBolt {
- public static Logger LOG = Logger.getLogger(TestWordCounter.class);
+ public static Logger LOG = LoggerFactory.getLogger(TestWordCounter.class);
private int _count;
OutputCollector _collector;
View
5 src/jvm/backtype/storm/testing/TestWordCounter.java
@@ -8,12 +8,13 @@
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.BasicOutputCollector;
import java.util.HashMap;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import static backtype.storm.utils.Utils.tuple;
public class TestWordCounter extends BaseBasicBolt {
- public static Logger LOG = Logger.getLogger(TestWordCounter.class);
+ public static Logger LOG = LoggerFactory.getLogger(TestWordCounter.class);
Map<String, Integer> _counts;
View
5 src/jvm/backtype/storm/testing/TestWordSpout.java
@@ -11,11 +11,12 @@
import backtype.storm.utils.Utils;
import java.util.HashMap;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class TestWordSpout extends BaseRichSpout {
- public static Logger LOG = Logger.getLogger(TestWordSpout.class);
+ public static Logger LOG = LoggerFactory.getLogger(TestWordSpout.class);
boolean _isDistributed;
SpoutOutputCollector _collector;
View
5 src/jvm/backtype/storm/topology/BasicBoltExecutor.java
@@ -4,10 +4,11 @@
import backtype.storm.task.TopologyContext;
import backtype.storm.tuple.Tuple;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class BasicBoltExecutor implements IRichBolt {
- public static Logger LOG = Logger.getLogger(BasicBoltExecutor.class);
+ public static Logger LOG = LoggerFactory.getLogger(BasicBoltExecutor.class);
private IBasicBolt _bolt;
private transient BasicOutputCollector _collector;
View
5 src/jvm/backtype/storm/transactional/TransactionalSpoutBatchExecutor.java
@@ -10,10 +10,11 @@
import java.math.BigInteger;
import java.util.Map;
import java.util.TreeMap;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class TransactionalSpoutBatchExecutor implements IRichBolt {
- public static Logger LOG = Logger.getLogger(TransactionalSpoutBatchExecutor.class);
+ public static Logger LOG = LoggerFactory.getLogger(TransactionalSpoutBatchExecutor.class);
BatchOutputCollectorImpl _collector;
ITransactionalSpout _spout;
View
5 src/jvm/backtype/storm/transactional/TransactionalSpoutCoordinator.java
@@ -15,10 +15,11 @@
import java.util.Map;
import java.util.TreeMap;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class TransactionalSpoutCoordinator extends BaseRichSpout {
- public static final Logger LOG = Logger.getLogger(TransactionalSpoutCoordinator.class);
+ public static final Logger LOG = LoggerFactory.getLogger(TransactionalSpoutCoordinator.class);
public static final BigInteger INIT_TXID = BigInteger.ONE;
View
5 src/jvm/backtype/storm/utils/Time.java
@@ -4,11 +4,12 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class Time {
- public static Logger LOG = Logger.getLogger(Time.class);
+ public static Logger LOG = LoggerFactory.getLogger(Time.class);
private static AtomicBoolean simulating = new AtomicBoolean(false);
//TODO: should probably use weak references here or something
View
5 src/jvm/storm/trident/spout/TridentSpoutCoordinator.java
@@ -10,14 +10,15 @@
import backtype.storm.tuple.Tuple;
import backtype.storm.tuple.Values;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import storm.trident.topology.MasterBatchCoordinator;
import storm.trident.topology.state.RotatingTransactionalState;
import storm.trident.topology.state.TransactionalState;
public class TridentSpoutCoordinator implements IBasicBolt {
- public static final Logger LOG = Logger.getLogger(TridentSpoutCoordinator.class);
+ public static final Logger LOG = LoggerFactory.getLogger(TridentSpoutCoordinator.class);
private static final String META_DIR = "meta";
ITridentSpout _spout;
View
5 src/jvm/storm/trident/spout/TridentSpoutExecutor.java
@@ -11,7 +11,8 @@
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import storm.trident.operation.TridentCollector;
import storm.trident.topology.BatchInfo;
import storm.trident.topology.ITridentBatchBolt;
@@ -21,7 +22,7 @@
public class TridentSpoutExecutor implements ITridentBatchBolt {
public static String ID_FIELD = "$tx";
- public static Logger LOG = Logger.getLogger(TridentSpoutExecutor.class);
+ public static Logger LOG = LoggerFactory.getLogger(TridentSpoutExecutor.class);
AddIdCollector _collector;
ITridentSpout _spout;
View
5 src/jvm/storm/trident/topology/MasterBatchCoordinator.java
@@ -13,12 +13,13 @@
import java.util.Map;
import java.util.TreeMap;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import storm.trident.spout.ITridentSpout;
import storm.trident.topology.state.TransactionalState;
public class MasterBatchCoordinator extends BaseRichSpout {
- public static final Logger LOG = Logger.getLogger(MasterBatchCoordinator.class);
+ public static final Logger LOG = LoggerFactory.getLogger(MasterBatchCoordinator.class);
public static final long INIT_TXID = 1L;
Please sign in to comment.
Something went wrong with that request. Please try again.