We need to serialize some data for putting into solr as well as hadoop.
I am evaluating serialization tools for the same.
The top two in my list are Gson and Avro.
As far as I understand, Avro = Gson + Schema-In-JSON
If that is correct, I do not see why Avro is so popular for Solr/Hadoop?
I have searched a lot on the Internet, but cannot find a single correct answer for this.
Everywhere it says, Avro is good because it stores schema. My question is what to do with that schema?
It may be good for very large objects in Hadoop where a single object is stored in multiple file blocks such that storing schema with each part helps to analyze it better. But even in that case, schema can be stored separately and just a reference to that is sufficient to describe the schema. I see no reason why schema should be part of each and every piece.
If someone can give me some good use case how Avro helped them and Gson/Jackson were insufficient for the purpose, it would be really helpful.
Also, official documentation at the Avro site says that we need to give a schema to Avro to help it produce Schema+Data. My question is, if schema is input and the same is sent to output along with JSON representation of data, then what extra is being achieved by Avro? Can I not do that myself by serializing an object using JSON, adding my input schema and calling it Avro?
I am really confused with this!