ecco 0.6.0-java → 0.6.1-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e64a7e2957edb9c0e4ead0c0d3b3d7902c8d702f
4
- data.tar.gz: 5256c067fd8cbb66da6f9986e8997137d381d34c
3
+ metadata.gz: 260dad691405d73f74f910b80431b25be925107d
4
+ data.tar.gz: f8fde912519a3b5f1c4bed8ad26adc9fa3481da0
5
5
  SHA512:
6
- metadata.gz: c4c4f317f333fb97d499ceb30eaa2830fed76b7acaee63931ccc9d0ce5afc78427a92248547df4d4efbaa8af7348cad6cbe4a44a9e4b7a20f535a0fa7bbbe497
7
- data.tar.gz: f6b0642858fef51f6e99df17a84906a11657857c0aedbf099e466d878ec27234ff8b7f73aaefd3ab6382e2025ecae0af3bdab8915bfc3616716228b91b50039a
6
+ metadata.gz: d22d6e6c108327f0b2de31bbaf65440ac8e8713ca1fa3e014fee4a0bb1e87a10e2f6748c2e2490a82781df28c9e814cc69d8c2fb61c90cbabcb25ac1b088fbb8
7
+ data.tar.gz: 35de29b97a50af44a2a5a63d6e8f6820e22612808503496a8904a33ac94f9859c75bba0abf17f9a587490d98d5e0918f39c30a9db38cc8776cc327946813b65a
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /tmp/
10
10
  .env
11
11
  .vagrant
12
+ *.retry
@@ -1,23 +1,35 @@
1
1
  sudo: true
2
2
 
3
+ dist: trusty
4
+ addons:
5
+ apt:
6
+ packages:
7
+ - mysql-server-5.6
8
+ - mysql-client-core-5.6
9
+ - mysql-client-5.6
10
+ - haveged # Extra entropy
11
+
3
12
  language: ruby
4
13
 
14
+ rvm:
15
+ - jruby-9.0.5.0
16
+
5
17
  services:
6
18
  - mysql
7
19
 
8
20
  before_install:
9
- - rvm get head
10
- - rvm use jruby-9.0.3.0 --install
21
+ - sudo service haveged start # Extra entropy too ensure quick start time for JRuby
11
22
  - printf "[mysqld]\nlog-bin=mysql-bin\nserver-id=1\nbinlog-format=ROW\n" | sudo tee /etc/mysql/conf.d/binlog.cnf
12
23
  - sudo service mysql restart
13
24
  - mysql -u root -e 'create database ecco_test;'
14
- - gem install bundler -v 1.10.6
25
+ - gem install bundler
15
26
 
16
27
  env:
17
28
  global:
18
29
  - DATABASE_USER=root
19
30
  - DATABASE_PASS=""
20
31
  - DATABASE_URL=jdbc:mysql://localhost:3306/ecco_test
32
+ - JRUBY_OPTS='--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -Xcext.enabled=false -J-Xss2m -Xcompile.invokedynamic=false'
21
33
 
22
34
  script: bin/all_specs
23
35
 
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/twingly/ecco.svg?branch=master)](https://travis-ci.org/twingly/ecco)
4
4
 
5
- MySQL replication binlog parser using [mysql-binlog-connector-java].
5
+ MySQL (version 5.5 and 5.6) replication binlog parser using [mysql-binlog-connector-java].
6
6
 
7
7
  ## Installation
8
8
 
data/Rakefile CHANGED
@@ -1,11 +1,13 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
3
 
4
+ desc "Run non-integration specs"
4
5
  RSpec::Core::RakeTask.new(:spec) do |task|
5
6
  task.exclude_pattern = "spec/integration/*_spec.rb"
6
7
  end
7
8
 
8
9
  namespace :spec do
10
+ desc "Run all specs (including integration)"
9
11
  RSpec::Core::RakeTask.new(:all)
10
12
  end
11
13
 
@@ -7,5 +7,8 @@ Vagrant.configure("2") do |config|
7
7
  end
8
8
 
9
9
  ubuntu.vm.network :forwarded_port, host: 3306, guest: 3306
10
+ ubuntu.vm.provider "virtualbox" do |vbox|
11
+ vbox.memory = 1024
12
+ end
10
13
  end
11
14
  end
@@ -3,11 +3,12 @@ require "ecco/row_event"
3
3
 
4
4
  module Ecco
5
5
  class RowEventListener < EventListener
6
- ROW_EVENTS = [
7
- EventType::WRITE_ROWS,
8
- EventType::UPDATE_ROWS,
9
- EventType::DELETE_ROWS,
10
- ]
6
+ # MySQL v1 and v2 row events
7
+ WRITE_EVENTS = [EventType::WRITE_ROWS, EventType::EXT_WRITE_ROWS]
8
+ UPDATE_EVENTS = [EventType::UPDATE_ROWS, EventType::EXT_UPDATE_ROWS]
9
+ DELETE_EVENTS = [EventType::DELETE_ROWS, EventType::EXT_DELETE_ROWS]
10
+
11
+ ROW_EVENTS = WRITE_EVENTS + UPDATE_EVENTS + DELETE_EVENTS
11
12
 
12
13
  def table_event
13
14
  EventType::TABLE_MAP
@@ -26,9 +27,9 @@ module Ecco
26
27
  @table_map_event = event
27
28
  when *accepted_events
28
29
  row_event = Ecco::RowEvent.new
29
- row_event.type = type.to_s
30
30
  row_event.table_id = data.get_table_id
31
31
  row_event.rows = data.rows
32
+ row_event.type = row_type_to_string(type)
32
33
 
33
34
  if @table_map_event
34
35
  table_event_data = @table_map_event.get_data
@@ -40,5 +41,17 @@ module Ecco
40
41
  @callback.call(row_event)
41
42
  end
42
43
  end
44
+
45
+ private
46
+
47
+ def row_type_to_string(type)
48
+ if WRITE_EVENTS.include?(type)
49
+ "WRITE_ROWS"
50
+ elsif UPDATE_EVENTS.include?(type)
51
+ "UPDATE_ROWS"
52
+ elsif DELETE_EVENTS.include?(type)
53
+ "DELETE_ROWS"
54
+ end
55
+ end
43
56
  end
44
57
  end
@@ -6,8 +6,11 @@ module Ecco
6
6
  EventType::QUERY,
7
7
  EventType::ROTATE,
8
8
  EventType::WRITE_ROWS,
9
+ EventType::EXT_WRITE_ROWS,
9
10
  EventType::UPDATE_ROWS,
11
+ EventType::EXT_UPDATE_ROWS,
10
12
  EventType::DELETE_ROWS,
13
+ EventType::EXT_DELETE_ROWS,
11
14
  ]
12
15
 
13
16
  def accepted_events
@@ -1,4 +1,4 @@
1
1
  module Ecco
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  MYSQL_BINLOG_CONNECTOR_VERSION = "0.2.4"
4
4
  end
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - hosts: all
3
- sudo: yes
3
+ become: yes
4
4
  tasks:
5
5
 
6
6
  - name: Update package cache
@@ -12,7 +12,7 @@
12
12
  - python-mysqldb
13
13
 
14
14
  - name: Install mysql server
15
- apt: name=mysql-server state=present
15
+ apt: name=mysql-server-5.6 state=present
16
16
 
17
17
  - name: Copy mysql config file
18
18
  copy: src=files/ecco-my.cnf dest=/etc/mysql/conf.d/
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecco
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: java
6
6
  authors:
7
7
  - Twingly AB
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-04 00:00:00.000000000 Z
11
+ date: 2016-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement