ecco 0.7.0-java → 0.8.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +0 -2
- data/.travis.yml +19 -31
- data/CHANGELOG.md +12 -0
- data/README.md +16 -8
- data/docker-compose-mysql-5-6.yml +5 -0
- data/docker-compose-mysql-5-7.yml +5 -0
- data/docker-compose-mysql-8-0.yml +5 -0
- data/docker-compose-mysql-base.yml +13 -0
- data/{vagrant/files → docker}/ecco-my.cnf +0 -1
- data/ecco.gemspec +1 -1
- data/lib/ecco/client.rb +16 -1
- data/lib/ecco/version.rb +2 -2
- data/lib/ext/mysql-binlog-connector-java-0.21.0.jar +0 -0
- data/pom.xml +1 -1
- metadata +16 -15
- data/Vagrantfile +0 -14
- data/lib/ext/mysql-binlog-connector-java-0.2.4.jar +0 -0
- data/vagrant/playbook.yml +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: aa0f1adf6e5a97d969a6acf43b3ec6d083e7975e3e60f4684e46b672453dd7e1
|
4
|
+
data.tar.gz: de78c5aba80a3ff667d63408721723737e5ae731124c55f413b2c5f0fdb15f4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ee74c54f9ab18d42046b00e7e6e48b7de8c761482a1a5840945ff77bdd3c618ed81721987a6873f76d99dc99835a373c872e8eeba68ed480995a898b6c250e8
|
7
|
+
data.tar.gz: 56a14190b670b5a8e02cd1d200f9aab042c3a471287c07a0f80372230a068d90de7c5e80c108f062fe918f8ccf4d383cc48a00edc3d0da474d924424c5d0d0dc
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,46 +1,34 @@
|
|
1
|
-
|
1
|
+
dist: bionic
|
2
|
+
language: ruby
|
3
|
+
services:
|
4
|
+
- docker
|
2
5
|
|
3
|
-
dist: trusty
|
4
6
|
addons:
|
5
7
|
apt:
|
6
8
|
packages:
|
7
|
-
- mysql-server-5.6
|
8
|
-
- mysql-client-core-5.6
|
9
|
-
- mysql-client-5.6
|
10
9
|
- haveged # Extra entropy
|
11
10
|
|
12
|
-
language: ruby
|
13
|
-
|
14
|
-
rvm:
|
15
|
-
- jruby-9.0.5.0
|
16
|
-
|
17
|
-
services:
|
18
|
-
- mysql
|
19
|
-
|
20
11
|
before_install:
|
21
|
-
- sudo service haveged start # Extra entropy
|
22
|
-
-
|
23
|
-
-
|
24
|
-
-
|
25
|
-
- gem install bundler
|
12
|
+
- sudo service haveged start # Extra entropy to ensure quick start time for JRuby
|
13
|
+
- rvm get master
|
14
|
+
- rvm install jruby-9.2.13.0
|
15
|
+
- rvm use jruby-9.2.13.0
|
16
|
+
- gem install bundler -v '< 2'
|
17
|
+
- docker-compose -f docker-compose-mysql-base.yml -f docker-compose-mysql-$MYSQL_VERSION.yml up -d
|
26
18
|
|
27
19
|
env:
|
28
20
|
global:
|
29
|
-
-
|
30
|
-
|
31
|
-
-
|
32
|
-
-
|
21
|
+
- JRUBY_OPTS='--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -Xcompile.invokedynamic=false'
|
22
|
+
jobs:
|
23
|
+
- MYSQL_VERSION="5-6"
|
24
|
+
- MYSQL_VERSION="5-7"
|
25
|
+
- MYSQL_VERSION="8-0"
|
26
|
+
|
27
|
+
jobs:
|
28
|
+
allow_failures:
|
29
|
+
- env: MYSQL_VERSION="8-0"
|
33
30
|
|
34
31
|
script: bin/all_specs
|
35
32
|
|
36
33
|
notifications:
|
37
34
|
email: false
|
38
|
-
hipchat:
|
39
|
-
on_success: never
|
40
|
-
on_failure: change
|
41
|
-
template:
|
42
|
-
- '%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}
|
43
|
-
(<a href="%{build_url}">Details</a>/<a href="%{compare_url}">Change view</a>)'
|
44
|
-
format: html
|
45
|
-
rooms:
|
46
|
-
secure: J7yYVGr6NQ0rOA6WdOVxiB4XxPJJDcQG7R0fgAXxtAzQNun+QHLBH9Yu7NN7kaJrVU69oIMrAw2e7EGSh9mnQ3fmGyA/z9Xu5+3GYjGuN3QDLGA8kbnDggIeo8vZrTZYL9aITVHMUH/6oKwAtg4Q5Tx4ftguj4zvMMWiZTFHuv05V0FgyoQkSggKLE3w8ZndEjZfaBbtgUeN/eGeAl2oeP8w53eM4ebh2+VNYNVGr+5zr1VGkkXz1SoRT3YEJtSjH0DvinZDrsU3VZZY9hIcUKu3dzhPuwZFMIDGshDxVqf/0XADOFUqgYFeHmg64O+ikIye4MiuBKw/miqSvx6lZSdjlsYyHruYFCbjcZue/WIKAw5nWZNQ+YZmzxMWZV4czImO8q2ljMOXUluVgW78mZMYsqzsoE5tX6PVO4I7aVL4L9mnb01nPDAPgJAXCGfudOkHfUi6jaVTkvLqSJvifbCzhsRvaPCA2VAQGUTssv9pm2YkCP5rOOeasU+XgJtLJif8Uv1g/zNjNajNU19A1PLCSNgdvX381Dgd3NS/DjMtNtgTXxGjSpHwQM54aL/lp6a2XhCpSpBZBcBz01KQJGsgLUgDDQJSzO1e8OdiP6YQHIGEA0OM4Wfoq2I3TLWMSlGSzJBvUBHJwstPMjTbH+1HM2AOY80orVHQWzttZlc=
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v0.7.0](https://github.com/twingly/ecco/tree/v0.7.0) (2016-10-07)
|
4
|
+
[Full Changelog](https://github.com/twingly/ecco/compare/v0.6.1...v0.7.0)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- Extend on\_save\_position with information about the event [\#23](https://github.com/twingly/ecco/issues/23)
|
9
|
+
|
10
|
+
**Merged pull requests:**
|
11
|
+
|
12
|
+
- Expose event information in on\_save\_position [\#24](https://github.com/twingly/ecco/pull/24) ([dentarg](https://github.com/dentarg))
|
13
|
+
- Add changelog [\#21](https://github.com/twingly/ecco/pull/21) ([dentarg](https://github.com/dentarg))
|
14
|
+
|
3
15
|
## [v0.6.1](https://github.com/twingly/ecco/tree/v0.6.1) (2016-07-18)
|
4
16
|
[Full Changelog](https://github.com/twingly/ecco/compare/v0.6.0...v0.6.1)
|
5
17
|
|
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 (
|
5
|
+
MySQL (5.6 and 5.7) replication binlog parser using [mysql-binlog-connector-java].
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -46,8 +46,8 @@ client.on_row_event do |row_event|
|
|
46
46
|
puts "Row event: #{database} #{table} #{type} #{second_column}"
|
47
47
|
end
|
48
48
|
|
49
|
-
client.on_save_position do |filename, position|
|
50
|
-
puts "
|
49
|
+
client.on_save_position do |filename, position, event_type_name|
|
50
|
+
puts "Saved #{event_type_name} event: #{filename} #{position}"
|
51
51
|
end
|
52
52
|
|
53
53
|
client.on_communication_failure do |client, error|
|
@@ -91,13 +91,22 @@ The integration tests don't run by default. To run all the tests, including inte
|
|
91
91
|
|
92
92
|
The tests needs a MySQL server with replication enabled.
|
93
93
|
|
94
|
-
Ecco includes
|
94
|
+
Ecco includes multiple Docker Compose definitions that can be used for this, one per supported MySQL version.
|
95
95
|
|
96
|
-
|
96
|
+
Start the desired version before running the tests:
|
97
97
|
|
98
|
-
|
98
|
+
```shell
|
99
|
+
# MySQL 5.6
|
100
|
+
docker-compose -f docker-compose-mysql-base.yml -f docker-compose-mysql-5-6.yml up
|
99
101
|
|
100
|
-
|
102
|
+
# MySQL 5.7
|
103
|
+
docker-compose -f docker-compose-mysql-base.yml -f docker-compose-mysql-5-7.yml up
|
104
|
+
|
105
|
+
# MySQL 8.0
|
106
|
+
docker-compose -f docker-compose-mysql-base.yml -f docker-compose-mysql-8-0.yml up
|
107
|
+
```
|
108
|
+
|
109
|
+
*Note: Stop any local MySQL server first, otherwise there will be port collisions*
|
101
110
|
|
102
111
|
## Release
|
103
112
|
|
@@ -123,5 +132,4 @@ Make a commit with the changelog changes and push.
|
|
123
132
|
The gem is available as open source under the terms of the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
|
124
133
|
|
125
134
|
[mysql-binlog-connector-java]: https://github.com/shyiko/mysql-binlog-connector-java
|
126
|
-
[Ansible]: http://www.ansible.com/
|
127
135
|
[GitHub Changelog Generator]: https://github.com/skywinder/github-changelog-generator/
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# https://docs.docker.com/compose/extends/#adding-and-overriding-configuration
|
2
|
+
|
3
|
+
version: "3.7"
|
4
|
+
|
5
|
+
services:
|
6
|
+
db:
|
7
|
+
volumes:
|
8
|
+
- ./docker/ecco-my.cnf:/etc/mysql/conf.d/ecco-my.cnf
|
9
|
+
ports:
|
10
|
+
- 3306:3306
|
11
|
+
environment:
|
12
|
+
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
|
13
|
+
MYSQL_DATABASE: ecco_test
|
data/ecco.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_development_dependency "bundler", "~> 1.10"
|
23
|
-
spec.add_development_dependency "rake", "~>
|
23
|
+
spec.add_development_dependency "rake", "~> 12"
|
24
24
|
spec.add_development_dependency "rspec"
|
25
25
|
spec.add_development_dependency "sequel"
|
26
26
|
spec.add_development_dependency "jdbc-mysql"
|
data/lib/ecco/client.rb
CHANGED
@@ -12,10 +12,25 @@ module Ecco
|
|
12
12
|
def_delegators :@client, :set_server_id, :get_server_id
|
13
13
|
def_delegators :@client, :set_keep_alive, :is_keep_alive
|
14
14
|
def_delegators :@client, :set_keep_alive_interval, :get_keep_alive_interval
|
15
|
-
def_delegators :@client, :
|
15
|
+
def_delegators :@client, :set_heartbeat_interval, :get_heartbeat_interval
|
16
|
+
def_delegators :@client, :set_connect_timeout, :get_connect_timeout
|
16
17
|
def_delegators :@client, :set_binlog_filename, :get_binlog_filename
|
17
18
|
def_delegators :@client, :set_binlog_position, :get_binlog_position
|
18
19
|
|
20
|
+
def get_keep_alive_connect_timeout
|
21
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. "\
|
22
|
+
"Please use `get_connect_timeout` instead."
|
23
|
+
|
24
|
+
get_connect_timeout
|
25
|
+
end
|
26
|
+
|
27
|
+
def set_keep_alive_connect_timeout(timeout)
|
28
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. "\
|
29
|
+
"Please use `set_connect_timeout` instead."
|
30
|
+
|
31
|
+
set_connect_timeout(timeout)
|
32
|
+
end
|
33
|
+
|
19
34
|
java_import com.github.shyiko.mysql.binlog.BinaryLogClient
|
20
35
|
java_import java.io.IOException
|
21
36
|
|
data/lib/ecco/version.rb
CHANGED
Binary file
|
data/pom.xml
CHANGED
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.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Twingly AB
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -17,8 +17,8 @@ dependencies:
|
|
17
17
|
- !ruby/object:Gem::Version
|
18
18
|
version: '1.10'
|
19
19
|
name: bundler
|
20
|
-
prerelease: false
|
21
20
|
type: :development
|
21
|
+
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
@@ -29,15 +29,15 @@ dependencies:
|
|
29
29
|
requirements:
|
30
30
|
- - "~>"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '12'
|
33
33
|
name: rake
|
34
|
-
prerelease: false
|
35
34
|
type: :development
|
35
|
+
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '12'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
@@ -45,8 +45,8 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
47
|
name: rspec
|
48
|
-
prerelease: false
|
49
48
|
type: :development
|
49
|
+
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
@@ -59,8 +59,8 @@ dependencies:
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
name: sequel
|
62
|
-
prerelease: false
|
63
62
|
type: :development
|
63
|
+
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
@@ -73,8 +73,8 @@ dependencies:
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
name: jdbc-mysql
|
76
|
-
prerelease: false
|
77
76
|
type: :development
|
77
|
+
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
@@ -95,10 +95,14 @@ files:
|
|
95
95
|
- Gemfile
|
96
96
|
- README.md
|
97
97
|
- Rakefile
|
98
|
-
- Vagrantfile
|
99
98
|
- bin/all_specs
|
100
99
|
- bin/console
|
101
100
|
- bin/specs
|
101
|
+
- docker-compose-mysql-5-6.yml
|
102
|
+
- docker-compose-mysql-5-7.yml
|
103
|
+
- docker-compose-mysql-8-0.yml
|
104
|
+
- docker-compose-mysql-base.yml
|
105
|
+
- docker/ecco-my.cnf
|
102
106
|
- ecco.gemspec
|
103
107
|
- lib/ecco.rb
|
104
108
|
- lib/ecco/client.rb
|
@@ -109,10 +113,8 @@ files:
|
|
109
113
|
- lib/ecco/row_event_listener.rb
|
110
114
|
- lib/ecco/save_event_listener.rb
|
111
115
|
- lib/ecco/version.rb
|
112
|
-
- lib/ext/mysql-binlog-connector-java-0.
|
116
|
+
- lib/ext/mysql-binlog-connector-java-0.21.0.jar
|
113
117
|
- pom.xml
|
114
|
-
- vagrant/files/ecco-my.cnf
|
115
|
-
- vagrant/playbook.yml
|
116
118
|
homepage: https://github.com/twingly/ecco
|
117
119
|
licenses:
|
118
120
|
- Apache-2.0
|
@@ -132,8 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
134
|
- !ruby/object:Gem::Version
|
133
135
|
version: '0'
|
134
136
|
requirements: []
|
135
|
-
|
136
|
-
rubygems_version: 2.6.7
|
137
|
+
rubygems_version: 3.0.6
|
137
138
|
signing_key:
|
138
139
|
specification_version: 4
|
139
140
|
summary: MySQL replication binlog parser.
|
data/Vagrantfile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Vagrant.configure("2") do |config|
|
2
|
-
config.vm.define "ecco-test" do |ubuntu|
|
3
|
-
ubuntu.vm.hostname = "ecco-test"
|
4
|
-
ubuntu.vm.box = "ubuntu/trusty64"
|
5
|
-
ubuntu.vm.provision :ansible do |ansible|
|
6
|
-
ansible.playbook = "vagrant/playbook.yml"
|
7
|
-
end
|
8
|
-
|
9
|
-
ubuntu.vm.network :forwarded_port, host: 3306, guest: 3306
|
10
|
-
ubuntu.vm.provider "virtualbox" do |vbox|
|
11
|
-
vbox.memory = 1024
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
Binary file
|
data/vagrant/playbook.yml
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
---
|
2
|
-
- hosts: all
|
3
|
-
become: yes
|
4
|
-
tasks:
|
5
|
-
|
6
|
-
- name: Update package cache
|
7
|
-
apt: update_cache=yes
|
8
|
-
|
9
|
-
- name: Install ansible dependencies
|
10
|
-
apt: name={{ item }}
|
11
|
-
with_items:
|
12
|
-
- python-mysqldb
|
13
|
-
|
14
|
-
- name: Install mysql server
|
15
|
-
apt: name=mysql-server-5.6 state=present
|
16
|
-
|
17
|
-
- name: Copy mysql config file
|
18
|
-
copy: src=files/ecco-my.cnf dest=/etc/mysql/conf.d/
|
19
|
-
|
20
|
-
- name: Allow mysql root connection from remote hosts
|
21
|
-
mysql_user: name=root password="" host=% priv=*.*:ALL state=present
|
22
|
-
|
23
|
-
- name: Restart mysql
|
24
|
-
service: name=mysql state=restarted
|
25
|
-
|
26
|
-
- name: Create database
|
27
|
-
mysql_db: name=ecco_test
|