Created
March 19, 2010 13:00
-
-
Save spariev/337484 to your computer and use it in GitHub Desktop.
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
(defn index-file-with-writer [config-id index-writer fname] | |
(let [req-counter (ref 0)] | |
(do | |
(println (str "Parsing " fname)) | |
(doall (map (partial process-request-log config-id index-writer) | |
(partition-by | |
#(if (. #^String % startsWith "Processing") | |
(dosync (alter req-counter inc)) | |
(deref req-counter)) | |
(line-seq (reader fname)))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment