Add deflate compression to avrorouter
The avrorouter can now compress the Avro files using the deflate algorithm provided by zlib.
This commit is contained in:
@ -106,7 +106,7 @@ void avro_close_binlog(int fd)
|
||||
* @param filepath Path to the created file
|
||||
* @param json_schema The schema of the table in JSON format
|
||||
*/
|
||||
AVRO_TABLE* avro_table_alloc(const char* filepath, const char* json_schema)
|
||||
AVRO_TABLE* avro_table_alloc(const char* filepath, const char* json_schema, const char *codec)
|
||||
{
|
||||
AVRO_TABLE *table = MXS_CALLOC(1, sizeof(AVRO_TABLE));
|
||||
if (table)
|
||||
@ -127,7 +127,8 @@ AVRO_TABLE* avro_table_alloc(const char* filepath, const char* json_schema)
|
||||
}
|
||||
else
|
||||
{
|
||||
rc = avro_file_writer_create(filepath, table->avro_schema, &table->avro_file);
|
||||
rc = avro_file_writer_create_with_codec(filepath, table->avro_schema,
|
||||
&table->avro_file, codec, 0);
|
||||
}
|
||||
|
||||
if (rc)
|
||||
|
Reference in New Issue
Block a user