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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffa1646346a6d10f15cc8837a0551ecdcddfd0c0
4
- data.tar.gz: 5a3f350ffdeda01067e3b7ab90b35078333f9ee6
3
+ metadata.gz: 7e0d8447f15a51520238bda787d9f00e1ffc2b17
4
+ data.tar.gz: acd39ee14e5eca137189069f652b91baa23847e4
5
5
  SHA512:
6
- metadata.gz: d96f0e8226cb824bf44a14d961528cef03a3831df71a0a5a6810d68935733fbe1f940d44875ef7871f2b757845174e168bd69fd77239fad96f773ef967b99af2
7
- data.tar.gz: 2c5886bdaa8050b70024cfeab747bdadaa6c0eb22bbb4b431aad818502969f58a3fbd23315565d41d74c4b9ee7cd9c9fca0f22681aa93c30dececa78647d5a22
6
+ metadata.gz: 2c8d1b8c80419b6b7b88540181b7a5d2c8b4cb8b5d7dca7489cfe9e163fdfa225cbc27ace78c31ffa7b198a54447ca1802a68c907d1a201ffd2e94b9c47123e1
7
+ data.tar.gz: 1465dbf6119e9a07ca3e177d2825868fa34fe0f4382c1c676f004a38493dcb1fba4c97e52f4b6991273b49dda9f2e8210cd7ebc2ff84138c02d44c363b4ee10e
data/.travis.yml CHANGED
@@ -7,6 +7,7 @@ rvm:
7
7
  - 2.1
8
8
 
9
9
  services:
10
+ - mysql
10
11
  - elasticsearch
11
12
 
12
13
  before_install:
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.1 | v0.14.x | >= 2.1 |
14
- | 0.6.1 | v0.12.x | >= 1.9 |
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.1
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.1
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.1"
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.1
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: 2017-04-15 00:00:00.000000000 Z
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.4.5
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: []