Created
January 25, 2013 00:52
-
-
Save nlacasse/4630509 to your computer and use it in GitHub Desktop.
-main
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 -main [graph-path & files] | |
(let [inserter (BatchInserters/inserter graph-path)] | |
(doseq [file files] | |
(log :debug (str "Loading file: " file)) | |
(let [c (atom 0)] | |
(doseq [tuple (parse-file file)] | |
(if (= (mod @c 10000) 0) | |
(log :debug (str file ": " @c))) | |
(swap! c inc) | |
(insert-tuple! inserter tuple)))) | |
(log :debug "Loading complete.") | |
(log :debug "Shutting down.") | |
(.shutdown inserter) | |
(log :debug "Shutdown complete!"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment