fluent-plugin-cassandra-driver 0.0.18 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59f881900aec4466eb669a9223ae1d59f2665a72
4
- data.tar.gz: dc9e4d39436b007ea6dcbb988715f4579b1f94cc
3
+ metadata.gz: b80447eaf29f2b01517e05c2950ca7c05008a5ef
4
+ data.tar.gz: 1066ac5799267d434e1df793dcc9db1ecc9788cc
5
5
  SHA512:
6
- metadata.gz: 0d2aa721973077d178571756c4d3af3c26267b7876001d06f204284bc594da0f3fa7841f030a0b5268206453be1273a5b77190bd115f624fdff559737dac6cd9
7
- data.tar.gz: e569006e18921befbf58713238f5fdb3f04d5ca065083edf4e0e134191e1b4af263a01b2caf0a69a9b69b1831f3bf74db645a78a6e49edbd288184549afbd7be
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 # keep or pop key/values from the fluentd hash when storing it as json (optional, default is false)
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
- '{:id => {:id => nil}, :timestamp => {:timestamp => :time}}'
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.18
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.18 ruby lib
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.18"
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
- record_key, type = mapping.first
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-cassandra-driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Lukyanov