Created
March 14, 2012 01:14
-
-
Save mstump/2033166 to your computer and use it in GitHub Desktop.
I get no result with lazy-generator: https://groups.google.com/d/topic/cascalog-user/4blpXGKqSkI/discussion
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 one outputs to stdout until it dies due to 'Exceeded max jobconf' | |
(defn format-package-repo-for-cassandra | |
[source-type base-attributes sink repo] | |
(cio/with-fs-tmp [_ tmp] | |
(let [packages (package-seq repo)] | |
(if-not (empty? packages) | |
(let [lazy-tap (ops/lazy-generator tmp packages)] | |
(?<- (stdout) | |
[?row-key ?col ?val] | |
((vec packages) :> ?name _ _ _ _ ?attr) | |
(format-package-for-output :< source-type base-attributes ?attr :> ?row-key ?col ?val))))))) |
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
;; I get no output to stdout | |
(defn format-package-repo-for-cassandra | |
[source-type base-attributes sink repo] | |
(cio/with-fs-tmp [_ tmp] | |
(let [packages (package-seq repo)] | |
(if-not (empty? packages) | |
(let [lazy-tap (ops/lazy-generator tmp packages)] | |
(?<- (stdout) | |
[?row-key ?col ?val] | |
(lazy-tap :> ?name _ _ _ _ ?attr) | |
(format-package-for-output :< source-type base-attributes ?attr :> ?row-key ?col ?val))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This turned out to be a bug in 1.8.6, it's fixed in 1.8.7. lazy-generator wouldn't work with nullable vars.