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

Histogram is not Serializable #54

Open
antonioalegria opened this issue Mar 4, 2014 · 6 comments
Open

Histogram is not Serializable #54

antonioalegria opened this issue Mar 4, 2014 · 6 comments

Comments

@antonioalegria
Copy link

When trying to serialize a Histogram I get a NotSerializableException. This seems like a pretty simple object, serialization should be a trivial matter.

Since these Histograms serve to summarize pretty huge datasets, it's an important feature to serialize them for re-use after a service restart.

Thank you

@antonioalegria
Copy link
Author

Ok, I see Histograms support a toJSON method. That's good enough

@antonioalegria
Copy link
Author

Actually, the toJSON methods are not enough - there isnt a fromJSON to convert back...

What would be the best course to implement SerDe for Histograms?

@antonioalegria antonioalegria reopened this Mar 6, 2014
@yayitswei
Copy link

+1 on this, I'd like to be able to run an experiment once and distribute the results for analysis.

@antonioalegria
Copy link
Author

I had to do this manually, it wasn't that hard actually (just store the Bins and reset them afterwards) for a simple usecase where I'm using simple targets.

For more involved use cases it would really be helpful to just have serialization support.

@ashenfad
Copy link
Contributor

ashenfad commented Apr 1, 2014

If you're using Clojure, the hist-to-clj and clj-to-hist functions can serialize a Histogram to native Clojure data structures (which are JSON friendly). But you're right that serialization for Java users is lacking.

I have some other tasks to get out of the way, but I'll look into supporting Java serialization soon... probably in a week or so.

@Mrfuture1
Copy link

My english is not very good.Maybe I missed some important information.I am cofused about why the histogram looks more like line chart. Can you explain it to me? thx

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

4 participants