Implement avrorouter in a separate file
The module implementation is now contained in one file. This makes it easier to see which parts depend on each other.
This commit is contained in:
@ -20,7 +20,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tr1/memory>
|
||||
#include <blr_constants.h>
|
||||
#include <maxscale/alloc.h>
|
||||
#include <maxscale/dcb.h>
|
||||
#include <maxscale/service.h>
|
||||
@ -34,7 +33,7 @@
|
||||
#include <binlog_common.h>
|
||||
#include <maxscale/sqlite3.h>
|
||||
#include <maxscale/protocol/mysql.h>
|
||||
|
||||
#include <blr_constants.h>
|
||||
#include "rpl_events.hh"
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
@ -160,6 +159,15 @@ enum mxs_avro_codec_type
|
||||
MXS_AVRO_CODEC_SNAPPY, /**< Not yet implemented */
|
||||
};
|
||||
|
||||
static const MXS_ENUM_VALUE codec_values[] =
|
||||
{
|
||||
{"null", MXS_AVRO_CODEC_NULL},
|
||||
{"deflate", MXS_AVRO_CODEC_DEFLATE},
|
||||
// Not yet implemented
|
||||
// {"snappy", MXS_AVRO_CODEC_SNAPPY},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
typedef std::tr1::shared_ptr<AvroTable> SAvroTable;
|
||||
|
||||
typedef std::tr1::unordered_map<std::string, STableCreateEvent> CreatedTables;
|
||||
@ -282,9 +290,12 @@ extern avro_binlog_end_t avro_read_all_events(Avro *router);
|
||||
extern AvroTable* avro_table_alloc(const char* filepath, const char* json_schema,
|
||||
const char *codec, size_t block_size);
|
||||
extern char* json_new_schema_from_table(const STableMapEvent& map, const STableCreateEvent& create);
|
||||
extern void save_avro_schema(const char *path, const char* schema, STableMapEvent& map, STableCreateEvent& create);
|
||||
extern void save_avro_schema(const char *path, const char* schema, STableMapEvent& map,
|
||||
STableCreateEvent& create);
|
||||
extern bool handle_table_map_event(Avro *router, REP_HEADER *hdr, uint8_t *ptr);
|
||||
extern bool handle_row_event(Avro *router, REP_HEADER *hdr, uint8_t *ptr);
|
||||
bool avro_save_conversion_state(Avro *router);
|
||||
void avro_update_index(Avro* router);
|
||||
|
||||
enum avrorouter_file_op
|
||||
{
|
||||
|
Reference in New Issue
Block a user