-RE: C API for writing datums
Vivek Nadkarni 2012-07-10, 01:17
Hi Saptarshi -
Yes, you should use the "value" API calls described in section 4 (http://avro.apache.org/docs/current/api/c/index.html#_avro_values) of the website, and you should not use the API described in the Examples in the web site. The examples have not been updated for the new API. However,
If you check out the code, and look in the "tests" directory there are several examples of how to use the value interface.
Specifically, performance.c compares the performance of the value API and the legacy datum API. The tests for the resolved_reader and resolved_writer also show how to use the new value API for schema resolution.
Other tests such as test_avro_984.c and test_avro_1034.c also show schema resolution using the value API, and test_avro_values.c shows how to create each type of avro value.
From: Saptarshi Guha [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2012 5:16 PM
Subject: C API for writing datums
On this website
the example code contains "avro_record". Grepping the source tells me that avro_record is in legacy.h.
So is this example really legacy and I should use the API calls above(i.e. preceding this in the website)?