fluent-plugin-cloudsearch 0.0.1 → 0.1.0
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 +4 -4
- data/fluent-plugin-cloudsearch.gemspec +1 -1
- data/lib/fluent/plugin/out_cloudsearch.rb +6 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ee705a541dbf1bf026b0bf14ff699813487eb5d2
|
|
4
|
+
data.tar.gz: f1890568d5ddfadbbec1c46b76168294c0673393
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d4697d892f8176d27f7c02f234e93180aec00d6a066595f700878c201ca31d25100e7057766a6b2e178658f1f1e198bcce1a8e2b0dc85d6dc37005b41f2ee162
|
|
7
|
+
data.tar.gz: 8e3bfb5dc1cc70deb8f66db6f3b5dfdae52e143c55e471ff5677d63a91438b4492ae5838f5c24f9571a31ff4bde03864433541359952ac0dccf36b55d4bd445f
|
|
@@ -29,6 +29,9 @@ module Fluent
|
|
|
29
29
|
|
|
30
30
|
super
|
|
31
31
|
|
|
32
|
+
unless @endpoint
|
|
33
|
+
raise ConfigError, "'endpoint' parameter is required"
|
|
34
|
+
end
|
|
32
35
|
if @buffer.buffer_chunk_limit > MAX_SIZE_LIMIT
|
|
33
36
|
raise ConfigError, "buffer_chunk_limit must be less than #{MAX_SIZE_LIMIT}"
|
|
34
37
|
end
|
|
@@ -37,7 +40,7 @@ module Fluent
|
|
|
37
40
|
def start
|
|
38
41
|
super
|
|
39
42
|
options = setup_credentials
|
|
40
|
-
options[:endpoint] = @endpoint
|
|
43
|
+
options[:endpoint] = @endpoint
|
|
41
44
|
options[:region] = @region if @region
|
|
42
45
|
@client = Aws::CloudSearchDomain::Client.new(options)
|
|
43
46
|
end
|
|
@@ -64,12 +67,12 @@ module Fluent
|
|
|
64
67
|
return ''
|
|
65
68
|
end
|
|
66
69
|
|
|
67
|
-
"#{record.to_json}
|
|
70
|
+
"#{record.to_json},"
|
|
68
71
|
end
|
|
69
72
|
|
|
70
73
|
def write(chunk)
|
|
71
74
|
documents = '['
|
|
72
|
-
documents << chunk.read.
|
|
75
|
+
documents << chunk.read.chop # chop last ','
|
|
73
76
|
documents << ']'
|
|
74
77
|
resp = @client.upload_documents(
|
|
75
78
|
:documents => documents,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-cloudsearch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kensaku Araga
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-12-
|
|
11
|
+
date: 2015-12-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fluentd
|