Last active
December 21, 2015 03:09
-
-
Save chillitom/6240567 to your computer and use it in GitHub Desktop.
trying to wrap combine and adjust and getting exceptions
This file contains hidden or 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
(defn combine-with-suffix | |
"same as riemann.streams/combine but takes a suffix argument to append to the service name" | |
[f suffix & children] | |
(combine f (adjust [:service str suffix] children))) | |
;java.lang.ClassCastException: clojure.lang.ArraySeq cannot be cast to clojure.lang.IFn | |
; at riemann.streams$combine$stream__8140$fn__8150.invoke(streams.clj:132) | |
; at riemann.streams$combine$stream__8140.invoke(streams.clj:132) | |
; at riemann.streams$moving_event_window$stream__8293$fn__8305.invoke(streams.clj:242) | |
; at riemann.streams$moving_event_window$stream__8293.invoke(streams.clj:242) | |
; ... | |
;using as follows: | |
(moving-event-window 5 | |
(combine-with-suffix std-dev " std dev" prn) | |
; fixed -- needed to use apply to pass children var args into adjust function | |
(defn combine-with-suffix | |
"same as riemann.streams/combine but takes a suffix argument to append to the service name" | |
[f suffix & children] | |
(combine f (apply adjust [:service str suffix] children))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fixed, see comment in code