You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Talat Uyarer <ta...@uyarer.com> on 2014/04/08 14:04:12 UTC

Fixed Type

Hi all,

"size: an integer, specifying the number of bytes per value" is
written In Fixed Type Section  of Documentation. If I want to limit
size of Integer or String type field. How can I do in Avro ?

Thanks
-- 
Talat UYARER
Websitesi: http://talat.uyarer.com
Twitter: http://twitter.com/talatuyarer
Linkedin: http://tr.linkedin.com/pub/talat-uyarer/10/142/304

Re: Fixed Type

Posted by Martin Kleppmann <mk...@linkedin.com>.
Hi Talat,

If you want to enforce a maximum size, you'll need to do that in your application before writing the data to Avro. Avro only has variable-sized types (int, string, bytes, ...) and a fixed-size type (fixed) but no configurable size constraint.

Martin

On 8 Apr 2014, at 05:04, Talat Uyarer <ta...@uyarer.com> wrote:
> Hi all,
> 
> "size: an integer, specifying the number of bytes per value" is
> written In Fixed Type Section  of Documentation. If I want to limit
> size of Integer or String type field. How can I do in Avro ?
> 
> Thanks
> -- 
> Talat UYARER
> Websitesi: http://talat.uyarer.com
> Twitter: http://twitter.com/talatuyarer
> Linkedin: http://tr.linkedin.com/pub/talat-uyarer/10/142/304