histogram
histogram copied to clipboard
Histogram is not Serializable
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
Ok, I see Histograms support a toJSON method. That's good enough
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?
+1 on this, I'd like to be able to run an experiment once and distribute the results for analysis.
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.
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.
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