Class: Storm::Nimbus::Processor

Inherits:
Object
  • Object
show all
Includes:
Thrift::Processor
Defined in:
lib/storm/thrift/nimbus.rb

Instance Method Summary collapse

Instance Method Details

#process_activate(seqid, iprot, oprot) ⇒ Object



300
301
302
303
304
305
306
307
308
309
# File 'lib/storm/thrift/nimbus.rb', line 300

def process_activate(seqid, iprot, oprot)
  args = read_args(iprot, Activate_args)
  result = Activate_result.new()
  begin
    @handler.activate(args.name)
  rescue NotAliveException => e
    result.e = e
  end
  write_result(result, oprot, 'activate', seqid)
end

#process_beginFileDownload(seqid, iprot, oprot) ⇒ Object



356
357
358
359
360
361
# File 'lib/storm/thrift/nimbus.rb', line 356

def process_beginFileDownload(seqid, iprot, oprot)
  args = read_args(iprot, BeginFileDownload_args)
  result = BeginFileDownload_result.new()
  result.success = @handler.beginFileDownload(args.file)
  write_result(result, oprot, 'beginFileDownload', seqid)
end

#process_beginFileUpload(seqid, iprot, oprot) ⇒ Object



335
336
337
338
339
340
# File 'lib/storm/thrift/nimbus.rb', line 335

def process_beginFileUpload(seqid, iprot, oprot)
  args = read_args(iprot, BeginFileUpload_args)
  result = BeginFileUpload_result.new()
  result.success = @handler.beginFileUpload()
  write_result(result, oprot, 'beginFileUpload', seqid)
end

#process_deactivate(seqid, iprot, oprot) ⇒ Object



311
312
313
314
315
316
317
318
319
320
# File 'lib/storm/thrift/nimbus.rb', line 311

def process_deactivate(seqid, iprot, oprot)
  args = read_args(iprot, Deactivate_args)
  result = Deactivate_result.new()
  begin
    @handler.deactivate(args.name)
  rescue NotAliveException => e
    result.e = e
  end
  write_result(result, oprot, 'deactivate', seqid)
end

#process_downloadChunk(seqid, iprot, oprot) ⇒ Object



363
364
365
366
367
368
# File 'lib/storm/thrift/nimbus.rb', line 363

def process_downloadChunk(seqid, iprot, oprot)
  args = read_args(iprot, DownloadChunk_args)
  result = DownloadChunk_result.new()
  result.success = @handler.downloadChunk(args.id)
  write_result(result, oprot, 'downloadChunk', seqid)
end

#process_finishFileUpload(seqid, iprot, oprot) ⇒ Object



349
350
351
352
353
354
# File 'lib/storm/thrift/nimbus.rb', line 349

def process_finishFileUpload(seqid, iprot, oprot)
  args = read_args(iprot, FinishFileUpload_args)
  result = FinishFileUpload_result.new()
  @handler.finishFileUpload(args.location)
  write_result(result, oprot, 'finishFileUpload', seqid)
end

#process_getClusterInfo(seqid, iprot, oprot) ⇒ Object



370
371
372
373
374
375
# File 'lib/storm/thrift/nimbus.rb', line 370

def process_getClusterInfo(seqid, iprot, oprot)
  args = read_args(iprot, GetClusterInfo_args)
  result = GetClusterInfo_result.new()
  result.success = @handler.getClusterInfo()
  write_result(result, oprot, 'getClusterInfo', seqid)
end

#process_getTopology(seqid, iprot, oprot) ⇒ Object



399
400
401
402
403
404
405
406
407
408
# File 'lib/storm/thrift/nimbus.rb', line 399

def process_getTopology(seqid, iprot, oprot)
  args = read_args(iprot, GetTopology_args)
  result = GetTopology_result.new()
  begin
    result.success = @handler.getTopology(args.id)
  rescue NotAliveException => e
    result.e = e
  end
  write_result(result, oprot, 'getTopology', seqid)
end

#process_getTopologyConf(seqid, iprot, oprot) ⇒ Object



388
389
390
391
392
393
394
395
396
397
# File 'lib/storm/thrift/nimbus.rb', line 388

