storm 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://www.rubygems.org"
2
+
3
+ # Specify your gem's dependencies in storm-client.gemspec
4
+ gemspec
@@ -0,0 +1,12 @@
1
+ module Storm
2
+ end
3
+
4
+ require 'thrift'
5
+
6
+ ## START THRIFT REQUIRE STATEMENTS ##
7
+ require 'storm/thrift/nimbus'
8
+ require 'storm/thrift/distributed_rpc'
9
+ require 'storm/thrift/distributed_rpc_invocations'
10
+ ## END THRIFT REQUIRE STATEMENTS ##
11
+
12
+ require 'storm/version'
@@ -0,0 +1,91 @@
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 'storm/thrift/storm_types'
9
+
10
+ module Storm
11
+
12
+ module DistributedRPC
13
+ class Client
14
+ include ::Thrift::Client
15
+
16
+ def execute(functionName, funcArgs)
17
+ send_execute(functionName, funcArgs)
18
+ return recv_execute()
19
+ end
20
+
21
+ def send_execute(functionName, funcArgs)
22
+ send_message('execute', Execute_args, :functionName => functionName, :funcArgs => funcArgs)
23
+ end
24
+
25
+ def recv_execute()
26
+ result = receive_message(Execute_result)
27
+ return result.success unless result.success.nil?
28
+ raise result.e unless result.e.nil?
29
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'execute failed: unknown result')
30
+ end
31
+
32
+ end
33
+
34
+ class Processor
35
+ include ::Thrift::Processor
36
+
37
+ def process_execute(seqid, iprot, oprot)
38
+ args = read_args(iprot, Execute_args)
39
+ result = Execute_result.new()
40
+ begin
41
+ result.success = @handler.execute(args.functionName, args.funcArgs)
42
+ rescue DRPCExecutionException => e
43
+ result.e = e
44
+ end
45
+ write_result(result, oprot, 'execute', seqid)
46
+ end
47
+
48
+ end
49
+
50
+ # HELPER FUNCTIONS AND STRUCTURES
51
+
52
+ class Execute_args
53
+ include ::Thrift::Struct, ::Thrift::Struct_Union
54
+ FUNCTIONNAME = 1
55
+ FUNCARGS = 2
56
+
57
+ FIELDS = {
58
+ FUNCTIONNAME => {:type => ::Thrift::Types::STRING, :name => 'functionName'},
59
+ FUNCARGS => {:type => ::Thrift::Types::STRING, :name => 'funcArgs'}
60
+ }
61
+
62
+ def struct_fields; FIELDS; end
63
+
64
+ def validate
65
+ end
66
+
67
+ ::Thrift::Struct.generate_accessors self
68
+ end
69
+
70
+ class Execute_result
71
+ include ::Thrift::Struct, ::Thrift::Struct_Union
72
+ SUCCESS = 0
73
+ E = 1
74
+
75
+ FIELDS = {
76
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
77
+ E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => DRPCExecutionException}
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
+ end
89
+
90
+
91
+ end
@@ -0,0 +1,188 @@
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 'storm/thrift/storm_types'
9
+
10
+ module Storm
11
+
12
+ module DistributedRPCInvocations
13
+ class Client
14
+ include ::Thrift::Client
15
+
16
+ def result(id, result)
17
+ send_result(id, result)
18
+ recv_result()
19
+ end
20
+
21
+ def send_result(id, result)
22
+ send_message('result', Result_args, :id => id, :result => result)
23
+ end
24
+
25
+ def recv_result()
26
+ result = receive_message(Result_result)
27
+ return
28
+ end
29
+
30
+ def fetchRequest(functionName)
31
+ send_fetchRequest(functionName)
32
+ return recv_fetchRequest()
33
+ end
34
+
35
+ def send_fetchRequest(functionName)
36
+ send_message('fetchRequest', FetchRequest_args, :functionName => functionName)
37
+ end
38
+
39
+ def recv_fetchRequest()
40
+ result = receive_message(FetchRequest_result)
41
+ return result.success unless result.success.nil?
42
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchRequest failed: unknown result')
43
+ end
44
+
45
+ def failRequest(id)
46
+ send_failRequest(id)
47
+ recv_failRequest()
48
+ end
49
+
50
+ def send_failRequest(id)
51
+ send_message('failRequest', FailRequest_args, :id => id)
52
+ end
53
+
54
+ def recv_failRequest()
55
+ result = receive_message(FailRequest_result)
56
+ return
57
+ end
58
+
59
+ end
60
+
61
+ class Processor
62
+ include ::Thrift::Processor
63
+
64
+ def process_result(seqid, iprot, oprot)
65
+ args = read_args(iprot, Result_args)
66
+ result = Result_result.new()
67
+ @handler.result(args.id, args.result)
68
+ write_result(result, oprot, 'result', seqid)
69
+ end
70
+
71
+ def process_fetchRequest(seqid, iprot, oprot)
72
+ args = read_args(iprot, FetchRequest_args)
73
+ result = FetchRequest_result.new()
74
+ result.success = @handler.fetchRequest(args.functionName)
75
+ write_result(result, oprot, 'fetchRequest', seqid)
76
+ end
77
+
78
+ def process_failRequest(seqid, iprot, oprot)
79
+ args = read_args(iprot, FailRequest_args)
80
+ result = FailRequest_result.new()
81
+ @handler.failRequest(args.id)
82
+ write_result(result, oprot, 'failRequest', seqid)
83
+ end
84
+
85
+ end
86
+
87
+ # HELPER FUNCTIONS AND STRUCTURES
88
+
89
+ class Result_args
90
+ include ::Thrift::Struct, ::Thrift::Struct_Union
91
+ ID = 1
92
+ RESULT = 2
93
+
94
+ FIELDS = {
95
+ ID => {:type => ::Thrift::Types::STRING, :name => 'id'},
96
+ RESULT => {:type => ::Thrift::Types::STRING, :name => 'result'}
97
+ }
98
+
99
+ def struct_fields; FIELDS; end
100
+
101
+ def validate
102
+ end
103
+
104
+ ::Thrift::Struct.generate_accessors self
105
+ end
106
+
107
+ class Result_result
108
+ include ::Thrift::Struct, ::Thrift::Struct_Union
109
+
110
+ FIELDS = {
111
+
112
+ }
113
+
114
+ def struct_fields; FIELDS; end
115
+
116
+ def validate
117
+ end
118
+
119
+ ::Thrift::Struct.generate_accessors self
120
+ end
121
+
122
+ class FetchRequest_args
123
+ include ::Thrift::Struct, ::Thrift::Struct_Union
124
+ FUNCTIONNAME = 1
125
+
126
+ FIELDS = {
127
+ FUNCTIONNAME => {:type => ::Thrift::Types::STRING, :name => 'functionName'}
128
+ }
129
+
130
+ def struct_fields; FIELDS; end
131
+
132
+ def validate
133
+ end
134
+
135
+ ::Thrift::Struct.generate_accessors self
136
+ end
137
+
138
+ class FetchRequest_result
139
+ include ::Thrift::Struct, ::Thrift::Struct_Union
140
+ SUCCESS = 0
141
+
142
+ FIELDS = {
143
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => DRPCRequest}
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 FailRequest_args
155
+ include ::Thrift::Struct, ::Thrift::Struct_Union
156
+ ID = 1
157
+
158
+ FIELDS = {
159
+ ID => {:type => ::Thrift::Types::STRING, :name => 'id'}
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 FailRequest_result
171
+ include ::Thrift::Struct, ::Thrift::Struct_Union
172
+
173
+ FIELDS = {
174
+
175
+ }
176
+
177
+ def struct_fields; FIELDS; end
178
+
179
+ def validate
180
+ end
181
+
182
+ ::Thrift::Struct.generate_accessors self
183
+ end
184
+
185
+ end
186
+
187
+
188
+ end
@@ -0,0 +1,960 @@
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 'storm/thrift/storm_types'
9
+
10
+ module Storm
11
+
12
+ module Nimbus
13
+ class Client
14
+ include ::Thrift::Client
15
+
16
+ def submitTopology(name, uploadedJarLocation, jsonConf, topology)
17
+ send_submitTopology(name, uploadedJarLocation, jsonConf, topology)
18
+ recv_submitTopology()
19
+ end
20
+
21
+ def send_submitTopology(name, uploadedJarLocation, jsonConf, topology)
22
+ send_message('submitTopology', SubmitTopology_args, :name => name, :uploadedJarLocation => uploadedJarLocation, :jsonConf => jsonConf, :topology => topology)
23
+ end
24
+
25
+ def recv_submitTopology()
26
+ result = receive_message(SubmitTopology_result)
27
+ raise result.e unless result.e.nil?
28
+ raise result.ite unless result.ite.nil?
29
+ return
30
+ end
31
+
32
+ def killTopology(name)
33
+ send_killTopology(name)
34
+ recv_killTopology()
35
+ end
36
+
37
+ def send_killTopology(name)
38
+ send_message('killTopology', KillTopology_args, :name => name)
39
+ end
40
+
41
+ def recv_killTopology()
42
+ result = receive_message(KillTopology_result)
43
+ raise result.e unless result.e.nil?
44
+ return
45
+ end
46
+
47
+ def killTopologyWithOpts(name, options)
48
+ send_killTopologyWithOpts(name, options)
49
+ recv_killTopologyWithOpts()
50
+ end
51
+
52
+ def send_killTopologyWithOpts(name, options)
53
+ send_message('killTopologyWithOpts', KillTopologyWithOpts_args, :name => name, :options => options)
54
+ end
55
+
56
+ def recv_killTopologyWithOpts()
57
+ result = receive_message(KillTopologyWithOpts_result)
58
+ raise result.e unless result.e.nil?
59
+ return
60
+ end
61
+
62
+ def activate(name)
63
+ send_activate(name)
64
+ recv_activate()
65
+ end
66
+
67
+ def send_activate(name)
68
+ send_message('activate', Activate_args, :name => name)
69
+ end
70
+
71
+ def recv_activate()
72
+ result = receive_message(Activate_result)
73
+ raise result.e unless result.e.nil?
74
+ return
75
+ end
76
+
77
+ def deactivate(name)
78
+ send_deactivate(name)
79
+ recv_deactivate()
80
+ end
81
+
82
+ def send_deactivate(name)
83
+ send_message('deactivate', Deactivate_args, :name => name)
84
+ end
85
+
86
+ def recv_deactivate()
87
+ result = receive_message(Deactivate_result)
88
+ raise result.e unless result.e.nil?
89
+ return
90
+ end
91
+
92
+ def rebalance(name, options)
93
+ send_rebalance(name, options)
94
+ recv_rebalance()
95
+ end
96
+
97
+ def send_rebalance(name, options)
98
+ send_message('rebalance', Rebalance_args, :name => name, :options => options)
99
+ end
100
+
101
+ def recv_rebalance()
102
+ result = receive_message(Rebalance_result)
103
+ raise result.e unless result.e.nil?
104
+ raise result.ite unless result.ite.nil?
105
+ return
106
+ end
107
+
108
+ def beginFileUpload()
109
+ send_beginFileUpload()
110
+ return recv_beginFileUpload()
111
+ end
112
+
113
+ def send_beginFileUpload()
114
+ send_message('beginFileUpload', BeginFileUpload_args)
115
+ end
116
+
117
+ def recv_beginFileUpload()
118
+ result = receive_message(BeginFileUpload_result)
119
+ return result.success unless result.success.nil?
120
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'beginFileUpload failed: unknown result')
121
+ end
122
+
123
+ def uploadChunk(location, chunk)
124
+ send_uploadChunk(location, chunk)
125
+ recv_uploadChunk()
126
+ end
127
+
128
+ def send_uploadChunk(location, chunk)
129
+ send_message('uploadChunk', UploadChunk_args, :location => location, :chunk => chunk)
130
+ end
131
+
132
+ def recv_uploadChunk()
133
+ result = receive_message(UploadChunk_result)
134
+ return
135
+ end
136
+
137
+ def finishFileUpload(location)
138
+ send_finishFileUpload(location)
139
+ recv_finishFileUpload()
140
+ end
141
+
142
+ def send_finishFileUpload(location)
143
+ send_message('finishFileUpload', FinishFileUpload_args, :location => location)
144
+ end
145
+
146
+ def recv_finishFileUpload()
147
+ result = receive_message(FinishFileUpload_result)
148
+ return
149
+ end
150
+
151
+ def beginFileDownload(file)
152
+ send_beginFileDownload(file)
153
+ return recv_beginFileDownload()
154
+ end
155
+
156
+ def send_beginFileDownload(file)
157
+ send_message('beginFileDownload', BeginFileDownload_args, :file => file)
158
+ end
159
+
160
+ def recv_beginFileDownload()
161
+ result = receive_message(BeginFileDownload_result)
162
+ return result.success unless result.success.nil?
163
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'beginFileDownload failed: unknown result')
164
+ end
165
+
166
+ def downloadChunk(id)
167
+ send_downloadChunk(id)
168
+ return recv_downloadChunk()
169
+ end
170
+
171
+ def send_downloadChunk(id)
172
+ send_message('downloadChunk', DownloadChunk_args, :id => id)
173
+ end
174
+
175
+ def recv_downloadChunk()
176
+ result = receive_message(DownloadChunk_result)
177
+ return result.success unless result.success.nil?
178
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'downloadChunk failed: unknown result')
179
+ end
180
+
181
+ def getClusterInfo()
182
+ send_getClusterInfo()
183
+ return recv_getClusterInfo()
184
+ end
185
+
186
+ def send_getClusterInfo()
187
+ send_message('getClusterInfo', GetClusterInfo_args)
188
+ end
189
+
190
+ def recv_getClusterInfo()
191
+ result = receive_message(GetClusterInfo_result)
192
+ return result.success unless result.success.nil?
193
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getClusterInfo failed: unknown result')
194
+ end
195
+
196
+ def getTopologyInfo(id)
197
+ send_getTopologyInfo(id)
198
+ return recv_getTopologyInfo()
199
+ end
200
+
201
+ def send_getTopologyInfo(id)
202
+ send_message('getTopologyInfo', GetTopologyInfo_args, :id => id)
203
+ end
204
+
205
+ def recv_getTopologyInfo()
206
+ result = receive_message(GetTopologyInfo_result)
207
+ return result.success unless result.success.nil?
208
+ raise result.e unless result.e.nil?
209
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTopologyInfo failed: unknown result')
210
+ end
211
+
212
+ def getTopologyConf(id)
213
+ send_getTopologyConf(id)
214
+ return recv_getTopologyConf()
215
+ end
216
+
217
+ def send_getTopologyConf(id)
218
+ send_message('getTopologyConf', GetTopologyConf_args, :id => id)
219
+ end
220
+
221
+ def recv_getTopologyConf()
222
+ result = receive_message(GetTopologyConf_result)
223
+ return result.success unless result.success.nil?
224
+ raise result.e unless result.e.nil?
225
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTopologyConf failed: unknown result')
226
+ end
227
+
228
+ def getTopology(id)
229
+ send_getTopology(id)
230
+ return recv_getTopology()
231
+ end
232
+
233
+ def send_getTopology(id)
234
+ send_message('getTopology', GetTopology_args, :id => id)
235
+ end
236
+
237
+ def recv_getTopology()
238
+ result = receive_message(GetTopology_result)
239
+ return result.success unless result.success.nil?
240
+ raise result.e unless result.e.nil?
241
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTopology failed: unknown result')
242
+ end
243
+
244
+ def getUserTopology(id)
245
+ send_getUserTopology(id)
246
+ return recv_getUserTopology()
247
+ end
248
+
249
+ def send_getUserTopology(id)
250
+ send_message('getUserTopology', GetUserTopology_args, :id => id)
251
+ end
252
+
253
+ def recv_getUserTopology()
254
+ result = receive_message(GetUserTopology_result)
255
+ return result.success unless result.success.nil?
256
+ raise result.e unless result.e.nil?
257
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getUserTopology failed: unknown result')
258
+ end
259
+
260
+ end
261
+
262
+ class Processor
263
+ include ::Thrift::Processor
264
+
265
+ def process_submitTopology(seqid, iprot, oprot)
266
+ args = read_args(iprot, SubmitTopology_args)
267
+ result = SubmitTopology_result.new()
268
+ begin
269
+ @handler.submitTopology(args.name, args.uploadedJarLocation, args.jsonConf, args.topology)
270
+ rescue AlreadyAliveException => e
271
+ result.e = e
272
+ rescue InvalidTopologyException => ite
273
+ result.ite = ite
274
+ end
275
+ write_result(result, oprot, 'submitTopology', seqid)
276
+ end
277
+
278
+ def process_killTopology(seqid, iprot, oprot)
279
+ args = read_args(iprot, KillTopology_args)
280
+ result = KillTopology_result.new()
281
+ begin
282
+ @handler.killTopology(args.name)
283
+ rescue NotAliveException => e
284
+ result.e = e
285
+ end
286
+ write_result(result, oprot, 'killTopology', seqid)
287
+ end
288
+
289
+ def process_killTopologyWithOpts(seqid, iprot, oprot)
290
+ args = read_args(iprot, KillTopologyWithOpts_args)
291
+ result = KillTopologyWithOpts_result.new()
292
+ begin
293
+ @handler.killTopologyWithOpts(args.name, args.options)
294
+ rescue NotAliveException => e
295
+ result.e = e
296
+ end
297
+ write_result(result, oprot, 'killTopologyWithOpts', seqid)
298
+ end
299
+
300
+ def process_activate(seqid, iprot, oprot)
301
+ args = read_args(iprot, Activate_args)
302
+ result = Activate_result.new()
303
+ begin
304
+ @handler.activate(args.name)
305
+ rescue NotAliveException => e
306
+ result.e = e
307
+ end
308
+ write_result(result, oprot, 'activate', seqid)
309
+ end
310
+
311
+ def process_deactivate(seqid, iprot, oprot)
312
+ args = read_args(iprot, Deactivate_args)
313
+ result = Deactivate_result.new()
314
+ begin
315
+ @handler.deactivate(args.name)
316
+ rescue NotAliveException => e
317
+ result.e = e
318
+ end
319
+ write_result(result, oprot, 'deactivate', seqid)
320
+ end
321
+
322
+ def process_rebalance(seqid, iprot, oprot)
323
+ args = read_args(iprot, Rebalance_args)
324
+ result = Rebalance_result.new()
325
+ begin
326
+ @handler.rebalance(args.name, args.options)
327
+ rescue NotAliveException => e
328
+ result.e = e
329
+ rescue InvalidTopologyException => ite
330
+ result.ite = ite
331
+ end
332
+ write_result(result, oprot, 'rebalance', seqid)
333
+ end
334
+
335
+ def process_beginFileUpload(seqid, iprot, oprot)
336
+ args = read_args(iprot, BeginFileUpload_args)
337
+ result = BeginFileUpload_result.new()
338
+ result.success = @handler.beginFileUpload()
339
+ write_result(result, oprot, 'beginFileUpload', seqid)
340
+ end
341
+
342
+ def process_uploadChunk(seqid, iprot, oprot)
343
+ args = read_args(iprot, UploadChunk_args)
344
+ result = UploadChunk_result.new()
345
+ @handler.uploadChunk(args.location, args.chunk)
346
+ write_result(result, oprot, 'uploadChunk', seqid)
347
+ end
348
+
349
+ def process_finishFileUpload(seqid, iprot, oprot)
350
+ args = read_args(iprot, FinishFileUpload_args)
351
+ result = FinishFileUpload_result.new()
352
+ @handler.finishFileUpload(args.location)
353
+ write_result(result, oprot, 'finishFileUpload', seqid)
354
+ end
355
+
356
+ def process_beginFileDownload(seqid, iprot, oprot)
357
+ args = read_args(iprot, BeginFileDownload_args)
358
+ result = BeginFileDownload_result.new()
359
+ result.success = @handler.beginFileDownload(args.file)
360
+ write_result(result, oprot, 'beginFileDownload', seqid)
361
+ end
362
+
363
+ def process_downloadChunk(seqid, iprot, oprot)
364
+ args = read_args(iprot, DownloadChunk_args)
365
+ result = DownloadChunk_result.new()
366
+ result.success = @handler.downloadChunk(args.id)
367
+ write_result(result, oprot, 'downloadChunk', seqid)
368
+ end
369
+
370
+ def process_getClusterInfo(seqid, iprot, oprot)
371
+ args = read_args(iprot, GetClusterInfo_args)
372
+ result = GetClusterInfo_result.new()
373
+ result.success = @handler.getClusterInfo()
374
+ write_result(result, oprot, 'getClusterInfo', seqid)
375
+ end
376
+
377
+ def process_getTopologyInfo(seqid, iprot, oprot)
378
+ args = read_args(iprot, GetTopologyInfo_args)
379
+ result = GetTopologyInfo_result.new()
380
+ begin
381
+ result.success = @handler.getTopologyInfo(args.id)
382
+ rescue NotAliveException => e
383
+ result.e = e
384
+ end
385
+ write_result(result, oprot, 'getTopologyInfo', seqid)
386
+ end
387
+
388
+ def process_getTopologyConf(seqid, iprot, oprot)
389
+ args = read_args(iprot, GetTopologyConf_args)
390
+ result = GetTopologyConf_result.new()
391
+ begin
392
+ result.success = @handler.getTopologyConf(args.id)
393
+ rescue NotAliveException => e
394
+ result.e = e
395
+ end
396
+ write_result(result, oprot, 'getTopologyConf', seqid)
397
+ end
398
+
399
+ def process_getTopology(seqid, iprot, oprot)
400
+ args = read_args(iprot, GetTopology_args)
401
+ result = GetTopology_result.new()
402
+ begin
403
+ result.success = @handler.getTopology(args.id)
404
+ rescue NotAliveException => e
405
+ result.e = e
406
+ end
407
+ write_result(result, oprot, 'getTopology', seqid)
408
+ end
409
+
410
+ def process_getUserTopology(seqid, iprot, oprot)
411
+ args = read_args(iprot, GetUserTopology_args)
412
+ result = GetUserTopology_result.new()
413
+ begin
414
+ result.success = @handler.getUserTopology(args.id)
415
+ rescue NotAliveException => e
416
+ result.e = e
417
+ end
418
+ write_result(result, oprot, 'getUserTopology', seqid)
419
+ end
420
+
421
+ end
422
+
423
+ # HELPER FUNCTIONS AND STRUCTURES
424
+
425
+ class SubmitTopology_args
426
+ include ::Thrift::Struct, ::Thrift::Struct_Union
427
+ NAME = 1
428
+ UPLOADEDJARLOCATION = 2
429
+ JSONCONF = 3
430
+ TOPOLOGY = 4
431
+
432
+ FIELDS = {
433
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
434
+ UPLOADEDJARLOCATION => {:type => ::Thrift::Types::STRING, :name => 'uploadedJarLocation'},
435
+ JSONCONF => {:type => ::Thrift::Types::STRING, :name => 'jsonConf'},
436
+ TOPOLOGY => {:type => ::Thrift::Types::STRUCT, :name => 'topology', :class => StormTopology}
437
+ }
438
+
439
+ def struct_fields; FIELDS; end
440
+
441
+ def validate
442
+ end
443
+
444
+ ::Thrift::Struct.generate_accessors self
445
+ end
446
+
447
+ class SubmitTopology_result
448
+ include ::Thrift::Struct, ::Thrift::Struct_Union
449
+ E = 1
450
+ ITE = 2
451
+
452
+ FIELDS = {
453
+ E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => AlreadyAliveException},
454
+ ITE => {:type => ::Thrift::Types::STRUCT, :name => 'ite', :class => InvalidTopologyException}
455
+ }
456
+
457
+ def struct_fields; FIELDS; end
458
+
459
+ def validate
460
+ end
461
+
462
+ ::Thrift::Struct.generate_accessors self
463
+ end
464
+
465
+ class KillTopology_args
466
+ include ::Thrift::Struct, ::Thrift::Struct_Union
467
+ NAME = 1
468
+
469
+ FIELDS = {
470
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}
471
+ }
472
+
473
+ def struct_fields; FIELDS; end
474
+
475
+ def validate
476
+ end
477
+
478
+ ::Thrift::Struct.generate_accessors self
479
+ end
480
+
481
+ class KillTopology_result
482
+ include ::Thrift::Struct, ::Thrift::Struct_Union
483
+ E = 1
484
+
485
+ FIELDS = {
486
+ E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => NotAliveException}
487
+ }
488
+
489
+ def struct_fields; FIELDS; end
490
+
491
+ def validate
492
+ end
493
+
494
+ ::Thrift::Struct.generate_accessors self
495
+ end
496
+
497
+ class KillTopologyWithOpts_args
498
+ include ::Thrift::Struct, ::Thrift::Struct_Union
499
+ NAME = 1
500
+ OPTIONS = 2
501
+
502
+ FIELDS = {
503
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
504
+ OPTIONS => {:type => ::Thrift::Types::STRUCT, :name => 'options', :class => KillOptions}
505
+ }
506
+
507
+ def struct_fields; FIELDS; end
508
+
509
+ def validate
510
+ end
511
+
512
+ ::Thrift::Struct.generate_accessors self
513
+ end
514
+
515
+ class KillTopologyWithOpts_result
516
+ include ::Thrift::Struct, ::Thrift::Struct_Union
517
+ E = 1
518
+
519
+ FIELDS = {
520
+ E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => NotAliveException}
521
+ }
522
+
523
+ def struct_fields; FIELDS; end
524
+
525
+ def validate
526
+ end
527
+
528
+ ::Thrift::Struct.generate_accessors self
529
+ end
530
+
531
+ class Activate_args
532
+ include ::Thrift::Struct, ::Thrift::Struct_Union
533
+ NAME = 1
534
+
535
+ FIELDS = {
536
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}
537
+ }
538
+
539
+ def struct_fields; FIELDS; end
540
+
541
+ def validate
542
+ end
543
+
544
+ ::Thrift::Struct.generate_accessors self
545
+ end
546
+
547
+ class Activate_result
548
+ include ::Thrift::Struct, ::Thrift::Struct_Union
549
+ E = 1
550
+
551
+ FIELDS = {
552
+ E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => NotAliveException}
553
+ }
554
+
555
+ def struct_fields; FIELDS; end
556
+
557
+ def validate
558
+ end
559
+
560
+ ::Thrift::Struct.generate_accessors self
561
+ end
562
+
563
+ class Deactivate_args
564
+ include ::Thrift::Struct, ::Thrift::Struct_Union
565
+ NAME = 1
566
+
567
+ FIELDS = {
568
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}
569
+ }
570
+
571
+ def struct_fields; FIELDS; end
572
+
573
+ def validate
574
+ end
575
+
576
+ ::Thrift::Struct.generate_accessors self
577
+ end
578
+
579
+ class Deactivate_result
580
+ include ::Thrift::Struct, ::Thrift::Struct_Union
581
+ E = 1
582
+
583
+ FIELDS = {
584
+ E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => NotAliveException}
585
+ }
586
+
587
+ def struct_fields; FIELDS; end
588
+
589
+ def validate
590
+ end
591
+
592
+ ::Thrift::Struct.generate_accessors self
593
+ end
594
+
595
+ class Rebalance_args
596
+ include ::Thrift::Struct, ::Thrift::Struct_Union
597
+ NAME = 1
598
+ OPTIONS = 2
599
+
600
+ FIELDS = {
601
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
602
+ OPTIONS => {:type => ::Thrift::Types::STRUCT, :name => 'options', :class => RebalanceOptions}
603
+ }
604
+
605
+ def struct_fields; FIELDS; end
606
+
607
+ def validate
608
+ end
609
+
610
+ ::Thrift::Struct.generate_accessors self
611
+ end
612
+
613
+ class Rebalance_result
614
+ include ::Thrift::Struct, ::Thrift::Struct_Union
615
+ E = 1
616
+ ITE = 2
617
+
618
+ FIELDS = {
619
+ E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => NotAliveException},
620
+ ITE => {:type => ::Thrift::Types::STRUCT, :name => 'ite', :class => InvalidTopologyException}
621
+ }
622
+
623
+ def struct_fields; FIELDS; end
624
+
625
+ def validate
626
+ end
627
+
628
+ ::Thrift::Struct.generate_accessors self
629
+ end
630
+
631
+ class BeginFileUpload_args
632
+ include ::Thrift::Struct, ::Thrift::Struct_Union
633
+
634
+ FIELDS = {
635
+
636
+ }
637
+
638
+ def struct_fields; FIELDS; end
639
+
640
+ def validate
641
+ end
642
+
643
+ ::Thrift::Struct.generate_accessors self
644
+ end
645
+
646
+ class BeginFileUpload_result
647
+ include ::Thrift::Struct, ::Thrift::Struct_Union
648
+ SUCCESS = 0
649
+
650
+ FIELDS = {
651
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
652
+ }
653
+
654
+ def struct_fields; FIELDS; end
655
+
656
+ def validate
657
+ end
658
+
659
+ ::Thrift::Struct.generate_accessors self
660
+ end
661
+
662
+ class UploadChunk_args
663
+ include ::Thrift::Struct, ::Thrift::Struct_Union
664
+ LOCATION = 1
665
+ CHUNK = 2
666
+
667
+ FIELDS = {
668
+ LOCATION => {:type => ::Thrift::Types::STRING, :name => 'location'},
669
+ CHUNK => {:type => ::Thrift::Types::STRING, :name => 'chunk', :binary => true}
670
+ }
671
+
672
+ def struct_fields; FIELDS; end
673
+
674
+ def validate
675
+ end
676
+
677
+ ::Thrift::Struct.generate_accessors self
678
+ end
679
+
680
+ class UploadChunk_result
681
+ include ::Thrift::Struct, ::Thrift::Struct_Union
682
+
683
+ FIELDS = {
684
+
685
+ }
686
+
687
+ def struct_fields; FIELDS; end
688
+
689
+ def validate
690
+ end
691
+
692
+ ::Thrift::Struct.generate_accessors self
693
+ end
694
+
695
+ class FinishFileUpload_args
696
+ include ::Thrift::Struct, ::Thrift::Struct_Union
697
+ LOCATION = 1
698
+
699
+ FIELDS = {
700
+ LOCATION => {:type => ::Thrift::Types::STRING, :name => 'location'}
701
+ }
702
+
703
+ def struct_fields; FIELDS; end
704
+
705
+ def validate
706
+ end
707
+
708
+ ::Thrift::Struct.generate_accessors self
709
+ end
710
+
711
+ class FinishFileUpload_result
712
+ include ::Thrift::Struct, ::Thrift::Struct_Union
713
+
714
+ FIELDS = {
715
+
716
+ }
717
+
718
+ def struct_fields; FIELDS; end
719
+
720
+ def validate
721
+ end
722
+
723
+ ::Thrift::Struct.generate_accessors self
724
+ end
725
+
726
+ class BeginFileDownload_args
727
+ include ::Thrift::Struct, ::Thrift::Struct_Union
728
+ FILE = 1
729
+
730
+ FIELDS = {
731
+ FILE => {:type => ::Thrift::Types::STRING, :name => 'file'}
732
+ }
733
+
734
+ def struct_fields; FIELDS; end
735
+
736
+ def validate
737
+ end
738
+
739
+ ::Thrift::Struct.generate_accessors self
740
+ end
741
+
742
+ class BeginFileDownload_result
743
+ include ::Thrift::Struct, ::Thrift::Struct_Union
744
+ SUCCESS = 0
745
+
746
+ FIELDS = {
747
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
748
+ }
749
+
750
+ def struct_fields; FIELDS; end
751
+
752
+ def validate
753
+ end
754
+
755
+ ::Thrift::Struct.generate_accessors self
756
+ end
757
+
758
+ class DownloadChunk_args
759
+ include ::Thrift::Struct, ::Thrift::Struct_Union
760
+ ID = 1
761
+
762
+ FIELDS = {
763
+ ID => {:type => ::Thrift::Types::STRING, :name => 'id'}
764
+ }
765
+
766
+ def struct_fields; FIELDS; end
767
+
768
+ def validate
769
+ end
770
+
771
+ ::Thrift::Struct.generate_accessors self
772
+ end
773
+
774
+ class DownloadChunk_result
775
+ include ::Thrift::Struct, ::Thrift::Struct_Union
776
+ SUCCESS = 0
777
+
778
+ FIELDS = {
779
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success', :binary => true}
780
+ }
781
+
782
+ def struct_fields; FIELDS; end
783
+
784
+ def validate
785
+ end
786
+
787
+ ::Thrift::Struct.generate_accessors self
788
+ end
789
+
790
+ class GetClusterInfo_args
791
+ include ::Thrift::Struct, ::Thrift::Struct_Union
792
+
793
+ FIELDS = {
794
+
795
+ }
796
+
797
+ def struct_fields; FIELDS; end
798
+
799
+ def validate
800
+ end
801
+
802
+ ::Thrift::Struct.generate_accessors self
803
+ end
804
+
805
+ class GetClusterInfo_result
806
+ include ::Thrift::Struct, ::Thrift::Struct_Union
807
+ SUCCESS = 0
808
+
809
+ FIELDS = {
810
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ClusterSummary}
811
+ }
812
+
813
+ def struct_fields; FIELDS; end
814
+
815
+ def validate
816
+ end
817
+
818
+ ::Thrift::Struct.generate_accessors self
819
+ end
820
+
821
+ class GetTopologyInfo_args
822
+ include ::Thrift::Struct, ::Thrift::Struct_Union
823
+ ID = 1
824
+
825
+ FIELDS = {
826
+ ID => {:type => ::Thrift::Types::STRING, :name => 'id'}
827
+ }
828
+
829
+ def struct_fields; FIELDS; end
830
+
831
+ def validate
832
+ end
833
+
834
+ ::Thrift::Struct.generate_accessors self
835
+ end
836
+
837
+ class GetTopologyInfo_result
838
+ include ::Thrift::Struct, ::Thrift::Struct_Union
839
+ SUCCESS = 0
840
+ E = 1
841
+
842
+ FIELDS = {
843
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => TopologyInfo},
844
+ E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => NotAliveException}
845
+ }
846
+
847
+ def struct_fields; FIELDS; end
848
+
849
+ def validate
850
+ end
851
+
852
+ ::Thrift::Struct.generate_accessors self
853
+ end
854
+
855
+ class GetTopologyConf_args
856
+ include ::Thrift::Struct, ::Thrift::Struct_Union
857
+ ID = 1
858
+
859
+ FIELDS = {
860
+ ID => {:type => ::Thrift::Types::STRING, :name => 'id'}
861
+ }
862
+
863
+ def struct_fields; FIELDS; end
864
+
865
+ def validate
866
+ end
867
+
868
+ ::Thrift::Struct.generate_accessors self
869
+ end
870
+
871
+ class GetTopologyConf_result
872
+ include ::Thrift::Struct, ::Thrift::Struct_Union
873
+ SUCCESS = 0
874
+ E = 1
875
+
876
+ FIELDS = {
877
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
878
+ E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => NotAliveException}
879
+ }
880
+
881
+ def struct_fields; FIELDS; end
882
+
883
+ def validate
884
+ end
885
+
886
+ ::Thrift::Struct.generate_accessors self
887
+ end
888
+
889
+ class GetTopology_args
890
+ include ::Thrift::Struct, ::Thrift::Struct_Union
891
+ ID = 1
892
+
893
+ FIELDS = {
894
+ ID => {:type => ::Thrift::Types::STRING, :name => 'id'}
895
+ }
896
+
897
+ def struct_fields; FIELDS; end
898
+
899
+ def validate
900
+ end
901
+
902
+ ::Thrift::Struct.generate_accessors self
903
+ end
904
+
905
+ class GetTopology_result
906
+ include ::Thrift::Struct, ::Thrift::Struct_Union
907
+ SUCCESS = 0
908
+ E = 1
909
+
910
+ FIELDS = {
911
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => StormTopology},
912
+ E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => NotAliveException}
913
+ }
914
+
915
+ def struct_fields; FIELDS; end
916
+
917
+ def validate
918
+ end
919
+
920
+ ::Thrift::Struct.generate_accessors self
921
+ end
922
+
923
+ class GetUserTopology_args
924
+ include ::Thrift::Struct, ::Thrift::Struct_Union
925
+ ID = 1
926
+
927
+ FIELDS = {
928
+ ID => {:type => ::Thrift::Types::STRING, :name => 'id'}
929
+ }
930
+
931
+ def struct_fields; FIELDS; end
932
+
933
+ def validate
934
+ end
935
+
936
+ ::Thrift::Struct.generate_accessors self
937
+ end
938
+
939
+ class GetUserTopology_result
940
+ include ::Thrift::Struct, ::Thrift::Struct_Union
941
+ SUCCESS = 0
942
+ E = 1
943
+
944
+ FIELDS = {
945
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => StormTopology},
946
+ E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => NotAliveException}
947
+ }
948
+
949
+ def struct_fields; FIELDS; end
950
+
951
+ def validate
952
+ end
953
+
954
+ ::Thrift::Struct.generate_accessors self
955
+ end
956
+
957
+ end
958
+
959
+
960
+ end