fluent-plugin-mysql-replicator 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/README.md +16 -4
- data/fluent-plugin-mysql-replicator.gemspec +1 -1
- data/lib/fluent/plugin/in_mysql_replicator.rb +1 -1
- data/lib/fluent/plugin/in_mysql_replicator_multi.rb +3 -0
- metadata +4 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e0d8447f15a51520238bda787d9f00e1ffc2b17
|
4
|
+
data.tar.gz: acd39ee14e5eca137189069f652b91baa23847e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c8d1b8c80419b6b7b88540181b7a5d2c8b4cb8b5d7dca7489cfe9e163fdfa225cbc27ace78c31ffa7b198a54447ca1802a68c907d1a201ffd2e94b9c47123e1
|
7
|
+
data.tar.gz: 1465dbf6119e9a07ca3e177d2825868fa34fe0f4382c1c676f004a38493dcb1fba4c97e52f4b6991273b49dda9f2e8210cd7ebc2ff84138c02d44c363b4ee10e
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -10,8 +10,20 @@ It's comming support replicate to another RDB/noSQL.
|
|
10
10
|
|
11
11
|
| fluent-plugin-mysql-replicator | fluentd | ruby |
|
12
12
|
|--------------------|------------|--------|
|
13
|
-
| 0.6.
|
14
|
-
| 0.6.
|
13
|
+
| 0.6.2 | v0.14.x | >= 2.1 |
|
14
|
+
| 0.6.2 | v0.12.x | >= 1.9 |
|
15
|
+
|
16
|
+
## Dependency
|
17
|
+
|
18
|
+
before use, install dependent library as:
|
19
|
+
|
20
|
+
```bash
|
21
|
+
# for RHEL/CentOS
|
22
|
+
$ sudo yum group install "Development Tools"
|
23
|
+
|
24
|
+
# for Ubuntu/Debian
|
25
|
+
$ sudo apt-get install build-essential
|
26
|
+
```
|
15
27
|
|
16
28
|
## Installation
|
17
29
|
|
@@ -19,10 +31,10 @@ install with gem or fluent-gem command as:
|
|
19
31
|
|
20
32
|
`````
|
21
33
|
# for system installed fluentd
|
22
|
-
$ gem install fluent-plugin-mysql-replicator -v 0.6.
|
34
|
+
$ gem install fluent-plugin-mysql-replicator -v 0.6.2
|
23
35
|
|
24
36
|
# for td-agent2
|
25
|
-
$ sudo td-agent-gem install fluent-plugin-mysql-replicator -v 0.6.
|
37
|
+
$ sudo td-agent-gem install fluent-plugin-mysql-replicator -v 0.6.2
|
26
38
|
`````
|
27
39
|
|
28
40
|
## Included plugins
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = "fluent-plugin-mysql-replicator"
|
4
|
-
s.version = "0.6.
|
4
|
+
s.version = "0.6.2"
|
5
5
|
s.authors = ["Kentaro Yoshida"]
|
6
6
|
s.email = ["y.ken.studio@gmail.com"]
|
7
7
|
s.homepage = "https://github.com/y-ken/fluent-plugin-mysql-replicator"
|
@@ -72,7 +72,7 @@ module Fluent
|
|
72
72
|
current_ids << row[@primary_key]
|
73
73
|
current_hash = Digest::SHA1.hexdigest(row.flatten.join)
|
74
74
|
row.each {|k, v| row[k] = v.to_s if v.is_a?(Time) || v.is_a?(Date) || v.is_a?(BigDecimal)}
|
75
|
-
row.select {|k, v| v.to_s.strip.match(/^SELECT/i) }.each do |k, v|
|
75
|
+
row.select {|k, v| v.to_s.strip.match(/^SELECT(\s+)/i) }.each do |k, v|
|
76
76
|
row[k] = [] unless row[k].is_a?(Array)
|
77
77
|
nest_rows, prepared_con = query(v.gsub(/\$\{([^\}]+)\}/, row[$1].to_s), prepared_con)
|
78
78
|
nest_rows.each do |nest_row|
|
@@ -106,6 +106,9 @@ module Fluent
|
|
106
106
|
rows_count += 1
|
107
107
|
end
|
108
108
|
db.close
|
109
|
+
unless config['prepared_query'].nil?
|
110
|
+
nest_db.close
|
111
|
+
end
|
109
112
|
elapsed_time = sprintf("%0.02f", Time.now - start_time)
|
110
113
|
@mutex.synchronize {
|
111
114
|
log.info "mysql_replicator_multi: execution finished. :setting_name=>#{config['name']} :rows_count=>#{rows_count} :elapsed_time=>#{elapsed_time} sec"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-mysql-replicator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kentaro Yoshida
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -150,15 +150,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.
|
153
|
+
rubygems_version: 2.6.11
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: Fluentd input plugin to track insert/update/delete event from MySQL database
|
157
157
|
server. Not only that, it could multiple table replication and generate nested document
|
158
158
|
for Elasticsearch/Solr. It's comming support replicate to another RDB/noSQL.
|
159
|
-
test_files:
|
160
|
-
- test/helper.rb
|
161
|
-
- test/plugin/test_in_mysql_replicator.rb
|
162
|
-
- test/plugin/test_in_mysql_replicator_multi.rb
|
163
|
-
- test/plugin/test_out_mysql_replicator_elasticsearch.rb
|
164
|
-
- test/plugin/test_out_mysql_replicator_solr.rb
|
159
|
+
test_files: []
|