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 2015/12/04 16:03:58 UTC
[03/17] storm git commit: Blobstore API STORM- 876
http://git-wip-us.apache.org/repos/asf/storm/blob/7029aee5/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 c2bb9ac..3b680ec 100644
--- a/storm-core/src/py/storm/Nimbus.py
+++ b/storm-core/src/py/storm/Nimbus.py
@@ -151,6 +151,108 @@ class Iface:
"""
pass
+ def beginCreateBlob(self, key, meta):
+ """
+ Parameters:
+ - key
+ - meta
+ """
+ pass
+
+ def beginUpdateBlob(self, key):
+ """
+ Parameters:
+ - key
+ """
+ pass
+
+ def uploadBlobChunk(self, session, chunk):
+ """
+ Parameters:
+ - session
+ - chunk
+ """
+ pass
+
+ def finishBlobUpload(self, session):
+ """
+ Parameters:
+ - session
+ """
+ pass
+
+ def cancelBlobUpload(self, session):
+ """
+ Parameters:
+ - session
+ """
+ pass
+
+ def getBlobMeta(self, key):
+ """
+ Parameters:
+ - key
+ """
+ pass
+
+ def setBlobMeta(self, key, meta):
+ """
+ Parameters:
+ - key
+ - meta
+ """
+ pass
+
+ def beginBlobDownload(self, key):
+ """
+ Parameters:
+ - key
+ """
+ pass
+
+ def downloadBlobChunk(self, session):
+ """
+ Parameters:
+ - session
+ """
+ pass
+
+ def deleteBlob(self, key):
+ """
+ Parameters:
+ - key
+ """
+ pass
+
+ def listBlobs(self, session):
+ """
+ Parameters:
+ - session
+ """
+ pass
+
+ def getBlobReplication(self, key):
+ """
+ Parameters:
+ - key
+ """
+ pass
+
+ def updateBlobReplication(self, key, replication):
+ """
+ Parameters:
+ - key
+ - replication
+ """
+ pass
+
+ def createStateInZookeeper(self, key):
+ """
+ Parameters:
+ - key
+ """
+ pass
+
def beginFileUpload(self):
pass
@@ -728,18 +830,25 @@ class Client(Iface):
raise result.aze
return
- def beginFileUpload(self):
- self.send_beginFileUpload()
- return self.recv_beginFileUpload()
-
- def send_beginFileUpload(self):
- self._oprot.writeMessageBegin('beginFileUpload', TMessageType.CALL, self._seqid)
- args = beginFileUpload_args()
+ def beginCreateBlob(self, key, meta):
+ """
+ Parameters:
+ - key
+ - meta
+ """
+ self.send_beginCreateBlob(key, meta)
+ return self.recv_beginCreateBlob()
+
+ def send_beginCreateBlob(self, key, meta):
+ self._oprot.writeMessageBegin('beginCreateBlob', TMessageType.CALL, self._seqid)
+ args = beginCreateBlob_args()
+ args.key = key
+ args.meta = meta
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_beginFileUpload(self):
+ def recv_beginCreateBlob(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -747,34 +856,34 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = beginFileUpload_result()
+ result = beginCreateBlob_result()
result.read(iprot)
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")
+ if result.kae is not None:
+ raise result.kae
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "beginCreateBlob failed: unknown result")
- def uploadChunk(self, location, chunk):
+ def beginUpdateBlob(self, key):
"""
Parameters:
- - location
- - chunk
+ - key
"""
- self.send_uploadChunk(location, chunk)
- self.recv_uploadChunk()
+ self.send_beginUpdateBlob(key)
+ return self.recv_beginUpdateBlob()
- def send_uploadChunk(self, location, chunk):
- self._oprot.writeMessageBegin('uploadChunk', TMessageType.CALL, self._seqid)
- args = uploadChunk_args()
- args.location = location
- args.chunk = chunk
+ def send_beginUpdateBlob(self, key):
+ self._oprot.writeMessageBegin('beginUpdateBlob', TMessageType.CALL, self._seqid)
+ args = beginUpdateBlob_args()
+ args.key = key
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_uploadChunk(self):
+ def recv_beginUpdateBlob(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -782,30 +891,36 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = uploadChunk_result()
+ result = beginUpdateBlob_result()
result.read(iprot)
iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
if result.aze is not None:
raise result.aze
- return
+ if result.knf is not None:
+ raise result.knf
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "beginUpdateBlob failed: unknown result")
- def finishFileUpload(self, location):
+ def uploadBlobChunk(self, session, chunk):
"""
Parameters:
- - location
+ - session
+ - chunk
"""
- self.send_finishFileUpload(location)
- self.recv_finishFileUpload()
+ self.send_uploadBlobChunk(session, chunk)
+ self.recv_uploadBlobChunk()
- def send_finishFileUpload(self, location):
- self._oprot.writeMessageBegin('finishFileUpload', TMessageType.CALL, self._seqid)
- args = finishFileUpload_args()
- args.location = location
+ def send_uploadBlobChunk(self, session, chunk):
+ self._oprot.writeMessageBegin('uploadBlobChunk', TMessageType.CALL, self._seqid)
+ args = uploadBlobChunk_args()
+ args.session = session
+ args.chunk = chunk
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_finishFileUpload(self):
+ def recv_uploadBlobChunk(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -813,30 +928,30 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = finishFileUpload_result()
+ result = uploadBlobChunk_result()
result.read(iprot)
iprot.readMessageEnd()
if result.aze is not None:
raise result.aze
return
- def beginFileDownload(self, file):
+ def finishBlobUpload(self, session):
"""
Parameters:
- - file
+ - session
"""
- self.send_beginFileDownload(file)
- return self.recv_beginFileDownload()
+ self.send_finishBlobUpload(session)
+ self.recv_finishBlobUpload()
- def send_beginFileDownload(self, file):
- self._oprot.writeMessageBegin('beginFileDownload', TMessageType.CALL, self._seqid)
- args = beginFileDownload_args()
- args.file = file
+ def send_finishBlobUpload(self, session):
+ self._oprot.writeMessageBegin('finishBlobUpload', TMessageType.CALL, self._seqid)
+ args = finishBlobUpload_args()
+ args.session = session
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_beginFileDownload(self):
+ def recv_finishBlobUpload(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -844,32 +959,30 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = beginFileDownload_result()
+ result = finishBlobUpload_result()
result.read(iprot)
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")
+ return
- def downloadChunk(self, id):
+ def cancelBlobUpload(self, session):
"""
Parameters:
- - id
+ - session
"""
- self.send_downloadChunk(id)
- return self.recv_downloadChunk()
+ self.send_cancelBlobUpload(session)
+ self.recv_cancelBlobUpload()
- def send_downloadChunk(self, id):
- self._oprot.writeMessageBegin('downloadChunk', TMessageType.CALL, self._seqid)
- args = downloadChunk_args()
- args.id = id
+ def send_cancelBlobUpload(self, session):
+ self._oprot.writeMessageBegin('cancelBlobUpload', TMessageType.CALL, self._seqid)
+ args = cancelBlobUpload_args()
+ args.session = session
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_downloadChunk(self):
+ def recv_cancelBlobUpload(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -877,27 +990,30 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = downloadChunk_result()
+ result = cancelBlobUpload_result()
result.read(iprot)
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")
+ return
- def getNimbusConf(self):
- self.send_getNimbusConf()
- return self.recv_getNimbusConf()
+ def getBlobMeta(self, key):
+ """
+ Parameters:
+ - key
+ """
+ self.send_getBlobMeta(key)
+ return self.recv_getBlobMeta()
- def send_getNimbusConf(self):
- self._oprot.writeMessageBegin('getNimbusConf', TMessageType.CALL, self._seqid)
- args = getNimbusConf_args()
+ def send_getBlobMeta(self, key):
+ self._oprot.writeMessageBegin('getBlobMeta', TMessageType.CALL, self._seqid)
+ args = getBlobMeta_args()
+ args.key = key
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_getNimbusConf(self):
+ def recv_getBlobMeta(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -905,27 +1021,36 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = getNimbusConf_result()
+ result = getBlobMeta_result()
result.read(iprot)
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):
- self.send_getClusterInfo()
- return self.recv_getClusterInfo()
+ if result.knf is not None:
+ raise result.knf
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getBlobMeta failed: unknown result")
- def send_getClusterInfo(self):
- self._oprot.writeMessageBegin('getClusterInfo', TMessageType.CALL, self._seqid)
- args = getClusterInfo_args()
+ def setBlobMeta(self, key, meta):
+ """
+ Parameters:
+ - key
+ - meta
+ """
+ self.send_setBlobMeta(key, meta)
+ self.recv_setBlobMeta()
+
+ def send_setBlobMeta(self, key, meta):
+ self._oprot.writeMessageBegin('setBlobMeta', TMessageType.CALL, self._seqid)
+ args = setBlobMeta_args()
+ args.key = key
+ args.meta = meta
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_getClusterInfo(self):
+ def recv_setBlobMeta(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -933,32 +1058,32 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = getClusterInfo_result()
+ result = setBlobMeta_result()
result.read(iprot)
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")
+ if result.knf is not None:
+ raise result.knf
+ return
- def getTopologyInfo(self, id):
+ def beginBlobDownload(self, key):
"""
Parameters:
- - id
+ - key
"""
- self.send_getTopologyInfo(id)
- return self.recv_getTopologyInfo()
+ self.send_beginBlobDownload(key)
+ return self.recv_beginBlobDownload()
- def send_getTopologyInfo(self, id):
- self._oprot.writeMessageBegin('getTopologyInfo', TMessageType.CALL, self._seqid)
- args = getTopologyInfo_args()
- args.id = id
+ def send_beginBlobDownload(self, key):
+ self._oprot.writeMessageBegin('beginBlobDownload', TMessageType.CALL, self._seqid)
+ args = beginBlobDownload_args()
+ args.key = key
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_getTopologyInfo(self):
+ def recv_beginBlobDownload(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -966,36 +1091,34 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = getTopologyInfo_result()
+ result = beginBlobDownload_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
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")
+ if result.knf is not None:
+ raise result.knf
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "beginBlobDownload failed: unknown result")
- def getTopologyInfoWithOpts(self, id, options):
+ def downloadBlobChunk(self, session):
"""
Parameters:
- - id
- - options
+ - session
"""
- self.send_getTopologyInfoWithOpts(id, options)
- return self.recv_getTopologyInfoWithOpts()
+ self.send_downloadBlobChunk(session)
+ return self.recv_downloadBlobChunk()
- def send_getTopologyInfoWithOpts(self, id, options):
- self._oprot.writeMessageBegin('getTopologyInfoWithOpts', TMessageType.CALL, self._seqid)
- args = getTopologyInfoWithOpts_args()
- args.id = id
- args.options = options
+ def send_downloadBlobChunk(self, session):
+ self._oprot.writeMessageBegin('downloadBlobChunk', TMessageType.CALL, self._seqid)
+ args = downloadBlobChunk_args()
+ args.session = session
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_getTopologyInfoWithOpts(self):
+ def recv_downloadBlobChunk(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -1003,38 +1126,32 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = getTopologyInfoWithOpts_result()
+ result = downloadBlobChunk_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
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, "getTopologyInfoWithOpts failed: unknown result")
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "downloadBlobChunk failed: unknown result")
- def getTopologyPageInfo(self, id, window, is_include_sys):
+ def deleteBlob(self, key):
"""
Parameters:
- - id
- - window
- - is_include_sys
+ - key
"""
- self.send_getTopologyPageInfo(id, window, is_include_sys)
- return self.recv_getTopologyPageInfo()
+ self.send_deleteBlob(key)
+ self.recv_deleteBlob()
- def send_getTopologyPageInfo(self, id, window, is_include_sys):
- self._oprot.writeMessageBegin('getTopologyPageInfo', TMessageType.CALL, self._seqid)
- args = getTopologyPageInfo_args()
- args.id = id
- args.window = window
- args.is_include_sys = is_include_sys
+ def send_deleteBlob(self, key):
+ self._oprot.writeMessageBegin('deleteBlob', TMessageType.CALL, self._seqid)
+ args = deleteBlob_args()
+ args.key = key
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_getTopologyPageInfo(self):
+ def recv_deleteBlob(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -1042,40 +1159,32 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = getTopologyPageInfo_result()
+ result = deleteBlob_result()
result.read(iprot)
iprot.readMessageEnd()
- if result.success is not None:
- 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, "getTopologyPageInfo failed: unknown result")
+ if result.knf is not None:
+ raise result.knf
+ return
- def getComponentPageInfo(self, topology_id, component_id, window, is_include_sys):
+ def listBlobs(self, session):
"""
Parameters:
- - topology_id
- - component_id
- - window
- - is_include_sys
+ - session
"""
- self.send_getComponentPageInfo(topology_id, component_id, window, is_include_sys)
- return self.recv_getComponentPageInfo()
+ self.send_listBlobs(session)
+ return self.recv_listBlobs()
- def send_getComponentPageInfo(self, topology_id, component_id, window, is_include_sys):
- self._oprot.writeMessageBegin('getComponentPageInfo', TMessageType.CALL, self._seqid)
- args = getComponentPageInfo_args()
- args.topology_id = topology_id
- args.component_id = component_id
- args.window = window
- args.is_include_sys = is_include_sys
+ def send_listBlobs(self, session):
+ self._oprot.writeMessageBegin('listBlobs', TMessageType.CALL, self._seqid)
+ args = listBlobs_args()
+ args.session = session
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_getComponentPageInfo(self):
+ def recv_listBlobs(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -1083,34 +1192,30 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = getComponentPageInfo_result()
+ result = listBlobs_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
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, "getComponentPageInfo failed: unknown result")
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "listBlobs failed: unknown result")
- def getTopologyConf(self, id):
+ def getBlobReplication(self, key):
"""
Parameters:
- - id
+ - key
"""
- self.send_getTopologyConf(id)
- return self.recv_getTopologyConf()
+ self.send_getBlobReplication(key)
+ return self.recv_getBlobReplication()
- def send_getTopologyConf(self, id):
- self._oprot.writeMessageBegin('getTopologyConf', TMessageType.CALL, self._seqid)
- args = getTopologyConf_args()
- args.id = id
+ def send_getBlobReplication(self, key):
+ self._oprot.writeMessageBegin('getBlobReplication', TMessageType.CALL, self._seqid)
+ args = getBlobReplication_args()
+ args.key = key
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_getTopologyConf(self):
+ def recv_getBlobReplication(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -1118,36 +1223,36 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = getTopologyConf_result()
+ result = getBlobReplication_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
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")
+ if result.knf is not None:
+ raise result.knf
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getBlobReplication failed: unknown result")
- def getTopology(self, id):
+ def updateBlobReplication(self, key, replication):
"""
- Returns the compiled topology that contains ackers and metrics consumsers. Compare {@link #getUserTopology(String id)}.
-
Parameters:
- - id
+ - key
+ - replication
"""
- self.send_getTopology(id)
- return self.recv_getTopology()
-
- def send_getTopology(self, id):
- self._oprot.writeMessageBegin('getTopology', TMessageType.CALL, self._seqid)
- args = getTopology_args()
- args.id = id
+ self.send_updateBlobReplication(key, replication)
+ return self.recv_updateBlobReplication()
+
+ def send_updateBlobReplication(self, key, replication):
+ self._oprot.writeMessageBegin('updateBlobReplication', TMessageType.CALL, self._seqid)
+ args = updateBlobReplication_args()
+ args.key = key
+ args.replication = replication
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_getTopology(self):
+ def recv_updateBlobReplication(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -1155,36 +1260,34 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = getTopology_result()
+ result = updateBlobReplication_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
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")
+ if result.knf is not None:
+ raise result.knf
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "updateBlobReplication failed: unknown result")
- def getUserTopology(self, id):
+ def createStateInZookeeper(self, key):
"""
- Returns the user specified topology as submitted originally. Compare {@link #getTopology(String id)}.
-
Parameters:
- - id
+ - key
"""
- self.send_getUserTopology(id)
- return self.recv_getUserTopology()
+ self.send_createStateInZookeeper(key)
+ self.recv_createStateInZookeeper()
- def send_getUserTopology(self, id):
- self._oprot.writeMessageBegin('getUserTopology', TMessageType.CALL, self._seqid)
- args = getUserTopology_args()
- args.id = id
+ def send_createStateInZookeeper(self, key):
+ self._oprot.writeMessageBegin('createStateInZookeeper', TMessageType.CALL, self._seqid)
+ args = createStateInZookeeper_args()
+ args.key = key
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_getUserTopology(self):
+ def recv_createStateInZookeeper(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -1192,34 +1295,58 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = getUserTopology_result()
+ result = createStateInZookeeper_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ return
+
+ def beginFileUpload(self):
+ self.send_beginFileUpload()
+ return self.recv_beginFileUpload()
+
+ def send_beginFileUpload(self):
+ self._oprot.writeMessageBegin('beginFileUpload', TMessageType.CALL, self._seqid)
+ args = beginFileUpload_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_beginFileUpload(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = beginFileUpload_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
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")
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "beginFileUpload failed: unknown result")
- def getTopologyHistory(self, user):
+ def uploadChunk(self, location, chunk):
"""
Parameters:
- - user
+ - location
+ - chunk
"""
- self.send_getTopologyHistory(user)
- return self.recv_getTopologyHistory()
+ self.send_uploadChunk(location, chunk)
+ self.recv_uploadChunk()
- def send_getTopologyHistory(self, user):
- self._oprot.writeMessageBegin('getTopologyHistory', TMessageType.CALL, self._seqid)
- args = getTopologyHistory_args()
- args.user = user
+ def send_uploadChunk(self, location, chunk):
+ self._oprot.writeMessageBegin('uploadChunk', TMessageType.CALL, self._seqid)
+ args = uploadChunk_args()
+ args.location = location
+ args.chunk = chunk
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_getTopologyHistory(self):
+ def recv_uploadChunk(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
@@ -1227,753 +1354,3612 @@ class Client(Iface):
x.read(iprot)
iprot.readMessageEnd()
raise x
- result = getTopologyHistory_result()
+ result = uploadChunk_result()
result.read(iprot)
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, "getTopologyHistory failed: unknown result")
+ return
+ def finishFileUpload(self, location):
+ """
+ Parameters:
+ - location
+ """
+ self.send_finishFileUpload(location)
+ self.recv_finishFileUpload()
-class Processor(Iface, TProcessor):
- def __init__(self, handler):
- self._handler = handler
- self._processMap = {}
- self._processMap["submitTopology"] = Processor.process_submitTopology
- self._processMap["submitTopologyWithOpts"] = Processor.process_submitTopologyWithOpts
- self._processMap["killTopology"] = Processor.process_killTopology
- self._processMap["killTopologyWithOpts"] = Processor.process_killTopologyWithOpts
- self._processMap["activate"] = Processor.process_activate
- self._processMap["deactivate"] = Processor.process_deactivate
- self._processMap["rebalance"] = Processor.process_rebalance
- self._processMap["setLogConfig"] = Processor.process_setLogConfig
- self._processMap["getLogConfig"] = Processor.process_getLogConfig
- self._processMap["debug"] = Processor.process_debug
- self._processMap["setWorkerProfiler"] = Processor.process_setWorkerProfiler
- self._processMap["getComponentPendingProfileActions"] = Processor.process_getComponentPendingProfileActions
- self._processMap["uploadNewCredentials"] = Processor.process_uploadNewCredentials
- self._processMap["beginFileUpload"] = Processor.process_beginFileUpload
- self._processMap["uploadChunk"] = Processor.process_uploadChunk
- self._processMap["finishFileUpload"] = Processor.process_finishFileUpload
- self._processMap["beginFileDownload"] = Processor.process_beginFileDownload
- self._processMap["downloadChunk"] = Processor.process_downloadChunk
- self._processMap["getNimbusConf"] = Processor.process_getNimbusConf
- self._processMap["getClusterInfo"] = Processor.process_getClusterInfo
- self._processMap["getTopologyInfo"] = Processor.process_getTopologyInfo
- self._processMap["getTopologyInfoWithOpts"] = Processor.process_getTopologyInfoWithOpts
- self._processMap["getTopologyPageInfo"] = Processor.process_getTopologyPageInfo
- self._processMap["getComponentPageInfo"] = Processor.process_getComponentPageInfo
- self._processMap["getTopologyConf"] = Processor.process_getTopologyConf
- self._processMap["getTopology"] = Processor.process_getTopology
- self._processMap["getUserTopology"] = Processor.process_getUserTopology
- self._processMap["getTopologyHistory"] = Processor.process_getTopologyHistory
+ def send_finishFileUpload(self, location):
+ self._oprot.writeMessageBegin('finishFileUpload', TMessageType.CALL, self._seqid)
+ args = finishFileUpload_args()
+ args.location = location
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
- def process(self, iprot, oprot):
- (name, type, seqid) = iprot.readMessageBegin()
- if name not in self._processMap:
- iprot.skip(TType.STRUCT)
+ def recv_finishFileUpload(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
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_submitTopology(self, seqid, iprot, oprot):
- args = submitTopology_args()
- args.read(iprot)
+ raise x
+ result = finishFileUpload_result()
+ result.read(iprot)
iprot.readMessageEnd()
- result = submitTopology_result()
- try:
- self._handler.submitTopology(args.name, args.uploadedJarLocation, args.jsonConf, args.topology)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AlreadyAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except InvalidTopologyException as ite:
- msg_type = TMessageType.REPLY
- result.ite = ite
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("submitTopology", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ if result.aze is not None:
+ raise result.aze
+ return
- def process_submitTopologyWithOpts(self, seqid, iprot, oprot):
- args = submitTopologyWithOpts_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = submitTopologyWithOpts_result()
- try:
- self._handler.submitTopologyWithOpts(args.name, args.uploadedJarLocation, args.jsonConf, args.topology, args.options)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AlreadyAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except InvalidTopologyException as ite:
- msg_type = TMessageType.REPLY
- result.ite = ite
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("submitTopologyWithOpts", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def beginFileDownload(self, file):
+ """
+ Parameters:
+ - file
+ """
+ self.send_beginFileDownload(file)
+ return self.recv_beginFileDownload()
- def process_killTopology(self, seqid, iprot, oprot):
- args = killTopology_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = killTopology_result()
- try:
- self._handler.killTopology(args.name)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("killTopology", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def send_beginFileDownload(self, file):
+ self._oprot.writeMessageBegin('beginFileDownload', TMessageType.CALL, self._seqid)
+ args = beginFileDownload_args()
+ args.file = file
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
- def process_killTopologyWithOpts(self, seqid, iprot, oprot):
- args = killTopologyWithOpts_args()
- args.read(iprot)
+ def recv_beginFileDownload(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = beginFileDownload_result()
+ result.read(iprot)
iprot.readMessageEnd()
- result = killTopologyWithOpts_result()
- try:
- self._handler.killTopologyWithOpts(args.name, args.options)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("killTopologyWithOpts", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ 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 process_activate(self, seqid, iprot, oprot):
- args = activate_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = activate_result()
- try:
- self._handler.activate(args.name)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("activate", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def downloadChunk(self, id):
+ """
+ Parameters:
+ - id
+ """
+ self.send_downloadChunk(id)
+ return self.recv_downloadChunk()
- def process_deactivate(self, seqid, iprot, oprot):
- args = deactivate_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = deactivate_result()
- try:
- self._handler.deactivate(args.name)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("deactivate", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def send_downloadChunk(self, id):
+ self._oprot.writeMessageBegin('downloadChunk', TMessageType.CALL, self._seqid)
+ args = downloadChunk_args()
+ args.id = id
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
- def process_rebalance(self, seqid, iprot, oprot):
- args = rebalance_args()
- args.read(iprot)
+ def recv_downloadChunk(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = downloadChunk_result()
+ result.read(iprot)
iprot.readMessageEnd()
- result = rebalance_result()
- try:
- self._handler.rebalance(args.name, args.options)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except InvalidTopologyException as ite:
- msg_type = TMessageType.REPLY
- result.ite = ite
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("rebalance", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ 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 process_setLogConfig(self, seqid, iprot, oprot):
- args = setLogConfig_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = setLogConfig_result()
- try:
- self._handler.setLogConfig(args.name, args.config)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("setLogConfig", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def getNimbusConf(self):
+ self.send_getNimbusConf()
+ return self.recv_getNimbusConf()
- def process_getLogConfig(self, seqid, iprot, oprot):
- args = getLogConfig_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = getLogConfig_result()
- try:
- result.success = self._handler.getLogConfig(args.name)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getLogConfig", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def send_getNimbusConf(self):
+ self._oprot.writeMessageBegin('getNimbusConf', TMessageType.CALL, self._seqid)
+ args = getNimbusConf_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
- def process_debug(self, seqid, iprot, oprot):
- args = debug_args()
- args.read(iprot)
+ def recv_getNimbusConf(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getNimbusConf_result()
+ result.read(iprot)
iprot.readMessageEnd()
- result = debug_result()
- try:
- self._handler.debug(args.name, args.component, args.enable, args.samplingPercentage)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("debug", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ 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 process_setWorkerProfiler(self, seqid, iprot, oprot):
- args = setWorkerProfiler_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = setWorkerProfiler_result()
- try:
- self._handler.setWorkerProfiler(args.id, args.profileRequest)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("setWorkerProfiler", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def getClusterInfo(self):
+ self.send_getClusterInfo()
+ return self.recv_getClusterInfo()
- def process_getComponentPendingProfileActions(self, seqid, iprot, oprot):
- args = getComponentPendingProfileActions_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = getComponentPendingProfileActions_result()
- try:
- result.success = self._handler.getComponentPendingProfileActions(args.id, args.component_id, args.action)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getComponentPendingProfileActions", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def send_getClusterInfo(self):
+ self._oprot.writeMessageBegin('getClusterInfo', TMessageType.CALL, self._seqid)
+ args = getClusterInfo_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._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)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except InvalidTopologyException as ite:
- msg_type = TMessageType.REPLY
- result.ite = ite
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("uploadNewCredentials", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_beginFileUpload(self, seqid, iprot, oprot):
- args = beginFileUpload_args()
- args.read(iprot)
+ def recv_getClusterInfo(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getClusterInfo_result()
+ result.read(iprot)
iprot.readMessageEnd()
- result = beginFileUpload_result()
- try:
- result.success = self._handler.beginFileUpload()
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("beginFileUpload", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ 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 process_uploadChunk(self, seqid, iprot, oprot):
- args = uploadChunk_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = uploadChunk_result()
- try:
- self._handler.uploadChunk(args.location, args.chunk)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("uploadChunk", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def getTopologyInfo(self, id):
+ """
+ Parameters:
+ - id
+ """
+ self.send_getTopologyInfo(id)
+ return self.recv_getTopologyInfo()
- def process_finishFileUpload(self, seqid, iprot, oprot):
- args = finishFileUpload_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = finishFileUpload_result()
- try:
- self._handler.finishFileUpload(args.location)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("finishFileUpload", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def send_getTopologyInfo(self, id):
+ self._oprot.writeMessageBegin('getTopologyInfo', TMessageType.CALL, self._seqid)
+ args = getTopologyInfo_args()
+ args.id = id
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
- def process_beginFileDownload(self, seqid, iprot, oprot):
- args = beginFileDownload_args()
- args.read(iprot)
+ def recv_getTopologyInfo(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getTopologyInfo_result()
+ result.read(iprot)
iprot.readMessageEnd()
- result = beginFileDownload_result()
- try:
- result.success = self._handler.beginFileDownload(args.file)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("beginFileDownload", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ if result.success is not None:
+ 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 process_downloadChunk(self, seqid, iprot, oprot):
- args = downloadChunk_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = downloadChunk_result()
- try:
- result.success = self._handler.downloadChunk(args.id)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("downloadChunk", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def getTopologyInfoWithOpts(self, id, options):
+ """
+ Parameters:
+ - id
+ - options
+ """
+ self.send_getTopologyInfoWithOpts(id, options)
+ return self.recv_getTopologyInfoWithOpts()
- def process_getNimbusConf(self, seqid, iprot, oprot):
- args = getNimbusConf_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = getNimbusConf_result()
- try:
- result.success = self._handler.getNimbusConf()
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getNimbusConf", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def send_getTopologyInfoWithOpts(self, id, options):
+ self._oprot.writeMessageBegin('getTopologyInfoWithOpts', TMessageType.CALL, self._seqid)
+ args = getTopologyInfoWithOpts_args()
+ args.id = id
+ args.options = options
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
- def process_getClusterInfo(self, seqid, iprot, oprot):
- args = getClusterInfo_args()
- args.read(iprot)
+ def recv_getTopologyInfoWithOpts(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getTopologyInfoWithOpts_result()
+ result.read(iprot)
iprot.readMessageEnd()
- result = getClusterInfo_result()
- try:
- result.success = self._handler.getClusterInfo()
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getClusterInfo", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ if result.success is not None:
+ 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, "getTopologyInfoWithOpts failed: unknown result")
- def process_getTopologyInfo(self, seqid, iprot, oprot):
- args = getTopologyInfo_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = getTopologyInfo_result()
- try:
- result.success = self._handler.getTopologyInfo(args.id)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getTopologyInfo", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_getTopologyInfoWithOpts(self, seqid, iprot, oprot):
- args = getTopologyInfoWithOpts_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = getTopologyInfoWithOpts_result()
- try:
- result.success = self._handler.getTopologyInfoWithOpts(args.id, args.options)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getTopologyInfoWithOpts", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def getTopologyPageInfo(self, id, window, is_include_sys):
+ """
+ Parameters:
+ - id
+ - window
+ - is_include_sys
+ """
+ self.send_getTopologyPageInfo(id, window, is_include_sys)
+ return self.recv_getTopologyPageInfo()
- def process_getTopologyPageInfo(self, seqid, iprot, oprot):
+ def send_getTopologyPageInfo(self, id, window, is_include_sys):
+ self._oprot.writeMessageBegin('getTopologyPageInfo', TMessageType.CALL, self._seqid)
args = getTopologyPageInfo_args()
- args.read(iprot)
- iprot.readMessageEnd()
+ args.id = id
+ args.window = window
+ args.is_include_sys = is_include_sys
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getTopologyPageInfo(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
result = getTopologyPageInfo_result()
- try:
- result.success = self._handler.getTopologyPageInfo(args.id, args.window, args.is_include_sys)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getTopologyPageInfo", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ 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, "getTopologyPageInfo failed: unknown result")
- def process_getComponentPageInfo(self, seqid, iprot, oprot):
+ def getComponentPageInfo(self, topology_id, component_id, window, is_include_sys):
+ """
+ Parameters:
+ - topology_id
+ - component_id
+ - window
+ - is_include_sys
+ """
+ self.send_getComponentPageInfo(topology_id, component_id, window, is_include_sys)
+ return self.recv_getComponentPageInfo()
+
+ def send_getComponentPageInfo(self, topology_id, component_id, window, is_include_sys):
+ self._oprot.writeMessageBegin('getComponentPageInfo', TMessageType.CALL, self._seqid)
args = getComponentPageInfo_args()
- args.read(iprot)
- iprot.readMessageEnd()
+ args.topology_id = topology_id
+ args.component_id = component_id
+ args.window = window
+ args.is_include_sys = is_include_sys
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getComponentPageInfo(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
result = getComponentPageInfo_result()
- try:
- result.success = self._handler.getComponentPageInfo(args.topology_id, args.component_id, args.window, args.is_include_sys)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getComponentPageInfo", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ 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, "getComponentPageInfo failed: unknown result")
- def process_getTopologyConf(self, seqid, iprot, oprot):
+ def getTopologyConf(self, id):
+ """
+ Parameters:
+ - id
+ """
+ self.send_getTopologyConf(id)
+ return self.recv_getTopologyConf()
+
+ def send_getTopologyConf(self, id):
+ self._oprot.writeMessageBegin('getTopologyConf', TMessageType.CALL, self._seqid)
args = getTopologyConf_args()
- args.read(iprot)
- iprot.readMessageEnd()
+ args.id = id
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getTopologyConf(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
result = getTopologyConf_result()
- try:
- result.success = self._handler.getTopologyConf(args.id)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getTopologyConf", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ 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 process_getTopology(self, seqid, iprot, oprot):
+ def getTopology(self, id):
+ """
+ Returns the compiled topology that contains ackers and metrics consumsers. Compare {@link #getUserTopology(String id)}.
+
+ Parameters:
+ - id
+ """
+ self.send_getTopology(id)
+ return self.recv_getTopology()
+
+ def send_getTopology(self, id):
+ self._oprot.writeMessageBegin('getTopology', TMessageType.CALL, self._seqid)
args = getTopology_args()
- args.read(iprot)
- iprot.readMessageEnd()
+ args.id = id
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getTopology(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
result = getTopology_result()
- try:
- result.success = self._handler.getTopology(args.id)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getTopology", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ 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):
+ """
+ Returns the user specified topology as submitted originally. Compare {@link #getTopology(String id)}.
+
+ Parameters:
+ - id
+ """
+ self.send_getUserTopology(id)
+ return self.recv_getUserTopology()
+
+ def send_getUserTopology(self, id):
+ self._oprot.writeMessageBegin('getUserTopology', TMessageType.CALL, self._seqid)
+ args = getUserTopology_args()
+ args.id = id
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getUserTopology(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getUserTopology_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ 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")
+
+ def getTopologyHistory(self, user):
+ """
+ Parameters:
+ - user
+ """
+ self.send_getTopologyHistory(user)
+ return self.recv_getTopologyHistory()
+
+ def send_getTopologyHistory(self, user):
+ self._oprot.writeMessageBegin('getTopologyHistory', TMessageType.CALL, self._seqid)
+ args = getTopologyHistory_args()
+ args.user = user
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getTopologyHistory(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getTopologyHistory_result()
+ result.read(iprot)
+ 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, "getTopologyHistory failed: unknown result")
+
+
+class Processor(Iface, TProcessor):
+ def __init__(self, handler):
+ self._handler = handler
+ self._processMap = {}
+ self._processMap["submitTopology"] = Processor.process_submitTopology
+ self._processMap["submitTopologyWithOpts"] = Processor.process_submitTopologyWithOpts
+ self._processMap["killTopology"] = Processor.process_killTopology
+ self._processMap["killTopologyWithOpts"] = Processor.process_killTopologyWithOpts
+ self._processMap["activate"] = Processor.process_activate
+ self._processMap["deactivate"] = Processor.process_deactivate
+ self._processMap["rebalance"] = Processor.process_rebalance
+ self._processMap["setLogConfig"] = Processor.process_setLogConfig
+ self._processMap["getLogConfig"] = Processor.process_getLogConfig
+ self._processMap["debug"] = Processor.process_debug
+ self._processMap["setWorkerProfiler"] = Processor.process_setWorkerProfiler
+ self._processMap["getComponentPendingProfileActions"] = Processor.process_getComponentPendingProfileActions
+ self._processMap["uploadNewCredentials"] = Processor.process_uploadNewCredentials
+ self._processMap["beginCreateBlob"] = Processor.process_beginCreateBlob
+ self._processMap["beginUpdateBlob"] = Processor.process_beginUpdateBlob
+ self._processMap["uploadBlobChunk"] = Processor.process_uploadBlobChunk
+ self._processMap["finishBlobUpload"] = Processor.process_finishBlobUpload
+ self._processMap["cancelBlobUpload"] = Processor.process_cancelBlobUpload
+ self._processMap["getBlobMeta"] = Processor.process_getBlobMeta
+ self._processMap["setBlobMeta"] = Processor.process_setBlobMeta
+ self._processMap["beginBlobDownload"] = Processor.process_beginBlobDownload
+ self._processMap["downloadBlobChunk"] = Processor.process_downloadBlobChunk
+ self._processMap["deleteBlob"] = Processor.process_deleteBlob
+ self._processMap["listBlobs"] = Processor.process_listBlobs
+ self._processMap["getBlobReplication"] = Processor.process_getBlobReplication
+ self._processMap["updateBlobReplication"] = Processor.process_updateBlobReplication
+ self._processMap["createStateInZookeeper"] = Processor.process_createStateInZookeeper
+ self._processMap["beginFileUpload"] = Processor.process_beginFileUpload
+ self._processMap["uploadChunk"] = Processor.process_uploadChunk
+ self._processMap["finishFileUpload"] = Processor.process_finishFileUpload
+ self._processMap["beginFileDownload"] = Processor.process_beginFileDownload
+ self._processMap["downloadChunk"] = Processor.process_downloadChunk
+ self._processMap["getNimbusConf"] = Processor.process_getNimbusConf
+ self._processMap["getClusterInfo"] = Processor.process_getClusterInfo
+ self._processMap["getTopologyInfo"] = Processor.process_getTopologyInfo
+ self._processMap["getTopologyInfoWithOpts"] = Processor.process_getTopologyInfoWithOpts
+ self._processMap["getTopologyPageInfo"] = Processor.process_getTopologyPageInfo
+ self._processMap["getComponentPageInfo"] = Processor.process_getComponentPageInfo
+ self._processMap["getTopologyConf"] = Processor.process_getTopologyConf
+ self._processMap["getTopology"] = Processor.process_getTopology
+ self._processMap["getUserTopology"] = Processor.process_getUserTopology
+ self._processMap["getTopologyHistory"] = Processor.process_getTopologyHistory
+
+ 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_submitTopology(self, seqid, iprot, oprot):
+ args = submitTopology_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = submitTopology_result()
+ try:
+ self._handler.submitTopology(args.name, args.uploadedJarLocation, args.jsonConf, args.topology)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except AlreadyAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except InvalidTopologyException as ite:
+ msg_type = TMessageType.REPLY
+ result.ite = ite
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("submitTopology", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_submitTopologyWithOpts(self, seqid, iprot, oprot):
+ args = submitTopologyWithOpts_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = submitTopologyWithOpts_result()
+ try:
+ self._handler.submitTopologyWithOpts(args.name, args.uploadedJarLocation, args.jsonConf, args.topology, args.options)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except AlreadyAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except InvalidTopologyException as ite:
+ msg_type = TMessageType.REPLY
+ result.ite = ite
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("submitTopologyWithOpts", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_killTopology(self, seqid, iprot, oprot):
+ args = killTopology_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = killTopology_result()
+ try:
+ self._handler.killTopology(args.name)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("killTopology", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_killTopologyWithOpts(self, seqid, iprot, oprot):
+ args = killTopologyWithOpts_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = killTopologyWithOpts_result()
+ try:
+ self._handler.killTopologyWithOpts(args.name, args.options)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("killTopologyWithOpts", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
oprot.trans.flush()
- def process_getUserTopology(self, seqid, iprot, oprot):
- args = getUserTopology_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = getUserTopology_result()
- try:
- result.success = self._handler.getUserTopology(args.id)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getUserTopology", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def process_activate(self, seqid, iprot, oprot):
+ args = activate_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = activate_result()
+ try:
+ self._handler.activate(args.name)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("activate", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_deactivate(self, seqid, iprot, oprot):
+ args = deactivate_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = deactivate_result()
+ try:
+ self._handler.deactivate(args.name)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("deactivate", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_rebalance(self, seqid, iprot, oprot):
+ args = rebalance_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = rebalance_result()
+ try:
+ self._handler.rebalance(args.name, args.options)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except InvalidTopologyException as ite:
+ msg_type = TMessageType.REPLY
+ result.ite = ite
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("rebalance", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_setLogConfig(self, seqid, iprot, oprot):
+ args = setLogConfig_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = setLogConfig_result()
+ try:
+ self._handler.setLogConfig(args.name, args.config)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("setLogConfig", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getLogConfig(self, seqid, iprot, oprot):
+ args = getLogConfig_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getLogConfig_result()
+ try:
+ result.success = self._handler.getLogConfig(args.name)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("getLogConfig", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_debug(self, seqid, iprot, oprot):
+ args = debug_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = debug_result()
+ try:
+ self._handler.debug(args.name, args.component, args.enable, args.samplingPercentage)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("debug", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_setWorkerProfiler(self, seqid, iprot, oprot):
+ args = setWorkerProfiler_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = setWorkerProfiler_result()
+ try:
+ self._handler.setWorkerProfiler(args.id, args.profileRequest)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("setWorkerProfiler", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getComponentPendingProfileActions(self, seqid, iprot, oprot):
+ args = getComponentPendingProfileActions_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getComponentPendingProfileActions_result()
+ try:
+ result.success = self._handler.getComponentPendingProfileActions(args.id, args.component_id, args.action)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("getComponentPendingProfileActions", msg_type, 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)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except InvalidTopologyException as ite:
+ msg_type = TMessageType.REPLY
+ result.ite = ite
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("uploadNewCredentials", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_beginCreateBlob(self, seqid, iprot, oprot):
+ args = beginCreateBlob_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = beginCreateBlob_result()
+ try:
+ result.success = self._handler.beginCreateBlob(args.key, args.meta)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except KeyAlreadyExistsException as kae:
+ msg_type = TMessageType.REPLY
+ result.kae = kae
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("beginCreateBlob", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_beginUpdateBlob(self, seqid, iprot, oprot):
+ args = beginUpdateBlob_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = beginUpdateBlob_result()
+ try:
+ result.success = self._handler.beginUpdateBlob(args.key)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except KeyNotFoundException as knf:
+ msg_type = TMessageType.REPLY
+ result.knf = knf
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("beginUpdateBlob", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_uploadBlobChunk(self, seqid, iprot, oprot):
+ args = uploadBlobChunk_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = uploadBlobChunk_result()
+ try:
+ self._handler.uploadBlobChunk(args.session, args.chunk)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("uploadBlobChunk", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_finishBlobUpload(self, seqid, iprot, oprot):
+ args = finishBlobUpload_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = finishBlobUpload_result()
+ try:
+ self._handler.finishBlobUpload(args.session)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("finishBlobUpload", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_cancelBlobUpload(self, seqid, iprot, oprot):
+ args = cancelBlobUpload_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = cancelBlobUpload_result()
+ try:
+ self._handler.cancelBlobUpload(args.session)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("cancelBlobUpload", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getBlobMeta(self, seqid, iprot, oprot):
+ args = getBlobMeta_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getBlobMeta_result()
+ try:
+ result.success = self._handler.getBlobMeta(args.key)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except KeyNotFoundException as knf:
+ msg_type = TMessageType.REPLY
+ result.knf = knf
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("getBlobMeta", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_setBlobMeta(self, seqid, iprot, oprot):
+ args = setBlobMeta_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = setBlobMeta_result()
+ try:
+ self._handler.setBlobMeta(args.key, args.meta)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except KeyNotFoundException as knf:
+ msg_type = TMessageType.REPLY
+ result.knf = knf
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("setBlobMeta", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_beginBlobDownload(self, seqid, iprot, oprot):
+ args = beginBlobDownload_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = beginBlobDownload_result()
+ try:
+ result.success = self._handler.beginBlobDownload(args.key)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except AuthorizationException as aze:
+ msg
<TRUNCATED>