Why we need Avro schema evolution
<p>I am new to Hadoop and programming, and I am a little confused about Avro schema evolution.  I will explain what I understand about Avro so far.</p>

<p>Avro is a serialization tool that stores binary data with its json schema at the top. The schema looks like this.</p>

<pre><code>{
    "namespace":"com.trese.db.model",
    "type":"record",
    "doc":"This Schema describes about Product",
    "name":"Product",
    "fields":[
        {"name":"product_id","type": "long"},
        {"name":"product_name","type": "string","doc":"This is the name of the product"},
        {"name":"cost","type": "float", "aliases":["price"]},
        {"name":"discount","type": "float", "default":5}
    ]
}
</code></pre>

<p>Now my question is why we need <em>evolution</em>? I have read that we can use <code>default</code> in the schema for new fields; but if we add a new schema in the file, that earlier schema will be overwritten. We cannot have two schemas for a single file. </p>

<p>Another question is, what are reader and writer schemas and how do they help?</p>