floom 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/Gemfile +3 -0
- data/README.md +15 -0
- data/Rakefile +3 -0
- data/bin/debug +19 -0
- data/bin/floom +22 -0
- data/bin/oneshot +41 -0
- data/bin/source +74 -0
- data/floom.gemspec +23 -0
- data/lib/floom.rb +18 -0
- data/lib/floom/client.rb +33 -0
- data/lib/floom/client/master.rb +106 -0
- data/lib/floom/client/reporter.rb +64 -0
- data/lib/floom/models/configuration.rb +71 -0
- data/lib/floom/models/report.rb +21 -0
- data/lib/floom/models/request.rb +29 -0
- data/lib/floom/models/status.rb +31 -0
- data/lib/floom/version.rb +3 -0
- data/lib/thrift/flume_constants.rb +8 -0
- data/lib/thrift/flume_master_admin_server.rb +454 -0
- data/lib/thrift/flume_types.rb +55 -0
- data/lib/thrift/flumeconfig_constants.rb +8 -0
- data/lib/thrift/flumeconfig_types.rb +48 -0
- data/lib/thrift/flumereportserver_constants.rb +8 -0
- data/lib/thrift/flumereportserver_types.rb +27 -0
- data/lib/thrift/mastercontrol_constants.rb +8 -0
- data/lib/thrift/mastercontrol_types.rb +78 -0
- data/lib/thrift/thrift_flume_client_server.rb +409 -0
- data/lib/thrift/thrift_flume_event_server.rb +119 -0
- data/lib/thrift/thrift_flume_report_server.rb +131 -0
- data/spec/spec_helper.rb +0 -0
- metadata +93 -0
@@ -0,0 +1,119 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.8.0)
|
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 close()
|
22
|
+
send_close()
|
23
|
+
recv_close()
|
24
|
+
end
|
25
|
+
|
26
|
+
def send_close()
|
27
|
+
send_message('close', Close_args)
|
28
|
+
end
|
29
|
+
|
30
|
+
def recv_close()
|
31
|
+
result = receive_message(Close_result)
|
32
|
+
return
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
class Processor
|
38
|
+
include ::Thrift::Processor
|
39
|
+
|
40
|
+
def process_append(seqid, iprot, oprot)
|
41
|
+
args = read_args(iprot, Append_args)
|
42
|
+
@handler.append(args.evt)
|
43
|
+
return
|
44
|
+
end
|
45
|
+
|
46
|
+
def process_close(seqid, iprot, oprot)
|
47
|
+
args = read_args(iprot, Close_args)
|
48
|
+
result = Close_result.new()
|
49
|
+
@handler.close()
|
50
|
+
write_result(result, oprot, 'close', seqid)
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
56
|
+
|
57
|
+
class Append_args
|
58
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
59
|
+
EVT = 1
|
60
|
+
|
61
|
+
FIELDS = {
|
62
|
+
EVT => {:type => ::Thrift::Types::STRUCT, :name => 'evt', :class => ThriftFlumeEvent}
|
63
|
+
}
|
64
|
+
|
65
|
+
def struct_fields; FIELDS; end
|
66
|
+
|
67
|
+
def validate
|
68
|
+
end
|
69
|
+
|
70
|
+
::Thrift::Struct.generate_accessors self
|
71
|
+
end
|
72
|
+
|
73
|
+
class Append_result
|
74
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
75
|
+
|
76
|
+
FIELDS = {
|
77
|
+
|
78
|
+
}
|
79
|
+
|
80
|
+
def struct_fields; FIELDS; end
|
81
|
+
|
82
|
+
def validate
|
83
|
+
end
|
84
|
+
|
85
|
+
::Thrift::Struct.generate_accessors self
|
86
|
+
end
|
87
|
+
|
88
|
+
class Close_args
|
89
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
90
|
+
|
91
|
+
FIELDS = {
|
92
|
+
|
93
|
+
}
|
94
|
+
|
95
|
+
def struct_fields; FIELDS; end
|
96
|
+
|
97
|
+
def validate
|
98
|
+
end
|
99
|
+
|
100
|
+
::Thrift::Struct.generate_accessors self
|
101
|
+
end
|
102
|
+
|
103
|
+
class Close_result
|
104
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
105
|
+
|
106
|
+
FIELDS = {
|
107
|
+
|
108
|
+
}
|
109
|
+
|
110
|
+
def struct_fields; FIELDS; end
|
111
|
+
|
112
|
+
def validate
|
113
|
+
end
|
114
|
+
|
115
|
+
::Thrift::Struct.generate_accessors self
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
119
|
+
|
@@ -0,0 +1,131 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.8.0)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'flumereportserver_types'
|
9
|
+
|
10
|
+
module ThriftFlumeReportServer
|
11
|
+
class Client
|
12
|
+
include ::Thrift::Client
|
13
|
+
|
14
|
+
def getAllReports()
|
15
|
+
send_getAllReports()
|
16
|
+
return recv_getAllReports()
|
17
|
+
end
|
18
|
+
|
19
|
+
def send_getAllReports()
|
20
|
+
send_message('getAllReports', GetAllReports_args)
|
21
|
+
end
|
22
|
+
|
23
|
+
def recv_getAllReports()
|
24
|
+
result = receive_message(GetAllReports_result)
|
25
|
+
return result.success unless result.success.nil?
|
26
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getAllReports failed: unknown result')
|
27
|
+
end
|
28
|
+
|
29
|
+
def getReportByName(reportName)
|
30
|
+
send_getReportByName(reportName)
|
31
|
+
return recv_getReportByName()
|
32
|
+
end
|
33
|
+
|
34
|
+
def send_getReportByName(reportName)
|
35
|
+
send_message('getReportByName', GetReportByName_args, :reportName => reportName)
|
36
|
+
end
|
37
|
+
|
38
|
+
def recv_getReportByName()
|
39
|
+
result = receive_message(GetReportByName_result)
|
40
|
+
return result.success unless result.success.nil?
|
41
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getReportByName failed: unknown result')
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
class Processor
|
47
|
+
include ::Thrift::Processor
|
48
|
+
|
49
|
+
def process_getAllReports(seqid, iprot, oprot)
|
50
|
+
args = read_args(iprot, GetAllReports_args)
|
51
|
+
result = GetAllReports_result.new()
|
52
|
+
result.success = @handler.getAllReports()
|
53
|
+
write_result(result, oprot, 'getAllReports', seqid)
|
54
|
+
end
|
55
|
+
|
56
|
+
def process_getReportByName(seqid, iprot, oprot)
|
57
|
+
args = read_args(iprot, GetReportByName_args)
|
58
|
+
result = GetReportByName_result.new()
|
59
|
+
result.success = @handler.getReportByName(args.reportName)
|
60
|
+
write_result(result, oprot, 'getReportByName', seqid)
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
|
65
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
66
|
+
|
67
|
+
class GetAllReports_args
|
68
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
69
|
+
|
70
|
+
FIELDS = {
|
71
|
+
|
72
|
+
}
|
73
|
+
|
74
|
+
def struct_fields; FIELDS; end
|
75
|
+
|
76
|
+
def validate
|
77
|
+
end
|
78
|
+
|
79
|
+
::Thrift::Struct.generate_accessors self
|
80
|
+
end
|
81
|
+
|
82
|
+
class GetAllReports_result
|
83
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
84
|
+
SUCCESS = 0
|
85
|
+
|
86
|
+
FIELDS = {
|
87
|
+
SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ThriftFlumeReport}}
|
88
|
+
}
|
89
|
+
|
90
|
+
def struct_fields; FIELDS; end
|
91
|
+
|
92
|
+
def validate
|
93
|
+
end
|
94
|
+
|
95
|
+
::Thrift::Struct.generate_accessors self
|
96
|
+
end
|
97
|
+
|
98
|
+
class GetReportByName_args
|
99
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
100
|
+
REPORTNAME = 1
|
101
|
+
|
102
|
+
FIELDS = {
|
103
|
+
REPORTNAME => {:type => ::Thrift::Types::STRING, :name => 'reportName'}
|
104
|
+
}
|
105
|
+
|
106
|
+
def struct_fields; FIELDS; end
|
107
|
+
|
108
|
+
def validate
|
109
|
+
end
|
110
|
+
|
111
|
+
::Thrift::Struct.generate_accessors self
|
112
|
+
end
|
113
|
+
|
114
|
+
class GetReportByName_result
|
115
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
116
|
+
SUCCESS = 0
|
117
|
+
|
118
|
+
FIELDS = {
|
119
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ThriftFlumeReport}
|
120
|
+
}
|
121
|
+
|
122
|
+
def struct_fields; FIELDS; end
|
123
|
+
|
124
|
+
def validate
|
125
|
+
end
|
126
|
+
|
127
|
+
::Thrift::Struct.generate_accessors self
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
131
|
+
|
data/spec/spec_helper.rb
ADDED
File without changes
|
metadata
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: floom
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Travis Dempsey
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-09-26 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: thrift
|
16
|
+
requirement: &2154449720 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.8.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *2154449720
|
25
|
+
description: ! '
|
26
|
+
|
27
|
+
Flume extra fun: Floom
|
28
|
+
|
29
|
+
|
30
|
+
'
|
31
|
+
email: travis@infochimps.org
|
32
|
+
executables:
|
33
|
+
- floom
|
34
|
+
extensions: []
|
35
|
+
extra_rdoc_files: []
|
36
|
+
files:
|
37
|
+
- .gitignore
|
38
|
+
- Gemfile
|
39
|
+
- README.md
|
40
|
+
- Rakefile
|
41
|
+
- bin/debug
|
42
|
+
- bin/floom
|
43
|
+
- bin/oneshot
|
44
|
+
- bin/source
|
45
|
+
- floom.gemspec
|
46
|
+
- lib/floom.rb
|
47
|
+
- lib/floom/client.rb
|
48
|
+
- lib/floom/client/master.rb
|
49
|
+
- lib/floom/client/reporter.rb
|
50
|
+
- lib/floom/models/configuration.rb
|
51
|
+
- lib/floom/models/report.rb
|
52
|
+
- lib/floom/models/request.rb
|
53
|
+
- lib/floom/models/status.rb
|
54
|
+
- lib/floom/version.rb
|
55
|
+
- lib/thrift/flume_constants.rb
|
56
|
+
- lib/thrift/flume_master_admin_server.rb
|
57
|
+
- lib/thrift/flume_types.rb
|
58
|
+
- lib/thrift/flumeconfig_constants.rb
|
59
|
+
- lib/thrift/flumeconfig_types.rb
|
60
|
+
- lib/thrift/flumereportserver_constants.rb
|
61
|
+
- lib/thrift/flumereportserver_types.rb
|
62
|
+
- lib/thrift/mastercontrol_constants.rb
|
63
|
+
- lib/thrift/mastercontrol_types.rb
|
64
|
+
- lib/thrift/thrift_flume_client_server.rb
|
65
|
+
- lib/thrift/thrift_flume_event_server.rb
|
66
|
+
- lib/thrift/thrift_flume_report_server.rb
|
67
|
+
- spec/spec_helper.rb
|
68
|
+
homepage: https://github.com/kornypoet/floom.git
|
69
|
+
licenses: []
|
70
|
+
post_install_message:
|
71
|
+
rdoc_options: []
|
72
|
+
require_paths:
|
73
|
+
- lib
|
74
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
requirements: []
|
87
|
+
rubyforge_project:
|
88
|
+
rubygems_version: 1.8.15
|
89
|
+
signing_key:
|
90
|
+
specification_version: 3
|
91
|
+
summary: Simple Thrift class extensions for Flume
|
92
|
+
test_files: []
|
93
|
+
has_rdoc:
|