Skip to content
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

Sparkling incompatibility with prismatic/schema #47

Open
dyerw opened this issue Jun 2, 2016 · 3 comments
Open

Sparkling incompatibility with prismatic/schema #47

dyerw opened this issue Jun 2, 2016 · 3 comments

Comments

@dyerw
Copy link

dyerw commented Jun 2, 2016

I'm getting this error from my code:

16/06/02 15:10:30 WARN Utils: Error serializing IFn sparkling.core$ftruthy_QMARK_$fn__3467@7ce0f591
java.io.NotSerializableException: clojure.lang.Delay

whenever I run (spark/filter parse/error?) on an RDD.

The function in question is here, I've simplified it as much as possible:

(s/defn error? :- s/Bool
  [log :- s/Str]
    true)
@dyerw
Copy link
Author

dyerw commented Jun 2, 2016

So, turns out it's prismatic/schema that returns a Delay. Any thoughts on how to use schema'd functions with spark?

Maybe now's the time to check out spec

@dyerw dyerw changed the title Error serializing clojure.lang.Delay Sparkling incompatibility with prismatic/schema Jun 2, 2016
@LukeDefeo
Copy link

LukeDefeo commented Jan 5, 2017

Not sure if related but i found when passing higher order functions to spark it would save me a lot of weird errors if i did NOT explicitly type out (fn[x] (parse/error? x)) as opposed to using the # reader macro or just passing the function symbol. Both of those led to a lot of wierdness that i dont fully understand.

@chrisbetz
Copy link
Contributor

Ok, I'm pretty sure it's not what you want to have an RDD full of Delays, so serializing a Delay actually doesn't make sense. So what you need to do (guess, haven't tried it out) is to actually deref the Delay to get the actual value...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants