fluent-plugin-cassandra-driver 0.0.18 → 0.0.20
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 +4 -2
- data/VERSION +1 -1
- data/fluent-plugin-cassandra-driver.gemspec +2 -2
- data/lib/fluent/plugin/out_cassandra_driver.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b80447eaf29f2b01517e05c2950ca7c05008a5ef
|
4
|
+
data.tar.gz: 1066ac5799267d434e1df793dcc9db1ecc9788cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d1ce7e16e1b604b71c76b6c74c284707012b52e2ae574b0b92be6d27ab04385c556662be3a098227c50a5ecece06009cb8b633f6b6cddc55ec46a507ac878a1
|
7
|
+
data.tar.gz: bd37041537fa6ee2f415e3b2c71ee0d7a71b75f1f1a49638ca1cfe25a9706ce147e4f0d918330a341803fc670b6bedea29dbed385a17ee8ed90d95d5a606905c
|
data/README.md
CHANGED
@@ -29,13 +29,15 @@ via RubyGems
|
|
29
29
|
columnfamily logs # cassandra column family
|
30
30
|
ttl 60 # cassandra ttl (optional, default is 0)
|
31
31
|
schema # cassandra column family schema (see example below)
|
32
|
-
pop_data_keys #
|
32
|
+
pop_data_keys # pop values from the fluentd hash when storing it as json (optional, default is true)
|
33
33
|
json_column json # column where store all remaining data from fluentd (optional)
|
34
34
|
</match>
|
35
35
|
|
36
36
|
### Schema example
|
37
37
|
# hash of hashes :column_damily_key => {:fluentd_record_key => :type_from_list}
|
38
|
-
|
38
|
+
# or :column_damily_key => :type_from_list
|
39
|
+
# then :fluentd_record_key will be the same as :column_damily_key
|
40
|
+
'{:id => {:ident => nil}, :timestamp => {:timestamp => :time}}'
|
39
41
|
|
40
42
|
Available mappings:
|
41
43
|
* :integer
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.20
|
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: fluent-plugin-cassandra-driver 0.0.
|
5
|
+
# stub: fluent-plugin-cassandra-driver 0.0.20 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "fluent-plugin-cassandra-driver".freeze
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.20"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
@@ -91,7 +91,12 @@ module Fluent
|
|
91
91
|
|
92
92
|
def build_insert_values(record)
|
93
93
|
values = self.schema.map.with_index { |column_family_key, mapping|
|
94
|
-
|
94
|
+
if mapping.class == Hash
|
95
|
+
record_key, type = mapping.first
|
96
|
+
else
|
97
|
+
record_key, type = column_family_key, mapping
|
98
|
+
end
|
99
|
+
|
95
100
|
value = record[record_key]
|
96
101
|
|
97
102
|
case type
|