fluent-plugin-presto_query 0.0.2 → 0.0.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/README.md +0 -1
- data/fluent-plugin-presto_query.gemspec +1 -1
- data/lib/fluent/plugin/in_presto_query.rb +6 -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: b86f11a7f6deff536a3fa6e3b746426c55119443
|
4
|
+
data.tar.gz: 36e01ec039a2e43a7d6094311245fbfbff6272d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e413dd7f6dfcd17cfe486d12958eb7b9965cea1be09ff7426564efe9a365284c97f7a6b779675f3da181b2dc4fa0809e492cce9776bb8c995c03b45d72910c6
|
7
|
+
data.tar.gz: db3245204f84db65caa6a89f1ed7f3d9e7bec0528e557fbefdd2072fbc91da7ea98515d0a3f3a144eb9358bb29756c4ffe7e422eab42a052b4f90207797e12b7
|
data/README.md
CHANGED
@@ -10,7 +10,6 @@ Query to [Presto](https://prestodb.io/) plugin for fluentd
|
|
10
10
|
host presto-cordinator
|
11
11
|
catalog store
|
12
12
|
schema public
|
13
|
-
interval 10s
|
14
13
|
sql select user_id, count(*) as cnt from db01.schema.conversion where user_id is not null group by user_id having count(*) > 1000
|
15
14
|
cron 0 * * * * # You can query at a given time, with cron syntax.
|
16
15
|
</source>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "fluent-plugin-presto_query"
|
5
|
-
gem.version = "0.0.
|
5
|
+
gem.version = "0.0.3"
|
6
6
|
gem.summary = %q{Fluentd Input plugin to execute Presto query and fetch rows.}
|
7
7
|
gem.description = %q{Fluentd Input plugin to execute Presto query and fetch rows.}
|
8
8
|
gem.license = "MIT"
|
@@ -2,6 +2,11 @@ module Fluent
|
|
2
2
|
class PrestoQueryInput < Fluent::Input
|
3
3
|
Plugin.register_input 'presto_query', self
|
4
4
|
|
5
|
+
# Define `router` method of v0.12 to support v0.10 or earlier
|
6
|
+
unless method_defined?(:router)
|
7
|
+
define_method("router") { Fluent::Engine }
|
8
|
+
end
|
9
|
+
|
5
10
|
config_param :tag, :string
|
6
11
|
config_param :sql, :string
|
7
12
|
config_param :host, :string
|
@@ -47,7 +52,7 @@ module Fluent
|
|
47
52
|
log.info "sql [#{@sql}]"
|
48
53
|
records = exec_query(@sql)
|
49
54
|
records.each do |record|
|
50
|
-
|
55
|
+
router.emit @tag, Fluent::Engine.now, record
|
51
56
|
end
|
52
57
|
rescue => e
|
53
58
|
log.error e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-presto_query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi Toyama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: presto-client
|