New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avro Loader #101
Avro Loader #101
Conversation
(let [parsed-schema (parse-schema (:schema opts)) | ||
storage (raw/storage$ ;; this creates a new storage definition | ||
;; add these jars to $PIG_CLASSPATH (most likely /home/hadoop/pig/lib) | ||
["json-simple-1.1.1.jar" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we need these on the classpath, would it be easier to just add them as dependencies that get pulled into the uberjar? The purpose of this was more for the annoying jars that aren't in maven.
Looks good! I'm looking forward to seeing the sample data & tests. I think that'll make it a lot more clear how the schema is being used. |
It would be great to hear about the gradle/clojure workflow people are using on this project - does anyone know how to get a repl with the dependencies loaded? I've resorted to creating another leningen project, with a dependency on pigpen-avro, opening core.clj in a cider buffer and eval-ing it in that repl. EDIT: there's |
@mbossenbroek, I think the issues you mentioned have been addressed. I'll save the storage side for next time (Or for someone else!). Anything else you need to see? |
|
||
(set! *warn-on-reflection* true) | ||
|
||
(declare field-names) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything except load-avro
should be private
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotted-args->nested-map needs to be public so we can require it from pig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. In other places where that's the case, I'll put the logic in a different namespace and just expose the public API by copying the symbols there. Take a look at pigpen.core
for examples. It also makes testing easier because you can access all of the internals easily.
Looks great! Just a couple of polish items. Thanks for the work! |
Almost forgot - what issues are you seeing with |
Here's the output from running clojureRepl: https://gist.github.com/theJohnnyBrown/faa5782176ebe327dade |
updated |
Released in 0.2.13 |
TODO