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 2018/07/30 18:22:49 UTC
[1/6] storm git commit: STORM-2947: Remove deprecated field and
method from Thrift
Repository: storm
Updated Branches:
refs/heads/master 9cc5b72c1 -> c8896efcc
http://git-wip-us.apache.org/repos/asf/storm/blob/1768062f/storm-client/src/py/storm/Nimbus-remote
----------------------------------------------------------------------
diff --git a/storm-client/src/py/storm/Nimbus-remote b/storm-client/src/py/storm/Nimbus-remote
index 3c35d1d..a4a2c32 100644
--- a/storm-client/src/py/storm/Nimbus-remote
+++ b/storm-client/src/py/storm/Nimbus-remote
@@ -72,7 +72,6 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print(' string beginFileUpload()')
print(' void uploadChunk(string location, string chunk)')
print(' void finishFileUpload(string location)')
- print(' string beginFileDownload(string file)')
print(' string downloadChunk(string id)')
print(' string getNimbusConf()')
print(' ClusterSummary getClusterInfo()')
@@ -352,12 +351,6 @@ elif cmd == 'finishFileUpload':
sys.exit(1)
pp.pprint(client.finishFileUpload(args[0],))
-elif cmd == 'beginFileDownload':
- if len(args) != 1:
- print('beginFileDownload requires 1 args')
- sys.exit(1)
- pp.pprint(client.beginFileDownload(args[0],))
-
elif cmd == 'downloadChunk':
if len(args) != 1:
print('downloadChunk requires 1 args')
http://git-wip-us.apache.org/repos/asf/storm/blob/1768062f/storm-client/src/py/storm/Nimbus.py
----------------------------------------------------------------------
diff --git a/storm-client/src/py/storm/Nimbus.py b/storm-client/src/py/storm/Nimbus.py
index a4e6484..363a03e 100644
--- a/storm-client/src/py/storm/Nimbus.py
+++ b/storm-client/src/py/storm/Nimbus.py
@@ -271,13 +271,6 @@ class Iface(object):
"""
pass
- def beginFileDownload(self, file):
- """
- Parameters:
- - file
- """
- pass
-
def downloadChunk(self, id):
"""
Parameters:
@@ -1463,39 +1456,6 @@ class Client(Iface):
raise result.aze
return
- def beginFileDownload(self, file):
- """
- Parameters:
- - file
- """
- self.send_beginFileDownload(file)
- return self.recv_beginFileDownload()
-
- 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 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()
- 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):
"""
Parameters:
@@ -2214,7 +2174,6 @@ class Processor(Iface, TProcessor):
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
@@ -3079,32 +3038,6 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_beginFileDownload(self, seqid, iprot, oprot):
- args = beginFileDownload_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = beginFileDownload_result()
- try:
- result.success = self._handler.beginFileDownload(args.file)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("beginFileDownload", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
def process_downloadChunk(self, seqid, iprot, oprot):
args = downloadChunk_args()
args.read(iprot)
@@ -7922,140 +7855,6 @@ finishFileUpload_result.thrift_spec = (
)
-class beginFileDownload_args(object):
- """
- Attributes:
- - file
- """
-
-
- def __init__(self, file=None,):
- self.file = file
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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.file = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('beginFileDownload_args')
- if self.file is not None:
- oprot.writeFieldBegin('file', TType.STRING, 1)
- oprot.writeString(self.file.encode('utf-8') if sys.version_info[0] == 2 else self.file)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
-all_structs.append(beginFileDownload_args)
-beginFileDownload_args.thrift_spec = (
- None, # 0
- (1, TType.STRING, 'file', 'UTF8', None, ), # 1
-)
-
-
-class beginFileDownload_result(object):
- """
- Attributes:
- - success
- - aze
- """
-
-
- def __init__(self, success=None, aze=None,):
- self.success = success
- self.aze = aze
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRING:
- self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('beginFileDownload_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRING, 0)
- oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else 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()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
-all_structs.append(beginFileDownload_result)
-beginFileDownload_result.thrift_spec = (
- (0, TType.STRING, 'success', 'UTF8', None, ), # 0
- (1, TType.STRUCT, 'aze', [AuthorizationException, None], None, ), # 1
-)
-
-
class downloadChunk_args(object):
"""
Attributes:
http://git-wip-us.apache.org/repos/asf/storm/blob/1768062f/storm-client/src/py/storm/ttypes.py
----------------------------------------------------------------------
diff --git a/storm-client/src/py/storm/ttypes.py b/storm-client/src/py/storm/ttypes.py
index 0d7ea12..e20c926 100644
--- a/storm-client/src/py/storm/ttypes.py
+++ b/storm-client/src/py/storm/ttypes.py
@@ -2600,15 +2600,13 @@ class ClusterSummary(object):
"""
Attributes:
- supervisors
- - nimbus_uptime_secs
- topologies
- nimbuses
"""
- def __init__(self, supervisors=None, nimbus_uptime_secs=0, topologies=None, nimbuses=None,):
+ def __init__(self, supervisors=None, topologies=None, nimbuses=None,):
self.supervisors = supervisors
- self.nimbus_uptime_secs = nimbus_uptime_secs
self.topologies = topologies
self.nimbuses = nimbuses
@@ -2633,11 +2631,6 @@ class ClusterSummary(object):
else:
iprot.skip(ftype)
elif fid == 2:
- if ftype == TType.I32:
- self.nimbus_uptime_secs = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 3:
if ftype == TType.LIST:
self.topologies = []
(_etype130, _size127) = iprot.readListBegin()
@@ -2648,7 +2641,7 @@ class ClusterSummary(object):
iprot.readListEnd()
else:
iprot.skip(ftype)
- elif fid == 4:
+ elif fid == 3:
if ftype == TType.LIST:
self.nimbuses = []
(_etype136, _size133) = iprot.readListBegin()
@@ -2676,19 +2669,15 @@ class ClusterSummary(object):
iter139.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
- if self.nimbus_uptime_secs is not None:
- oprot.writeFieldBegin('nimbus_uptime_secs', TType.I32, 2)
- oprot.writeI32(self.nimbus_uptime_secs)
- oprot.writeFieldEnd()
if self.topologies is not None:
- oprot.writeFieldBegin('topologies', TType.LIST, 3)
+ oprot.writeFieldBegin('topologies', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.topologies))
for iter140 in self.topologies:
iter140.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.nimbuses is not None:
- oprot.writeFieldBegin('nimbuses', TType.LIST, 4)
+ oprot.writeFieldBegin('nimbuses', TType.LIST, 3)
oprot.writeListBegin(TType.STRUCT, len(self.nimbuses))
for iter141 in self.nimbuses:
iter141.write(oprot)
@@ -10830,9 +10819,8 @@ all_structs.append(ClusterSummary)
ClusterSummary.thrift_spec = (
None, # 0
(1, TType.LIST, 'supervisors', (TType.STRUCT, [SupervisorSummary, None], False), None, ), # 1
- (2, TType.I32, 'nimbus_uptime_secs', None, 0, ), # 2
- (3, TType.LIST, 'topologies', (TType.STRUCT, [TopologySummary, None], False), None, ), # 3
- (4, TType.LIST, 'nimbuses', (TType.STRUCT, [NimbusSummary, None], False), None, ), # 4
+ (2, TType.LIST, 'topologies', (TType.STRUCT, [TopologySummary, None], False), None, ), # 2
+ (3, TType.LIST, 'nimbuses', (TType.STRUCT, [NimbusSummary, None], False), None, ), # 3
)
all_structs.append(ErrorInfo)
ErrorInfo.thrift_spec = (
http://git-wip-us.apache.org/repos/asf/storm/blob/1768062f/storm-client/src/storm.thrift
----------------------------------------------------------------------
diff --git a/storm-client/src/storm.thrift b/storm-client/src/storm.thrift
index 724c5b4..9997c8e 100644
--- a/storm-client/src/storm.thrift
+++ b/storm-client/src/storm.thrift
@@ -206,10 +206,8 @@ struct NimbusSummary {
struct ClusterSummary {
1: required list<SupervisorSummary> supervisors;
- //@deprecated, please use nimbuses.uptime_secs instead.
- 2: optional i32 nimbus_uptime_secs = 0;
- 3: required list<TopologySummary> topologies;
- 4: required list<NimbusSummary> nimbuses;
+ 2: required list<TopologySummary> topologies;
+ 3: required list<NimbusSummary> nimbuses;
}
struct ErrorInfo {
@@ -760,8 +758,6 @@ service Nimbus {
void uploadChunk(1: string location, 2: binary chunk) throws (1: AuthorizationException aze);
void finishFileUpload(1: string location) throws (1: AuthorizationException aze);
- //@deprecated beginBlobDownload does that
- 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) throws (1: AuthorizationException aze);
http://git-wip-us.apache.org/repos/asf/storm/blob/1768062f/storm-server/src/main/java/org/apache/storm/LocalCluster.java
----------------------------------------------------------------------
diff --git a/storm-server/src/main/java/org/apache/storm/LocalCluster.java b/storm-server/src/main/java/org/apache/storm/LocalCluster.java
index 0e314c9..02fbe63 100644
--- a/storm-server/src/main/java/org/apache/storm/LocalCluster.java
+++ b/storm-server/src/main/java/org/apache/storm/LocalCluster.java
@@ -875,11 +875,6 @@ public class LocalCluster implements ILocalClusterTrackedTopologyAware, Iface {
}
@Override
- public String beginFileDownload(String file) throws AuthorizationException, TException {
- throw new WrappedAuthorizationException("FILE DOWNLOAD NOT SUPPORTED IN LOCAL MODE");
- }
-
- @Override
public ByteBuffer downloadChunk(String id) throws AuthorizationException, TException {
throw new WrappedAuthorizationException("FILE DOWNLOAD NOT SUPPORTED IN LOCAL MODE");
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1768062f/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
----------------------------------------------------------------------
diff --git a/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java b/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
index 3c16745..5cd7d97 100644
--- a/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
+++ b/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
@@ -236,7 +236,6 @@ public class Nimbus implements Iface, Shutdownable, DaemonCommon {
private static final Meter beginFileUploadCalls = StormMetricsRegistry.registerMeter("nimbus:num-beginFileUpload-calls");
private static final Meter uploadChunkCalls = StormMetricsRegistry.registerMeter("nimbus:num-uploadChunk-calls");
private static final Meter finishFileUploadCalls = StormMetricsRegistry.registerMeter("nimbus:num-finishFileUpload-calls");
- private static final Meter beginFileDownloadCalls = StormMetricsRegistry.registerMeter("nimbus:num-beginFileDownload-calls");
private static final Meter downloadChunkCalls = StormMetricsRegistry.registerMeter("nimbus:num-downloadChunk-calls");
private static final Meter getNimbusConfCalls = StormMetricsRegistry.registerMeter("nimbus:num-getNimbusConf-calls");
private static final Meter getLogConfigCalls = StormMetricsRegistry.registerMeter("nimbus:num-getLogConfig-calls");
@@ -2692,7 +2691,6 @@ public class Nimbus implements Iface, Shutdownable, DaemonCommon {
}
ClusterSummary ret = new ClusterSummary(summaries, topologySummaries, nimbuses);
- ret.set_nimbus_uptime_secs(uptime);
return ret;
}
@@ -3743,27 +3741,6 @@ public class Nimbus implements Iface, Shutdownable, DaemonCommon {
@SuppressWarnings("deprecation")
@Override
- public String beginFileDownload(String file) throws AuthorizationException, TException {
- try {
- beginFileDownloadCalls.mark();
- checkAuthorization(null, null, "fileDownload");
- BufferInputStream is = new BufferInputStream(blobStore.getBlob(file, null),
- ObjectReader.getInt(conf.get(Config.STORM_BLOBSTORE_INPUTSTREAM_BUFFER_SIZE_BYTES),
- 65536));
- String id = Utils.uuid();
- downloaders.put(id, is);
- return id;
- } catch (Exception e) {
- LOG.warn("begin file download exception.", e);
- if (e instanceof TException) {
- throw (TException) e;
- }
- throw new RuntimeException(e);
- }
- }
-
- @SuppressWarnings("deprecation")
- @Override
public ByteBuffer downloadChunk(String id) throws AuthorizationException, TException {
try {
downloadChunkCalls.mark();
[4/6] storm git commit: Fix test
Posted by bo...@apache.org.
Fix test
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/e0795f12
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/e0795f12
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/e0795f12
Branch: refs/heads/master
Commit: e0795f12113e722726f6d05ace7db8d1c496d86d
Parents: 1768062
Author: Stig Rohde Døssing <sr...@apache.org>
Authored: Thu Jul 12 15:17:29 2018 +0200
Committer: Stig Rohde Døssing <sr...@apache.org>
Committed: Thu Jul 12 15:17:29 2018 +0200
----------------------------------------------------------------------
.../test/clj/org/apache/storm/security/auth/nimbus_auth_test.clj | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/e0795f12/storm-core/test/clj/org/apache/storm/security/auth/nimbus_auth_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/org/apache/storm/security/auth/nimbus_auth_test.clj b/storm-core/test/clj/org/apache/storm/security/auth/nimbus_auth_test.clj
index a7697c2..8b9e453 100644
--- a/storm-core/test/clj/org/apache/storm/security/auth/nimbus_auth_test.clj
+++ b/storm-core/test/clj/org/apache/storm/security/auth/nimbus_auth_test.clj
@@ -125,7 +125,6 @@
(is (thrown-cause? AuthorizationException (.uploadChunk nimbus_client nil nil)))
(is (thrown-cause? AuthorizationException (.finishFileUpload nimbus_client nil)))
- (is (thrown-cause? AuthorizationException (.beginFileDownload nimbus_client nil)))
(is (thrown-cause? AuthorizationException (.downloadChunk nimbus_client nil)))
(is (thrown-cause? AuthorizationException (.getNimbusConf nimbus_client)))
(is (thrown-cause? AuthorizationException (.getClusterInfo nimbus_client)))
@@ -192,7 +191,6 @@
(is (thrown-cause? AuthorizationException (.uploadChunk nimbus_client nil nil)))
(is (thrown-cause? AuthorizationException (.finishFileUpload nimbus_client nil)))
- (is (thrown-cause? AuthorizationException (.beginFileDownload nimbus_client nil)))
(is (thrown-cause? AuthorizationException (.downloadChunk nimbus_client nil)))
(is (thrown-cause? AuthorizationException (.getNimbusConf nimbus_client)))
(is (thrown-cause? AuthorizationException (.getClusterInfo nimbus_client)))
[6/6] storm git commit: Merge branch 'STORM-2947-thrift' of
https://github.com/srdo/storm into STORM-2947
Posted by bo...@apache.org.
Merge branch 'STORM-2947-thrift' of https://github.com/srdo/storm into STORM-2947
STORM-2947: Remove deprecated field and method from Thrift
This closes #2761
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/c8896efc
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/c8896efc
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/c8896efc
Branch: refs/heads/master
Commit: c8896efcca5b6101942f51434d2100f45df456c6
Parents: 9cc5b72 950bd18
Author: Robert Evans <ev...@yahoo-inc.com>
Authored: Mon Jul 30 13:01:54 2018 -0500
Committer: Robert Evans <ev...@yahoo-inc.com>
Committed: Mon Jul 30 13:01:54 2018 -0500
----------------------------------------------------------------------
.../apache/storm/generated/ClusterSummary.java | 108 -
.../jvm/org/apache/storm/generated/Nimbus.java | 2519 ++++++------------
storm-client/src/py/storm/Nimbus-remote | 7 -
storm-client/src/py/storm/Nimbus.py | 201 --
storm-client/src/py/storm/ttypes.py | 15 +-
storm-client/src/storm.thrift | 10 +-
.../storm/security/auth/nimbus_auth_test.clj | 2 -
.../java/org/apache/storm/LocalCluster.java | 5 -
.../org/apache/storm/daemon/nimbus/Nimbus.java | 23 -
9 files changed, 776 insertions(+), 2114 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/c8896efc/storm-server/src/main/java/org/apache/storm/LocalCluster.java
----------------------------------------------------------------------
[2/6] storm git commit: STORM-2947: Remove deprecated field and
method from Thrift
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1768062f/storm-client/src/jvm/org/apache/storm/generated/Nimbus.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/Nimbus.java b/storm-client/src/jvm/org/apache/storm/generated/Nimbus.java
index de9a3b3..47bc7fc 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/Nimbus.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/Nimbus.java
@@ -101,8 +101,6 @@ public class Nimbus {
public void finishFileUpload(java.lang.String location) throws AuthorizationException, org.apache.storm.thrift.TException;
- public java.lang.String beginFileDownload(java.lang.String file) throws AuthorizationException, org.apache.storm.thrift.TException;
-
public java.nio.ByteBuffer downloadChunk(java.lang.String id) throws AuthorizationException, org.apache.storm.thrift.TException;
public java.lang.String getNimbusConf() throws AuthorizationException, org.apache.storm.thrift.TException;
@@ -237,8 +235,6 @@ public class Nimbus {
public void finishFileUpload(java.lang.String location, org.apache.storm.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.storm.thrift.TException;
- public void beginFileDownload(java.lang.String file, org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.storm.thrift.TException;
-
public void downloadChunk(java.lang.String id, org.apache.storm.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.storm.thrift.TException;
public void getNimbusConf(org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.storm.thrift.TException;
@@ -1093,32 +1089,6 @@ public class Nimbus {
return;
}
- public java.lang.String beginFileDownload(java.lang.String file) throws AuthorizationException, org.apache.storm.thrift.TException
- {
- send_beginFileDownload(file);
- return recv_beginFileDownload();
- }
-
- public void send_beginFileDownload(java.lang.String file) throws org.apache.storm.thrift.TException
- {
- beginFileDownload_args args = new beginFileDownload_args();
- args.set_file(file);
- sendBase("beginFileDownload", args);
- }
-
- public java.lang.String recv_beginFileDownload() throws AuthorizationException, org.apache.storm.thrift.TException
- {
- beginFileDownload_result result = new beginFileDownload_result();
- receiveBase(result, "beginFileDownload");
- if (result.is_set_success()) {
- return result.success;
- }
- if (result.aze != null) {
- throw result.aze;
- }
- throw new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.MISSING_RESULT, "beginFileDownload failed: unknown result");
- }
-
public java.nio.ByteBuffer downloadChunk(java.lang.String id) throws AuthorizationException, org.apache.storm.thrift.TException
{
send_downloadChunk(id);
@@ -2700,38 +2670,6 @@ public class Nimbus {
}
}
- public void beginFileDownload(java.lang.String file, org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.storm.thrift.TException {
- checkReady();
- beginFileDownload_call method_call = new beginFileDownload_call(file, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class beginFileDownload_call extends org.apache.storm.thrift.async.TAsyncMethodCall<java.lang.String> {
- private java.lang.String file;
- public beginFileDownload_call(java.lang.String file, org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.storm.thrift.async.TAsyncClient client, org.apache.storm.thrift.protocol.TProtocolFactory protocolFactory, org.apache.storm.thrift.transport.TNonblockingTransport transport) throws org.apache.storm.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.file = file;
- }
-
- public void write_args(org.apache.storm.thrift.protocol.TProtocol prot) throws org.apache.storm.thrift.TException {
- prot.writeMessageBegin(new org.apache.storm.thrift.protocol.TMessage("beginFileDownload", org.apache.storm.thrift.protocol.TMessageType.CALL, 0));
- beginFileDownload_args args = new beginFileDownload_args();
- args.set_file(file);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public java.lang.String getResult() throws AuthorizationException, org.apache.storm.thrift.TException {
- if (getState() != org.apache.storm.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new java.lang.IllegalStateException("Method call not finished!");
- }
- org.apache.storm.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.storm.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.storm.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_beginFileDownload();
- }
- }
-
public void downloadChunk(java.lang.String id, org.apache.storm.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.storm.thrift.TException {
checkReady();
downloadChunk_call method_call = new downloadChunk_call(id, resultHandler, this, ___protocolFactory, ___transport);
@@ -3430,7 +3368,6 @@ public class Nimbus {
processMap.put("beginFileUpload", new beginFileUpload());
processMap.put("uploadChunk", new uploadChunk());
processMap.put("finishFileUpload", new finishFileUpload());
- processMap.put("beginFileDownload", new beginFileDownload());
processMap.put("downloadChunk", new downloadChunk());
processMap.put("getNimbusConf", new getNimbusConf());
processMap.put("getClusterInfo", new getClusterInfo());
@@ -4346,35 +4283,6 @@ public class Nimbus {
}
}
- public static class beginFileDownload<I extends Iface> extends org.apache.storm.thrift.ProcessFunction<I, beginFileDownload_args> {
- public beginFileDownload() {
- super("beginFileDownload");
- }
-
- public beginFileDownload_args getEmptyArgsInstance() {
- return new beginFileDownload_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- @Override
- protected boolean handleRuntimeExceptions() {
- return false;
- }
-
- public beginFileDownload_result getResult(I iface, beginFileDownload_args args) throws org.apache.storm.thrift.TException {
- beginFileDownload_result result = new beginFileDownload_result();
- try {
- result.success = iface.beginFileDownload(args.file);
- } catch (AuthorizationException aze) {
- result.aze = aze;
- }
- return result;
- }
- }
-
public static class downloadChunk<I extends Iface> extends org.apache.storm.thrift.ProcessFunction<I, downloadChunk_args> {
public downloadChunk() {
super("downloadChunk");
@@ -5014,7 +4922,6 @@ public class Nimbus {
processMap.put("beginFileUpload", new beginFileUpload());
processMap.put("uploadChunk", new uploadChunk());
processMap.put("finishFileUpload", new finishFileUpload());
- processMap.put("beginFileDownload", new beginFileDownload());
processMap.put("downloadChunk", new downloadChunk());
processMap.put("getNimbusConf", new getNimbusConf());
processMap.put("getClusterInfo", new getClusterInfo());
@@ -7035,20 +6942,85 @@ public class Nimbus {
}
}
- public static class beginFileDownload<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, beginFileDownload_args, java.lang.String> {
- public beginFileDownload() {
- super("beginFileDownload");
+ public static class downloadChunk<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, downloadChunk_args, java.nio.ByteBuffer> {
+ public downloadChunk() {
+ super("downloadChunk");
+ }
+
+ public downloadChunk_args getEmptyArgsInstance() {
+ return new downloadChunk_args();
+ }
+
+ public org.apache.storm.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer>() {
+ public void onComplete(java.nio.ByteBuffer o) {
+ downloadChunk_result result = new downloadChunk_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.storm.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
+ }
+ }
+ public void onError(java.lang.Exception e) {
+ byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
+ org.apache.storm.thrift.TSerializable msg;
+ downloadChunk_result result = new downloadChunk_result();
+ if (e instanceof AuthorizationException) {
+ result.aze = (AuthorizationException) e;
+ result.set_aze_isSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.storm.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.storm.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
+ }
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, downloadChunk_args args, org.apache.storm.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.downloadChunk(args.id,resultHandler);
+ }
+ }
+
+ public static class getNimbusConf<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getNimbusConf_args, java.lang.String> {
+ public getNimbusConf() {
+ super("getNimbusConf");
}
- public beginFileDownload_args getEmptyArgsInstance() {
- return new beginFileDownload_args();
+ public getNimbusConf_args getEmptyArgsInstance() {
+ return new getNimbusConf_args();
}
public org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
return new org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String>() {
public void onComplete(java.lang.String o) {
- beginFileDownload_result result = new beginFileDownload_result();
+ getNimbusConf_result result = new getNimbusConf_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
@@ -7063,7 +7035,7 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- beginFileDownload_result result = new beginFileDownload_result();
+ getNimbusConf_result result = new getNimbusConf_result();
if (e instanceof AuthorizationException) {
result.aze = (AuthorizationException) e;
result.set_aze_isSet(true);
@@ -7095,25 +7067,25 @@ public class Nimbus {
return false;
}
- public void start(I iface, beginFileDownload_args args, org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.storm.thrift.TException {
- iface.beginFileDownload(args.file,resultHandler);
+ public void start(I iface, getNimbusConf_args args, org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getNimbusConf(resultHandler);
}
}
- public static class downloadChunk<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, downloadChunk_args, java.nio.ByteBuffer> {
- public downloadChunk() {
- super("downloadChunk");
+ public static class getClusterInfo<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getClusterInfo_args, ClusterSummary> {
+ public getClusterInfo() {
+ super("getClusterInfo");
}
- public downloadChunk_args getEmptyArgsInstance() {
- return new downloadChunk_args();
+ public getClusterInfo_args getEmptyArgsInstance() {
+ return new getClusterInfo_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<ClusterSummary> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer>() {
- public void onComplete(java.nio.ByteBuffer o) {
- downloadChunk_result result = new downloadChunk_result();
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<ClusterSummary>() {
+ public void onComplete(ClusterSummary o) {
+ getClusterInfo_result result = new getClusterInfo_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
@@ -7128,7 +7100,7 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- downloadChunk_result result = new downloadChunk_result();
+ getClusterInfo_result result = new getClusterInfo_result();
if (e instanceof AuthorizationException) {
result.aze = (AuthorizationException) e;
result.set_aze_isSet(true);
@@ -7160,25 +7132,25 @@ public class Nimbus {
return false;
}
- public void start(I iface, downloadChunk_args args, org.apache.storm.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.storm.thrift.TException {
- iface.downloadChunk(args.id,resultHandler);
+ public void start(I iface, getClusterInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback<ClusterSummary> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getClusterInfo(resultHandler);
}
}
- public static class getNimbusConf<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getNimbusConf_args, java.lang.String> {
- public getNimbusConf() {
- super("getNimbusConf");
+ public static class getLeader<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getLeader_args, NimbusSummary> {
+ public getLeader() {
+ super("getLeader");
}
- public getNimbusConf_args getEmptyArgsInstance() {
- return new getNimbusConf_args();
+ public getLeader_args getEmptyArgsInstance() {
+ return new getLeader_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<NimbusSummary> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String>() {
- public void onComplete(java.lang.String o) {
- getNimbusConf_result result = new getNimbusConf_result();
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<NimbusSummary>() {
+ public void onComplete(NimbusSummary o) {
+ getLeader_result result = new getLeader_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
@@ -7193,7 +7165,7 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- getNimbusConf_result result = new getNimbusConf_result();
+ getLeader_result result = new getLeader_result();
if (e instanceof AuthorizationException) {
result.aze = (AuthorizationException) e;
result.set_aze_isSet(true);
@@ -7225,26 +7197,27 @@ public class Nimbus {
return false;
}
- public void start(I iface, getNimbusConf_args args, org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getNimbusConf(resultHandler);
+ public void start(I iface, getLeader_args args, org.apache.storm.thrift.async.AsyncMethodCallback<NimbusSummary> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getLeader(resultHandler);
}
}
- public static class getClusterInfo<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getClusterInfo_args, ClusterSummary> {
- public getClusterInfo() {
- super("getClusterInfo");
+ public static class isTopologyNameAllowed<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, isTopologyNameAllowed_args, java.lang.Boolean> {
+ public isTopologyNameAllowed() {
+ super("isTopologyNameAllowed");
}
- public getClusterInfo_args getEmptyArgsInstance() {
- return new getClusterInfo_args();
+ public isTopologyNameAllowed_args getEmptyArgsInstance() {
+ return new isTopologyNameAllowed_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<ClusterSummary> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<ClusterSummary>() {
- public void onComplete(ClusterSummary o) {
- getClusterInfo_result result = new getClusterInfo_result();
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
+ public void onComplete(java.lang.Boolean o) {
+ isTopologyNameAllowed_result result = new isTopologyNameAllowed_result();
result.success = o;
+ result.set_success_isSet(true);
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.storm.thrift.transport.TTransportException e) {
@@ -7258,7 +7231,7 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- getClusterInfo_result result = new getClusterInfo_result();
+ isTopologyNameAllowed_result result = new isTopologyNameAllowed_result();
if (e instanceof AuthorizationException) {
result.aze = (AuthorizationException) e;
result.set_aze_isSet(true);
@@ -7290,25 +7263,25 @@ public class Nimbus {
return false;
}
- public void start(I iface, getClusterInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback<ClusterSummary> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getClusterInfo(resultHandler);
+ public void start(I iface, isTopologyNameAllowed_args args, org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.isTopologyNameAllowed(args.name,resultHandler);
}
}
- public static class getLeader<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getLeader_args, NimbusSummary> {
- public getLeader() {
- super("getLeader");
+ public static class getTopologyInfo<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getTopologyInfo_args, TopologyInfo> {
+ public getTopologyInfo() {
+ super("getTopologyInfo");
}
- public getLeader_args getEmptyArgsInstance() {
- return new getLeader_args();
+ public getTopologyInfo_args getEmptyArgsInstance() {
+ return new getTopologyInfo_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<NimbusSummary> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<TopologyInfo> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<NimbusSummary>() {
- public void onComplete(NimbusSummary o) {
- getLeader_result result = new getLeader_result();
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<TopologyInfo>() {
+ public void onComplete(TopologyInfo o) {
+ getTopologyInfo_result result = new getTopologyInfo_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
@@ -7323,8 +7296,150 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- getLeader_result result = new getLeader_result();
- if (e instanceof AuthorizationException) {
+ getTopologyInfo_result result = new getTopologyInfo_result();
+ if (e instanceof NotAliveException) {
+ result.e = (NotAliveException) e;
+ result.set_e_isSet(true);
+ msg = result;
+ } else if (e instanceof AuthorizationException) {
+ result.aze = (AuthorizationException) e;
+ result.set_aze_isSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.storm.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.storm.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
+ }
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getTopologyInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback<TopologyInfo> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getTopologyInfo(args.id,resultHandler);
+ }
+ }
+
+ public static class getTopologyInfoWithOpts<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getTopologyInfoWithOpts_args, TopologyInfo> {
+ public getTopologyInfoWithOpts() {
+ super("getTopologyInfoWithOpts");
+ }
+
+ public getTopologyInfoWithOpts_args getEmptyArgsInstance() {
+ return new getTopologyInfoWithOpts_args();
+ }
+
+ public org.apache.storm.thrift.async.AsyncMethodCallback<TopologyInfo> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<TopologyInfo>() {
+ public void onComplete(TopologyInfo o) {
+ getTopologyInfoWithOpts_result result = new getTopologyInfoWithOpts_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.storm.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
+ }
+ }
+ public void onError(java.lang.Exception e) {
+ byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
+ org.apache.storm.thrift.TSerializable msg;
+ getTopologyInfoWithOpts_result result = new getTopologyInfoWithOpts_result();
+ if (e instanceof NotAliveException) {
+ result.e = (NotAliveException) e;
+ result.set_e_isSet(true);
+ msg = result;
+ } else if (e instanceof AuthorizationException) {
+ result.aze = (AuthorizationException) e;
+ result.set_aze_isSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.storm.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.storm.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
+ }
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getTopologyInfoWithOpts_args args, org.apache.storm.thrift.async.AsyncMethodCallback<TopologyInfo> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getTopologyInfoWithOpts(args.id, args.options,resultHandler);
+ }
+ }
+
+ public static class getTopologyPageInfo<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getTopologyPageInfo_args, TopologyPageInfo> {
+ public getTopologyPageInfo() {
+ super("getTopologyPageInfo");
+ }
+
+ public getTopologyPageInfo_args getEmptyArgsInstance() {
+ return new getTopologyPageInfo_args();
+ }
+
+ public org.apache.storm.thrift.async.AsyncMethodCallback<TopologyPageInfo> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<TopologyPageInfo>() {
+ public void onComplete(TopologyPageInfo o) {
+ getTopologyPageInfo_result result = new getTopologyPageInfo_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.storm.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
+ }
+ }
+ public void onError(java.lang.Exception e) {
+ byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
+ org.apache.storm.thrift.TSerializable msg;
+ getTopologyPageInfo_result result = new getTopologyPageInfo_result();
+ if (e instanceof NotAliveException) {
+ result.e = (NotAliveException) e;
+ result.set_e_isSet(true);
+ msg = result;
+ } else if (e instanceof AuthorizationException) {
result.aze = (AuthorizationException) e;
result.set_aze_isSet(true);
msg = result;
@@ -7355,27 +7470,26 @@ public class Nimbus {
return false;
}
- public void start(I iface, getLeader_args args, org.apache.storm.thrift.async.AsyncMethodCallback<NimbusSummary> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getLeader(resultHandler);
+ public void start(I iface, getTopologyPageInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback<TopologyPageInfo> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getTopologyPageInfo(args.id, args.window, args.is_include_sys,resultHandler);
}
}
- public static class isTopologyNameAllowed<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, isTopologyNameAllowed_args, java.lang.Boolean> {
- public isTopologyNameAllowed() {
- super("isTopologyNameAllowed");
+ public static class getSupervisorPageInfo<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getSupervisorPageInfo_args, SupervisorPageInfo> {
+ public getSupervisorPageInfo() {
+ super("getSupervisorPageInfo");
}
- public isTopologyNameAllowed_args getEmptyArgsInstance() {
- return new isTopologyNameAllowed_args();
+ public getSupervisorPageInfo_args getEmptyArgsInstance() {
+ return new getSupervisorPageInfo_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<SupervisorPageInfo> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
- public void onComplete(java.lang.Boolean o) {
- isTopologyNameAllowed_result result = new isTopologyNameAllowed_result();
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<SupervisorPageInfo>() {
+ public void onComplete(SupervisorPageInfo o) {
+ getSupervisorPageInfo_result result = new getSupervisorPageInfo_result();
result.success = o;
- result.set_success_isSet(true);
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.storm.thrift.transport.TTransportException e) {
@@ -7389,8 +7503,12 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- isTopologyNameAllowed_result result = new isTopologyNameAllowed_result();
- if (e instanceof AuthorizationException) {
+ getSupervisorPageInfo_result result = new getSupervisorPageInfo_result();
+ if (e instanceof NotAliveException) {
+ result.e = (NotAliveException) e;
+ result.set_e_isSet(true);
+ msg = result;
+ } else if (e instanceof AuthorizationException) {
result.aze = (AuthorizationException) e;
result.set_aze_isSet(true);
msg = result;
@@ -7421,25 +7539,25 @@ public class Nimbus {
return false;
}
- public void start(I iface, isTopologyNameAllowed_args args, org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.storm.thrift.TException {
- iface.isTopologyNameAllowed(args.name,resultHandler);
+ public void start(I iface, getSupervisorPageInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback<SupervisorPageInfo> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getSupervisorPageInfo(args.id, args.host, args.is_include_sys,resultHandler);
}
}
- public static class getTopologyInfo<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getTopologyInfo_args, TopologyInfo> {
- public getTopologyInfo() {
- super("getTopologyInfo");
+ public static class getComponentPageInfo<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getComponentPageInfo_args, ComponentPageInfo> {
+ public getComponentPageInfo() {
+ super("getComponentPageInfo");
}
- public getTopologyInfo_args getEmptyArgsInstance() {
- return new getTopologyInfo_args();
+ public getComponentPageInfo_args getEmptyArgsInstance() {
+ return new getComponentPageInfo_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<TopologyInfo> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<ComponentPageInfo> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<TopologyInfo>() {
- public void onComplete(TopologyInfo o) {
- getTopologyInfo_result result = new getTopologyInfo_result();
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<ComponentPageInfo>() {
+ public void onComplete(ComponentPageInfo o) {
+ getComponentPageInfo_result result = new getComponentPageInfo_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
@@ -7454,7 +7572,7 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- getTopologyInfo_result result = new getTopologyInfo_result();
+ getComponentPageInfo_result result = new getComponentPageInfo_result();
if (e instanceof NotAliveException) {
result.e = (NotAliveException) e;
result.set_e_isSet(true);
@@ -7490,25 +7608,25 @@ public class Nimbus {
return false;
}
- public void start(I iface, getTopologyInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback<TopologyInfo> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getTopologyInfo(args.id,resultHandler);
+ public void start(I iface, getComponentPageInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback<ComponentPageInfo> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getComponentPageInfo(args.topology_id, args.component_id, args.window, args.is_include_sys,resultHandler);
}
}
- public static class getTopologyInfoWithOpts<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getTopologyInfoWithOpts_args, TopologyInfo> {
- public getTopologyInfoWithOpts() {
- super("getTopologyInfoWithOpts");
+ public static class getTopologyConf<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getTopologyConf_args, java.lang.String> {
+ public getTopologyConf() {
+ super("getTopologyConf");
}
- public getTopologyInfoWithOpts_args getEmptyArgsInstance() {
- return new getTopologyInfoWithOpts_args();
+ public getTopologyConf_args getEmptyArgsInstance() {
+ return new getTopologyConf_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<TopologyInfo> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<TopologyInfo>() {
- public void onComplete(TopologyInfo o) {
- getTopologyInfoWithOpts_result result = new getTopologyInfoWithOpts_result();
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String>() {
+ public void onComplete(java.lang.String o) {
+ getTopologyConf_result result = new getTopologyConf_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
@@ -7523,7 +7641,7 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- getTopologyInfoWithOpts_result result = new getTopologyInfoWithOpts_result();
+ getTopologyConf_result result = new getTopologyConf_result();
if (e instanceof NotAliveException) {
result.e = (NotAliveException) e;
result.set_e_isSet(true);
@@ -7559,25 +7677,25 @@ public class Nimbus {
return false;
}
- public void start(I iface, getTopologyInfoWithOpts_args args, org.apache.storm.thrift.async.AsyncMethodCallback<TopologyInfo> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getTopologyInfoWithOpts(args.id, args.options,resultHandler);
+ public void start(I iface, getTopologyConf_args args, org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getTopologyConf(args.id,resultHandler);
}
}
- public static class getTopologyPageInfo<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getTopologyPageInfo_args, TopologyPageInfo> {
- public getTopologyPageInfo() {
- super("getTopologyPageInfo");
+ public static class getTopology<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getTopology_args, StormTopology> {
+ public getTopology() {
+ super("getTopology");
}
- public getTopologyPageInfo_args getEmptyArgsInstance() {
- return new getTopologyPageInfo_args();
+ public getTopology_args getEmptyArgsInstance() {
+ return new getTopology_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<TopologyPageInfo> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<StormTopology> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<TopologyPageInfo>() {
- public void onComplete(TopologyPageInfo o) {
- getTopologyPageInfo_result result = new getTopologyPageInfo_result();
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<StormTopology>() {
+ public void onComplete(StormTopology o) {
+ getTopology_result result = new getTopology_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
@@ -7592,7 +7710,7 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- getTopologyPageInfo_result result = new getTopologyPageInfo_result();
+ getTopology_result result = new getTopology_result();
if (e instanceof NotAliveException) {
result.e = (NotAliveException) e;
result.set_e_isSet(true);
@@ -7628,25 +7746,25 @@ public class Nimbus {
return false;
}
- public void start(I iface, getTopologyPageInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback<TopologyPageInfo> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getTopologyPageInfo(args.id, args.window, args.is_include_sys,resultHandler);
+ public void start(I iface, getTopology_args args, org.apache.storm.thrift.async.AsyncMethodCallback<StormTopology> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getTopology(args.id,resultHandler);
}
}
- public static class getSupervisorPageInfo<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getSupervisorPageInfo_args, SupervisorPageInfo> {
- public getSupervisorPageInfo() {
- super("getSupervisorPageInfo");
+ public static class getUserTopology<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getUserTopology_args, StormTopology> {
+ public getUserTopology() {
+ super("getUserTopology");
}
- public getSupervisorPageInfo_args getEmptyArgsInstance() {
- return new getSupervisorPageInfo_args();
+ public getUserTopology_args getEmptyArgsInstance() {
+ return new getUserTopology_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<SupervisorPageInfo> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<StormTopology> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<SupervisorPageInfo>() {
- public void onComplete(SupervisorPageInfo o) {
- getSupervisorPageInfo_result result = new getSupervisorPageInfo_result();
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<StormTopology>() {
+ public void onComplete(StormTopology o) {
+ getUserTopology_result result = new getUserTopology_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
@@ -7661,7 +7779,7 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- getSupervisorPageInfo_result result = new getSupervisorPageInfo_result();
+ getUserTopology_result result = new getUserTopology_result();
if (e instanceof NotAliveException) {
result.e = (NotAliveException) e;
result.set_e_isSet(true);
@@ -7697,25 +7815,25 @@ public class Nimbus {
return false;
}
- public void start(I iface, getSupervisorPageInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback<SupervisorPageInfo> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getSupervisorPageInfo(args.id, args.host, args.is_include_sys,resultHandler);
+ public void start(I iface, getUserTopology_args args, org.apache.storm.thrift.async.AsyncMethodCallback<StormTopology> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getUserTopology(args.id,resultHandler);
}
}
- public static class getComponentPageInfo<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getComponentPageInfo_args, ComponentPageInfo> {
- public getComponentPageInfo() {
- super("getComponentPageInfo");
+ public static class getTopologyHistory<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getTopologyHistory_args, TopologyHistoryInfo> {
+ public getTopologyHistory() {
+ super("getTopologyHistory");
}
- public getComponentPageInfo_args getEmptyArgsInstance() {
- return new getComponentPageInfo_args();
+ public getTopologyHistory_args getEmptyArgsInstance() {
+ return new getTopologyHistory_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<ComponentPageInfo> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<TopologyHistoryInfo> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<ComponentPageInfo>() {
- public void onComplete(ComponentPageInfo o) {
- getComponentPageInfo_result result = new getComponentPageInfo_result();
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<TopologyHistoryInfo>() {
+ public void onComplete(TopologyHistoryInfo o) {
+ getTopologyHistory_result result = new getTopologyHistory_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
@@ -7730,12 +7848,8 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- getComponentPageInfo_result result = new getComponentPageInfo_result();
- if (e instanceof NotAliveException) {
- result.e = (NotAliveException) e;
- result.set_e_isSet(true);
- msg = result;
- } else if (e instanceof AuthorizationException) {
+ getTopologyHistory_result result = new getTopologyHistory_result();
+ if (e instanceof AuthorizationException) {
result.aze = (AuthorizationException) e;
result.set_aze_isSet(true);
msg = result;
@@ -7766,25 +7880,25 @@ public class Nimbus {
return false;
}
- public void start(I iface, getComponentPageInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback<ComponentPageInfo> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getComponentPageInfo(args.topology_id, args.component_id, args.window, args.is_include_sys,resultHandler);
+ public void start(I iface, getTopologyHistory_args args, org.apache.storm.thrift.async.AsyncMethodCallback<TopologyHistoryInfo> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getTopologyHistory(args.user,resultHandler);
}
}
- public static class getTopologyConf<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getTopologyConf_args, java.lang.String> {
- public getTopologyConf() {
- super("getTopologyConf");
+ public static class getOwnerResourceSummaries<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getOwnerResourceSummaries_args, java.util.List<OwnerResourceSummary>> {
+ public getOwnerResourceSummaries() {
+ super("getOwnerResourceSummaries");
}
- public getTopologyConf_args getEmptyArgsInstance() {
- return new getTopologyConf_args();
+ public getOwnerResourceSummaries_args getEmptyArgsInstance() {
+ return new getOwnerResourceSummaries_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<java.util.List<OwnerResourceSummary>> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String>() {
- public void onComplete(java.lang.String o) {
- getTopologyConf_result result = new getTopologyConf_result();
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<java.util.List<OwnerResourceSummary>>() {
+ public void onComplete(java.util.List<OwnerResourceSummary> o) {
+ getOwnerResourceSummaries_result result = new getOwnerResourceSummaries_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
@@ -7799,12 +7913,8 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- getTopologyConf_result result = new getTopologyConf_result();
- if (e instanceof NotAliveException) {
- result.e = (NotAliveException) e;
- result.set_e_isSet(true);
- msg = result;
- } else if (e instanceof AuthorizationException) {
+ getOwnerResourceSummaries_result result = new getOwnerResourceSummaries_result();
+ if (e instanceof AuthorizationException) {
result.aze = (AuthorizationException) e;
result.set_aze_isSet(true);
msg = result;
@@ -7835,25 +7945,25 @@ public class Nimbus {
return false;
}
- public void start(I iface, getTopologyConf_args args, org.apache.storm.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getTopologyConf(args.id,resultHandler);
+ public void start(I iface, getOwnerResourceSummaries_args args, org.apache.storm.thrift.async.AsyncMethodCallback<java.util.List<OwnerResourceSummary>> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getOwnerResourceSummaries(args.owner,resultHandler);
}
}
- public static class getTopology<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getTopology_args, StormTopology> {
- public getTopology() {
- super("getTopology");
+ public static class getSupervisorAssignments<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getSupervisorAssignments_args, SupervisorAssignments> {
+ public getSupervisorAssignments() {
+ super("getSupervisorAssignments");
}
- public getTopology_args getEmptyArgsInstance() {
- return new getTopology_args();
+ public getSupervisorAssignments_args getEmptyArgsInstance() {
+ return new getSupervisorAssignments_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<StormTopology> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<SupervisorAssignments> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<StormTopology>() {
- public void onComplete(StormTopology o) {
- getTopology_result result = new getTopology_result();
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<SupervisorAssignments>() {
+ public void onComplete(SupervisorAssignments o) {
+ getSupervisorAssignments_result result = new getSupervisorAssignments_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
@@ -7868,12 +7978,8 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- getTopology_result result = new getTopology_result();
- if (e instanceof NotAliveException) {
- result.e = (NotAliveException) e;
- result.set_e_isSet(true);
- msg = result;
- } else if (e instanceof AuthorizationException) {
+ getSupervisorAssignments_result result = new getSupervisorAssignments_result();
+ if (e instanceof AuthorizationException) {
result.aze = (AuthorizationException) e;
result.set_aze_isSet(true);
msg = result;
@@ -7904,26 +8010,25 @@ public class Nimbus {
return false;
}
- public void start(I iface, getTopology_args args, org.apache.storm.thrift.async.AsyncMethodCallback<StormTopology> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getTopology(args.id,resultHandler);
+ public void start(I iface, getSupervisorAssignments_args args, org.apache.storm.thrift.async.AsyncMethodCallback<SupervisorAssignments> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.getSupervisorAssignments(args.node,resultHandler);
}
}
- public static class getUserTopology<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getUserTopology_args, StormTopology> {
- public getUserTopology() {
- super("getUserTopology");
+ public static class sendSupervisorWorkerHeartbeats<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, sendSupervisorWorkerHeartbeats_args, Void> {
+ public sendSupervisorWorkerHeartbeats() {
+ super("sendSupervisorWorkerHeartbeats");
}
- public getUserTopology_args getEmptyArgsInstance() {
- return new getUserTopology_args();
+ public sendSupervisorWorkerHeartbeats_args getEmptyArgsInstance() {
+ return new sendSupervisorWorkerHeartbeats_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<StormTopology> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<StormTopology>() {
- public void onComplete(StormTopology o) {
- getUserTopology_result result = new getUserTopology_result();
- result.success = o;
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ sendSupervisorWorkerHeartbeats_result result = new sendSupervisorWorkerHeartbeats_result();
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.storm.thrift.transport.TTransportException e) {
@@ -7937,12 +8042,8 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- getUserTopology_result result = new getUserTopology_result();
- if (e instanceof NotAliveException) {
- result.e = (NotAliveException) e;
- result.set_e_isSet(true);
- msg = result;
- } else if (e instanceof AuthorizationException) {
+ sendSupervisorWorkerHeartbeats_result result = new sendSupervisorWorkerHeartbeats_result();
+ if (e instanceof AuthorizationException) {
result.aze = (AuthorizationException) e;
result.set_aze_isSet(true);
msg = result;
@@ -7973,26 +8074,25 @@ public class Nimbus {
return false;
}
- public void start(I iface, getUserTopology_args args, org.apache.storm.thrift.async.AsyncMethodCallback<StormTopology> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getUserTopology(args.id,resultHandler);
+ public void start(I iface, sendSupervisorWorkerHeartbeats_args args, org.apache.storm.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.storm.thrift.TException {
+ iface.sendSupervisorWorkerHeartbeats(args.heartbeats,resultHandler);
}
}
- public static class getTopologyHistory<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getTopologyHistory_args, TopologyHistoryInfo> {
- public getTopologyHistory() {
- super("getTopologyHistory");
+ public static class sendSupervisorWorkerHeartbeat<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, sendSupervisorWorkerHeartbeat_args, Void> {
+ public sendSupervisorWorkerHeartbeat() {
+ super("sendSupervisorWorkerHeartbeat");
}
- public getTopologyHistory_args getEmptyArgsInstance() {
- return new getTopologyHistory_args();
+ public sendSupervisorWorkerHeartbeat_args getEmptyArgsInstance() {
+ return new sendSupervisorWorkerHeartbeat_args();
}
- public org.apache.storm.thrift.async.AsyncMethodCallback<TopologyHistoryInfo> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.storm.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<TopologyHistoryInfo>() {
- public void onComplete(TopologyHistoryInfo o) {
- getTopologyHistory_result result = new getTopologyHistory_result();
- result.success = o;
+ return new org.apache.storm.thrift.async.AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ sendSupervisorWorkerHeartbeat_result result = new sendSupervisorWorkerHeartbeat_result();
try {
fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.storm.thrift.transport.TTransportException e) {
@@ -8006,272 +8106,14 @@ public class Nimbus {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
org.apache.storm.thrift.TSerializable msg;
- getTopologyHistory_result result = new getTopologyHistory_result();
+ sendSupervisorWorkerHeartbeat_result result = new sendSupervisorWorkerHeartbeat_result();
if (e instanceof AuthorizationException) {
result.aze = (AuthorizationException) e;
result.set_aze_isSet(true);
- msg = result;
- } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) {
- _LOGGER.error("TTransportException inside handler", e);
- fb.close();
- return;
- } else if (e instanceof org.apache.storm.thrift.TApplicationException) {
- _LOGGER.error("TApplicationException inside handler", e);
- msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.storm.thrift.TApplicationException)e;
- } else {
- _LOGGER.error("Exception inside handler", e);
- msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
- msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- } catch (java.lang.Exception ex) {
- _LOGGER.error("Exception writing to internal frame buffer", ex);
- fb.close();
- }
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getTopologyHistory_args args, org.apache.storm.thrift.async.AsyncMethodCallback<TopologyHistoryInfo> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getTopologyHistory(args.user,resultHandler);
- }
- }
-
- public static class getOwnerResourceSummaries<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getOwnerResourceSummaries_args, java.util.List<OwnerResourceSummary>> {
- public getOwnerResourceSummaries() {
- super("getOwnerResourceSummaries");
- }
-
- public getOwnerResourceSummaries_args getEmptyArgsInstance() {
- return new getOwnerResourceSummaries_args();
- }
-
- public org.apache.storm.thrift.async.AsyncMethodCallback<java.util.List<OwnerResourceSummary>> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
- final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<java.util.List<OwnerResourceSummary>>() {
- public void onComplete(java.util.List<OwnerResourceSummary> o) {
- getOwnerResourceSummaries_result result = new getOwnerResourceSummaries_result();
- result.success = o;
- try {
- fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
- } catch (org.apache.storm.thrift.transport.TTransportException e) {
- _LOGGER.error("TTransportException writing to internal frame buffer", e);
- fb.close();
- } catch (java.lang.Exception e) {
- _LOGGER.error("Exception writing to internal frame buffer", e);
- onError(e);
- }
- }
- public void onError(java.lang.Exception e) {
- byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
- org.apache.storm.thrift.TSerializable msg;
- getOwnerResourceSummaries_result result = new getOwnerResourceSummaries_result();
- if (e instanceof AuthorizationException) {
- result.aze = (AuthorizationException) e;
- result.set_aze_isSet(true);
- msg = result;
- } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) {
- _LOGGER.error("TTransportException inside handler", e);
- fb.close();
- return;
- } else if (e instanceof org.apache.storm.thrift.TApplicationException) {
- _LOGGER.error("TApplicationException inside handler", e);
- msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.storm.thrift.TApplicationException)e;
- } else {
- _LOGGER.error("Exception inside handler", e);
- msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
- msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- } catch (java.lang.Exception ex) {
- _LOGGER.error("Exception writing to internal frame buffer", ex);
- fb.close();
- }
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getOwnerResourceSummaries_args args, org.apache.storm.thrift.async.AsyncMethodCallback<java.util.List<OwnerResourceSummary>> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getOwnerResourceSummaries(args.owner,resultHandler);
- }
- }
-
- public static class getSupervisorAssignments<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, getSupervisorAssignments_args, SupervisorAssignments> {
- public getSupervisorAssignments() {
- super("getSupervisorAssignments");
- }
-
- public getSupervisorAssignments_args getEmptyArgsInstance() {
- return new getSupervisorAssignments_args();
- }
-
- public org.apache.storm.thrift.async.AsyncMethodCallback<SupervisorAssignments> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
- final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<SupervisorAssignments>() {
- public void onComplete(SupervisorAssignments o) {
- getSupervisorAssignments_result result = new getSupervisorAssignments_result();
- result.success = o;
- try {
- fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
- } catch (org.apache.storm.thrift.transport.TTransportException e) {
- _LOGGER.error("TTransportException writing to internal frame buffer", e);
- fb.close();
- } catch (java.lang.Exception e) {
- _LOGGER.error("Exception writing to internal frame buffer", e);
- onError(e);
- }
- }
- public void onError(java.lang.Exception e) {
- byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
- org.apache.storm.thrift.TSerializable msg;
- getSupervisorAssignments_result result = new getSupervisorAssignments_result();
- if (e instanceof AuthorizationException) {
- result.aze = (AuthorizationException) e;
- result.set_aze_isSet(true);
- msg = result;
- } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) {
- _LOGGER.error("TTransportException inside handler", e);
- fb.close();
- return;
- } else if (e instanceof org.apache.storm.thrift.TApplicationException) {
- _LOGGER.error("TApplicationException inside handler", e);
- msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.storm.thrift.TApplicationException)e;
- } else {
- _LOGGER.error("Exception inside handler", e);
- msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
- msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- } catch (java.lang.Exception ex) {
- _LOGGER.error("Exception writing to internal frame buffer", ex);
- fb.close();
- }
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getSupervisorAssignments_args args, org.apache.storm.thrift.async.AsyncMethodCallback<SupervisorAssignments> resultHandler) throws org.apache.storm.thrift.TException {
- iface.getSupervisorAssignments(args.node,resultHandler);
- }
- }
-
- public static class sendSupervisorWorkerHeartbeats<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, sendSupervisorWorkerHeartbeats_args, Void> {
- public sendSupervisorWorkerHeartbeats() {
- super("sendSupervisorWorkerHeartbeats");
- }
-
- public sendSupervisorWorkerHeartbeats_args getEmptyArgsInstance() {
- return new sendSupervisorWorkerHeartbeats_args();
- }
-
- public org.apache.storm.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
- final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- sendSupervisorWorkerHeartbeats_result result = new sendSupervisorWorkerHeartbeats_result();
- try {
- fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
- } catch (org.apache.storm.thrift.transport.TTransportException e) {
- _LOGGER.error("TTransportException writing to internal frame buffer", e);
- fb.close();
- } catch (java.lang.Exception e) {
- _LOGGER.error("Exception writing to internal frame buffer", e);
- onError(e);
- }
- }
- public void onError(java.lang.Exception e) {
- byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
- org.apache.storm.thrift.TSerializable msg;
- sendSupervisorWorkerHeartbeats_result result = new sendSupervisorWorkerHeartbeats_result();
- if (e instanceof AuthorizationException) {
- result.aze = (AuthorizationException) e;
- result.set_aze_isSet(true);
- msg = result;
- } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) {
- _LOGGER.error("TTransportException inside handler", e);
- fb.close();
- return;
- } else if (e instanceof org.apache.storm.thrift.TApplicationException) {
- _LOGGER.error("TApplicationException inside handler", e);
- msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.storm.thrift.TApplicationException)e;
- } else {
- _LOGGER.error("Exception inside handler", e);
- msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION;
- msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- } catch (java.lang.Exception ex) {
- _LOGGER.error("Exception writing to internal frame buffer", ex);
- fb.close();
- }
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, sendSupervisorWorkerHeartbeats_args args, org.apache.storm.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.storm.thrift.TException {
- iface.sendSupervisorWorkerHeartbeats(args.heartbeats,resultHandler);
- }
- }
-
- public static class sendSupervisorWorkerHeartbeat<I extends AsyncIface> extends org.apache.storm.thrift.AsyncProcessFunction<I, sendSupervisorWorkerHeartbeat_args, Void> {
- public sendSupervisorWorkerHeartbeat() {
- super("sendSupervisorWorkerHeartbeat");
- }
-
- public sendSupervisorWorkerHeartbeat_args getEmptyArgsInstance() {
- return new sendSupervisorWorkerHeartbeat_args();
- }
-
- public org.apache.storm.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
- final org.apache.storm.thrift.AsyncProcessFunction fcall = this;
- return new org.apache.storm.thrift.async.AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- sendSupervisorWorkerHeartbeat_result result = new sendSupervisorWorkerHeartbeat_result();
- try {
- fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid);
- } catch (org.apache.storm.thrift.transport.TTransportException e) {
- _LOGGER.error("TTransportException writing to internal frame buffer", e);
- fb.close();
- } catch (java.lang.Exception e) {
- _LOGGER.error("Exception writing to internal frame buffer", e);
- onError(e);
- }
- }
- public void onError(java.lang.Exception e) {
- byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY;
- org.apache.storm.thrift.TSerializable msg;
- sendSupervisorWorkerHeartbeat_result result = new sendSupervisorWorkerHeartbeat_result();
- if (e instanceof AuthorizationException) {
- result.aze = (AuthorizationException) e;
- result.set_aze_isSet(true);
- msg = result;
- } else if (e instanceof NotAliveException) {
- result.e = (NotAliveException) e;
- result.set_e_isSet(true);
+ msg = result;
+ } else if (e instanceof NotAliveException) {
+ result.e = (NotAliveException) e;
+ result.set_e_isSet(true);
msg = result;
} else if (e instanceof org.apache.storm.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
@@ -33279,909 +33121,14 @@ public class Nimbus {
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
- case SUCCESS:
- if (value == null) {
- unset_success();
- } else {
- set_success((java.lang.String)value);
- }
- break;
-
- case AZE:
- if (value == null) {
- unset_aze();
- } else {
- set_aze((AuthorizationException)value);
- }
- break;
-
- }
- }
-
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return get_success();
-
- case AZE:
- return get_aze();
-
- }
- throw new java.lang.IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return is_set_success();
- case AZE:
- return is_set_aze();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null)
- return false;
- if (that instanceof beginFileUpload_result)
- return this.equals((beginFileUpload_result)that);
- return false;
- }
-
- public boolean equals(beginFileUpload_result that) {
- if (that == null)
- return false;
- if (this == that)
- return true;
-
- boolean this_present_success = true && this.is_set_success();
- boolean that_present_success = true && that.is_set_success();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- boolean this_present_aze = true && this.is_set_aze();
- boolean that_present_aze = true && that.is_set_aze();
- if (this_present_aze || that_present_aze) {
- if (!(this_present_aze && that_present_aze))
- return false;
- if (!this.aze.equals(that.aze))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((is_set_success()) ? 131071 : 524287);
- if (is_set_success())
- hashCode = hashCode * 8191 + success.hashCode();
-
- hashCode = hashCode * 8191 + ((is_set_aze()) ? 131071 : 524287);
- if (is_set_aze())
- hashCode = hashCode * 8191 + aze.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(beginFileUpload_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_success()) {
- lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_aze()) {
- lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.aze, other.aze);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.storm.thrift.protocol.TProtocol iprot) throws org.apache.storm.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.storm.thrift.protocol.TProtocol oprot) throws org.apache.storm.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("beginFileUpload_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("aze:");
- if (this.aze == null) {
- sb.append("null");
- } else {
- sb.append(this.aze);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.storm.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.storm.thrift.protocol.TCompactProtocol(new org.apache.storm.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.storm.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(new org.apache.storm.thrift.protocol.TCompactProtocol(new org.apache.storm.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.storm.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class beginFileUpload_resultStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory {
- public beginFileUpload_resultStandardScheme getScheme() {
- return new beginFileUpload_resultStandardScheme();
- }
- }
-
- private static class beginFileUpload_resultStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme<beginFileUpload_result> {
-
- public void read(org.apache.storm.thrift.protocol.TProtocol iprot, beginFileUpload_result struct) throws org.apache.storm.thrift.TException {
- org.apache.storm.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.storm.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRING) {
- struct.success = iprot.readString();
- struct.set_success_isSet(true);
- } else {
- org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 1: // AZE
- if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRUCT) {
- struct.aze = new AuthorizationException();
- struct.aze.read(iprot);
- struct.set_aze_isSet(true);
- } else {
- org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.storm.thrift.protocol.TProtocol oprot, beginFileUpload_result struct) throws org.apache.storm.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeString(struct.success);
- oprot.writeFieldEnd();
- }
- if (struct.aze != null) {
- oprot.writeFieldBegin(AZE_FIELD_DESC);
- struct.aze.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class beginFileUpload_resultTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory {
- public beginFileUpload_resultTupleScheme getScheme() {
- return new beginFileUpload_resultTupleScheme();
- }
- }
-
- private static class beginFileUpload_resultTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme<beginFileUpload_result> {
-
- @Override
- public void write(org.apache.storm.thrift.protocol.TProtocol prot, beginFileUpload_result struct) throws org.apache.storm.thrift.TException {
- org.apache.storm.thrift.protocol.TTupleProtocol oprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.is_set_success()) {
- optionals.set(0);
- }
- if (struct.is_set_aze()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.is_set_success()) {
- oprot.writeString(struct.success);
- }
- if (struct.is_set_aze()) {
- struct.aze.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.storm.thrift.protocol.TProtocol prot, beginFileUpload_result struct) throws org.apache.storm.thrift.TException {
- org.apache.storm.thrift.protocol.TTupleProtocol iprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.success = iprot.readString();
- struct.set_success_isSet(true);
- }
- if (incoming.get(1)) {
- struct.aze = new AuthorizationException();
- struct.aze.read(iprot);
- struct.set_aze_isSet(true);
- }
- }
- }
-
- private static <S extends org.apache.storm.thrift.scheme.IScheme> S scheme(org.apache.storm.thrift.protocol.TProtocol proto) {
- return (org.apache.storm.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
- }
- }
-
- public static class uploadChunk_args implements org.apache.storm.thrift.TBase<uploadChunk_args, uploadChunk_args._Fields>, java.io.Serializable, Cloneable, Comparable<uploadChunk_args> {
- private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("uploadChunk_args");
-
- private static final org.apache.storm.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("location", org.apache.storm.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.storm.thrift.protocol.TField CHUNK_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("chunk", org.apache.storm.thrift.protocol.TType.STRING, (short)2);
-
- private static final org.apache.storm.thrift.scheme.Sch
<TRUNCATED>
[3/6] storm git commit: STORM-2947: Remove deprecated field and
method from Thrift
Posted by bo...@apache.org.
STORM-2947: Remove deprecated field and method from Thrift
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/1768062f
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/1768062f
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/1768062f
Branch: refs/heads/master
Commit: 1768062f7b5f069a5a1b6a55218e6195f5e8f66a
Parents: 2d7c7d3
Author: Stig Rohde Døssing <sr...@apache.org>
Authored: Tue Jul 10 15:56:34 2018 +0200
Committer: Stig Rohde Døssing <sr...@apache.org>
Committed: Thu Jul 12 15:07:58 2018 +0200
----------------------------------------------------------------------
.../apache/storm/generated/ClusterSummary.java | 124 +-
.../jvm/org/apache/storm/generated/Nimbus.java | 2519 ++++++------------
storm-client/src/py/storm/Nimbus-remote | 7 -
storm-client/src/py/storm/Nimbus.py | 201 --
storm-client/src/py/storm/ttypes.py | 24 +-
storm-client/src/storm.thrift | 8 +-
.../java/org/apache/storm/LocalCluster.java | 5 -
.../org/apache/storm/daemon/nimbus/Nimbus.java | 23 -
8 files changed, 785 insertions(+), 2126 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/1768062f/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java b/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java
index 3ab05ca..400e06d 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java
@@ -29,24 +29,21 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("ClusterSummary");
private static final org.apache.storm.thrift.protocol.TField SUPERVISORS_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("supervisors", org.apache.storm.thrift.protocol.TType.LIST, (short)1);
- private static final org.apache.storm.thrift.protocol.TField NIMBUS_UPTIME_SECS_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("nimbus_uptime_secs", org.apache.storm.thrift.protocol.TType.I32, (short)2);
- private static final org.apache.storm.thrift.protocol.TField TOPOLOGIES_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("topologies", org.apache.storm.thrift.protocol.TType.LIST, (short)3);
- private static final org.apache.storm.thrift.protocol.TField NIMBUSES_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("nimbuses", org.apache.storm.thrift.protocol.TType.LIST, (short)4);
+ private static final org.apache.storm.thrift.protocol.TField TOPOLOGIES_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("topologies", org.apache.storm.thrift.protocol.TType.LIST, (short)2);
+ private static final org.apache.storm.thrift.protocol.TField NIMBUSES_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("nimbuses", org.apache.storm.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ClusterSummaryStandardSchemeFactory();
private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ClusterSummaryTupleSchemeFactory();
private java.util.List<SupervisorSummary> supervisors; // required
- private int nimbus_uptime_secs; // optional
private java.util.List<TopologySummary> topologies; // required
private java.util.List<NimbusSummary> nimbuses; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.storm.thrift.TFieldIdEnum {
SUPERVISORS((short)1, "supervisors"),
- NIMBUS_UPTIME_SECS((short)2, "nimbus_uptime_secs"),
- TOPOLOGIES((short)3, "topologies"),
- NIMBUSES((short)4, "nimbuses");
+ TOPOLOGIES((short)2, "topologies"),
+ NIMBUSES((short)3, "nimbuses");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -63,11 +60,9 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
switch(fieldId) {
case 1: // SUPERVISORS
return SUPERVISORS;
- case 2: // NIMBUS_UPTIME_SECS
- return NIMBUS_UPTIME_SECS;
- case 3: // TOPOLOGIES
+ case 2: // TOPOLOGIES
return TOPOLOGIES;
- case 4: // NIMBUSES
+ case 3: // NIMBUSES
return NIMBUSES;
default:
return null;
@@ -109,17 +104,12 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
}
// isset id assignments
- private static final int __NIMBUS_UPTIME_SECS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.NIMBUS_UPTIME_SECS};
public static final java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUPERVISORS, new org.apache.storm.thrift.meta_data.FieldMetaData("supervisors", org.apache.storm.thrift.TFieldRequirementType.REQUIRED,
new org.apache.storm.thrift.meta_data.ListMetaData(org.apache.storm.thrift.protocol.TType.LIST,
new org.apache.storm.thrift.meta_data.StructMetaData(org.apache.storm.thrift.protocol.TType.STRUCT, SupervisorSummary.class))));
- tmpMap.put(_Fields.NIMBUS_UPTIME_SECS, new org.apache.storm.thrift.meta_data.FieldMetaData("nimbus_uptime_secs", org.apache.storm.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.storm.thrift.meta_data.FieldValueMetaData(org.apache.storm.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.TOPOLOGIES, new org.apache.storm.thrift.meta_data.FieldMetaData("topologies", org.apache.storm.thrift.TFieldRequirementType.REQUIRED,
new org.apache.storm.thrift.meta_data.ListMetaData(org.apache.storm.thrift.protocol.TType.LIST,
new org.apache.storm.thrift.meta_data.StructMetaData(org.apache.storm.thrift.protocol.TType.STRUCT, TopologySummary.class))));
@@ -131,8 +121,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
}
public ClusterSummary() {
- this.nimbus_uptime_secs = 0;
-
}
public ClusterSummary(
@@ -150,7 +138,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
* Performs a deep copy on <i>other</i>.
*/
public ClusterSummary(ClusterSummary other) {
- __isset_bitfield = other.__isset_bitfield;
if (other.is_set_supervisors()) {
java.util.List<SupervisorSummary> __this__supervisors = new java.util.ArrayList<SupervisorSummary>(other.supervisors.size());
for (SupervisorSummary other_element : other.supervisors) {
@@ -158,7 +145,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
}
this.supervisors = __this__supervisors;
}
- this.nimbus_uptime_secs = other.nimbus_uptime_secs;
if (other.is_set_topologies()) {
java.util.List<TopologySummary> __this__topologies = new java.util.ArrayList<TopologySummary>(other.topologies.size());
for (TopologySummary other_element : other.topologies) {
@@ -182,8 +168,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
@Override
public void clear() {
this.supervisors = null;
- this.nimbus_uptime_secs = 0;
-
this.topologies = null;
this.nimbuses = null;
}
@@ -226,28 +210,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
}
}
- public int get_nimbus_uptime_secs() {
- return this.nimbus_uptime_secs;
- }
-
- public void set_nimbus_uptime_secs(int nimbus_uptime_secs) {
- this.nimbus_uptime_secs = nimbus_uptime_secs;
- set_nimbus_uptime_secs_isSet(true);
- }
-
- public void unset_nimbus_uptime_secs() {
- __isset_bitfield = org.apache.storm.thrift.EncodingUtils.clearBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID);
- }
-
- /** Returns true if field nimbus_uptime_secs is set (has been assigned a value) and false otherwise */
- public boolean is_set_nimbus_uptime_secs() {
- return org.apache.storm.thrift.EncodingUtils.testBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID);
- }
-
- public void set_nimbus_uptime_secs_isSet(boolean value) {
- __isset_bitfield = org.apache.storm.thrift.EncodingUtils.setBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID, value);
- }
-
public int get_topologies_size() {
return (this.topologies == null) ? 0 : this.topologies.size();
}
@@ -334,14 +296,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
}
break;
- case NIMBUS_UPTIME_SECS:
- if (value == null) {
- unset_nimbus_uptime_secs();
- } else {
- set_nimbus_uptime_secs((java.lang.Integer)value);
- }
- break;
-
case TOPOLOGIES:
if (value == null) {
unset_topologies();
@@ -366,9 +320,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
case SUPERVISORS:
return get_supervisors();
- case NIMBUS_UPTIME_SECS:
- return get_nimbus_uptime_secs();
-
case TOPOLOGIES:
return get_topologies();
@@ -388,8 +339,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
switch (field) {
case SUPERVISORS:
return is_set_supervisors();
- case NIMBUS_UPTIME_SECS:
- return is_set_nimbus_uptime_secs();
case TOPOLOGIES:
return is_set_topologies();
case NIMBUSES:
@@ -422,15 +371,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
return false;
}
- boolean this_present_nimbus_uptime_secs = true && this.is_set_nimbus_uptime_secs();
- boolean that_present_nimbus_uptime_secs = true && that.is_set_nimbus_uptime_secs();
- if (this_present_nimbus_uptime_secs || that_present_nimbus_uptime_secs) {
- if (!(this_present_nimbus_uptime_secs && that_present_nimbus_uptime_secs))
- return false;
- if (this.nimbus_uptime_secs != that.nimbus_uptime_secs)
- return false;
- }
-
boolean this_present_topologies = true && this.is_set_topologies();
boolean that_present_topologies = true && that.is_set_topologies();
if (this_present_topologies || that_present_topologies) {
@@ -460,10 +400,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
if (is_set_supervisors())
hashCode = hashCode * 8191 + supervisors.hashCode();
- hashCode = hashCode * 8191 + ((is_set_nimbus_uptime_secs()) ? 131071 : 524287);
- if (is_set_nimbus_uptime_secs())
- hashCode = hashCode * 8191 + nimbus_uptime_secs;
-
hashCode = hashCode * 8191 + ((is_set_topologies()) ? 131071 : 524287);
if (is_set_topologies())
hashCode = hashCode * 8191 + topologies.hashCode();
@@ -493,16 +429,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
return lastComparison;
}
}
- lastComparison = java.lang.Boolean.valueOf(is_set_nimbus_uptime_secs()).compareTo(other.is_set_nimbus_uptime_secs());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_nimbus_uptime_secs()) {
- lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.nimbus_uptime_secs, other.nimbus_uptime_secs);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
lastComparison = java.lang.Boolean.valueOf(is_set_topologies()).compareTo(other.is_set_topologies());
if (lastComparison != 0) {
return lastComparison;
@@ -550,12 +476,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
sb.append(this.supervisors);
}
first = false;
- if (is_set_nimbus_uptime_secs()) {
- if (!first) sb.append(", ");
- sb.append("nimbus_uptime_secs:");
- sb.append(this.nimbus_uptime_secs);
- first = false;
- }
if (!first) sb.append(", ");
sb.append("topologies:");
if (this.topologies == null) {
@@ -603,8 +523,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
read(new org.apache.storm.thrift.protocol.TCompactProtocol(new org.apache.storm.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.storm.thrift.TException te) {
throw new java.io.IOException(te);
@@ -648,15 +566,7 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // NIMBUS_UPTIME_SECS
- if (schemeField.type == org.apache.storm.thrift.protocol.TType.I32) {
- struct.nimbus_uptime_secs = iprot.readI32();
- struct.set_nimbus_uptime_secs_isSet(true);
- } else {
- org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // TOPOLOGIES
+ case 2: // TOPOLOGIES
if (schemeField.type == org.apache.storm.thrift.protocol.TType.LIST) {
{
org.apache.storm.thrift.protocol.TList _list139 = iprot.readListBegin();
@@ -675,7 +585,7 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 4: // NIMBUSES
+ case 3: // NIMBUSES
if (schemeField.type == org.apache.storm.thrift.protocol.TType.LIST) {
{
org.apache.storm.thrift.protocol.TList _list142 = iprot.readListBegin();
@@ -719,11 +629,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
}
oprot.writeFieldEnd();
}
- if (struct.is_set_nimbus_uptime_secs()) {
- oprot.writeFieldBegin(NIMBUS_UPTIME_SECS_FIELD_DESC);
- oprot.writeI32(struct.nimbus_uptime_secs);
- oprot.writeFieldEnd();
- }
if (struct.topologies != null) {
oprot.writeFieldBegin(TOPOLOGIES_FIELD_DESC);
{
@@ -786,14 +691,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
_iter150.write(oprot);
}
}
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.is_set_nimbus_uptime_secs()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.is_set_nimbus_uptime_secs()) {
- oprot.writeI32(struct.nimbus_uptime_secs);
- }
}
@Override
@@ -835,11 +732,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
}
}
struct.set_nimbuses_isSet(true);
- java.util.BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.nimbus_uptime_secs = iprot.readI32();
- struct.set_nimbus_uptime_secs_isSet(true);
- }
}
}
[5/6] storm git commit: Address review comments
Posted by bo...@apache.org.
Address review comments
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/950bd181
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/950bd181
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/950bd181
Branch: refs/heads/master
Commit: 950bd1819cbef92ea12d93d2fae9324895e667a1
Parents: e0795f1
Author: Stig Rohde Døssing <sr...@apache.org>
Authored: Thu Jul 12 19:28:59 2018 +0200
Committer: Stig Rohde Døssing <sr...@apache.org>
Committed: Thu Jul 12 19:30:20 2018 +0200
----------------------------------------------------------------------
.../org/apache/storm/generated/ClusterSummary.java | 16 ++++++++--------
storm-client/src/py/storm/ttypes.py | 13 +++++++------
storm-client/src/storm.thrift | 10 +++++++---
3 files changed, 22 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/950bd181/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java b/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java
index 400e06d..d5567a0 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java
@@ -29,8 +29,8 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("ClusterSummary");
private static final org.apache.storm.thrift.protocol.TField SUPERVISORS_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("supervisors", org.apache.storm.thrift.protocol.TType.LIST, (short)1);
- private static final org.apache.storm.thrift.protocol.TField TOPOLOGIES_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("topologies", org.apache.storm.thrift.protocol.TType.LIST, (short)2);
- private static final org.apache.storm.thrift.protocol.TField NIMBUSES_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("nimbuses", org.apache.storm.thrift.protocol.TType.LIST, (short)3);
+ private static final org.apache.storm.thrift.protocol.TField TOPOLOGIES_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("topologies", org.apache.storm.thrift.protocol.TType.LIST, (short)3);
+ private static final org.apache.storm.thrift.protocol.TField NIMBUSES_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("nimbuses", org.apache.storm.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ClusterSummaryStandardSchemeFactory();
private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ClusterSummaryTupleSchemeFactory();
@@ -42,8 +42,8 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.storm.thrift.TFieldIdEnum {
SUPERVISORS((short)1, "supervisors"),
- TOPOLOGIES((short)2, "topologies"),
- NIMBUSES((short)3, "nimbuses");
+ TOPOLOGIES((short)3, "topologies"),
+ NIMBUSES((short)4, "nimbuses");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -60,9 +60,9 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
switch(fieldId) {
case 1: // SUPERVISORS
return SUPERVISORS;
- case 2: // TOPOLOGIES
+ case 3: // TOPOLOGIES
return TOPOLOGIES;
- case 3: // NIMBUSES
+ case 4: // NIMBUSES
return NIMBUSES;
default:
return null;
@@ -566,7 +566,7 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // TOPOLOGIES
+ case 3: // TOPOLOGIES
if (schemeField.type == org.apache.storm.thrift.protocol.TType.LIST) {
{
org.apache.storm.thrift.protocol.TList _list139 = iprot.readListBegin();
@@ -585,7 +585,7 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 3: // NIMBUSES
+ case 4: // NIMBUSES
if (schemeField.type == org.apache.storm.thrift.protocol.TType.LIST) {
{
org.apache.storm.thrift.protocol.TList _list142 = iprot.readListBegin();
http://git-wip-us.apache.org/repos/asf/storm/blob/950bd181/storm-client/src/py/storm/ttypes.py
----------------------------------------------------------------------
diff --git a/storm-client/src/py/storm/ttypes.py b/storm-client/src/py/storm/ttypes.py
index e20c926..16f35a4 100644
--- a/storm-client/src/py/storm/ttypes.py
+++ b/storm-client/src/py/storm/ttypes.py
@@ -2630,7 +2630,7 @@ class ClusterSummary(object):
iprot.readListEnd()
else:
iprot.skip(ftype)
- elif fid == 2:
+ elif fid == 3:
if ftype == TType.LIST:
self.topologies = []
(_etype130, _size127) = iprot.readListBegin()
@@ -2641,7 +2641,7 @@ class ClusterSummary(object):
iprot.readListEnd()
else:
iprot.skip(ftype)
- elif fid == 3:
+ elif fid == 4:
if ftype == TType.LIST:
self.nimbuses = []
(_etype136, _size133) = iprot.readListBegin()
@@ -2670,14 +2670,14 @@ class ClusterSummary(object):
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.topologies is not None:
- oprot.writeFieldBegin('topologies', TType.LIST, 2)
+ oprot.writeFieldBegin('topologies', TType.LIST, 3)
oprot.writeListBegin(TType.STRUCT, len(self.topologies))
for iter140 in self.topologies:
iter140.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.nimbuses is not None:
- oprot.writeFieldBegin('nimbuses', TType.LIST, 3)
+ oprot.writeFieldBegin('nimbuses', TType.LIST, 4)
oprot.writeListBegin(TType.STRUCT, len(self.nimbuses))
for iter141 in self.nimbuses:
iter141.write(oprot)
@@ -10819,8 +10819,9 @@ all_structs.append(ClusterSummary)
ClusterSummary.thrift_spec = (
None, # 0
(1, TType.LIST, 'supervisors', (TType.STRUCT, [SupervisorSummary, None], False), None, ), # 1
- (2, TType.LIST, 'topologies', (TType.STRUCT, [TopologySummary, None], False), None, ), # 2
- (3, TType.LIST, 'nimbuses', (TType.STRUCT, [NimbusSummary, None], False), None, ), # 3
+ None, # 2
+ (3, TType.LIST, 'topologies', (TType.STRUCT, [TopologySummary, None], False), None, ), # 3
+ (4, TType.LIST, 'nimbuses', (TType.STRUCT, [NimbusSummary, None], False), None, ), # 4
)
all_structs.append(ErrorInfo)
ErrorInfo.thrift_spec = (
http://git-wip-us.apache.org/repos/asf/storm/blob/950bd181/storm-client/src/storm.thrift
----------------------------------------------------------------------
diff --git a/storm-client/src/storm.thrift b/storm-client/src/storm.thrift
index 9997c8e..9753ff5 100644
--- a/storm-client/src/storm.thrift
+++ b/storm-client/src/storm.thrift
@@ -206,8 +206,9 @@ struct NimbusSummary {
struct ClusterSummary {
1: required list<SupervisorSummary> supervisors;
- 2: required list<TopologySummary> topologies;
- 3: required list<NimbusSummary> nimbuses;
+ //2: Removed. Do not reuse.
+ 3: required list<TopologySummary> topologies;
+ 4: required list<NimbusSummary> nimbuses;
}
struct ErrorInfo {
@@ -711,6 +712,9 @@ struct WorkerMetrics {
}
service Nimbus {
+ //Removed methods, be careful about reusing these names
+ //string beginFileDownload(1: string file) throws (1: AuthorizationException aze);
+
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);
@@ -757,7 +761,7 @@ service Nimbus {
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);
-
+
//can stop downloading chunks when receive 0-length byte array back
binary downloadChunk(1: string id) throws (1: AuthorizationException aze);