embulk-output-elasticsearch_ruby 0.1.1 → 0.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a39cfe60830d7b5eef921678236f63b294c80cc
|
4
|
+
data.tar.gz: 8c19d1d98c742dbdfea65c5a10bb45d8c0d1e5b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2605199832fe17c37fc9e1e9afeca4d4acc29054b97c188f49cb7cddcbfebd2a408f3b7c54337b202b2f2d63a178e3719c35ea0548f96f935b7c9da6fc33333
|
7
|
+
data.tar.gz: 8f7b3d9f33eae1a8cee0ef13f8518df4fe1bcb6fd5a8c0502390baff94683e43b7a3082e4f39fe5c5facf755e747c7fffacf904ce12bb762b7b9a64f8e6ed43f
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
Gem::Specification.new do |spec|
|
3
3
|
spec.name = "embulk-output-elasticsearch_ruby"
|
4
|
-
spec.version = "0.1.
|
4
|
+
spec.version = "0.1.2"
|
5
5
|
spec.authors = ["toyama0919"]
|
6
6
|
spec.summary = "Elasticsearch Ruby output plugin for Embulk. Elasticsearch 1.X AND 2.X AND 5.X compatible."
|
7
7
|
spec.description = "Dumps records to Elasticsearch Ruby. Elasticsearch 1.X AND 2.X AND 5.X compatible."
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.add_dependency 'elasticsearch'
|
17
17
|
spec.add_dependency 'excon'
|
18
18
|
spec.add_development_dependency 'bundler', ['~> 1.0']
|
19
|
-
spec.add_development_dependency 'embulk', ['>= 0.8.
|
19
|
+
spec.add_development_dependency 'embulk', ['>= 0.8.16']
|
20
20
|
spec.add_development_dependency 'rake', ['>= 10.0']
|
21
21
|
spec.add_development_dependency 'test-unit'
|
22
22
|
spec.add_development_dependency 'test-unit-rr'
|
@@ -23,6 +23,8 @@ module Embulk
|
|
23
23
|
"array_columns" => config.param("array_columns", :array, default: nil),
|
24
24
|
"bulk_actions" => config.param("bulk_actions", :integer, default: 1000),
|
25
25
|
"retry_on_failure" => config.param("retry_on_failure", :integer, default: 5),
|
26
|
+
"before_template_name" => config.param("before_template_name", :string, default: nil),
|
27
|
+
"before_template" => config.param("before_template", :hash, default: nil),
|
26
28
|
}
|
27
29
|
task['time_value'] = Time.now.strftime('%Y.%m.%d.%H.%M.%S')
|
28
30
|
task['index'] = Time.now.strftime(task['index'])
|
@@ -32,6 +34,12 @@ module Embulk
|
|
32
34
|
end
|
33
35
|
Embulk.logger.info("mode => #{task['mode']}")
|
34
36
|
|
37
|
+
if task['before_template_name'] && task['before_template']
|
38
|
+
client = create_client(task)
|
39
|
+
Embulk.logger.info("put template => #{task['before_template_name']}")
|
40
|
+
client.indices.put_template name: task['before_template_name'], body: task['before_template']
|
41
|
+
end
|
42
|
+
|
35
43
|
task_reports = yield(task)
|
36
44
|
next_config_diff = {}
|
37
45
|
return next_config_diff
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-elasticsearch_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- toyama0919
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
requirements:
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 0.8.
|
60
|
+
version: 0.8.16
|
61
61
|
name: embulk
|
62
62
|
prerelease: false
|
63
63
|
type: :development
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.8.
|
68
|
+
version: 0.8.16
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|