fluent-plugin-flume 0.1.1 → 0.1.2
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 +7 -0
- data/.gitignore +5 -0
- data/ChangeLog +8 -1
- data/Gemfile +3 -0
- data/README.rdoc +5 -3
- data/Rakefile +4 -22
- data/VERSION +1 -1
- data/bin/fluent-flume-remote +8 -6
- data/example-in-flume.conf +10 -0
- data/example-out-flume.conf +11 -0
- data/fluent-plugin-flume.gemspec +18 -50
- data/lib/fluent/plugin/in_flume.rb +46 -20
- data/lib/fluent/plugin/out_flume.rb +23 -20
- data/lib/fluent/plugin/thrift/flume.thrift +21 -55
- data/lib/fluent/plugin/thrift/flume_constants.rb +2 -1
- data/lib/fluent/plugin/thrift/flume_types.rb +15 -49
- data/lib/fluent/plugin/thrift/thrift_source_protocol.rb +138 -0
- data/sample_client.rb +30 -0
- data/sample_server.rb +57 -0
- data/test/plugin/test_in_flume.rb +2 -0
- data/test/plugin/test_out_flume.rb +9 -72
- metadata +67 -29
- data/lib/fluent/plugin/thrift/thrift_flume_event_server.rb +0 -220
metadata
CHANGED
@@ -1,51 +1,89 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-flume
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Muga Nishizawa
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-12-01 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: fluentd
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.10.
|
19
|
+
version: 0.10.43
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.10.43
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: thrift
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- - ~>
|
31
|
+
- - "~>"
|
31
32
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
33
|
+
version: 0.9.0
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
-
|
37
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.9.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.9.2
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.9.2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: test-unit
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.1.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 3.1.0
|
69
|
+
description: Flume Input/Output plugin for Fluentd event collector
|
70
|
+
email:
|
71
|
+
- muga.nishizawa@gmail.com
|
38
72
|
executables:
|
39
73
|
- fluent-flume-remote
|
40
74
|
extensions: []
|
41
|
-
extra_rdoc_files:
|
42
|
-
- ChangeLog
|
43
|
-
- README.rdoc
|
75
|
+
extra_rdoc_files: []
|
44
76
|
files:
|
77
|
+
- ".gitignore"
|
45
78
|
- AUTHORS
|
79
|
+
- ChangeLog
|
80
|
+
- Gemfile
|
81
|
+
- README.rdoc
|
46
82
|
- Rakefile
|
47
83
|
- VERSION
|
48
84
|
- bin/fluent-flume-remote
|
85
|
+
- example-in-flume.conf
|
86
|
+
- example-out-flume.conf
|
49
87
|
- fluent-plugin-flume.gemspec
|
50
88
|
- lib/fluent/plugin/in_flume.rb
|
51
89
|
- lib/fluent/plugin/out_flume.rb
|
@@ -53,34 +91,34 @@ files:
|
|
53
91
|
- lib/fluent/plugin/thrift/flume.thrift.orig
|
54
92
|
- lib/fluent/plugin/thrift/flume_constants.rb
|
55
93
|
- lib/fluent/plugin/thrift/flume_types.rb
|
56
|
-
- lib/fluent/plugin/thrift/
|
94
|
+
- lib/fluent/plugin/thrift/thrift_source_protocol.rb
|
95
|
+
- sample_client.rb
|
96
|
+
- sample_server.rb
|
57
97
|
- test/plugin/test_in_flume.rb
|
58
98
|
- test/plugin/test_out_flume.rb
|
59
|
-
-
|
60
|
-
|
61
|
-
|
62
|
-
|
99
|
+
homepage: https://github.com/fluent/fluent-plugin-flume
|
100
|
+
licenses:
|
101
|
+
- MIT
|
102
|
+
metadata: {}
|
63
103
|
post_install_message:
|
64
104
|
rdoc_options: []
|
65
105
|
require_paths:
|
66
106
|
- lib
|
67
107
|
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
108
|
requirements:
|
70
|
-
- -
|
109
|
+
- - ">="
|
71
110
|
- !ruby/object:Gem::Version
|
72
111
|
version: '0'
|
73
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
113
|
requirements:
|
76
|
-
- -
|
114
|
+
- - ">="
|
77
115
|
- !ruby/object:Gem::Version
|
78
116
|
version: '0'
|
79
117
|
requirements: []
|
80
118
|
rubyforge_project:
|
81
|
-
rubygems_version:
|
119
|
+
rubygems_version: 2.4.5.1
|
82
120
|
signing_key:
|
83
|
-
specification_version:
|
121
|
+
specification_version: 4
|
84
122
|
summary: Flume Input/Output plugin for Fluentd event collector
|
85
123
|
test_files:
|
86
124
|
- test/plugin/test_in_flume.rb
|
@@ -1,220 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Autogenerated by Thrift
|
3
|
-
#
|
4
|
-
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
-
#
|
6
|
-
|
7
|
-
require 'thrift'
|
8
|
-
require 'flume_types'
|
9
|
-
|
10
|
-
module ThriftFlumeEventServer
|
11
|
-
class Client
|
12
|
-
include ::Thrift::Client
|
13
|
-
|
14
|
-
def append(evt)
|
15
|
-
send_append(evt)
|
16
|
-
end
|
17
|
-
|
18
|
-
def send_append(evt)
|
19
|
-
send_message('append', Append_args, :evt => evt)
|
20
|
-
end
|
21
|
-
def rawAppend(evt)
|
22
|
-
send_rawAppend(evt)
|
23
|
-
end
|
24
|
-
|
25
|
-
def send_rawAppend(evt)
|
26
|
-
send_message('rawAppend', RawAppend_args, :evt => evt)
|
27
|
-
end
|
28
|
-
def ackedAppend(evt)
|
29
|
-
send_ackedAppend(evt)
|
30
|
-
return recv_ackedAppend()
|
31
|
-
end
|
32
|
-
|
33
|
-
def send_ackedAppend(evt)
|
34
|
-
send_message('ackedAppend', AckedAppend_args, :evt => evt)
|
35
|
-
end
|
36
|
-
|
37
|
-
def recv_ackedAppend()
|
38
|
-
result = receive_message(AckedAppend_result)
|
39
|
-
return result.success unless result.success.nil?
|
40
|
-
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'ackedAppend failed: unknown result')
|
41
|
-
end
|
42
|
-
|
43
|
-
def close()
|
44
|
-
send_close()
|
45
|
-
recv_close()
|
46
|
-
end
|
47
|
-
|
48
|
-
def send_close()
|
49
|
-
send_message('close', Close_args)
|
50
|
-
end
|
51
|
-
|
52
|
-
def recv_close()
|
53
|
-
result = receive_message(Close_result)
|
54
|
-
return
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
58
|
-
|
59
|
-
class Processor
|
60
|
-
include ::Thrift::Processor
|
61
|
-
|
62
|
-
def process_append(seqid, iprot, oprot)
|
63
|
-
args = read_args(iprot, Append_args)
|
64
|
-
@handler.append(args.evt)
|
65
|
-
return
|
66
|
-
end
|
67
|
-
|
68
|
-
def process_rawAppend(seqid, iprot, oprot)
|
69
|
-
args = read_args(iprot, RawAppend_args)
|
70
|
-
@handler.rawAppend(args.evt)
|
71
|
-
return
|
72
|
-
end
|
73
|
-
|
74
|
-
def process_ackedAppend(seqid, iprot, oprot)
|
75
|
-
args = read_args(iprot, AckedAppend_args)
|
76
|
-
result = AckedAppend_result.new()
|
77
|
-
result.success = @handler.ackedAppend(args.evt)
|
78
|
-
write_result(result, oprot, 'ackedAppend', seqid)
|
79
|
-
end
|
80
|
-
|
81
|
-
def process_close(seqid, iprot, oprot)
|
82
|
-
args = read_args(iprot, Close_args)
|
83
|
-
result = Close_result.new()
|
84
|
-
@handler.close()
|
85
|
-
write_result(result, oprot, 'close', seqid)
|
86
|
-
end
|
87
|
-
|
88
|
-
end
|
89
|
-
|
90
|
-
# HELPER FUNCTIONS AND STRUCTURES
|
91
|
-
|
92
|
-
class Append_args
|
93
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
94
|
-
EVT = 1
|
95
|
-
|
96
|
-
FIELDS = {
|
97
|
-
EVT => {:type => ::Thrift::Types::STRUCT, :name => 'evt', :class => ThriftFlumeEvent}
|
98
|
-
}
|
99
|
-
|
100
|
-
def struct_fields; FIELDS; end
|
101
|
-
|
102
|
-
def validate
|
103
|
-
end
|
104
|
-
|
105
|
-
::Thrift::Struct.generate_accessors self
|
106
|
-
end
|
107
|
-
|
108
|
-
class Append_result
|
109
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
110
|
-
|
111
|
-
FIELDS = {
|
112
|
-
|
113
|
-
}
|
114
|
-
|
115
|
-
def struct_fields; FIELDS; end
|
116
|
-
|
117
|
-
def validate
|
118
|
-
end
|
119
|
-
|
120
|
-
::Thrift::Struct.generate_accessors self
|
121
|
-
end
|
122
|
-
|
123
|
-
class RawAppend_args
|
124
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
125
|
-
EVT = 1
|
126
|
-
|
127
|
-
FIELDS = {
|
128
|
-
EVT => {:type => ::Thrift::Types::STRUCT, :name => 'evt', :class => RawEvent}
|
129
|
-
}
|
130
|
-
|
131
|
-
def struct_fields; FIELDS; end
|
132
|
-
|
133
|
-
def validate
|
134
|
-
end
|
135
|
-
|
136
|
-
::Thrift::Struct.generate_accessors self
|
137
|
-
end
|
138
|
-
|
139
|
-
class RawAppend_result
|
140
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
141
|
-
|
142
|
-
FIELDS = {
|
143
|
-
|
144
|
-
}
|
145
|
-
|
146
|
-
def struct_fields; FIELDS; end
|
147
|
-
|
148
|
-
def validate
|
149
|
-
end
|
150
|
-
|
151
|
-
::Thrift::Struct.generate_accessors self
|
152
|
-
end
|
153
|
-
|
154
|
-
class AckedAppend_args
|
155
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
156
|
-
EVT = 1
|
157
|
-
|
158
|
-
FIELDS = {
|
159
|
-
EVT => {:type => ::Thrift::Types::STRUCT, :name => 'evt', :class => ThriftFlumeEvent}
|
160
|
-
}
|
161
|
-
|
162
|
-
def struct_fields; FIELDS; end
|
163
|
-
|
164
|
-
def validate
|
165
|
-
end
|
166
|
-
|
167
|
-
::Thrift::Struct.generate_accessors self
|
168
|
-
end
|
169
|
-
|
170
|
-
class AckedAppend_result
|
171
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
172
|
-
SUCCESS = 0
|
173
|
-
|
174
|
-
FIELDS = {
|
175
|
-
SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success', :enum_class => EventStatus}
|
176
|
-
}
|
177
|
-
|
178
|
-
def struct_fields; FIELDS; end
|
179
|
-
|
180
|
-
def validate
|
181
|
-
unless @success.nil? || EventStatus::VALID_VALUES.include?(@success)
|
182
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field success!')
|
183
|
-
end
|
184
|
-
end
|
185
|
-
|
186
|
-
::Thrift::Struct.generate_accessors self
|
187
|
-
end
|
188
|
-
|
189
|
-
class Close_args
|
190
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
191
|
-
|
192
|
-
FIELDS = {
|
193
|
-
|
194
|
-
}
|
195
|
-
|
196
|
-
def struct_fields; FIELDS; end
|
197
|
-
|
198
|
-
def validate
|
199
|
-
end
|
200
|
-
|
201
|
-
::Thrift::Struct.generate_accessors self
|
202
|
-
end
|
203
|
-
|
204
|
-
class Close_result
|
205
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
206
|
-
|
207
|
-
FIELDS = {
|
208
|
-
|
209
|
-
}
|
210
|
-
|
211
|
-
def struct_fields; FIELDS; end
|
212
|
-
|
213
|
-
def validate
|
214
|
-
end
|
215
|
-
|
216
|
-
::Thrift::Struct.generate_accessors self
|
217
|
-
end
|
218
|
-
|
219
|
-
end
|
220
|
-
|