fluent-plugin-ilm_hbase 0.1.3 → 0.1.4
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/lib/fluent/plugin/out_ilm_hbase.rb +18 -15
- 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: f19171bee111d1750ff276142aef2c4e36abe435
|
4
|
+
data.tar.gz: 19939bd172473245c2de7d8efff4748f092ebb4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67109ee1d0550e0a99922437969f2069a2795156b43a13323f86d45f13670816201926fb39f597fa48020815de3df4fa9a03d23f2f3310b0a825efd852ad1fb5
|
7
|
+
data.tar.gz: 636f4992faed72f2dbd4b661053df52673abe6af6eb95896f2238c6dfc31d28eb410691a72f51abe953b45a8d0391084d4b6f447257e528ab9baed610db76309
|
@@ -20,8 +20,8 @@ module Fluent
|
|
20
20
|
config_set_default :time_key, nil
|
21
21
|
|
22
22
|
|
23
|
-
config_param :
|
24
|
-
config_param :
|
23
|
+
config_param :include_custom_row_key, :bool, :default=>false
|
24
|
+
config_param :custom_key_list, :string, :default => nil
|
25
25
|
config_param :tag_column_name, :string, :default => nil
|
26
26
|
config_param :time_column_name, :string, :default => nil
|
27
27
|
config_param :fields_to_columns_mapping, :string
|
@@ -35,8 +35,8 @@ module Fluent
|
|
35
35
|
src_to_dst.split("=>")
|
36
36
|
}
|
37
37
|
@mapping = Hash[*@fields_to_columns.flatten]
|
38
|
-
@rowchangeflag = @
|
39
|
-
@
|
38
|
+
@rowchangeflag = @include_custom_row_key
|
39
|
+
@rowkeys = @custom_key_list.split(",")
|
40
40
|
@customrow = SecureRandom.uuid
|
41
41
|
end
|
42
42
|
|
@@ -94,17 +94,20 @@ MESSAGE
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def write(chunk)
|
97
|
-
|
97
|
+
row_key = ""
|
98
|
+
row_attrs = Array.new
|
99
|
+
if @rowchangeflag
|
98
100
|
chunk.msgpack_each {|row_values|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
101
|
+
|
102
|
+
row_attrs << row_values.select do |column_family_and_column, value|
|
103
|
+
rowkeys.include? column_family_and_column
|
104
|
+
end.map do |column_family_and_column, value| value end
|
105
|
+
|
106
|
+
}
|
107
|
+
head, *tail = row_attrs
|
108
|
+
row_key << head
|
109
|
+
tail.each do |value| row_key << "-"; row_key << value; end
|
110
|
+
end
|
108
111
|
chunk.msgpack_each {|row_values|
|
109
112
|
event = {}
|
110
113
|
|
@@ -115,7 +118,7 @@ MESSAGE
|
|
115
118
|
}
|
116
119
|
|
117
120
|
row = MassiveRecord::Wrapper::Row.new
|
118
|
-
row.id =
|
121
|
+
row.id = row_key
|
119
122
|
row.values = event
|
120
123
|
row.table = @table
|
121
124
|
row.save
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-ilm_hbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- testman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|