def process_getTopologyConf(seqid, iprot, oprot)
  args = read_args(iprot, GetTopologyConf_args)
  result = GetTopologyConf_result.new()
  begin
    result.success = @handler.getTopologyConf(args.id)
  rescue NotAliveException => e
    result.e = e
  end
  write_result(result, oprot, 'getTopologyConf', seqid)
end

#process_getTopologyInfo(seqid, iprot, oprot) ⇒ Object



377
378
379
380
381
382
383
384
385
386
# File 'lib/storm/thrift/nimbus.rb', line 377

def process_getTopologyInfo(seqid, iprot, oprot)
  args = read_args(iprot, GetTopologyInfo_args)
  result = GetTopologyInfo_result.new()
  begin
    result.success = @handler.getTopologyInfo(args.id)
  rescue NotAliveException => e
    result.e = e
  end
  write_result(result, oprot, 'getTopologyInfo', seqid)
end

#process_getUserTopology(seqid, iprot, oprot) ⇒ Object



410
411
412
413
414
415
416
417
418
419
# File 'lib/storm/thrift/nimbus.rb', line 410

def process_getUserTopology(seqid, iprot, oprot)
  args = read_args(iprot, GetUserTopology_args)
  result = GetUserTopology_result.new()
  begin
    result.success = @handler.getUserTopology(args.id)
  rescue NotAliveException => e
    result.e = e
  end
  write_result(result, oprot, 'getUserTopology', seqid)
end

#process_killTopology(seqid, iprot, oprot) ⇒ Object



278
279
280
281
282
283
284
285
286
287
# File 'lib/storm/thrift/nimbus.rb', line 278

def process_killTopology(seqid, iprot, oprot)
  args = read_args(iprot, KillTopology_args)
  result = KillTopology_result.new()
  begin
    @handler.killTopology(args.name)
  rescue NotAliveException => e
    result.e = e
  end
  write_result(result, oprot, 'killTopology', seqid)
end

#process_killTopologyWithOpts(seqid, iprot, oprot) ⇒ Object



289
290
291
292
293
294
295
296
297
298
# File 'lib/storm/thrift/nimbus.rb', line 289

def process_killTopologyWithOpts(seqid, iprot, oprot)
  args = read_args(iprot, KillTopologyWithOpts_args)
  result = KillTopologyWithOpts_result.new()
  begin
    @handler.killTopologyWithOpts(args.name, args.options)
  rescue NotAliveException => e
    result.e = e
  end
  write_result(result, oprot, 'killTopologyWithOpts', seqid)
end

#process_rebalance(seqid, iprot, oprot) ⇒ Object



322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/storm/thrift/nimbus.rb', line 322

def process_rebalance(seqid, iprot, oprot)
  args = read_args(iprot, Rebalance_args)
  result = Rebalance_result.new()
  begin
    @handler.rebalance(args.name, args.options)
  rescue NotAliveException => e
    result.e = e
  rescue InvalidTopologyException => ite
    result.ite = ite
  end
  write_result(result, oprot, 'rebalance', seqid)
end

#process_submitTopology(seqid, iprot, oprot) ⇒ Object



265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/storm/thrift/nimbus.rb', line 265

def process_submitTopology(seqid, iprot, oprot)
  args = read_args(iprot, SubmitTopology_args)
  result = SubmitTopology_result.new()
  begin
    @handler.submitTopology(args.name, args.uploadedJarLocation, args.jsonConf, args.topology)
  rescue AlreadyAliveException => e
    result.e = e
  rescue InvalidTopologyException => ite
    result.ite = ite
  end
  write_result(result, oprot, 'submitTopology', seqid)
end

#process_uploadChunk(seqid, iprot, oprot) ⇒ Object



342
343
344
345
346
347
# File 'lib/storm/thrift/nimbus.rb', line 342

def process_uploadChunk(seqid, iprot, oprot)
  args = read_args(iprot, UploadChunk_args)
  result = UploadChunk_result.new()
  @handler.uploadChunk(args.location, args.chunk)
  write_result(result, oprot, 'uploadChunk', seqid)
end