Class: Flydata::SourceMysql::ParseDumpAndSend

Inherits:
Flydata::Source::ParseDumpAndSend show all
Defined in:
lib/flydata/source_mysql/parse_dump_and_send.rb

Instance Method Summary collapse

Methods inherited from Flydata::Source::ParseDumpAndSend

inherited

Methods inherited from Flydata::Source::Component

#initialize

Constructor Details

This class inherits a constructor from Flydata::Source::Component

Instance Method Details

#parse_dump(dump_pos_info, dmpio, create_table_block, insert_record_block, check_point_source_pos_block) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/flydata/source_mysql/parse_dump_and_send.rb', line 14

def parse_dump(dump_pos_info, dmpio,
               create_table_block, insert_record_block, check_point_source_pos_block)

  check_point_binlog_block = Proc.new { |source_table, last_pos, bytesize, binlog_hash, state, substate|
    source_pos = FlydataCore::Mysql::BinlogPos.new(binlog_hash) # SourcePos object is BinlogPos in SourceMysql

    check_point_source_pos_block.call(source_table, last_pos, bytesize, source_pos, state, substate)
  }
  Parser::MysqlDumpParser.new(dump_pos_info).parse(dmpio,
               create_table_block, insert_record_block, check_point_binlog_block)
end

#value_convertersObject



10
11
12
# File 'lib/flydata/source_mysql/parse_dump_and_send.rb', line 10

def value_converters
  FlydataCore::TableDef::MysqlTableDef::VALUE_CONVERTERS
end