Açıklaması şöyle
Avro added the idea of a default symbol in 1.9.0. This is much like a default field value. It provides the reader with a fallback symbol to use if it encounters a symbol that it does not recognize.
Örnek
Şöyle yaparız
{"type": "record","name": "MyRecord","fields": [{"name": "my_field","type": {"type": "enum","name": "MyEnum","symbols": ["a","b","Unknown"],/** Symbol default - for forwards compatibility -* new in Avro 1.9.0*/"default": "Unknown"},/** Field default - for handle backwards compatibility*/"default": "Unknown"}, ...
No comments:
Post a Comment