You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2014/05/21 18:06:59 UTC
[04/14] STORM-216: Added Authentication and Authorization.
http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/fe5f41aa/storm-core/src/py/storm/Nimbus.py
----------------------------------------------------------------------
diff --git a/storm-core/src/py/storm/Nimbus.py b/storm-core/src/py/storm/Nimbus.py
index cd535be..e1ee510 100644
--- a/storm-core/src/py/storm/Nimbus.py
+++ b/storm-core/src/py/storm/Nimbus.py
@@ -74,6 +74,14 @@ class Iface:
"""
pass
+ def uploadNewCredentials(self, name, creds):
+ """
+ Parameters:
+ - name
+ - creds
+ """
+ pass
+
def beginFileUpload(self, ):
pass
@@ -184,6 +192,8 @@ class Client(Iface):
raise result.e
if result.ite is not None:
raise result.ite
+ if result.aze is not None:
+ raise result.aze
return
def submitTopologyWithOpts(self, name, uploadedJarLocation, jsonConf, topology, options):
@@ -224,6 +234,8 @@ class Client(Iface):
raise result.e
if result.ite is not None:
raise result.ite
+ if result.aze is not None:
+ raise result.aze
return
def killTopology(self, name):
@@ -254,6 +266,8 @@ class Client(Iface):
self._iprot.readMessageEnd()
if result.e is not None:
raise result.e
+ if result.aze is not None:
+ raise result.aze
return
def killTopologyWithOpts(self, name, options):
@@ -286,6 +300,8 @@ class Client(Iface):
self._iprot.readMessageEnd()
if result.e is not None:
raise result.e
+ if result.aze is not None:
+ raise result.aze
return
def activate(self, name):
@@ -316,6 +332,8 @@ class Client(Iface):
self._iprot.readMessageEnd()
if result.e is not None:
raise result.e
+ if result.aze is not None:
+ raise result.aze
return
def deactivate(self, name):
@@ -346,6 +364,8 @@ class Client(Iface):
self._iprot.readMessageEnd()
if result.e is not None:
raise result.e
+ if result.aze is not None:
+ raise result.aze
return
def rebalance(self, name, options):
@@ -380,6 +400,44 @@ class Client(Iface):
raise result.e
if result.ite is not None:
raise result.ite
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def uploadNewCredentials(self, name, creds):
+ """
+ Parameters:
+ - name
+ - creds
+ """
+ self.send_uploadNewCredentials(name, creds)
+ self.recv_uploadNewCredentials()
+
+ def send_uploadNewCredentials(self, name, creds):
+ self._oprot.writeMessageBegin('uploadNewCredentials', TMessageType.CALL, self._seqid)
+ args = uploadNewCredentials_args()
+ args.name = name
+ args.creds = creds
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_uploadNewCredentials(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = uploadNewCredentials_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.e is not None:
+ raise result.e
+ if result.ite is not None:
+ raise result.ite
+ if result.aze is not None:
+ raise result.aze
return
def beginFileUpload(self, ):
@@ -405,6 +463,8 @@ class Client(Iface):
self._iprot.readMessageEnd()
if result.success is not None:
return result.success
+ if result.aze is not None:
+ raise result.aze
raise TApplicationException(TApplicationException.MISSING_RESULT, "beginFileUpload failed: unknown result");
def uploadChunk(self, location, chunk):
@@ -435,6 +495,8 @@ class Client(Iface):
result = uploadChunk_result()
result.read(self._iprot)
self._iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
return
def finishFileUpload(self, location):
@@ -463,6 +525,8 @@ class Client(Iface):
result = finishFileUpload_result()
result.read(self._iprot)
self._iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
return
def beginFileDownload(self, file):
@@ -493,6 +557,8 @@ class Client(Iface):
self._iprot.readMessageEnd()
if result.success is not None:
return result.success
+ if result.aze is not None:
+ raise result.aze
raise TApplicationException(TApplicationException.MISSING_RESULT, "beginFileDownload failed: unknown result");
def downloadChunk(self, id):
@@ -523,6 +589,8 @@ class Client(Iface):
self._iprot.readMessageEnd()
if result.success is not None:
return result.success
+ if result.aze is not None:
+ raise result.aze
raise TApplicationException(TApplicationException.MISSING_RESULT, "downloadChunk failed: unknown result");
def getNimbusConf(self, ):
@@ -548,6 +616,8 @@ class Client(Iface):
self._iprot.readMessageEnd()
if result.success is not None:
return result.success
+ if result.aze is not None:
+ raise result.aze
raise TApplicationException(TApplicationException.MISSING_RESULT, "getNimbusConf failed: unknown result");
def getClusterInfo(self, ):
@@ -573,6 +643,8 @@ class Client(Iface):
self._iprot.readMessageEnd()
if result.success is not None:
return result.success
+ if result.aze is not None:
+ raise result.aze
raise TApplicationException(TApplicationException.MISSING_RESULT, "getClusterInfo failed: unknown result");
def getTopologyInfo(self, id):
@@ -605,6 +677,8 @@ class Client(Iface):
return result.success
if result.e is not None:
raise result.e
+ if result.aze is not None:
+ raise result.aze
raise TApplicationException(TApplicationException.MISSING_RESULT, "getTopologyInfo failed: unknown result");
def getTopologyConf(self, id):
@@ -637,6 +711,8 @@ class Client(Iface):
return result.success
if result.e is not None:
raise result.e
+ if result.aze is not None:
+ raise result.aze
raise TApplicationException(TApplicationException.MISSING_RESULT, "getTopologyConf failed: unknown result");
def getTopology(self, id):
@@ -669,6 +745,8 @@ class Client(Iface):
return result.success
if result.e is not None:
raise result.e
+ if result.aze is not None:
+ raise result.aze
raise TApplicationException(TApplicationException.MISSING_RESULT, "getTopology failed: unknown result");
def getUserTopology(self, id):
@@ -701,6 +779,8 @@ class Client(Iface):
return result.success
if result.e is not None:
raise result.e
+ if result.aze is not None:
+ raise result.aze
raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserTopology failed: unknown result");
@@ -715,6 +795,7 @@ class Processor(Iface, TProcessor):
self._processMap["activate"] = Processor.process_activate
self._processMap["deactivate"] = Processor.process_deactivate
self._processMap["rebalance"] = Processor.process_rebalance
+ self._processMap["uploadNewCredentials"] = Processor.process_uploadNewCredentials
self._processMap["beginFileUpload"] = Processor.process_beginFileUpload
self._processMap["uploadChunk"] = Processor.process_uploadChunk
self._processMap["finishFileUpload"] = Processor.process_finishFileUpload
@@ -753,6 +834,8 @@ class Processor(Iface, TProcessor):
result.e = e
except InvalidTopologyException, ite:
result.ite = ite
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("submitTopology", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -769,6 +852,8 @@ class Processor(Iface, TProcessor):
result.e = e
except InvalidTopologyException, ite:
result.ite = ite
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("submitTopologyWithOpts", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -783,6 +868,8 @@ class Processor(Iface, TProcessor):
self._handler.killTopology(args.name)
except NotAliveException, e:
result.e = e
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("killTopology", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -797,6 +884,8 @@ class Processor(Iface, TProcessor):
self._handler.killTopologyWithOpts(args.name, args.options)
except NotAliveException, e:
result.e = e
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("killTopologyWithOpts", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -811,6 +900,8 @@ class Processor(Iface, TProcessor):
self._handler.activate(args.name)
except NotAliveException, e:
result.e = e
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("activate", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -825,6 +916,8 @@ class Processor(Iface, TProcessor):
self._handler.deactivate(args.name)
except NotAliveException, e:
result.e = e
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("deactivate", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -841,17 +934,40 @@ class Processor(Iface, TProcessor):
result.e = e
except InvalidTopologyException, ite:
result.ite = ite
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("rebalance", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_uploadNewCredentials(self, seqid, iprot, oprot):
+ args = uploadNewCredentials_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = uploadNewCredentials_result()
+ try:
+ self._handler.uploadNewCredentials(args.name, args.creds)
+ except NotAliveException, e:
+ result.e = e
+ except InvalidTopologyException, ite:
+ result.ite = ite
+ except AuthorizationException, aze:
+ result.aze = aze
+ oprot.writeMessageBegin("uploadNewCredentials", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_beginFileUpload(self, seqid, iprot, oprot):
args = beginFileUpload_args()
args.read(iprot)
iprot.readMessageEnd()
result = beginFileUpload_result()
- result.success = self._handler.beginFileUpload()
+ try:
+ result.success = self._handler.beginFileUpload()
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("beginFileUpload", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -862,7 +978,10 @@ class Processor(Iface, TProcessor):
args.read(iprot)
iprot.readMessageEnd()
result = uploadChunk_result()
- self._handler.uploadChunk(args.location, args.chunk)
+ try:
+ self._handler.uploadChunk(args.location, args.chunk)
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("uploadChunk", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -873,7 +992,10 @@ class Processor(Iface, TProcessor):
args.read(iprot)
iprot.readMessageEnd()
result = finishFileUpload_result()
- self._handler.finishFileUpload(args.location)
+ try:
+ self._handler.finishFileUpload(args.location)
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("finishFileUpload", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -884,7 +1006,10 @@ class Processor(Iface, TProcessor):
args.read(iprot)
iprot.readMessageEnd()
result = beginFileDownload_result()
- result.success = self._handler.beginFileDownload(args.file)
+ try:
+ result.success = self._handler.beginFileDownload(args.file)
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("beginFileDownload", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -895,7 +1020,10 @@ class Processor(Iface, TProcessor):
args.read(iprot)
iprot.readMessageEnd()
result = downloadChunk_result()
- result.success = self._handler.downloadChunk(args.id)
+ try:
+ result.success = self._handler.downloadChunk(args.id)
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("downloadChunk", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -906,7 +1034,10 @@ class Processor(Iface, TProcessor):
args.read(iprot)
iprot.readMessageEnd()
result = getNimbusConf_result()
- result.success = self._handler.getNimbusConf()
+ try:
+ result.success = self._handler.getNimbusConf()
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("getNimbusConf", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -917,7 +1048,10 @@ class Processor(Iface, TProcessor):
args.read(iprot)
iprot.readMessageEnd()
result = getClusterInfo_result()
- result.success = self._handler.getClusterInfo()
+ try:
+ result.success = self._handler.getClusterInfo()
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("getClusterInfo", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -932,6 +1066,8 @@ class Processor(Iface, TProcessor):
result.success = self._handler.getTopologyInfo(args.id)
except NotAliveException, e:
result.e = e
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("getTopologyInfo", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -946,6 +1082,8 @@ class Processor(Iface, TProcessor):
result.success = self._handler.getTopologyConf(args.id)
except NotAliveException, e:
result.e = e
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("getTopologyConf", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -960,6 +1098,8 @@ class Processor(Iface, TProcessor):
result.success = self._handler.getTopology(args.id)
except NotAliveException, e:
result.e = e
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("getTopology", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -974,6 +1114,8 @@ class Processor(Iface, TProcessor):
result.success = self._handler.getUserTopology(args.id)
except NotAliveException, e:
result.e = e
+ except AuthorizationException, aze:
+ result.aze = aze
oprot.writeMessageBegin("getUserTopology", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -1087,20 +1229,23 @@ class submitTopology_result:
Attributes:
- e
- ite
+ - aze
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'e', (AlreadyAliveException, AlreadyAliveException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ite', (InvalidTopologyException, InvalidTopologyException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 3
)
def __hash__(self):
- return 0 + hash(self.e) + hash(self.ite)
+ return 0 + hash(self.e) + hash(self.ite) + hash(self.aze)
- def __init__(self, e=None, ite=None,):
+ def __init__(self, e=None, ite=None, aze=None,):
self.e = e
self.ite = ite
+ self.aze = aze
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:
@@ -1123,6 +1268,12 @@ class submitTopology_result:
self.ite.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -1141,6 +1292,10 @@ class submitTopology_result:
oprot.writeFieldBegin('ite', TType.STRUCT, 2)
self.ite.write(oprot)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 3)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -1277,20 +1432,23 @@ class submitTopologyWithOpts_result:
Attributes:
- e
- ite
+ - aze
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'e', (AlreadyAliveException, AlreadyAliveException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ite', (InvalidTopologyException, InvalidTopologyException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 3
)
def __hash__(self):
- return 0 + hash(self.e) + hash(self.ite)
+ return 0 + hash(self.e) + hash(self.ite) + hash(self.aze)
- def __init__(self, e=None, ite=None,):
+ def __init__(self, e=None, ite=None, aze=None,):
self.e = e
self.ite = ite
+ self.aze = aze
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:
@@ -1313,6 +1471,12 @@ class submitTopologyWithOpts_result:
self.ite.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -1331,6 +1495,10 @@ class submitTopologyWithOpts_result:
oprot.writeFieldBegin('ite', TType.STRUCT, 2)
self.ite.write(oprot)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 3)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -1416,18 +1584,21 @@ class killTopology_result:
"""
Attributes:
- e
+ - aze
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'e', (NotAliveException, NotAliveException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 2
)
def __hash__(self):
- return 0 + hash(self.e)
+ return 0 + hash(self.e) + hash(self.aze)
- def __init__(self, e=None,):
+ def __init__(self, e=None, aze=None,):
self.e = e
+ self.aze = aze
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:
@@ -1444,6 +1615,12 @@ class killTopology_result:
self.e.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -1458,6 +1635,10 @@ class killTopology_result:
oprot.writeFieldBegin('e', TType.STRUCT, 1)
self.e.write(oprot)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 2)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -1556,18 +1737,21 @@ class killTopologyWithOpts_result:
"""
Attributes:
- e
+ - aze
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'e', (NotAliveException, NotAliveException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 2
)
def __hash__(self):
- return 0 + hash(self.e)
+ return 0 + hash(self.e) + hash(self.aze)
- def __init__(self, e=None,):
+ def __init__(self, e=None, aze=None,):
self.e = e
+ self.aze = aze
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:
@@ -1584,6 +1768,12 @@ class killTopologyWithOpts_result:
self.e.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -1598,6 +1788,10 @@ class killTopologyWithOpts_result:
oprot.writeFieldBegin('e', TType.STRUCT, 1)
self.e.write(oprot)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 2)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -1683,18 +1877,21 @@ class activate_result:
"""
Attributes:
- e
+ - aze
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'e', (NotAliveException, NotAliveException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 2
)
def __hash__(self):
- return 0 + hash(self.e)
+ return 0 + hash(self.e) + hash(self.aze)
- def __init__(self, e=None,):
+ def __init__(self, e=None, aze=None,):
self.e = e
+ self.aze = aze
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:
@@ -1711,6 +1908,12 @@ class activate_result:
self.e.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -1725,6 +1928,10 @@ class activate_result:
oprot.writeFieldBegin('e', TType.STRUCT, 1)
self.e.write(oprot)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 2)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -1810,18 +2017,21 @@ class deactivate_result:
"""
Attributes:
- e
+ - aze
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'e', (NotAliveException, NotAliveException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 2
)
def __hash__(self):
- return 0 + hash(self.e)
+ return 0 + hash(self.e) + hash(self.aze)
- def __init__(self, e=None,):
+ def __init__(self, e=None, aze=None,):
self.e = e
+ self.aze = aze
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:
@@ -1838,6 +2048,12 @@ class deactivate_result:
self.e.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -1852,6 +2068,10 @@ class deactivate_result:
oprot.writeFieldBegin('e', TType.STRUCT, 1)
self.e.write(oprot)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 2)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -1951,20 +2171,23 @@ class rebalance_result:
Attributes:
- e
- ite
+ - aze
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'e', (NotAliveException, NotAliveException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ite', (InvalidTopologyException, InvalidTopologyException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 3
)
def __hash__(self):
- return 0 + hash(self.e) + hash(self.ite)
+ return 0 + hash(self.e) + hash(self.ite) + hash(self.aze)
- def __init__(self, e=None, ite=None,):
+ def __init__(self, e=None, ite=None, aze=None,):
self.e = e
self.ite = ite
+ self.aze = aze
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:
@@ -1987,6 +2210,12 @@ class rebalance_result:
self.ite.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2005,6 +2234,176 @@ class rebalance_result:
oprot.writeFieldBegin('ite', TType.STRUCT, 2)
self.ite.write(oprot)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 3)
+ self.aze.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 uploadNewCredentials_args:
+ """
+ Attributes:
+ - name
+ - creds
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'name', None, None, ), # 1
+ (2, TType.STRUCT, 'creds', (Credentials, Credentials.thrift_spec), None, ), # 2
+ )
+
+ def __hash__(self):
+ return 0 + hash(self.name) + hash(self.creds)
+
+ def __init__(self, name=None, creds=None,):
+ self.name = name
+ self.creds = creds
+
+ 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.name = iprot.readString().decode('utf-8')
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.creds = Credentials()
+ self.creds.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('uploadNewCredentials_args')
+ if self.name is not None:
+ oprot.writeFieldBegin('name', TType.STRING, 1)
+ oprot.writeString(self.name.encode('utf-8'))
+ oprot.writeFieldEnd()
+ if self.creds is not None:
+ oprot.writeFieldBegin('creds', TType.STRUCT, 2)
+ self.creds.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 uploadNewCredentials_result:
+ """
+ Attributes:
+ - e
+ - ite
+ - aze
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'e', (NotAliveException, NotAliveException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'ite', (InvalidTopologyException, InvalidTopologyException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 3
+ )
+
+ def __hash__(self):
+ return 0 + hash(self.e) + hash(self.ite) + hash(self.aze)
+
+ def __init__(self, e=None, ite=None, aze=None,):
+ self.e = e
+ self.ite = ite
+ self.aze = aze
+
+ 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.STRUCT:
+ self.e = NotAliveException()
+ self.e.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.ite = InvalidTopologyException()
+ self.ite.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.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('uploadNewCredentials_result')
+ if self.e is not None:
+ oprot.writeFieldBegin('e', TType.STRUCT, 1)
+ self.e.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ite is not None:
+ oprot.writeFieldBegin('ite', TType.STRUCT, 2)
+ self.ite.write(oprot)
+ oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 3)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2072,17 +2471,20 @@ class beginFileUpload_result:
"""
Attributes:
- success
+ - aze
"""
thrift_spec = (
(0, TType.STRING, 'success', None, None, ), # 0
+ (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
)
def __hash__(self):
- return 0 + hash(self.success)
+ return 0 + hash(self.success) + hash(self.aze)
- def __init__(self, success=None,):
+ def __init__(self, success=None, aze=None,):
self.success = success
+ self.aze = aze
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:
@@ -2098,6 +2500,12 @@ class beginFileUpload_result:
self.success = iprot.readString().decode('utf-8')
else:
iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2112,6 +2520,10 @@ class beginFileUpload_result:
oprot.writeFieldBegin('success', TType.STRING, 0)
oprot.writeString(self.success.encode('utf-8'))
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 1)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2206,12 +2618,21 @@ class uploadChunk_args:
return not (self == other)
class uploadChunk_result:
+ """
+ Attributes:
+ - aze
+ """
thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
)
def __hash__(self):
- return 0
+ return 0 + hash(self.aze)
+
+ def __init__(self, aze=None,):
+ self.aze = aze
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:
@@ -2222,6 +2643,12 @@ class uploadChunk_result:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
+ if fid == 1:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2232,6 +2659,10 @@ class uploadChunk_result:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('uploadChunk_result')
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 1)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2314,12 +2745,21 @@ class finishFileUpload_args:
return not (self == other)
class finishFileUpload_result:
+ """
+ Attributes:
+ - aze
+ """
thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
)
def __hash__(self):
- return 0
+ return 0 + hash(self.aze)
+
+ def __init__(self, aze=None,):
+ self.aze = aze
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:
@@ -2330,6 +2770,12 @@ class finishFileUpload_result:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
+ if fid == 1:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2340,6 +2786,10 @@ class finishFileUpload_result:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('finishFileUpload_result')
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 1)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2425,17 +2875,20 @@ class beginFileDownload_result:
"""
Attributes:
- success
+ - aze
"""
thrift_spec = (
(0, TType.STRING, 'success', None, None, ), # 0
+ (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
)
def __hash__(self):
- return 0 + hash(self.success)
+ return 0 + hash(self.success) + hash(self.aze)
- def __init__(self, success=None,):
+ def __init__(self, success=None, aze=None,):
self.success = success
+ self.aze = aze
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:
@@ -2451,6 +2904,12 @@ class beginFileDownload_result:
self.success = iprot.readString().decode('utf-8')
else:
iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2465,6 +2924,10 @@ class beginFileDownload_result:
oprot.writeFieldBegin('success', TType.STRING, 0)
oprot.writeString(self.success.encode('utf-8'))
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 1)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2550,17 +3013,20 @@ class downloadChunk_result:
"""
Attributes:
- success
+ - aze
"""
thrift_spec = (
(0, TType.STRING, 'success', None, None, ), # 0
+ (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
)
def __hash__(self):
- return 0 + hash(self.success)
+ return 0 + hash(self.success) + hash(self.aze)
- def __init__(self, success=None,):
+ def __init__(self, success=None, aze=None,):
self.success = success
+ self.aze = aze
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:
@@ -2576,6 +3042,12 @@ class downloadChunk_result:
self.success = iprot.readString();
else:
iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2590,6 +3062,10 @@ class downloadChunk_result:
oprot.writeFieldBegin('success', TType.STRING, 0)
oprot.writeString(self.success)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 1)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2657,17 +3133,20 @@ class getNimbusConf_result:
"""
Attributes:
- success
+ - aze
"""
thrift_spec = (
(0, TType.STRING, 'success', None, None, ), # 0
+ (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
)
def __hash__(self):
- return 0 + hash(self.success)
+ return 0 + hash(self.success) + hash(self.aze)
- def __init__(self, success=None,):
+ def __init__(self, success=None, aze=None,):
self.success = success
+ self.aze = aze
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:
@@ -2683,6 +3162,12 @@ class getNimbusConf_result:
self.success = iprot.readString().decode('utf-8')
else:
iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2697,6 +3182,10 @@ class getNimbusConf_result:
oprot.writeFieldBegin('success', TType.STRING, 0)
oprot.writeString(self.success.encode('utf-8'))
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 1)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2764,17 +3253,20 @@ class getClusterInfo_result:
"""
Attributes:
- success
+ - aze
"""
thrift_spec = (
(0, TType.STRUCT, 'success', (ClusterSummary, ClusterSummary.thrift_spec), None, ), # 0
+ (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
)
def __hash__(self):
- return 0 + hash(self.success)
+ return 0 + hash(self.success) + hash(self.aze)
- def __init__(self, success=None,):
+ def __init__(self, success=None, aze=None,):
self.success = success
+ self.aze = aze
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:
@@ -2791,6 +3283,12 @@ class getClusterInfo_result:
self.success.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2805,6 +3303,10 @@ class getClusterInfo_result:
oprot.writeFieldBegin('success', TType.STRUCT, 0)
self.success.write(oprot)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 1)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2891,19 +3393,22 @@ class getTopologyInfo_result:
Attributes:
- success
- e
+ - aze
"""
thrift_spec = (
(0, TType.STRUCT, 'success', (TopologyInfo, TopologyInfo.thrift_spec), None, ), # 0
(1, TType.STRUCT, 'e', (NotAliveException, NotAliveException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 2
)
def __hash__(self):
- return 0 + hash(self.success) + hash(self.e)
+ return 0 + hash(self.success) + hash(self.e) + hash(self.aze)
- def __init__(self, success=None, e=None,):
+ def __init__(self, success=None, e=None, aze=None,):
self.success = success
self.e = e
+ self.aze = aze
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:
@@ -2926,6 +3431,12 @@ class getTopologyInfo_result:
self.e.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2944,6 +3455,10 @@ class getTopologyInfo_result:
oprot.writeFieldBegin('e', TType.STRUCT, 1)
self.e.write(oprot)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 2)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -3030,19 +3545,22 @@ class getTopologyConf_result:
Attributes:
- success
- e
+ - aze
"""
thrift_spec = (
(0, TType.STRING, 'success', None, None, ), # 0
(1, TType.STRUCT, 'e', (NotAliveException, NotAliveException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 2
)
def __hash__(self):
- return 0 + hash(self.success) + hash(self.e)
+ return 0 + hash(self.success) + hash(self.e) + hash(self.aze)
- def __init__(self, success=None, e=None,):
+ def __init__(self, success=None, e=None, aze=None,):
self.success = success
self.e = e
+ self.aze = aze
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:
@@ -3064,6 +3582,12 @@ class getTopologyConf_result:
self.e.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -3082,6 +3606,10 @@ class getTopologyConf_result:
oprot.writeFieldBegin('e', TType.STRUCT, 1)
self.e.write(oprot)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 2)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -3168,19 +3696,22 @@ class getTopology_result:
Attributes:
- success
- e
+ - aze
"""
thrift_spec = (
(0, TType.STRUCT, 'success', (StormTopology, StormTopology.thrift_spec), None, ), # 0
(1, TType.STRUCT, 'e', (NotAliveException, NotAliveException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 2
)
def __hash__(self):
- return 0 + hash(self.success) + hash(self.e)
+ return 0 + hash(self.success) + hash(self.e) + hash(self.aze)
- def __init__(self, success=None, e=None,):
+ def __init__(self, success=None, e=None, aze=None,):
self.success = success
self.e = e
+ self.aze = aze
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:
@@ -3203,6 +3734,12 @@ class getTopology_result:
self.e.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -3221,6 +3758,10 @@ class getTopology_result:
oprot.writeFieldBegin('e', TType.STRUCT, 1)
self.e.write(oprot)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 2)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -3307,19 +3848,22 @@ class getUserTopology_result:
Attributes:
- success
- e
+ - aze
"""
thrift_spec = (
(0, TType.STRUCT, 'success', (StormTopology, StormTopology.thrift_spec), None, ), # 0
(1, TType.STRUCT, 'e', (NotAliveException, NotAliveException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 2
)
def __hash__(self):
- return 0 + hash(self.success) + hash(self.e)
+ return 0 + hash(self.success) + hash(self.e) + hash(self.aze)
- def __init__(self, success=None, e=None,):
+ def __init__(self, success=None, e=None, aze=None,):
self.success = success
self.e = e
+ self.aze = aze
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:
@@ -3342,6 +3886,12 @@ class getUserTopology_result:
self.e.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -3360,6 +3910,10 @@ class getUserTopology_result:
oprot.writeFieldBegin('e', TType.STRUCT, 1)
self.e.write(oprot)
oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 2)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/fe5f41aa/storm-core/src/py/storm/ttypes.py
----------------------------------------------------------------------
diff --git a/storm-core/src/py/storm/ttypes.py b/storm-core/src/py/storm/ttypes.py
index 2c0a50b..8fa34b0 100644
--- a/storm-core/src/py/storm/ttypes.py
+++ b/storm-core/src/py/storm/ttypes.py
@@ -1407,6 +1407,74 @@ class NotAliveException(Exception):
def __ne__(self, other):
return not (self == other)
+class AuthorizationException(Exception):
+ """
+ Attributes:
+ - msg
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'msg', None, None, ), # 1
+ )
+
+ def __hash__(self):
+ return 0 + hash(self.msg)
+
+ def __init__(self, msg=None,):
+ self.msg = msg
+
+ 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.msg = 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('AuthorizationException')
+ if self.msg is not None:
+ oprot.writeFieldBegin('msg', TType.STRING, 1)
+ oprot.writeString(self.msg.encode('utf-8'))
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.msg is None:
+ raise TProtocol.TProtocolException(message='Required field msg is unset!')
+ return
+
+
+ def __str__(self):
+ return repr(self)
+
+ 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 InvalidTopologyException(Exception):
"""
Attributes:
@@ -1485,6 +1553,8 @@ class TopologySummary:
- num_workers
- uptime_secs
- status
+ - sched_status
+ - owner
"""
thrift_spec = (
@@ -1496,12 +1566,519 @@ class TopologySummary:
(5, TType.I32, 'num_workers', None, None, ), # 5
(6, TType.I32, 'uptime_secs', None, None, ), # 6
(7, TType.STRING, 'status', None, None, ), # 7
+ None, # 8
+ None, # 9
+ None, # 10
+ None, # 11
+ None, # 12
+ None, # 13
+ None, # 14
+ None, # 15
+ None, # 16
+ None, # 17
+ None, # 18
+ None, # 19
+ None, # 20
+ None, # 21
+ None, # 22
+ None, # 23
+ None, # 24
+ None, # 25
+ None, # 26
+ None, # 27
+ None, # 28
+ None, # 29
+ None, # 30
+ None, # 31
+ None, # 32
+ None, # 33
+ None, # 34
+ None, # 35
+ None, # 36
+ None, # 37
+ None, # 38
+ None, # 39
+ None, # 40
+ None, # 41
+ None, # 42
+ None, # 43
+ None, # 44
+ None, # 45
+ None, # 46
+ None, # 47
+ None, # 48
+ None, # 49
+ None, # 50
+ None, # 51
+ None, # 52
+ None, # 53
+ None, # 54
+ None, # 55
+ None, # 56
+ None, # 57
+ None, # 58
+ None, # 59
+ None, # 60
+ None, # 61
+ None, # 62
+ None, # 63
+ None, # 64
+ None, # 65
+ None, # 66
+ None, # 67
+ None, # 68
+ None, # 69
+ None, # 70
+ None, # 71
+ None, # 72
+ None, # 73
+ None, # 74
+ None, # 75
+ None, # 76
+ None, # 77
+ None, # 78
+ None, # 79
+ None, # 80
+ None, # 81
+ None, # 82
+ None, # 83
+ None, # 84
+ None, # 85
+ None, # 86
+ None, # 87
+ None, # 88
+ None, # 89
+ None, # 90
+ None, # 91
+ None, # 92
+ None, # 93
+ None, # 94
+ None, # 95
+ None, # 96
+ None, # 97
+ None, # 98
+ None, # 99
+ None, # 100
+ None, # 101
+ None, # 102
+ None, # 103
+ None, # 104
+ None, # 105
+ None, # 106
+ None, # 107
+ None, # 108
+ None, # 109
+ None, # 110
+ None, # 111
+ None, # 112
+ None, # 113
+ None, # 114
+ None, # 115
+ None, # 116
+ None, # 117
+ None, # 118
+ None, # 119
+ None, # 120
+ None, # 121
+ None, # 122
+ None, # 123
+ None, # 124
+ None, # 125
+ None, # 126
+ None, # 127
+ None, # 128
+ None, # 129
+ None, # 130
+ None, # 131
+ None, # 132
+ None, # 133
+ None, # 134
+ None, # 135
+ None, # 136
+ None, # 137
+ None, # 138
+ None, # 139
+ None, # 140
+ None, # 141
+ None, # 142
+ None, # 143
+ None, # 144
+ None, # 145
+ None, # 146
+ None, # 147
+ None, # 148
+ None, # 149
+ None, # 150
+ None, # 151
+ None, # 152
+ None, # 153
+ None, # 154
+ None, # 155
+ None, # 156
+ None, # 157
+ None, # 158
+ None, # 159
+ None, # 160
+ None, # 161
+ None, # 162
+ None, # 163
+ None, # 164
+ None, # 165
+ None, # 166
+ None, # 167
+ None, # 168
+ None, # 169
+ None, # 170
+ None, # 171
+ None, # 172
+ None, # 173
+ None, # 174
+ None, # 175
+ None, # 176
+ None, # 177
+ None, # 178
+ None, # 179
+ None, # 180
+ None, # 181
+ None, # 182
+ None, # 183
+ None, # 184
+ None, # 185
+ None, # 186
+ None, # 187
+ None, # 188
+ None, # 189
+ None, # 190
+ None, # 191
+ None, # 192
+ None, # 193
+ None, # 194
+ None, # 195
+ None, # 196
+ None, # 197
+ None, # 198
+ None, # 199
+ None, # 200
+ None, # 201
+ None, # 202
+ None, # 203
+ None, # 204
+ None, # 205
+ None, # 206
+ None, # 207
+ None, # 208
+ None, # 209
+ None, # 210
+ None, # 211
+ None, # 212
+ None, # 213
+ None, # 214
+ None, # 215
+ None, # 216
+ None, # 217
+ None, # 218
+ None, # 219
+ None, # 220
+ None, # 221
+ None, # 222
+ None, # 223
+ None, # 224
+ None, # 225
+ None, # 226
+ None, # 227
+ None, # 228
+ None, # 229
+ None, # 230
+ None, # 231
+ None, # 232
+ None, # 233
+ None, # 234
+ None, # 235
+ None, # 236
+ None, # 237
+ None, # 238
+ None, # 239
+ None, # 240
+ None, # 241
+ None, # 242
+ None, # 243
+ None, # 244
+ None, # 245
+ None, # 246
+ None, # 247
+ None, # 248
+ None, # 249
+ None, # 250
+ None, # 251
+ None, # 252
+ None, # 253
+ None, # 254
+ None, # 255
+ None, # 256
+ None, # 257
+ None, # 258
+ None, # 259
+ None, # 260
+ None, # 261
+ None, # 262
+ None, # 263
+ None, # 264
+ None, # 265
+ None, # 266
+ None, # 267
+ None, # 268
+ None, # 269
+ None, # 270
+ None, # 271
+ None, # 272
+ None, # 273
+ None, # 274
+ None, # 275
+ None, # 276
+ None, # 277
+ None, # 278
+ None, # 279
+ None, # 280
+ None, # 281
+ None, # 282
+ None, # 283
+ None, # 284
+ None, # 285
+ None, # 286
+ None, # 287
+ None, # 288
+ None, # 289
+ None, # 290
+ None, # 291
+ None, # 292
+ None, # 293
+ None, # 294
+ None, # 295
+ None, # 296
+ None, # 297
+ None, # 298
+ None, # 299
+ None, # 300
+ None, # 301
+ None, # 302
+ None, # 303
+ None, # 304
+ None, # 305
+ None, # 306
+ None, # 307
+ None, # 308
+ None, # 309
+ None, # 310
+ None, # 311
+ None, # 312
+ None, # 313
+ None, # 314
+ None, # 315
+ None, # 316
+ None, # 317
+ None, # 318
+ None, # 319
+ None, # 320
+ None, # 321
+ None, # 322
+ None, # 323
+ None, # 324
+ None, # 325
+ None, # 326
+ None, # 327
+ None, # 328
+ None, # 329
+ None, # 330
+ None, # 331
+ None, # 332
+ None, # 333
+ None, # 334
+ None, # 335
+ None, # 336
+ None, # 337
+ None, # 338
+ None, # 339
+ None, # 340
+ None, # 341
+ None, # 342
+ None, # 343
+ None, # 344
+ None, # 345
+ None, # 346
+ None, # 347
+ None, # 348
+ None, # 349
+ None, # 350
+ None, # 351
+ None, # 352
+ None, # 353
+ None, # 354
+ None, # 355
+ None, # 356
+ None, # 357
+ None, # 358
+ None, # 359
+ None, # 360
+ None, # 361
+ None, # 362
+ None, # 363
+ None, # 364
+ None, # 365
+ None, # 366
+ None, # 367
+ None, # 368
+ None, # 369
+ None, # 370
+ None, # 371
+ None, # 372
+ None, # 373
+ None, # 374
+ None, # 375
+ None, # 376
+ None, # 377
+ None, # 378
+ None, # 379
+ None, # 380
+ None, # 381
+ None, # 382
+ None, # 383
+ None, # 384
+ None, # 385
+ None, # 386
+ None, # 387
+ None, # 388
+ None, # 389
+ None, # 390
+ None, # 391
+ None, # 392
+ None, # 393
+ None, # 394
+ None, # 395
+ None, # 396
+ None, # 397
+ None, # 398
+ None, # 399
+ None, # 400
+ None, # 401
+ None, # 402
+ None, # 403
+ None, # 404
+ None, # 405
+ None, # 406
+ None, # 407
+ None, # 408
+ None, # 409
+ None, # 410
+ None, # 411
+ None, # 412
+ None, # 413
+ None, # 414
+ None, # 415
+ None, # 416
+ None, # 417
+ None, # 418
+ None, # 419
+ None, # 420
+ None, # 421
+ None, # 422
+ None, # 423
+ None, # 424
+ None, # 425
+ None, # 426
+ None, # 427
+ None, # 428
+ None, # 429
+ None, # 430
+ None, # 431
+ None, # 432
+ None, # 433
+ None, # 434
+ None, # 435
+ None, # 436
+ None, # 437
+ None, # 438
+ None, # 439
+ None, # 440
+ None, # 441
+ None, # 442
+ None, # 443
+ None, # 444
+ None, # 445
+ None, # 446
+ None, # 447
+ None, # 448
+ None, # 449
+ None, # 450
+ None, # 451
+ None, # 452
+ None, # 453
+ None, # 454
+ None, # 455
+ None, # 456
+ None, # 457
+ None, # 458
+ None, # 459
+ None, # 460
+ None, # 461
+ None, # 462
+ None, # 463
+ None, # 464
+ None, # 465
+ None, # 466
+ None, # 467
+ None, # 468
+ None, # 469
+ None, # 470
+ None, # 471
+ None, # 472
+ None, # 473
+ None, # 474
+ None, # 475
+ None, # 476
+ None, # 477
+ None, # 478
+ None, # 479
+ None, # 480
+ None, # 481
+ None, # 482
+ None, # 483
+ None, # 484
+ None, # 485
+ None, # 486
+ None, # 487
+ None, # 488
+ None, # 489
+ None, # 490
+ None, # 491
+ None, # 492
+ None, # 493
+ None, # 494
+ None, # 495
+ None, # 496
+ None, # 497
+ None, # 498
+ None, # 499
+ None, # 500
+ None, # 501
+ None, # 502
+ None, # 503
+ None, # 504
+ None, # 505
+ None, # 506
+ None, # 507
+ None, # 508
+ None, # 509
+ None, # 510
+ None, # 511
+ None, # 512
+ (513, TType.STRING, 'sched_status', None, None, ), # 513
+ (514, TType.STRING, 'owner', None, None, ), # 514
)
def __hash__(self):
- return 0 + hash(self.id) + hash(self.name) + hash(self.num_tasks) + hash(self.num_executors) + hash(self.num_workers) + hash(self.uptime_secs) + hash(self.status)
+ return 0 + hash(self.id) + hash(self.name) + hash(self.num_tasks) + hash(self.num_executors) + hash(self.num_workers) + hash(self.uptime_secs) + hash(self.status) + hash(self.sched_status) + hash(self.owner)
- def __init__(self, id=None, name=None, num_tasks=None, num_executors=None, num_workers=None, uptime_secs=None, status=None,):
+ def __init__(self, id=None, name=None, num_tasks=None, num_executors=None, num_workers=None, uptime_secs=None, status=None, sched_status=None, owner=None,):
self.id = id
self.name = name
self.num_tasks = num_tasks
@@ -1509,6 +2086,8 @@ class TopologySummary:
self.num_workers = num_workers
self.uptime_secs = uptime_secs
self.status = status
+ self.sched_status = sched_status
+ self.owner = owner
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:
@@ -1554,6 +2133,16 @@ class TopologySummary:
self.status = iprot.readString().decode('utf-8')
else:
iprot.skip(ftype)
+ elif fid == 513:
+ if ftype == TType.STRING:
+ self.sched_status = iprot.readString().decode('utf-8')
+ else:
+ iprot.skip(ftype)
+ elif fid == 514:
+ if ftype == TType.STRING:
+ self.owner = iprot.readString().decode('utf-8')
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -1592,6 +2181,14 @@ class TopologySummary:
oprot.writeFieldBegin('status', TType.STRING, 7)
oprot.writeString(self.status.encode('utf-8'))
oprot.writeFieldEnd()
+ if self.sched_status is not None:
+ oprot.writeFieldBegin('sched_status', TType.STRING, 513)
+ oprot.writeString(self.sched_status.encode('utf-8'))
+ oprot.writeFieldEnd()
+ if self.owner is not None:
+ oprot.writeFieldBegin('owner', TType.STRING, 514)
+ oprot.writeString(self.owner.encode('utf-8'))
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2749,6 +3346,8 @@ class TopologyInfo:
- executors
- status
- errors
+ - sched_status
+ - owner
"""
thrift_spec = (
@@ -2759,18 +3358,528 @@ class TopologyInfo:
(4, TType.LIST, 'executors', (TType.STRUCT,(ExecutorSummary, ExecutorSummary.thrift_spec)), None, ), # 4
(5, TType.STRING, 'status', None, None, ), # 5
(6, TType.MAP, 'errors', (TType.STRING,None,TType.LIST,(TType.STRUCT,(ErrorInfo, ErrorInfo.thrift_spec))), None, ), # 6
+ None, # 7
+ None, # 8
+ None, # 9
+ None, # 10
+ None, # 11
+ None, # 12
+ None, # 13
+ None, # 14
+ None, # 15
+ None, # 16
+ None, # 17
+ None, # 18
+ None, # 19
+ None, # 20
+ None, # 21
+ None, # 22
+ None, # 23
+ None, # 24
+ None, # 25
+ None, # 26
+ None, # 27
+ None, # 28
+ None, # 29
+ None, # 30
+ None, # 31
+ None, # 32
+ None, # 33
+ None, # 34
+ None, # 35
+ None, # 36
+ None, # 37
+ None, # 38
+ None, # 39
+ None, # 40
+ None, # 41
+ None, # 42
+ None, # 43
+ None, # 44
+ None, # 45
+ None, # 46
+ None, # 47
+ None, # 48
+ None, # 49
+ None, # 50
+ None, # 51
+ None, # 52
+ None, # 53
+ None, # 54
+ None, # 55
+ None, # 56
+ None, # 57
+ None, # 58
+ None, # 59
+ None, # 60
+ None, # 61
+ None, # 62
+ None, # 63
+ None, # 64
+ None, # 65
+ None, # 66
+ None, # 67
+ None, # 68
+ None, # 69
+ None, # 70
+ None, # 71
+ None, # 72
+ None, # 73
+ None, # 74
+ None, # 75
+ None, # 76
+ None, # 77
+ None, # 78
+ None, # 79
+ None, # 80
+ None, # 81
+ None, # 82
+ None, # 83
+ None, # 84
+ None, # 85
+ None, # 86
+ None, # 87
+ None, # 88
+ None, # 89
+ None, # 90
+ None, # 91
+ None, # 92
+ None, # 93
+ None, # 94
+ None, # 95
+ None, # 96
+ None, # 97
+ None, # 98
+ None, # 99
+ None, # 100
+ None, # 101
+ None, # 102
+ None, # 103
+ None, # 104
+ None, # 105
+ None, # 106
+ None, # 107
+ None, # 108
+ None, # 109
+ None, # 110
+ None, # 111
+ None, # 112
+ None, # 113
+ None, # 114
+ None, # 115
+ None, # 116
+ None, # 117
+ None, # 118
+ None, # 119
+ None, # 120
+ None, # 121
+ None, # 122
+ None, # 123
+ None, # 124
+ None, # 125
+ None, # 126
+ None, # 127
+ None, # 128
+ None, # 129
+ None, # 130
+ None, # 131
+ None, # 132
+ None, # 133
+ None, # 134
+ None, # 135
+ None, # 136
+ None, # 137
+ None, # 138
+ None, # 139
+ None, # 140
+ None, # 141
+ None, # 142
+ None, # 143
+ None, # 144
+ None, # 145
+ None, # 146
+ None, # 147
+ None, # 148
+ None, # 149
+ None, # 150
+ None, # 151
+ None, # 152
+ None, # 153
+ None, # 154
+ None, # 155
+ None, # 156
+ None, # 157
+ None, # 158
+ None, # 159
+ None, # 160
+ None, # 161
+ None, # 162
+ None, # 163
+ None, # 164
+ None, # 165
+ None, # 166
+ None, # 167
+ None, # 168
+ None, # 169
+ None, # 170
+ None, # 171
+ None, # 172
+ None, # 173
+ None, # 174
+ None, # 175
+ None, # 176
+ None, # 177
+ None, # 178
+ None, # 179
+ None, # 180
+ None, # 181
+ None, # 182
+ None, # 183
+ None, # 184
+ None, # 185
+ None, # 186
+ None, # 187
+ None, # 188
+ None, # 189
+ None, # 190
+ None, # 191
+ None, # 192
+ None, # 193
+ None, # 194
+ None, # 195
+ None, # 196
+ None, # 197
+ None, # 198
+ None, # 199
+ None, # 200
+ None, # 201
+ None, # 202
+ None, # 203
+ None, # 204
+ None, # 205
+ None, # 206
+ None, # 207
+ None, # 208
+ None, # 209
+ None, # 210
+ None, # 211
+ None, # 212
+ None, # 213
+ None, # 214
+ None, # 215
+ None, # 216
+ None, # 217
+ None, # 218
+ None, # 219
+ None, # 220
+ None, # 221
+ None, # 222
+ None, # 223
+ None, # 224
+ None, # 225
+ None, # 226
+ None, # 227
+ None, # 228
+ None, # 229
+ None, # 230
+ None, # 231
+ None, # 232
+ None, # 233
+ None, # 234
+ None, # 235
+ None, # 236
+ None, # 237
+ None, # 238
+ None, # 239
+ None, # 240
+ None, # 241
+ None, # 242
+ None, # 243
+ None, # 244
+ None, # 245
+ None, # 246
+ None, # 247
+ None, # 248
+ None, # 249
+ None, # 250
+ None, # 251
+ None, # 252
+ None, # 253
+ None, # 254
+ None, # 255
+ None, # 256
+ None, # 257
+ None, # 258
+ None, # 259
+ None, # 260
+ None, # 261
+ None, # 262
+ None, # 263
+ None, # 264
+ None, # 265
+ None, # 266
+ None, # 267
+ None, # 268
+ None, # 269
+ None, # 270
+ None, # 271
+ None, # 272
+ None, # 273
+ None, # 274
+ None, # 275
+ None, # 276
+ None, # 277
+ None, # 278
+ None, # 279
+ None, # 280
+ None, # 281
+ None, # 282
+ None, # 283
+ None, # 284
+ None, # 285
+ None, # 286
+ None, # 287
+ None, # 288
+ None, # 289
+ None, # 290
+ None, # 291
+ None, # 292
+ None, # 293
+ None, # 294
+ None, # 295
+ None, # 296
+ None, # 297
+ None, # 298
+ None, # 299
+ None, # 300
+ None, # 301
+ None, # 302
+ None, # 303
+ None, # 304
+ None, # 305
+ None, # 306
+ None, # 307
+ None, # 308
+ None, # 309
+ None, # 310
+ None, # 311
+ None, # 312
+ None, # 313
+ None, # 314
+ None, # 315
+ None, # 316
+ None, # 317
+ None, # 318
+ None, # 319
+ None, # 320
+ None, # 321
+ None, # 322
+ None, # 323
+ None, # 324
+ None, # 325
+ None, # 326
+ None, # 327
+ None, # 328
+ None, # 329
+ None, # 330
+ None, # 331
+ None, # 332
+ None, # 333
+ None, # 334
+ None, # 335
+ None, # 336
+ None, # 337
+ None, # 338
+ None, # 339
+ None, # 340
+ None, # 341
+ None, # 342
+ None, # 343
+ None, # 344
+ None, # 345
+ None, # 346
+ None, # 347
+ None, # 348
+ None, # 349
+ None, # 350
+ None, # 351
+ None, # 352
+ None, # 353
+ None, # 354
+ None, # 355
+ None, # 356
+ None, # 357
+ None, # 358
+ None, # 359
+ None, # 360
+ None, # 361
+ None, # 362
+ None, # 363
+ None, # 364
+ None, # 365
+ None, # 366
+ None, # 367
+ None, # 368
+ None, # 369
+ None, # 370
+ None, # 371
+ None, # 372
+ None, # 373
+ None, # 374
+ None, # 375
+ None, # 376
+ None, # 377
+ None, # 378
+ None, # 379
+ None, # 380
+ None, # 381
+ None, # 382
+ None, # 383
+ None, # 384
+ None, # 385
+ None, # 386
+ None, # 387
+ None, # 388
+ None, # 389
+ None, # 390
+ None, # 391
+ None, # 392
+ None, # 393
+ None, # 394
+ None, # 395
+ None, # 396
+ None, # 397
+ None, # 398
+ None, # 399
+ None, # 400
+ None, # 401
+ None, # 402
+ None, # 403
+ None, # 404
+ None, # 405
+ None, # 406
+ None, # 407
+ None, # 408
+ None, # 409
+ None, # 410
+ None, # 411
+ None, # 412
+ None, # 413
+ None, # 414
+ None, # 415
+ None, # 416
+ None, # 417
+ None, # 418
+ None, # 419
+ None, # 420
+ None, # 421
+ None, # 422
+ None, # 423
+ None, # 424
+ None, # 425
+ None, # 426
+ None, # 427
+ None, # 428
+ None, # 429
+ None, # 430
+ None, # 431
+ None, # 432
+ None, # 433
+ None, # 434
+ None, # 435
+ None, # 436
+ None, # 437
+ None, # 438
+ None, # 439
+ None, # 440
+ None, # 441
+ None, # 442
+ None, # 443
+ None, # 444
+ None, # 445
+ None, # 446
+ None, # 447
+ None, # 448
+ None, # 449
+ None, # 450
+ None, # 451
+ None, # 452
+ None, # 453
+ None, # 454
+ None, # 455
+ None, # 456
+ None, # 457
+ None, # 458
+ None, # 459
+ None, # 460
+ None, # 461
+ None, # 462
+ None, # 463
+ None, # 464
+ None, # 465
+ None, # 466
+ None, # 467
+ None, # 468
+ None, # 469
+ None, # 470
+ None, # 471
+ None, # 472
+ None, # 473
+ None, # 474
+ None, # 475
+ None, # 476
+ None, # 477
+ None, # 478
+ None, # 479
+ None, # 480
+ None, # 481
+ None, # 482
+ None, # 483
+ None, # 484
+ None, # 485
+ None, # 486
+ None, # 487
+ None, # 488
+ None, # 489
+ None, # 490
+ None, # 491
+ None, # 492
+ None, # 493
+ None, # 494
+ None, # 495
+ None, # 496
+ None, # 497
+ None, # 498
+ None, # 499
+ None, # 500
+ None, # 501
+ None, # 502
+ None, # 503
+ None, # 504
+ None, # 505
+ None, # 506
+ None, # 507
+ None, # 508
+ None, # 509
+ None, # 510
+ None, # 511
+ None, # 512
+ (513, TType.STRING, 'sched_status', None, None, ), # 513
+ (514, TType.STRING, 'owner', None, None, ), # 514
)
def __hash__(self):
- return 0 + hash(self.id) + hash(self.name) + hash(self.uptime_secs) + hash(self.executors) + hash(self.status) + hash(self.errors)
+ return 0 + hash(self.id) + hash(self.name) + hash(self.uptime_secs) + hash(self.executors) + hash(self.status) + hash(self.errors) + hash(self.sched_status) + hash(self.owner)
- def __init__(self, id=None, name=None, uptime_secs=None, executors=None, status=None, errors=None,):
+ def __init__(self, id=None, name=None, uptime_secs=None, executors=None, status=None, errors=None, sched_status=None, owner=None,):
self.id = id
self.name = name
self.uptime_secs = uptime_secs
self.executors = executors
self.status = status
self.errors = errors
+ self.sched_status = sched_status
+ self.owner = owner
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:
@@ -2829,6 +3938,16 @@ class TopologyInfo:
iprot.readMapEnd()
else:
iprot.skip(ftype)
+ elif fid == 513:
+ if ftype == TType.STRING:
+ self.sched_status = iprot.readString().decode('utf-8')
+ else:
+ iprot.skip(ftype)
+ elif fid == 514:
+ if ftype == TType.STRING:
+ self.owner = iprot.readString().decode('utf-8')
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2873,6 +3992,14 @@ class TopologyInfo:
oprot.writeListEnd()
oprot.writeMapEnd()
oprot.writeFieldEnd()
+ if self.sched_status is not None:
+ oprot.writeFieldBegin('sched_status', TType.STRING, 513)
+ oprot.writeString(self.sched_status.encode('utf-8'))
+ oprot.writeFieldEnd()
+ if self.owner is not None:
+ oprot.writeFieldBegin('owner', TType.STRING, 514)
+ oprot.writeString(self.owner.encode('utf-8'))
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -3063,22 +4190,100 @@ class RebalanceOptions:
def __ne__(self, other):
return not (self == other)
+class Credentials:
+ """
+ Attributes:
+ - creds
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.MAP, 'creds', (TType.STRING,None,TType.STRING,None), None, ), # 1
+ )
+
+ def __hash__(self):
+ return 0 + hash(self.creds)
+
+ def __init__(self, creds=None,):
+ self.creds = creds
+
+ 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.MAP:
+ self.creds = {}
+ (_ktype293, _vtype294, _size292 ) = iprot.readMapBegin()
+ for _i296 in xrange(_size292):
+ _key297 = iprot.readString().decode('utf-8')
+ _val298 = iprot.readString().decode('utf-8')
+ self.creds[_key297] = _val298
+ iprot.readMapEnd()
+ 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('Credentials')
+ if self.creds is not None:
+ oprot.writeFieldBegin('creds', TType.MAP, 1)
+ oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.creds))
+ for kiter299,viter300 in self.creds.items():
+ oprot.writeString(kiter299.encode('utf-8'))
+ oprot.writeString(viter300.encode('utf-8'))
+ oprot.writeMapEnd()
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.creds is None:
+ raise TProtocol.TProtocolException(message='Required field creds is unset!')
+ 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 SubmitOptions:
"""
Attributes:
- initial_status
+ - creds
"""
thrift_spec = (
None, # 0
(1, TType.I32, 'initial_status', None, None, ), # 1
+ (2, TType.STRUCT, 'creds', (Credentials, Credentials.thrift_spec), None, ), # 2
)
def __hash__(self):
- return 0 + hash(self.initial_status)
+ return 0 + hash(self.initial_status) + hash(self.creds)
- def __init__(self, initial_status=None,):
+ def __init__(self, initial_status=None, creds=None,):
self.initial_status = initial_status
+ self.creds = creds
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:
@@ -3094,6 +4299,12 @@ class SubmitOptions:
self.initial_status = iprot.readI32();
else:
iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.creds = Credentials()
+ self.creds.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -3108,6 +4319,10 @@ class SubmitOptions:
oprot.writeFieldBegin('initial_status', TType.I32, 1)
oprot.writeI32(self.initial_status)
oprot.writeFieldEnd()
+ if self.creds is not None:
+ oprot.writeFieldBegin('creds', TType.STRUCT, 2)
+ self.creds.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/fe5f41aa/storm-core/src/storm.thrift
----------------------------------------------------------------------
diff --git a/storm-core/src/storm.thrift b/storm-core/src/storm.thrift
index 3c54d30..679d29e 100644
--- a/storm-core/src/storm.thrift
+++ b/storm-core/src/storm.thrift
@@ -127,6 +127,10 @@ exception NotAliveException {
1: required string msg;
}
+exception AuthorizationException {
+ 1: required string msg;
+}
+
exception InvalidTopologyException {
1: required string msg;
}
@@ -139,6 +143,8 @@ struct TopologySummary {
5: required i32 num_workers;
6: required i32 uptime_secs;
7: required string status;
+513: optional string sched_status;
+514: optional string owner;
}
struct SupervisorSummary {
@@ -208,6 +214,8 @@ struct TopologyInfo {
4: required list<ExecutorSummary> executors;
5: required string status;
6: required map<string, list<ErrorInfo>> errors;
+513: optional string sched_status;
+514: optional string owner;
}
struct KillOptions {
@@ -220,42 +228,48 @@ struct RebalanceOptions {
3: optional map<string, i32> num_executors;
}
+struct Credentials {
+ 1: required map<string,string> creds;
+}
+
enum TopologyInitialStatus {
ACTIVE = 1,
INACTIVE = 2
}
struct SubmitOptions {
1: required TopologyInitialStatus initial_status;
+ 2: optional Credentials creds;
}
service Nimbus {
- void submitTopology(1: string name, 2: string uploadedJarLocation, 3: string jsonConf, 4: StormTopology topology) throws (1: AlreadyAliveException e, 2: InvalidTopologyException ite);
- void submitTopologyWithOpts(1: string name, 2: string uploadedJarLocation, 3: string jsonConf, 4: StormTopology topology, 5: SubmitOptions options) throws (1: AlreadyAliveException e, 2: InvalidTopologyException ite);
- void killTopology(1: string name) throws (1: NotAliveException e);
- void killTopologyWithOpts(1: string name, 2: KillOptions options) throws (1: NotAliveException e);
- void activate(1: string name) throws (1: NotAliveException e);
- void deactivate(1: string name) throws (1: NotAliveException e);
- void rebalance(1: string name, 2: RebalanceOptions options) throws (1: NotAliveException e, 2: InvalidTopologyException ite);
+ void submitTopology(1: string name, 2: string uploadedJarLocation, 3: string jsonConf, 4: StormTopology topology) throws (1: AlreadyAliveException e, 2: InvalidTopologyException ite, 3: AuthorizationException aze);
+ void submitTopologyWithOpts(1: string name, 2: string uploadedJarLocation, 3: string jsonConf, 4: StormTopology topology, 5: SubmitOptions options) throws (1: AlreadyAliveException e, 2: InvalidTopologyException ite, 3: AuthorizationException aze);
+ void killTopology(1: string name) throws (1: NotAliveException e, 2: AuthorizationException aze);
+ void killTopologyWithOpts(1: string name, 2: KillOptions options) throws (1: NotAliveException e, 2: AuthorizationException aze);
+ void activate(1: string name) throws (1: NotAliveException e, 2: AuthorizationException aze);
+ void deactivate(1: string name) throws (1: NotAliveException e, 2: AuthorizationException aze);
+ void rebalance(1: string name, 2: RebalanceOptions options) throws (1: NotAliveException e, 2: InvalidTopologyException ite, 3: AuthorizationException aze);
+ void uploadNewCredentials(1: string name, 2: Credentials creds) throws (1: NotAliveException e, 2: InvalidTopologyException ite, 3: AuthorizationException aze);
// need to add functions for asking about status of storms, what nodes they're running on, looking at task logs
- string beginFileUpload();
- void uploadChunk(1: string location, 2: binary chunk);
- void finishFileUpload(1: string location);
+ string beginFileUpload() throws (1: AuthorizationException aze);
+ void uploadChunk(1: string location, 2: binary chunk) throws (1: AuthorizationException aze);
+ void finishFileUpload(1: string location) throws (1: AuthorizationException aze);
- string beginFileDownload(1: string file);
+ string beginFileDownload(1: string file) throws (1: AuthorizationException aze);
//can stop downloading chunks when receive 0-length byte array back
- binary downloadChunk(1: string id);
+ binary downloadChunk(1: string id) throws (1: AuthorizationException aze);
// returns json
- string getNimbusConf();
+ string getNimbusConf() throws (1: AuthorizationException aze);
// stats functions
- ClusterSummary getClusterInfo();
- TopologyInfo getTopologyInfo(1: string id) throws (1: NotAliveException e);
+ ClusterSummary getClusterInfo() throws (1: AuthorizationException aze);
+ TopologyInfo getTopologyInfo(1: string id) throws (1: NotAliveException e, 2: AuthorizationException aze);
//returns json
- string getTopologyConf(1: string id) throws (1: NotAliveException e);
- StormTopology getTopology(1: string id) throws (1: NotAliveException e);
- StormTopology getUserTopology(1: string id) throws (1: NotAliveException e);
+ string getTopologyConf(1: string id) throws (1: NotAliveException e, 2: AuthorizationException aze);
+ StormTopology getTopology(1: string id) throws (1: NotAliveException e, 2: AuthorizationException aze);
+ StormTopology getUserTopology(1: string id) throws (1: NotAliveException e, 2: AuthorizationException aze);
}
struct DRPCRequest {
@@ -268,11 +282,11 @@ exception DRPCExecutionException {
}
service DistributedRPC {
- string execute(1: string functionName, 2: string funcArgs) throws (1: DRPCExecutionException e);
+ string execute(1: string functionName, 2: string funcArgs) throws (1: DRPCExecutionException e, 2: AuthorizationException aze);
}
service DistributedRPCInvocations {
- void result(1: string id, 2: string result);
- DRPCRequest fetchRequest(1: string functionName);
- void failRequest(1: string id);
+ void result(1: string id, 2: string result) throws (1: AuthorizationException aze);
+ DRPCRequest fetchRequest(1: string functionName) throws (1: AuthorizationException aze);
+ void failRequest(1: string id) throws (1: AuthorizationException aze);
}
http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/fe5f41aa/storm-core/src/ui/public/css/style.css
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/css/style.css b/storm-core/src/ui/public/css/style.css
index 6c7c119..29a45eb 100644
--- a/storm-core/src/ui/public/css/style.css
+++ b/storm-core/src/ui/public/css/style.css
@@ -19,8 +19,14 @@
display: none;
}
+.ui-user {
+ float: right;
+ padding: 0.5em;
+}
+
body {
color: #808080;
+ padding: 0.2em;
}
table {