You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pt...@apache.org on 2015/11/05 21:40:55 UTC
[16/60] [abbrv] [partial] storm git commit: Release 2.0.4-SNAPSHOT
http://git-wip-us.apache.org/repos/asf/storm/blob/e935da91/jstorm-client/src/main/py/storm/DistributedRPCInvocations.py
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/py/storm/DistributedRPCInvocations.py b/jstorm-client/src/main/py/storm/DistributedRPCInvocations.py
deleted file mode 100644
index 4f951a9..0000000
--- a/jstorm-client/src/main/py/storm/DistributedRPCInvocations.py
+++ /dev/null
@@ -1,549 +0,0 @@
-#
-# Autogenerated by Thrift Compiler (0.7.0)
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-
-from thrift.Thrift import *
-from ttypes import *
-from thrift.Thrift import TProcessor
-from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol, TProtocol
-try:
- from thrift.protocol import fastbinary
-except:
- fastbinary = None
-
-
-class Iface:
- def result(self, id, result):
- """
- Parameters:
- - id
- - result
- """
- pass
-
- def fetchRequest(self, functionName):
- """
- Parameters:
- - functionName
- """
- pass
-
- def failRequest(self, id):
- """
- Parameters:
- - id
- """
- pass
-
-
-class Client(Iface):
- def __init__(self, iprot, oprot=None):
- self._iprot = self._oprot = iprot
- if oprot is not None:
- self._oprot = oprot
- self._seqid = 0
-
- def result(self, id, result):
- """
- Parameters:
- - id
- - result
- """
- self.send_result(id, result)
- self.recv_result()
-
- def send_result(self, id, result):
- self._oprot.writeMessageBegin('result', TMessageType.CALL, self._seqid)
- args = result_args()
- args.id = id
- args.result = result
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_result(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = result_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- return
-
- def fetchRequest(self, functionName):
- """
- Parameters:
- - functionName
- """
- self.send_fetchRequest(functionName)
- return self.recv_fetchRequest()
-
- def send_fetchRequest(self, functionName):
- self._oprot.writeMessageBegin('fetchRequest', TMessageType.CALL, self._seqid)
- args = fetchRequest_args()
- args.functionName = functionName
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_fetchRequest(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = fetchRequest_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "fetchRequest failed: unknown result");
-
- def failRequest(self, id):
- """
- Parameters:
- - id
- """
- self.send_failRequest(id)
- self.recv_failRequest()
-
- def send_failRequest(self, id):
- self._oprot.writeMessageBegin('failRequest', TMessageType.CALL, self._seqid)
- args = failRequest_args()
- args.id = id
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_failRequest(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = failRequest_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- return
-
-
-class Processor(Iface, TProcessor):
- def __init__(self, handler):
- self._handler = handler
- self._processMap = {}
- self._processMap["result"] = Processor.process_result
- self._processMap["fetchRequest"] = Processor.process_fetchRequest
- self._processMap["failRequest"] = Processor.process_failRequest
-
- def process(self, iprot, oprot):
- (name, type, seqid) = iprot.readMessageBegin()
- if name not in self._processMap:
- iprot.skip(TType.STRUCT)
- iprot.readMessageEnd()
- x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
- oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
- x.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- return
- else:
- self._processMap[name](self, seqid, iprot, oprot)
- return True
-
- def process_result(self, seqid, iprot, oprot):
- args = result_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = result_result()
- self._handler.result(args.id, args.result)
- oprot.writeMessageBegin("result", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_fetchRequest(self, seqid, iprot, oprot):
- args = fetchRequest_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = fetchRequest_result()
- result.success = self._handler.fetchRequest(args.functionName)
- oprot.writeMessageBegin("fetchRequest", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_failRequest(self, seqid, iprot, oprot):
- args = failRequest_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = failRequest_result()
- self._handler.failRequest(args.id)
- oprot.writeMessageBegin("failRequest", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
-
-# HELPER FUNCTIONS AND STRUCTURES
-
-class result_args:
- """
- Attributes:
- - id
- - result
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'id', None, None, ), # 1
- (2, TType.STRING, 'result', None, None, ), # 2
- )
-
- def __hash__(self):
- return 0 + hash(self.id) + hash(self.result)
-
- def __init__(self, id=None, result=None,):
- self.id = id
- self.result = result
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.id = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.result = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('result_args')
- if self.id is not None:
- oprot.writeFieldBegin('id', TType.STRING, 1)
- oprot.writeString(self.id.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.result is not None:
- oprot.writeFieldBegin('result', TType.STRING, 2)
- oprot.writeString(self.result.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class result_result:
-
- thrift_spec = (
- )
-
- def __hash__(self):
- return 0
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('result_result')
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class fetchRequest_args:
- """
- Attributes:
- - functionName
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'functionName', None, None, ), # 1
- )
-
- def __hash__(self):
- return 0 + hash(self.functionName)
-
- def __init__(self, functionName=None,):
- self.functionName = functionName
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.functionName = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('fetchRequest_args')
- if self.functionName is not None:
- oprot.writeFieldBegin('functionName', TType.STRING, 1)
- oprot.writeString(self.functionName.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class fetchRequest_result:
- """
- Attributes:
- - success
- """
-
- thrift_spec = (
- (0, TType.STRUCT, 'success', (DRPCRequest, DRPCRequest.thrift_spec), None, ), # 0
- )
-
- def __hash__(self):
- return 0 + hash(self.success)
-
- def __init__(self, success=None,):
- self.success = success
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = DRPCRequest()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('fetchRequest_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class failRequest_args:
- """
- Attributes:
- - id
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'id', None, None, ), # 1
- )
-
- def __hash__(self):
- return 0 + hash(self.id)
-
- def __init__(self, id=None,):
- self.id = id
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.id = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('failRequest_args')
- if self.id is not None:
- oprot.writeFieldBegin('id', TType.STRING, 1)
- oprot.writeString(self.id.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class failRequest_result:
-
- thrift_spec = (
- )
-
- def __hash__(self):
- return 0
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('failRequest_result')
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
http://git-wip-us.apache.org/repos/asf/storm/blob/e935da91/jstorm-client/src/main/py/storm/Nimbus-remote
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/py/storm/Nimbus-remote b/jstorm-client/src/main/py/storm/Nimbus-remote
deleted file mode 100644
index 1fe7051..0000000
--- a/jstorm-client/src/main/py/storm/Nimbus-remote
+++ /dev/null
@@ -1,232 +0,0 @@
-#!/usr/bin/env python
-#
-# Autogenerated by Thrift Compiler (0.7.0)
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-
-import sys
-import pprint
-from urlparse import urlparse
-from thrift.transport import TTransport
-from thrift.transport import TSocket
-from thrift.transport import THttpClient
-from thrift.protocol import TBinaryProtocol
-
-import Nimbus
-from ttypes import *
-
-if len(sys.argv) <= 1 or sys.argv[1] == '--help':
- print ''
- print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
- print ''
- print 'Functions:'
- print ' void submitTopology(string name, string uploadedJarLocation, string jsonConf, StormTopology topology)'
- print ' void submitTopologyWithOpts(string name, string uploadedJarLocation, string jsonConf, StormTopology topology, SubmitOptions options)'
- print ' void killTopology(string name)'
- print ' void killTopologyWithOpts(string name, KillOptions options)'
- print ' void activate(string name)'
- print ' void deactivate(string name)'
- print ' void rebalance(string name, RebalanceOptions options)'
- print ' void metricMonitor(string name, MonitorOptions options)'
- print ' void beginLibUpload(string libName)'
- print ' string beginFileUpload()'
- print ' void uploadChunk(string location, string chunk)'
- print ' void finishFileUpload(string location)'
- print ' string beginFileDownload(string file)'
- print ' string downloadChunk(string id)'
- print ' string getNimbusConf()'
- print ' ClusterSummary getClusterInfo()'
- print ' TopologyInfo getTopologyInfo(string id)'
- print ' SupervisorWorkers getSupervisorWorkers(string host)'
- print ' string getTopologyConf(string id)'
- print ' StormTopology getTopology(string id)'
- print ' StormTopology getUserTopology(string id)'
- print ' TopologyMetricInfo getTopologyMetric(string id)'
- print ''
- sys.exit(0)
-
-pp = pprint.PrettyPrinter(indent = 2)
-host = 'localhost'
-port = 9090
-uri = ''
-framed = False
-http = False
-argi = 1
-
-if sys.argv[argi] == '-h':
- parts = sys.argv[argi+1].split(':')
- host = parts[0]
- port = int(parts[1])
- argi += 2
-
-if sys.argv[argi] == '-u':
- url = urlparse(sys.argv[argi+1])
- parts = url[1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- else:
- port = 80
- uri = url[2]
- if url[4]:
- uri += '?%s' % url[4]
- http = True
- argi += 2
-
-if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
- framed = True
- argi += 1
-
-cmd = sys.argv[argi]
-args = sys.argv[argi+1:]
-
-if http:
- transport = THttpClient.THttpClient(host, port, uri)
-else:
- socket = TSocket.TSocket(host, port)
- if framed:
- transport = TTransport.TFramedTransport(socket)
- else:
- transport = TTransport.TBufferedTransport(socket)
-protocol = TBinaryProtocol.TBinaryProtocol(transport)
-client = Nimbus.Client(protocol)
-transport.open()
-
-if cmd == 'submitTopology':
- if len(args) != 4:
- print 'submitTopology requires 4 args'
- sys.exit(1)
- pp.pprint(client.submitTopology(args[0],args[1],args[2],eval(args[3]),))
-
-elif cmd == 'submitTopologyWithOpts':
- if len(args) != 5:
- print 'submitTopologyWithOpts requires 5 args'
- sys.exit(1)
- pp.pprint(client.submitTopologyWithOpts(args[0],args[1],args[2],eval(args[3]),eval(args[4]),))
-
-elif cmd == 'killTopology':
- if len(args) != 1:
- print 'killTopology requires 1 args'
- sys.exit(1)
- pp.pprint(client.killTopology(args[0],))
-
-elif cmd == 'killTopologyWithOpts':
- if len(args) != 2:
- print 'killTopologyWithOpts requires 2 args'
- sys.exit(1)
- pp.pprint(client.killTopologyWithOpts(args[0],eval(args[1]),))
-
-elif cmd == 'activate':
- if len(args) != 1:
- print 'activate requires 1 args'
- sys.exit(1)
- pp.pprint(client.activate(args[0],))
-
-elif cmd == 'deactivate':
- if len(args) != 1:
- print 'deactivate requires 1 args'
- sys.exit(1)
- pp.pprint(client.deactivate(args[0],))
-
-elif cmd == 'rebalance':
- if len(args) != 2:
- print 'rebalance requires 2 args'
- sys.exit(1)
- pp.pprint(client.rebalance(args[0],eval(args[1]),))
-
-elif cmd == 'metricMonitor':
- if len(args) != 2:
- print 'metricMonitor requires 2 args'
- sys.exit(1)
- pp.pprint(client.metricMonitor(args[0],eval(args[1]),))
-
-elif cmd == 'beginLibUpload':
- if len(args) != 1:
- print 'beginLibUpload requires 1 args'
- sys.exit(1)
- pp.pprint(client.beginLibUpload(args[0],))
-
-elif cmd == 'beginFileUpload':
- if len(args) != 0:
- print 'beginFileUpload requires 0 args'
- sys.exit(1)
- pp.pprint(client.beginFileUpload())
-
-elif cmd == 'uploadChunk':
- if len(args) != 2:
- print 'uploadChunk requires 2 args'
- sys.exit(1)
- pp.pprint(client.uploadChunk(args[0],args[1],))
-
-elif cmd == 'finishFileUpload':
- if len(args) != 1:
- print 'finishFileUpload requires 1 args'
- sys.exit(1)
- pp.pprint(client.finishFileUpload(args[0],))
-
-elif cmd == 'beginFileDownload':
- if len(args) != 1:
- print 'beginFileDownload requires 1 args'
- sys.exit(1)
- pp.pprint(client.beginFileDownload(args[0],))
-
-elif cmd == 'downloadChunk':
- if len(args) != 1:
- print 'downloadChunk requires 1 args'
- sys.exit(1)
- pp.pprint(client.downloadChunk(args[0],))
-
-elif cmd == 'getNimbusConf':
- if len(args) != 0:
- print 'getNimbusConf requires 0 args'
- sys.exit(1)
- pp.pprint(client.getNimbusConf())
-
-elif cmd == 'getClusterInfo':
- if len(args) != 0:
- print 'getClusterInfo requires 0 args'
- sys.exit(1)
- pp.pprint(client.getClusterInfo())
-
-elif cmd == 'getTopologyInfo':
- if len(args) != 1:
- print 'getTopologyInfo requires 1 args'
- sys.exit(1)
- pp.pprint(client.getTopologyInfo(args[0],))
-
-elif cmd == 'getSupervisorWorkers':
- if len(args) != 1:
- print 'getSupervisorWorkers requires 1 args'
- sys.exit(1)
- pp.pprint(client.getSupervisorWorkers(args[0],))
-
-elif cmd == 'getTopologyConf':
- if len(args) != 1:
- print 'getTopologyConf requires 1 args'
- sys.exit(1)
- pp.pprint(client.getTopologyConf(args[0],))
-
-elif cmd == 'getTopology':
- if len(args) != 1:
- print 'getTopology requires 1 args'
- sys.exit(1)
- pp.pprint(client.getTopology(args[0],))
-
-elif cmd == 'getUserTopology':
- if len(args) != 1:
- print 'getUserTopology requires 1 args'
- sys.exit(1)
- pp.pprint(client.getUserTopology(args[0],))
-
-elif cmd == 'getTopologyMetric':
- if len(args) != 1:
- print 'getTopologyMetric requires 1 args'
- sys.exit(1)
- pp.pprint(client.getTopologyMetric(args[0],))
-
-else:
- print 'Unrecognized method %s' % cmd
- sys.exit(1)
-
-transport.close()