Skip to content

Instantly share code, notes, and snippets.

@nlacasse
Created January 25, 2013 00:52
Show Gist options
  • Save nlacasse/4630509 to your computer and use it in GitHub Desktop.
Save nlacasse/4630509 to your computer and use it in GitHub Desktop.
-main
(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