avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcrea...@apache.org
Subject svn commit: r1295401 - in /avro/trunk: CHANGES.txt lang/c/examples/quickstop.c
Date Thu, 01 Mar 2012 03:54:53 GMT
Author: dcreager
Date: Thu Mar  1 03:54:53 2012
New Revision: 1295401

URL: http://svn.apache.org/viewvc?rev=1295401&view=rev
Log:
AVRO-1039. C: Don't try to use nonexistent codecs in test cases.

The quickstop example was hard-coded to use the deflate codec, even if
we're not building that codec.  The null codec will always be there, so
we fall back on that if we don't have deflate.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/c/examples/quickstop.c

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1295401&r1=1295400&r2=1295401&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Thu Mar  1 03:54:53 2012
@@ -24,6 +24,8 @@ Avro 1.6.3 (unreleased)
     AVRO-1038. C: Require GCC 4.5.0 to use GCC atomic instrinsics.
     (Vivek Nadkarni via dcreager)
 
+    AVRO-1039. C: Don't use nonexistent codecs in test cases. (dcreager)
+
 Avro 1.6.2 (13 February 2012)
 
   NEW FEATURES

Modified: avro/trunk/lang/c/examples/quickstop.c
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/examples/quickstop.c?rev=1295401&r1=1295400&r2=1295401&view=diff
==============================================================================
--- avro/trunk/lang/c/examples/quickstop.c (original)
+++ avro/trunk/lang/c/examples/quickstop.c Thu Mar  1 03:54:53 2012
@@ -21,6 +21,12 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#ifdef DEFLATE_CODEC
+#define QUICKSTOP_CODEC  "deflate"
+#else
+#define QUICKSTOP_CODEC  "null"
+#endif
+
 avro_schema_t person_schema;
 int64_t id = 0;
 
@@ -140,7 +146,8 @@ int main(void)
 	/* Delete the database if it exists */
 	unlink(dbname);
 	/* Create a new database */
-	rval = avro_file_writer_create_with_codec(dbname, person_schema, &db, "deflate", 0);
+	rval = avro_file_writer_create_with_codec
+	    (dbname, person_schema, &db, QUICKSTOP_CODEC, 0);
 	if (rval) {
 		fprintf(stderr, "There was an error creating %s\n", dbname);
 		fprintf(stderr, " error message: %s\n", avro_strerror());



Mime
View raw message