logstash-input-rethinkdb 0.2.2 → 0.2.3
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/Gemfile +1 -1
- data/lib/logstash/inputs/rethinkdb.rb +11 -4
- data/logstash-input-rethinkdb.gemspec +1 -1
- 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: de73fa978e44887578a9e1d2b148ec13939d09a9
|
4
|
+
data.tar.gz: 0e4ef2d0d85448599ccd44a8bc927f1b043b66a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 669c328da26eb4936b1b6eb2d52e9078cc19d6b9749ae05df0382c780617885e4f1d648872328dcae3457bd76fa0b6023f6b29f17696c35d0488399538d1875b
|
7
|
+
data.tar.gz: 1938a4881a2d1cf93fa680b1141b5248a9c75d2930c77d4016dbe08dc2711f9c6fa2b594c006a26a080dbe5cbf362925247a2f19799fb046eda7b93856279e69
|
data/Gemfile
CHANGED
@@ -89,7 +89,7 @@ class LogStash::Inputs::RethinkDB < LogStash::Inputs::Base
|
|
89
89
|
# Add a table feed to the registry
|
90
90
|
unless @table_feeds.has_key?(db) &&
|
91
91
|
@table_feeds[db].has_key?(table)
|
92
|
-
@logger.log("Watching table #{db}.#{table}")
|
92
|
+
@logger.log("Watching table #{db}.#{table} #{@table_feeds.keys}")
|
93
93
|
@table_feeds[db][table] = qhandle
|
94
94
|
else
|
95
95
|
qhandle.close
|
@@ -131,23 +131,28 @@ class LogStash::Inputs::RethinkDB < LogStash::Inputs::Base
|
|
131
131
|
end
|
132
132
|
|
133
133
|
def create_db_feed(db, handler)
|
134
|
+
@logger.log("Creating db feed for #{db}")
|
134
135
|
r.db('rethinkdb').
|
135
136
|
table('table_status').
|
136
|
-
filter {|row| row['status']['all_replicas_ready']}.
|
137
|
-
pluck('db', 'name').
|
138
137
|
changes(:include_initial => @backfill,
|
139
138
|
:squash => @squash,
|
140
139
|
:include_states => true).
|
140
|
+
filter{|row| row['db'].eq(db) & row['status']['all_replicas_ready']}.
|
141
|
+
pluck({:new_val => ['db', 'name'], :old_val => ['db', 'name']}).
|
141
142
|
em_run(@conn, handler)
|
142
143
|
end
|
143
144
|
|
144
145
|
def create_table_feed(db, table, handler)
|
146
|
+
options = {
|
147
|
+
:time_format => 'raw',
|
148
|
+
:binary_format => 'raw',
|
149
|
+
}
|
145
150
|
r.db(db).
|
146
151
|
table(table).
|
147
152
|
changes(:include_initial => @backfill,
|
148
153
|
:squash => @squash,
|
149
154
|
:include_states => true).
|
150
|
-
em_run(@conn, handler)
|
155
|
+
em_run(@conn, options, handler)
|
151
156
|
end
|
152
157
|
|
153
158
|
def teardown
|
@@ -232,10 +237,12 @@ class DBHandler < RethinkDB::Handler
|
|
232
237
|
end
|
233
238
|
|
234
239
|
def on_initial_val(val)
|
240
|
+
@plugin.logger.log("Initial val #{val}")
|
235
241
|
@plugin.update_db_tables(nil, val)
|
236
242
|
end
|
237
243
|
|
238
244
|
def on_change(old_val, new_val)
|
245
|
+
@pluging.logger.log("Got table change #{old_val}, new: #{new_val}")
|
239
246
|
@plugin.update_db_tables(old_val, new_val)
|
240
247
|
end
|
241
248
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-rethinkdb'
|
3
|
-
s.version = '0.2.
|
3
|
+
s.version = '0.2.3'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = "Streams changes from RethinkDB tables into LogStash."
|
6
6
|
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-rethinkdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RethinkDB
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core
|