fluent-plugin-out-solr 0.0.7 → 0.0.8
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-out-solr.gemspec +2 -2
- data/lib/fluent/plugin/solr_config_common.rb +2 -0
- data/lib/fluent/plugin/solr_util.rb +9 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 203ff5656b607227133e3613e85e9943a6b531f2
|
|
4
|
+
data.tar.gz: ba5beff75c8cab148a18d34ebb96eaaae763508f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 121791f7e76f42b7288f2fd1ab0bfe0bd8dbaa08159c715c2ceebf2438554a5101589d511c4119240fd73af69f88e6cba9abce99c4fc4d3622f5d8dd36944d86
|
|
7
|
+
data.tar.gz: 28b213b5d7db84fa6df2eec33fa4150e945b6228a3c47ec7fc3fd34f09792b7b9fc35d6e40c8f9d500362aaade9392d1c70536aec1346287752efd39826c65e8
|
|
@@ -5,8 +5,8 @@ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = 'fluent-plugin-out-solr'
|
|
8
|
-
s.version = '0.0.
|
|
9
|
-
s.authors = %w(diogo pitr haruyama
|
|
8
|
+
s.version = '0.0.8'
|
|
9
|
+
s.authors = %w(diogo pitr haruyama)
|
|
10
10
|
s.email = ['haruyama@unixuser.org']
|
|
11
11
|
s.description = %q(Solr output plugin for Fluent event collector)
|
|
12
12
|
s.summary = s.description
|
|
@@ -9,6 +9,8 @@ module SolrConfigCommon
|
|
|
9
9
|
config_param :port, :integer, default: 8983
|
|
10
10
|
config_param :time_field, :string, default: 'timestamp'
|
|
11
11
|
config_param :commit, :bool, default: false
|
|
12
|
+
config_param :read_timeout, :integer, default: 600
|
|
13
|
+
config_param :send_rate, :integer, default: 20
|
|
12
14
|
|
|
13
15
|
include Fluent::SetTagKeyMixin
|
|
14
16
|
config_set_default :include_tag_key, false
|
|
@@ -13,9 +13,18 @@ module SolrUtil
|
|
|
13
13
|
record.merge!(@time_field => time.strftime('%FT%TZ'))
|
|
14
14
|
record.merge!(@tag_key => tag) if @include_tag_key
|
|
15
15
|
documents << record
|
|
16
|
+
if documents.count >= @send_rate
|
|
17
|
+
update_core_request(documents)
|
|
18
|
+
documents = []
|
|
19
|
+
end
|
|
16
20
|
end
|
|
17
21
|
|
|
22
|
+
update_core_request(documents) if documents.count > 0
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def update_core_request(documents)
|
|
18
26
|
http = Net::HTTP.new(@host, @port.to_i)
|
|
27
|
+
http.read_timeout = @read_timeout
|
|
19
28
|
url = '/solr/' + URI.escape(core) + '/update'
|
|
20
29
|
url += '?commit=true' if @commit
|
|
21
30
|
request = Net::HTTP::Post.new(url, 'content-type' => 'application/json; charset=utf-8')
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-out-solr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- diogo
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2015-03-18 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: fluentd
|
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
96
96
|
version: '0'
|
|
97
97
|
requirements: []
|
|
98
98
|
rubyforge_project:
|
|
99
|
-
rubygems_version: 2.
|
|
99
|
+
rubygems_version: 2.4.5
|
|
100
100
|
signing_key:
|
|
101
101
|
specification_version: 4
|
|
102
102
|
summary: Solr output plugin for Fluent event collector
|