fluent-plugin-output-solr 1.0.1 → 1.0.2
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/README.md +30 -99
- data/fluent-plugin-output-solr.gemspec +10 -10
- data/fluent.conf +8 -2
- data/lib/fluent/plugin/out_solr.rb +85 -84
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83c3ee7ee757f55da3c9605b0c292d31cb41ca97
|
4
|
+
data.tar.gz: f01b0a4f320facb257e530772b5798ce38aa1c63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e957af523348177ef465b00f33762e9e566229afc980bf430f7aa59b6f82a1c72d027043077e204fd7b37b2984719eba055b2f7c2457795662570272a92707f
|
7
|
+
data.tar.gz: 820719027d5dfe43a39d8ed9771a3d069b15ed151d316db2172df5c1c8840798ee10de3be569b85620dc6e55922b06e7cfc7bf5e1cae4bfd2850fb9b6f2e1109
|
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# Fluent::Plugin::SolrOutput
|
2
2
|
|
3
|
-
This is a [Fluentd](http://fluentd.org/) output plugin for
|
3
|
+
This is a [Fluentd](http://fluentd.org/) output plugin for send data to [Apache Solr](http://lucene.apache.org/solr/).
|
4
4
|
|
5
5
|
## Requirements
|
6
6
|
|
7
|
-
| fluent-plugin-output-solr | fluentd | td-agent | ruby
|
8
|
-
| ------------------------- | --------------- | -------- |
|
9
|
-
| 1.x.x |
|
10
|
-
| 0.x.x | ~> 0.12.0 | 2 |
|
7
|
+
| fluent-plugin-output-solr | fluentd | td-agent | ruby |
|
8
|
+
| ------------------------- | --------------- | -------- | ------ |
|
9
|
+
| 1.x.x | >= 0.14.0, < 2 | 3 | >= 2.1 |
|
10
|
+
| 0.x.x | ~> 0.12.0 | 2 | >= 1.9 |
|
11
11
|
|
12
12
|
* The 1.x.x series is developed from this branch (master)
|
13
13
|
* The 0.x.x series (compatible with fluentd v0.12, and td-agent 2) is developed on the [v0.x.x branch](https://github.com/mosuka/fluent-plugin-output-solr/tree/v0.x.x)
|
@@ -32,12 +32,12 @@ $ rake install
|
|
32
32
|
|
33
33
|
## Config parameters
|
34
34
|
|
35
|
-
###
|
35
|
+
### base_url
|
36
36
|
|
37
|
-
The Solr
|
37
|
+
The Solr base url (for example http://localhost:8983/solr).
|
38
38
|
|
39
39
|
```
|
40
|
-
|
40
|
+
base_url http://localhost:8983/solr
|
41
41
|
```
|
42
42
|
|
43
43
|
### zk_host
|
@@ -50,50 +50,50 @@ zk_host localhost:2181/solr
|
|
50
50
|
|
51
51
|
### collection
|
52
52
|
|
53
|
-
The
|
53
|
+
The Solr collection/core name (default collection1).
|
54
54
|
|
55
55
|
```
|
56
56
|
collection collection1
|
57
57
|
```
|
58
58
|
|
59
|
-
###
|
59
|
+
### ignore_undefined_fields
|
60
60
|
|
61
|
-
|
61
|
+
Ignore undefined fields in the Solr schema.xml.
|
62
62
|
|
63
63
|
```
|
64
|
-
|
64
|
+
ignore_undefined_fields false
|
65
65
|
```
|
66
66
|
|
67
|
-
###
|
67
|
+
### tag_field
|
68
68
|
|
69
|
-
|
69
|
+
A field name of fluentd tag in the Solr schema.xml (default tag).
|
70
70
|
|
71
71
|
```
|
72
|
-
|
72
|
+
tag_field tag
|
73
73
|
```
|
74
74
|
|
75
|
-
###
|
75
|
+
### time_field
|
76
76
|
|
77
|
-
A
|
77
|
+
A field name of event timestamp in the Solr schema.xml (default time).
|
78
78
|
|
79
79
|
```
|
80
|
-
|
80
|
+
time_field time
|
81
81
|
```
|
82
82
|
|
83
|
-
###
|
83
|
+
### time_format
|
84
84
|
|
85
|
-
|
85
|
+
The format of the time field (default %FT%TZ).
|
86
86
|
|
87
87
|
```
|
88
|
-
|
88
|
+
time_format %FT%TZ
|
89
89
|
```
|
90
90
|
|
91
|
-
###
|
91
|
+
### millisecond
|
92
92
|
|
93
|
-
|
93
|
+
Output millisecond to Solr (default false).
|
94
94
|
|
95
95
|
```
|
96
|
-
|
96
|
+
millisecond false
|
97
97
|
```
|
98
98
|
|
99
99
|
### flush_size
|
@@ -119,8 +119,11 @@ commit_with_flush true
|
|
119
119
|
<match something.logs>
|
120
120
|
@type solr
|
121
121
|
|
122
|
-
# The Solr
|
123
|
-
|
122
|
+
# The Solr base url (for example http://localhost:8983/solr).
|
123
|
+
base_url http://localhost:8983/solr
|
124
|
+
|
125
|
+
# The Solr collection/core name (default collection1).
|
126
|
+
collection collection1
|
124
127
|
</match>
|
125
128
|
```
|
126
129
|
|
@@ -132,83 +135,11 @@ commit_with_flush true
|
|
132
135
|
# The ZooKeeper connection string that SolrCloud refers to (for example localhost:2181/solr).
|
133
136
|
zk_host localhost:2181/solr
|
134
137
|
|
135
|
-
# The
|
138
|
+
# The Solr collection/core name (default collection1).
|
136
139
|
collection collection1
|
137
140
|
</match>
|
138
141
|
```
|
139
142
|
|
140
|
-
## Solr setup examples
|
141
|
-
|
142
|
-
### How to setup Standalone Solr using data-driven schemaless mode.
|
143
|
-
|
144
|
-
1.Download and install Solr
|
145
|
-
|
146
|
-
```sh
|
147
|
-
$ mkdir $HOME/solr
|
148
|
-
$ cd $HOME/solr
|
149
|
-
$ wget https://archive.apache.org/dist/lucene/solr/5.4.0/solr-5.4.0.tgz
|
150
|
-
$ tar zxvf solr-5.4.0.tgz
|
151
|
-
$ cd solr-5.4.0
|
152
|
-
```
|
153
|
-
|
154
|
-
2.Start standalone Solr
|
155
|
-
|
156
|
-
```sh
|
157
|
-
$ ./bin/solr start -p 8983 -s server/solr
|
158
|
-
```
|
159
|
-
|
160
|
-
3.Create core
|
161
|
-
|
162
|
-
```sh
|
163
|
-
$ ./bin/solr create -c collection1 -d server/solr/configsets/data_driven_schema_configs -n collection1_configs
|
164
|
-
```
|
165
|
-
|
166
|
-
### How to setup SolrCloud using data-driven schemaless mode (shards=1 and replicationfactor=2).
|
167
|
-
|
168
|
-
1.Download and install ZooKeeper
|
169
|
-
|
170
|
-
```sh
|
171
|
-
$ mkdir $HOME/zookeeper
|
172
|
-
$ cd $HOME/zookeeper
|
173
|
-
$ wget https://archive.apache.org/dist/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
|
174
|
-
$ tar zxvf zookeeper-3.4.6.tar.gz
|
175
|
-
$ cd zookeeper-3.4.6
|
176
|
-
$ cp -p ./conf/zoo_sample.cfg ./conf/zoo.cfg
|
177
|
-
```
|
178
|
-
|
179
|
-
2.Start standalone ZooKeeper
|
180
|
-
|
181
|
-
```sh
|
182
|
-
$ ./bin/zkServer.sh start
|
183
|
-
```
|
184
|
-
|
185
|
-
3.Download an install Solr
|
186
|
-
|
187
|
-
```sh
|
188
|
-
$ mkdir $HOME/solr
|
189
|
-
$ cd $HOME/solr
|
190
|
-
$ wget https://archive.apache.org/dist/lucene/solr/5.4.0/solr-5.4.0.tgz
|
191
|
-
$ tar zxvf solr-5.4.0.tgz
|
192
|
-
$ cd solr-5.4.0
|
193
|
-
$ ./server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:2181 -cmd clear /solr
|
194
|
-
$ ./server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:2181 -cmd makepath /solr
|
195
|
-
$ cp -pr server/solr server/solr1
|
196
|
-
$ cp -pr server/solr server/solr2
|
197
|
-
```
|
198
|
-
|
199
|
-
4.Start SolrCloud
|
200
|
-
|
201
|
-
```sh
|
202
|
-
$ ./bin/solr start -h localhost -p 8983 -z localhost:2181/solr -s server/solr1
|
203
|
-
$ ./bin/solr start -h localhost -p 8985 -z localhost:2181/solr -s server/solr2
|
204
|
-
```
|
205
|
-
|
206
|
-
5.Create collection
|
207
|
-
|
208
|
-
```sh
|
209
|
-
$ ./bin/solr create -c collection1 -d server/solr1/configsets/data_driven_schema_configs -n collection1_configs -shards 1 -replicationFactor 2
|
210
|
-
```
|
211
|
-
|
212
143
|
## Development
|
213
144
|
|
214
145
|
After checking out the repo, run `bundle install` to install dependencies. Then, run `rake test` to run the tests.
|
@@ -3,21 +3,21 @@ lib = File.expand_path('../lib', __FILE__)
|
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name =
|
7
|
-
spec.version =
|
8
|
-
spec.authors = [
|
9
|
-
spec.email = [
|
6
|
+
spec.name = 'fluent-plugin-output-solr'
|
7
|
+
spec.version = '1.0.2'
|
8
|
+
spec.authors = ['Minoru Osuka']
|
9
|
+
spec.email = ['minoru.osuka@gmail.com']
|
10
10
|
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
13
|
-
spec.homepage =
|
11
|
+
spec.summary = 'Fluent output plugin for sending data to Apache Solr.'
|
12
|
+
spec.description = 'Fluent output plugin for sending data to Apache Solr.'
|
13
|
+
spec.homepage = 'https://github.com/mosuka/fluent-plugin-output-solr'
|
14
14
|
|
15
|
-
spec.license =
|
15
|
+
spec.license = 'Apache-2.0'
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
-
spec.bindir =
|
18
|
+
spec.bindir = 'exe'
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
-
spec.require_paths = [
|
20
|
+
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
spec.add_runtime_dependency 'fluentd', ['>= 0.14.0', '< 2']
|
23
23
|
spec.add_runtime_dependency 'rsolr-cloud', '~> 1.1.0'
|
data/fluent.conf
CHANGED
@@ -15,11 +15,17 @@
|
|
15
15
|
|
16
16
|
<match messages>
|
17
17
|
@type solr
|
18
|
-
|
19
|
-
zk_host localhost:2181/solr
|
18
|
+
base_url http://localhost:8983/solr
|
19
|
+
# zk_host localhost:2181/solr
|
20
20
|
collection collection1
|
21
21
|
ignore_undefined_fields false
|
22
|
+
tag_field tag
|
23
|
+
time_field time
|
24
|
+
time_format %FT%TZ
|
25
|
+
millisecond true
|
22
26
|
flush_size 100
|
27
|
+
commit_with_flush true
|
28
|
+
|
23
29
|
buffer_type memory
|
24
30
|
buffer_queue_limit 64m
|
25
31
|
buffer_chunk_limit 8m
|
@@ -11,12 +11,17 @@ module Fluent::Plugin
|
|
11
11
|
helpers :inject, :compat_parameters
|
12
12
|
|
13
13
|
DEFAULT_COLLECTION = 'collection1'
|
14
|
-
|
15
|
-
DEFAULT_STRING_FIELD_VALUE_MAX_LENGTH = -1
|
14
|
+
|
16
15
|
DEFAULT_TAG_FIELD = 'tag'
|
17
|
-
|
16
|
+
|
17
|
+
DEFAULT_TIME_FIELD = 'time'
|
18
|
+
DEFAULT_TIME_FORMAT = '%FT%TZ'
|
19
|
+
DEFAULT_MILLISECOND = false
|
20
|
+
|
21
|
+
DEFAULT_IGNORE_UNDEFINED_FIELDS = false
|
22
|
+
|
18
23
|
DEFAULT_FLUSH_SIZE = 100
|
19
|
-
DEFAULT_BUFFER_TYPE =
|
24
|
+
DEFAULT_BUFFER_TYPE = 'memory'
|
20
25
|
DEFAULT_COMMIT_WITH_FLUSH = true
|
21
26
|
|
22
27
|
MODE_STANDALONE = 'Standalone'
|
@@ -25,27 +30,27 @@ module Fluent::Plugin
|
|
25
30
|
config_set_default :include_tag_key, false
|
26
31
|
config_set_default :include_time_key, false
|
27
32
|
|
28
|
-
config_param :
|
29
|
-
:desc => 'The Solr
|
33
|
+
config_param :base_url, :string, :default => nil,
|
34
|
+
:desc => 'The Solr base url (for example http://localhost:8983/solr).'
|
30
35
|
|
31
36
|
config_param :zk_host, :string, :default => nil,
|
32
37
|
:desc => 'The ZooKeeper connection string that SolrCloud refers to (for example localhost:2181/solr).'
|
38
|
+
|
33
39
|
config_param :collection, :string, :default => DEFAULT_COLLECTION,
|
34
|
-
:desc => 'The
|
40
|
+
:desc => 'The Solr collection/core name (default collection1).'
|
35
41
|
|
36
|
-
config_param :defined_fields, :array, :default => nil,
|
37
|
-
:desc => 'The defined fields in the Solr schema.xml. If omitted, it will get fields via Solr Schema API.'
|
38
42
|
config_param :ignore_undefined_fields, :bool, :default => DEFAULT_IGNORE_UNDEFINED_FIELDS,
|
39
43
|
:desc => 'Ignore undefined fields in the Solr schema.xml.'
|
40
|
-
config_param :string_field_value_max_length, :integer, :default => DEFAULT_STRING_FIELD_VALUE_MAX_LENGTH,
|
41
|
-
:desc => 'Field value max length.'
|
42
44
|
|
43
|
-
config_param :unique_key_field, :string, :default => nil,
|
44
|
-
:desc => 'A field name of unique key in the Solr schema.xml. If omitted, it will get unique key via Solr Schema API.'
|
45
45
|
config_param :tag_field, :string, :default => DEFAULT_TAG_FIELD,
|
46
46
|
:desc => 'A field name of fluentd tag in the Solr schema.xml (default time).'
|
47
|
-
|
47
|
+
|
48
|
+
config_param :time_field, :string, :default => DEFAULT_TIME_FIELD,
|
48
49
|
:desc => 'A field name of event timestamp in the Solr schema.xml (default time).'
|
50
|
+
config_param :time_format, :string, :default => DEFAULT_TIME_FORMAT,
|
51
|
+
:desc => 'The format of the time field (default %d/%b/%Y:%H:%M:%S %z).'
|
52
|
+
config_param :millisecond, :bool, :default => DEFAULT_MILLISECOND,
|
53
|
+
:desc => 'Output millisecond to Solr (default false).'
|
49
54
|
|
50
55
|
config_param :flush_size, :integer, :default => DEFAULT_FLUSH_SIZE,
|
51
56
|
:desc => 'A number of events to queue up before writing to Solr (default 100).'
|
@@ -72,7 +77,7 @@ module Fluent::Plugin
|
|
72
77
|
super
|
73
78
|
|
74
79
|
@mode = nil
|
75
|
-
if ! @
|
80
|
+
if ! @base_url.nil? then
|
76
81
|
@mode = MODE_STANDALONE
|
77
82
|
elsif ! @zk_host.nil?
|
78
83
|
@mode = MODE_SOLRCLOUD
|
@@ -82,7 +87,7 @@ module Fluent::Plugin
|
|
82
87
|
@zk = nil
|
83
88
|
|
84
89
|
if @mode == MODE_STANDALONE then
|
85
|
-
@solr = RSolr.connect :url => @
|
90
|
+
@solr = RSolr.connect :url => @base_url.end_with?('/') ? @base_url + @collection : @base_url + '/' + @collection
|
86
91
|
elsif @mode == MODE_SOLRCLOUD then
|
87
92
|
@zk = ZK.new(@zk_host)
|
88
93
|
cloud_connection = RSolr::Cloud::Connection.new(@zk)
|
@@ -113,123 +118,119 @@ module Fluent::Plugin
|
|
113
118
|
def write(chunk)
|
114
119
|
documents = []
|
115
120
|
|
116
|
-
|
117
|
-
|
121
|
+
# Get fields from Solr
|
122
|
+
fields = get_fields
|
123
|
+
|
124
|
+
# Get unique key field from Solr
|
125
|
+
unique_key = get_unique_key
|
126
|
+
|
127
|
+
# Get fluentd tag
|
118
128
|
tag = chunk.metadata.tag
|
129
|
+
|
119
130
|
chunk.msgpack_each do |time, record|
|
120
131
|
record = inject_values_to_record(tag, time, record)
|
121
132
|
|
122
|
-
|
123
|
-
|
133
|
+
# Set unique key and value
|
134
|
+
unless record.has_key?(unique_key) then
|
135
|
+
record.merge!({unique_key => SecureRandom.uuid})
|
124
136
|
end
|
125
137
|
|
138
|
+
# Set Fluentd tag to Solr tag field
|
126
139
|
unless record.has_key?(@tag_field) then
|
127
140
|
record.merge!({@tag_field => tag})
|
128
141
|
end
|
129
142
|
|
130
|
-
|
143
|
+
# Set time
|
144
|
+
tmp_time = Time.at(time).utc
|
145
|
+
if record.has_key?(@time_field) then
|
146
|
+
# Parsing the time field in the record by the specified format.
|
131
147
|
begin
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
record.merge!({@timestamp_field => Time.at(time).utc.strftime('%FT%TZ')})
|
148
|
+
tmp_time = Time.strptime(record[@time_field], @time_format).utc
|
149
|
+
rescue Exception => e
|
150
|
+
log.warn "An error occurred in parsing the time field: #{e.message}"
|
136
151
|
end
|
152
|
+
end
|
153
|
+
if @millisecond then
|
154
|
+
record.merge!({@time_field => '%s.%03dZ' % [tmp_time.strftime('%FT%T'), tmp_time.usec / 1000.0]})
|
137
155
|
else
|
138
|
-
record.merge!({@
|
156
|
+
record.merge!({@time_field => tmp_time.strftime('%FT%TZ')})
|
139
157
|
end
|
140
158
|
|
159
|
+
# Ignore undefined fields
|
141
160
|
if @ignore_undefined_fields then
|
142
161
|
record.each_key do |key|
|
143
|
-
unless
|
162
|
+
unless fields.include?(key) then
|
144
163
|
record.delete(key)
|
145
164
|
end
|
146
165
|
end
|
147
166
|
end
|
148
167
|
|
149
|
-
|
150
|
-
record.each_key do |key|
|
151
|
-
if record[key].instance_of?(Array) then
|
152
|
-
values = []
|
153
|
-
record[key].each do |value|
|
154
|
-
if value.instance_of?(String) then
|
155
|
-
if value.length > @string_field_value_max_length then
|
156
|
-
log.warn "#{key} is too long (#{value.length}, max is #{@string_field_value_max_length})."
|
157
|
-
values.push(value.slice(0, @string_field_value_max_length))
|
158
|
-
else
|
159
|
-
values.push(value)
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
record[key] = values
|
164
|
-
elsif record[key].instance_of?(String) then
|
165
|
-
if record[key].length > @string_field_value_max_length then
|
166
|
-
log.warn "#{key} is too long (#{record[key].length}, max is #{@string_field_value_max_length})."
|
167
|
-
record[key] = record[key].slice(0, @string_field_value_max_length)
|
168
|
-
end
|
169
|
-
end
|
170
|
-
end
|
171
|
-
end
|
172
|
-
|
168
|
+
# Add record to documents
|
173
169
|
documents << record
|
174
170
|
|
171
|
+
# Update when flash size is reached
|
175
172
|
if documents.count >= @flush_size
|
176
173
|
update documents
|
177
174
|
documents.clear
|
178
175
|
end
|
179
176
|
end
|
180
177
|
|
178
|
+
# Update remaining documents
|
181
179
|
update documents unless documents.empty?
|
182
180
|
end
|
183
181
|
|
184
182
|
def update(documents)
|
185
|
-
|
186
|
-
@
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
183
|
+
begin
|
184
|
+
if @mode == MODE_STANDALONE then
|
185
|
+
@solr.add documents, :params => {:commit => @commit_with_flush}
|
186
|
+
elsif @mode == MODE_SOLRCLOUD then
|
187
|
+
@solr.add documents, collection: @collection, :params => {:commit => @commit_with_flush}
|
188
|
+
end
|
189
|
+
log.debug "Sent #{documents.count} document(s) to Solr"
|
190
|
+
rescue Exception
|
191
|
+
log.warn "An error occurred while sending #{documents.count} document(s) to Solr"
|
191
192
|
end
|
192
|
-
rescue Exception => e
|
193
|
-
log.warn "Update: An error occurred while indexing: #{e.message}"
|
194
193
|
end
|
195
194
|
|
196
195
|
def get_unique_key
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
response =
|
201
|
-
|
202
|
-
|
196
|
+
unique_key = 'id'
|
197
|
+
|
198
|
+
begin
|
199
|
+
response = nil
|
200
|
+
if @mode == MODE_STANDALONE then
|
201
|
+
response = @solr.get 'schema/uniquekey'
|
202
|
+
elsif @mode == MODE_SOLRCLOUD then
|
203
|
+
response = @solr.get 'schema/uniquekey', collection: @collection
|
204
|
+
end
|
205
|
+
unique_key = response['uniqueKey']
|
206
|
+
log.debug "Unique key: #{unique_key}"
|
207
|
+
rescue Exception
|
208
|
+
log.warn 'An error occurred while getting unique key'
|
203
209
|
end
|
204
210
|
|
205
|
-
unique_key = response['uniqueKey']
|
206
|
-
log.debug "Unique key: #{unique_key}"
|
207
|
-
|
208
211
|
return unique_key
|
209
|
-
|
210
|
-
rescue Exception => e
|
211
|
-
log.warn "An error occurred: #{e.message}"
|
212
212
|
end
|
213
213
|
|
214
214
|
def get_fields
|
215
|
-
|
215
|
+
fields = []
|
216
216
|
|
217
|
-
|
218
|
-
response =
|
219
|
-
elsif @mode == MODE_SOLRCLOUD then
|
220
|
-
response = @solr.get 'schema/fields', collection: @collection
|
221
|
-
end
|
217
|
+
begin
|
218
|
+
response = nil
|
222
219
|
|
223
|
-
|
224
|
-
|
225
|
-
|
220
|
+
if @mode == MODE_STANDALONE then
|
221
|
+
response = @solr.get 'schema/fields'
|
222
|
+
elsif @mode == MODE_SOLRCLOUD then
|
223
|
+
response = @solr.get 'schema/fields', collection: @collection
|
224
|
+
end
|
225
|
+
response['fields'].each do |field|
|
226
|
+
fields.push(field['name'])
|
227
|
+
end
|
228
|
+
log.debug "Fields: #{fields}"
|
229
|
+
rescue Exception
|
230
|
+
log.warn 'An error occurred while getting fields'
|
226
231
|
end
|
227
|
-
log.debug "Fields: #{fields}"
|
228
232
|
|
229
233
|
return fields
|
230
|
-
|
231
|
-
rescue Exception => e
|
232
|
-
log.warn "An error occurred: #{e.message}"
|
233
234
|
end
|
234
235
|
end
|
235
236
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-output-solr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Minoru Osuka
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -156,8 +156,7 @@ dependencies:
|
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: 1.1.8
|
159
|
-
description: Fluent output plugin for sending data to Apache Solr.
|
160
|
-
Solr and SolrCloud.
|
159
|
+
description: Fluent output plugin for sending data to Apache Solr.
|
161
160
|
email:
|
162
161
|
- minoru.osuka@gmail.com
|
163
162
|
executables: []
|