forked from nathanmarz/storm-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:nathanmarz/storm-contrib into sub…
…modules-merge Conflicts: storm-backport storm-benchmark storm-cassandra storm-growl storm-growl/README.markdown storm-growl/pom.xml storm-growl/src/main/java/storm/growl/GrowlBolt.java storm-growl/src/main/java/storm/growl/TestGrowlTopology.java storm-hbase storm-jms storm-redis-pubsub storm-scribe storm-signals storm-state
- Loading branch information
Showing
8 changed files
with
220 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
(defproject storm/storm-kafka "0.9.0-wip15-scala292" | ||
:source-path "src/clj" | ||
:java-source-path "src/jvm" | ||
:javac-options {:debug "true" :fork "true"} | ||
:repositories {"conjars" "http://conjars.org/repo/"} | ||
:dependencies [[com.twitter/kafka_2.9.2 "0.7.0" | ||
(defproject storm/storm-kafka "0.9.0-wip16a-scala292" | ||
:java-source-paths ["src/jvm"] | ||
:repositories {"scala-tools" "http://scala-tools.org/repo-releases" | ||
"conjars" "http://conjars.org/repo/"} | ||
:dependencies [[org.scala-lang/scala-library "2.9.2"] | ||
[com.twitter/kafka_2.9.2 "0.7.0" | ||
:exclusions [org.apache.zookeeper/zookeeper | ||
log4j/log4j]]] | ||
:dev-dependencies [[storm "0.9.0-wip15"] | ||
[org.slf4j/log4j-over-slf4j "1.6.6"] | ||
[ch.qos.logback/logback-classic "1.0.6"] | ||
[org.clojure/clojure "1.4.0"]] | ||
:jvm-opts ["-Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib"]) | ||
:profiles | ||
{:provided {:dependencies [[storm "0.9.0-wip15"] | ||
[org.slf4j/log4j-over-slf4j "1.6.6"] | ||
;;[ch.qos.logback/logback-classic "1.0.6"] | ||
[org.clojure/clojure "1.4.0"]]}} | ||
:jvm-opts ["-Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib"] | ||
:min-lein-version "2.0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package storm.kafka.trident; | ||
|
||
|
||
import backtype.storm.metric.api.ICombiner; | ||
import clojure.lang.Numbers; | ||
|
||
public class MaxMetric implements ICombiner<Long> { | ||
@Override | ||
public Long identity() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Long combine(Long l1, Long l2) { | ||
if(l1 == null) return l2; | ||
if(l2 == null) return l1; | ||
return Math.max(l1, l2); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.