Class: Mysql::BinlogRecordHandler
- Inherits:
-
Object
- Object
- Mysql::BinlogRecordHandler
- Defined in:
- lib/flydata/fluent-plugins/mysql/binlog_record_handler.rb
Direct Known Subclasses
Constant Summary collapse
- TABLE_NAME =
A Flydata JSON tag to specify a table name
:table_name
- TYPE =
:type
- SEQ =
:seq
- RESPECT_ORDER =
:respect_order
- SRC_POS =
:src_pos
- TABLE_REV =
:table_rev
Instance Method Summary collapse
-
#initialize(context) ⇒ BinlogRecordHandler
constructor
A new instance of BinlogRecordHandler.
Constructor Details
#initialize(context) ⇒ BinlogRecordHandler
Returns a new instance of BinlogRecordHandler.
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/flydata/fluent-plugins/mysql/binlog_record_handler.rb', line 14 def initialize(context) @context = context @first_empty_binlog = true # Load per-table binlog position @table_binlog_pos = {} @context.tables.each do |table_name| table_binlog_content = @context.sync_fm.get_table_binlog_pos(table_name) if table_binlog_content @table_binlog_pos[table_name] = BinLogPosition.new(table_binlog_content) end end end |