thekrakken / java-grok

Simple API that allows you to easily parse logs and other files
http://grok.nflabs.com/
Other
358 stars 152 forks source link

Making Grok Serializable #37

Closed egashira closed 9 years ago

egashira commented 9 years ago

Anthony, this project is pretty neat! thank you for sharing this. I am testing this grok to parse data in spark, but hit exception since Grok is not serializable. I think this will be one common usecase, does it make sense to make Grok serializable?

Exception in thread "main" org.apache.spark.SparkException: Task not serializable .. Caused by: java.io.NotSerializableException: oi.thekraken.grok.api.Grok Serialization stack:

- object not serializable (class: oi.thekraken.grok.api.Grok, value: oi.thekraken.grok.api.Grok@7da8ca25)

anthonycorbacho commented 9 years ago

Hi,

Yes it does make sense. Thank you for your contrib! :D

egashira commented 8 years ago

Hi, Anthony

thank you for merging the fix! could you please push the version with the fix to maven repo, which could benefit other users?

Thanks Ryota