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/05/23 20:03:31 UTC
[01/43] storm git commit: STORM-3061: thrift 0.11
Repository: storm
Updated Branches:
refs/heads/master 93ed60142 -> 9e97a0758
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/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 f6c98b0..48d2886 100644
--- a/storm-client/src/py/storm/ttypes.py
+++ b/storm-client/src/py/storm/ttypes.py
@@ -17,13509 +17,12858 @@
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:utf8strings
#
-from thrift.Thrift import TType, TMessageType, TException, TApplicationException
+from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+from thrift.protocol.TProtocol import TProtocolException
+from thrift.TRecursive import fix_spec
+
+import sys
from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol, TProtocol
-try:
- from thrift.protocol import fastbinary
-except:
- fastbinary = None
-
-
-class ComponentType:
- BOLT = 1
- SPOUT = 2
-
- _VALUES_TO_NAMES = {
- 1: "BOLT",
- 2: "SPOUT",
- }
-
- _NAMES_TO_VALUES = {
- "BOLT": 1,
- "SPOUT": 2,
- }
-
-class TopologyInitialStatus:
- ACTIVE = 1
- INACTIVE = 2
-
- _VALUES_TO_NAMES = {
- 1: "ACTIVE",
- 2: "INACTIVE",
- }
-
- _NAMES_TO_VALUES = {
- "ACTIVE": 1,
- "INACTIVE": 2,
- }
-
-class AccessControlType:
- OTHER = 1
- USER = 2
-
- _VALUES_TO_NAMES = {
- 1: "OTHER",
- 2: "USER",
- }
-
- _NAMES_TO_VALUES = {
- "OTHER": 1,
- "USER": 2,
- }
-
-class TopologyStatus:
- ACTIVE = 1
- INACTIVE = 2
- REBALANCING = 3
- KILLED = 4
-
- _VALUES_TO_NAMES = {
- 1: "ACTIVE",
- 2: "INACTIVE",
- 3: "REBALANCING",
- 4: "KILLED",
- }
-
- _NAMES_TO_VALUES = {
- "ACTIVE": 1,
- "INACTIVE": 2,
- "REBALANCING": 3,
- "KILLED": 4,
- }
-
-class NumErrorsChoice:
- ALL = 0
- NONE = 1
- ONE = 2
-
- _VALUES_TO_NAMES = {
- 0: "ALL",
- 1: "NONE",
- 2: "ONE",
- }
-
- _NAMES_TO_VALUES = {
- "ALL": 0,
- "NONE": 1,
- "ONE": 2,
- }
-
-class ProfileAction:
- JPROFILE_STOP = 0
- JPROFILE_START = 1
- JPROFILE_DUMP = 2
- JMAP_DUMP = 3
- JSTACK_DUMP = 4
- JVM_RESTART = 5
-
- _VALUES_TO_NAMES = {
- 0: "JPROFILE_STOP",
- 1: "JPROFILE_START",
- 2: "JPROFILE_DUMP",
- 3: "JMAP_DUMP",
- 4: "JSTACK_DUMP",
- 5: "JVM_RESTART",
- }
-
- _NAMES_TO_VALUES = {
- "JPROFILE_STOP": 0,
- "JPROFILE_START": 1,
- "JPROFILE_DUMP": 2,
- "JMAP_DUMP": 3,
- "JSTACK_DUMP": 4,
- "JVM_RESTART": 5,
- }
-
-class LogLevelAction:
- UNCHANGED = 1
- UPDATE = 2
- REMOVE = 3
-
- _VALUES_TO_NAMES = {
- 1: "UNCHANGED",
- 2: "UPDATE",
- 3: "REMOVE",
- }
-
- _NAMES_TO_VALUES = {
- "UNCHANGED": 1,
- "UPDATE": 2,
- "REMOVE": 3,
- }
-
-class DRPCExceptionType:
- INTERNAL_ERROR = 0
- SERVER_SHUTDOWN = 1
- SERVER_TIMEOUT = 2
- FAILED_REQUEST = 3
-
- _VALUES_TO_NAMES = {
- 0: "INTERNAL_ERROR",
- 1: "SERVER_SHUTDOWN",
- 2: "SERVER_TIMEOUT",
- 3: "FAILED_REQUEST",
- }
-
- _NAMES_TO_VALUES = {
- "INTERNAL_ERROR": 0,
- "SERVER_SHUTDOWN": 1,
- "SERVER_TIMEOUT": 2,
- "FAILED_REQUEST": 3,
- }
-
-class HBServerMessageType:
- CREATE_PATH = 0
- CREATE_PATH_RESPONSE = 1
- EXISTS = 2
- EXISTS_RESPONSE = 3
- SEND_PULSE = 4
- SEND_PULSE_RESPONSE = 5
- GET_ALL_PULSE_FOR_PATH = 6
- GET_ALL_PULSE_FOR_PATH_RESPONSE = 7
- GET_ALL_NODES_FOR_PATH = 8
- GET_ALL_NODES_FOR_PATH_RESPONSE = 9
- GET_PULSE = 10
- GET_PULSE_RESPONSE = 11
- DELETE_PATH = 12
- DELETE_PATH_RESPONSE = 13
- DELETE_PULSE_ID = 14
- DELETE_PULSE_ID_RESPONSE = 15
- CONTROL_MESSAGE = 16
- SASL_MESSAGE_TOKEN = 17
- NOT_AUTHORIZED = 18
-
- _VALUES_TO_NAMES = {
- 0: "CREATE_PATH",
- 1: "CREATE_PATH_RESPONSE",
- 2: "EXISTS",
- 3: "EXISTS_RESPONSE",
- 4: "SEND_PULSE",
- 5: "SEND_PULSE_RESPONSE",
- 6: "GET_ALL_PULSE_FOR_PATH",
- 7: "GET_ALL_PULSE_FOR_PATH_RESPONSE",
- 8: "GET_ALL_NODES_FOR_PATH",
- 9: "GET_ALL_NODES_FOR_PATH_RESPONSE",
- 10: "GET_PULSE",
- 11: "GET_PULSE_RESPONSE",
- 12: "DELETE_PATH",
- 13: "DELETE_PATH_RESPONSE",
- 14: "DELETE_PULSE_ID",
- 15: "DELETE_PULSE_ID_RESPONSE",
- 16: "CONTROL_MESSAGE",
- 17: "SASL_MESSAGE_TOKEN",
- 18: "NOT_AUTHORIZED",
- }
-
- _NAMES_TO_VALUES = {
- "CREATE_PATH": 0,
- "CREATE_PATH_RESPONSE": 1,
- "EXISTS": 2,
- "EXISTS_RESPONSE": 3,
- "SEND_PULSE": 4,
- "SEND_PULSE_RESPONSE": 5,
- "GET_ALL_PULSE_FOR_PATH": 6,
- "GET_ALL_PULSE_FOR_PATH_RESPONSE": 7,
- "GET_ALL_NODES_FOR_PATH": 8,
- "GET_ALL_NODES_FOR_PATH_RESPONSE": 9,
- "GET_PULSE": 10,
- "GET_PULSE_RESPONSE": 11,
- "DELETE_PATH": 12,
- "DELETE_PATH_RESPONSE": 13,
- "DELETE_PULSE_ID": 14,
- "DELETE_PULSE_ID_RESPONSE": 15,
- "CONTROL_MESSAGE": 16,
- "SASL_MESSAGE_TOKEN": 17,
- "NOT_AUTHORIZED": 18,
- }
-
-class WorkerTokenServiceType:
- NIMBUS = 0
- DRPC = 1
- SUPERVISOR = 2
-
- _VALUES_TO_NAMES = {
- 0: "NIMBUS",
- 1: "DRPC",
- 2: "SUPERVISOR",
- }
-
- _NAMES_TO_VALUES = {
- "NIMBUS": 0,
- "DRPC": 1,
- "SUPERVISOR": 2,
- }
-
-
-class JavaObjectArg:
- """
- Attributes:
- - int_arg
- - long_arg
- - string_arg
- - bool_arg
- - binary_arg
- - double_arg
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.I32, 'int_arg', None, None, ), # 1
- (2, TType.I64, 'long_arg', None, None, ), # 2
- (3, TType.STRING, 'string_arg', None, None, ), # 3
- (4, TType.BOOL, 'bool_arg', None, None, ), # 4
- (5, TType.STRING, 'binary_arg', None, None, ), # 5
- (6, TType.DOUBLE, 'double_arg', None, None, ), # 6
- )
-
- def __init__(self, int_arg=None, long_arg=None, string_arg=None, bool_arg=None, binary_arg=None, double_arg=None,):
- self.int_arg = int_arg
- self.long_arg = long_arg
- self.string_arg = string_arg
- self.bool_arg = bool_arg
- self.binary_arg = binary_arg
- self.double_arg = double_arg
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.I32:
- self.int_arg = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.I64:
- self.long_arg = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.string_arg = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.BOOL:
- self.bool_arg = iprot.readBool()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.STRING:
- self.binary_arg = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.DOUBLE:
- self.double_arg = iprot.readDouble()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('JavaObjectArg')
- if self.int_arg is not None:
- oprot.writeFieldBegin('int_arg', TType.I32, 1)
- oprot.writeI32(self.int_arg)
- oprot.writeFieldEnd()
- if self.long_arg is not None:
- oprot.writeFieldBegin('long_arg', TType.I64, 2)
- oprot.writeI64(self.long_arg)
- oprot.writeFieldEnd()
- if self.string_arg is not None:
- oprot.writeFieldBegin('string_arg', TType.STRING, 3)
- oprot.writeString(self.string_arg.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.bool_arg is not None:
- oprot.writeFieldBegin('bool_arg', TType.BOOL, 4)
- oprot.writeBool(self.bool_arg)
- oprot.writeFieldEnd()
- if self.binary_arg is not None:
- oprot.writeFieldBegin('binary_arg', TType.STRING, 5)
- oprot.writeString(self.binary_arg)
- oprot.writeFieldEnd()
- if self.double_arg is not None:
- oprot.writeFieldBegin('double_arg', TType.DOUBLE, 6)
- oprot.writeDouble(self.double_arg)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.int_arg)
- value = (value * 31) ^ hash(self.long_arg)
- value = (value * 31) ^ hash(self.string_arg)
- value = (value * 31) ^ hash(self.bool_arg)
- value = (value * 31) ^ hash(self.binary_arg)
- value = (value * 31) ^ hash(self.double_arg)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class JavaObject:
- """
- Attributes:
- - full_class_name
- - args_list
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'full_class_name', None, None, ), # 1
- (2, TType.LIST, 'args_list', (TType.STRUCT,(JavaObjectArg, JavaObjectArg.thrift_spec)), None, ), # 2
- )
-
- def __init__(self, full_class_name=None, args_list=None,):
- self.full_class_name = full_class_name
- self.args_list = args_list
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.full_class_name = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.LIST:
- self.args_list = []
- (_etype3, _size0) = iprot.readListBegin()
- for _i4 in xrange(_size0):
- _elem5 = JavaObjectArg()
- _elem5.read(iprot)
- self.args_list.append(_elem5)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('JavaObject')
- if self.full_class_name is not None:
- oprot.writeFieldBegin('full_class_name', TType.STRING, 1)
- oprot.writeString(self.full_class_name.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.args_list is not None:
- oprot.writeFieldBegin('args_list', TType.LIST, 2)
- oprot.writeListBegin(TType.STRUCT, len(self.args_list))
- for iter6 in self.args_list:
- iter6.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.full_class_name is None:
- raise TProtocol.TProtocolException(message='Required field full_class_name is unset!')
- if self.args_list is None:
- raise TProtocol.TProtocolException(message='Required field args_list is unset!')
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.full_class_name)
- value = (value * 31) ^ hash(self.args_list)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class NullStruct:
-
- thrift_spec = (
- )
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('NullStruct')
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class GlobalStreamId:
- """
- Attributes:
- - componentId
- - streamId
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'componentId', None, None, ), # 1
- (2, TType.STRING, 'streamId', None, None, ), # 2
- )
-
- def __init__(self, componentId=None, streamId=None,):
- self.componentId = componentId
- self.streamId = streamId
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.componentId = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.streamId = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('GlobalStreamId')
- if self.componentId is not None:
- oprot.writeFieldBegin('componentId', TType.STRING, 1)
- oprot.writeString(self.componentId.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.streamId is not None:
- oprot.writeFieldBegin('streamId', TType.STRING, 2)
- oprot.writeString(self.streamId.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.componentId is None:
- raise TProtocol.TProtocolException(message='Required field componentId is unset!')
- if self.streamId is None:
- raise TProtocol.TProtocolException(message='Required field streamId is unset!')
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.componentId)
- value = (value * 31) ^ hash(self.streamId)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class Grouping:
- """
- Attributes:
- - fields
- - shuffle
- - all
- - none
- - direct
- - custom_object
- - custom_serialized
- - local_or_shuffle
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.LIST, 'fields', (TType.STRING,None), None, ), # 1
- (2, TType.STRUCT, 'shuffle', (NullStruct, NullStruct.thrift_spec), None, ), # 2
- (3, TType.STRUCT, 'all', (NullStruct, NullStruct.thrift_spec), None, ), # 3
- (4, TType.STRUCT, 'none', (NullStruct, NullStruct.thrift_spec), None, ), # 4
- (5, TType.STRUCT, 'direct', (NullStruct, NullStruct.thrift_spec), None, ), # 5
- (6, TType.STRUCT, 'custom_object', (JavaObject, JavaObject.thrift_spec), None, ), # 6
- (7, TType.STRING, 'custom_serialized', None, None, ), # 7
- (8, TType.STRUCT, 'local_or_shuffle', (NullStruct, NullStruct.thrift_spec), None, ), # 8
- )
-
- def __init__(self, fields=None, shuffle=None, all=None, none=None, direct=None, custom_object=None, custom_serialized=None, local_or_shuffle=None,):
- self.fields = fields
- self.shuffle = shuffle
- self.all = all
- self.none = none
- self.direct = direct
- self.custom_object = custom_object
- self.custom_serialized = custom_serialized
- self.local_or_shuffle = local_or_shuffle
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.LIST:
- self.fields = []
- (_etype10, _size7) = iprot.readListBegin()
- for _i11 in xrange(_size7):
- _elem12 = iprot.readString().decode('utf-8')
- self.fields.append(_elem12)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.shuffle = NullStruct()
- self.shuffle.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRUCT:
- self.all = NullStruct()
- self.all.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.STRUCT:
- self.none = NullStruct()
- self.none.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.STRUCT:
- self.direct = NullStruct()
- self.direct.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.STRUCT:
- self.custom_object = JavaObject()
- self.custom_object.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 7:
- if ftype == TType.STRING:
- self.custom_serialized = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 8:
- if ftype == TType.STRUCT:
- self.local_or_shuffle = NullStruct()
- self.local_or_shuffle.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('Grouping')
- if self.fields is not None:
- oprot.writeFieldBegin('fields', TType.LIST, 1)
- oprot.writeListBegin(TType.STRING, len(self.fields))
- for iter13 in self.fields:
- oprot.writeString(iter13.encode('utf-8'))
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.shuffle is not None:
- oprot.writeFieldBegin('shuffle', TType.STRUCT, 2)
- self.shuffle.write(oprot)
- oprot.writeFieldEnd()
- if self.all is not None:
- oprot.writeFieldBegin('all', TType.STRUCT, 3)
- self.all.write(oprot)
- oprot.writeFieldEnd()
- if self.none is not None:
- oprot.writeFieldBegin('none', TType.STRUCT, 4)
- self.none.write(oprot)
- oprot.writeFieldEnd()
- if self.direct is not None:
- oprot.writeFieldBegin('direct', TType.STRUCT, 5)
- self.direct.write(oprot)
- oprot.writeFieldEnd()
- if self.custom_object is not None:
- oprot.writeFieldBegin('custom_object', TType.STRUCT, 6)
- self.custom_object.write(oprot)
- oprot.writeFieldEnd()
- if self.custom_serialized is not None:
- oprot.writeFieldBegin('custom_serialized', TType.STRING, 7)
- oprot.writeString(self.custom_serialized)
- oprot.writeFieldEnd()
- if self.local_or_shuffle is not None:
- oprot.writeFieldBegin('local_or_shuffle', TType.STRUCT, 8)
- self.local_or_shuffle.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.fields)
- value = (value * 31) ^ hash(self.shuffle)
- value = (value * 31) ^ hash(self.all)
- value = (value * 31) ^ hash(self.none)
- value = (value * 31) ^ hash(self.direct)
- value = (value * 31) ^ hash(self.custom_object)
- value = (value * 31) ^ hash(self.custom_serialized)
- value = (value * 31) ^ hash(self.local_or_shuffle)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class StreamInfo:
- """
- Attributes:
- - output_fields
- - direct
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.LIST, 'output_fields', (TType.STRING,None), None, ), # 1
- (2, TType.BOOL, 'direct', None, None, ), # 2
- )
-
- def __init__(self, output_fields=None, direct=None,):
- self.output_fields = output_fields
- self.direct = direct
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.LIST:
- self.output_fields = []
- (_etype17, _size14) = iprot.readListBegin()
- for _i18 in xrange(_size14):
- _elem19 = iprot.readString().decode('utf-8')
- self.output_fields.append(_elem19)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.BOOL:
- self.direct = iprot.readBool()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('StreamInfo')
- if self.output_fields is not None:
- oprot.writeFieldBegin('output_fields', TType.LIST, 1)
- oprot.writeListBegin(TType.STRING, len(self.output_fields))
- for iter20 in self.output_fields:
- oprot.writeString(iter20.encode('utf-8'))
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.direct is not None:
- oprot.writeFieldBegin('direct', TType.BOOL, 2)
- oprot.writeBool(self.direct)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.output_fields is None:
- raise TProtocol.TProtocolException(message='Required field output_fields is unset!')
- if self.direct is None:
- raise TProtocol.TProtocolException(message='Required field direct is unset!')
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.output_fields)
- value = (value * 31) ^ hash(self.direct)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class ShellComponent:
- """
- Attributes:
- - execution_command
- - script
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'execution_command', None, None, ), # 1
- (2, TType.STRING, 'script', None, None, ), # 2
- )
-
- def __init__(self, execution_command=None, script=None,):
- self.execution_command = execution_command
- self.script = script
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.execution_command = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.script = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('ShellComponent')
- if self.execution_command is not None:
- oprot.writeFieldBegin('execution_command', TType.STRING, 1)
- oprot.writeString(self.execution_command.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.script is not None:
- oprot.writeFieldBegin('script', TType.STRING, 2)
- oprot.writeString(self.script.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.execution_command)
- value = (value * 31) ^ hash(self.script)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class ComponentObject:
- """
- Attributes:
- - serialized_java
- - shell
- - java_object
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'serialized_java', None, None, ), # 1
- (2, TType.STRUCT, 'shell', (ShellComponent, ShellComponent.thrift_spec), None, ), # 2
- (3, TType.STRUCT, 'java_object', (JavaObject, JavaObject.thrift_spec), None, ), # 3
- )
-
- def __init__(self, serialized_java=None, shell=None, java_object=None,):
- self.serialized_java = serialized_java
- self.shell = shell
- self.java_object = java_object
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.serialized_java = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.shell = ShellComponent()
- self.shell.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRUCT:
- self.java_object = JavaObject()
- self.java_object.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('ComponentObject')
- if self.serialized_java is not None:
- oprot.writeFieldBegin('serialized_java', TType.STRING, 1)
- oprot.writeString(self.serialized_java)
- oprot.writeFieldEnd()
- if self.shell is not None:
- oprot.writeFieldBegin('shell', TType.STRUCT, 2)
- self.shell.write(oprot)
- oprot.writeFieldEnd()
- if self.java_object is not None:
- oprot.writeFieldBegin('java_object', TType.STRUCT, 3)
- self.java_object.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.serialized_java)
- value = (value * 31) ^ hash(self.shell)
- value = (value * 31) ^ hash(self.java_object)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class ComponentCommon:
- """
- Attributes:
- - inputs
- - streams
- - parallelism_hint
- - json_conf
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.MAP, 'inputs', (TType.STRUCT,(GlobalStreamId, GlobalStreamId.thrift_spec),TType.STRUCT,(Grouping, Grouping.thrift_spec)), None, ), # 1
- (2, TType.MAP, 'streams', (TType.STRING,None,TType.STRUCT,(StreamInfo, StreamInfo.thrift_spec)), None, ), # 2
- (3, TType.I32, 'parallelism_hint', None, None, ), # 3
- (4, TType.STRING, 'json_conf', None, None, ), # 4
- )
-
- def __init__(self, inputs=None, streams=None, parallelism_hint=None, json_conf=None,):
- self.inputs = inputs
- self.streams = streams
- self.parallelism_hint = parallelism_hint
- self.json_conf = json_conf
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.MAP:
- self.inputs = {}
- (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin()
- for _i25 in xrange(_size21):
- _key26 = GlobalStreamId()
- _key26.read(iprot)
- _val27 = Grouping()
- _val27.read(iprot)
- self.inputs[_key26] = _val27
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.MAP:
- self.streams = {}
- (_ktype29, _vtype30, _size28 ) = iprot.readMapBegin()
- for _i32 in xrange(_size28):
- _key33 = iprot.readString().decode('utf-8')
- _val34 = StreamInfo()
- _val34.read(iprot)
- self.streams[_key33] = _val34
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.I32:
- self.parallelism_hint = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.STRING:
- self.json_conf = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('ComponentCommon')
- if self.inputs is not None:
- oprot.writeFieldBegin('inputs', TType.MAP, 1)
- oprot.writeMapBegin(TType.STRUCT, TType.STRUCT, len(self.inputs))
- for kiter35,viter36 in self.inputs.items():
- kiter35.write(oprot)
- viter36.write(oprot)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.streams is not None:
- oprot.writeFieldBegin('streams', TType.MAP, 2)
- oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.streams))
- for kiter37,viter38 in self.streams.items():
- oprot.writeString(kiter37.encode('utf-8'))
- viter38.write(oprot)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.parallelism_hint is not None:
- oprot.writeFieldBegin('parallelism_hint', TType.I32, 3)
- oprot.writeI32(self.parallelism_hint)
- oprot.writeFieldEnd()
- if self.json_conf is not None:
- oprot.writeFieldBegin('json_conf', TType.STRING, 4)
- oprot.writeString(self.json_conf.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.inputs is None:
- raise TProtocol.TProtocolException(message='Required field inputs is unset!')
- if self.streams is None:
- raise TProtocol.TProtocolException(message='Required field streams is unset!')
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.inputs)
- value = (value * 31) ^ hash(self.streams)
- value = (value * 31) ^ hash(self.parallelism_hint)
- value = (value * 31) ^ hash(self.json_conf)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class SpoutSpec:
- """
- Attributes:
- - spout_object
- - common
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'spout_object', (ComponentObject, ComponentObject.thrift_spec), None, ), # 1
- (2, TType.STRUCT, 'common', (ComponentCommon, ComponentCommon.thrift_spec), None, ), # 2
- )
-
- def __init__(self, spout_object=None, common=None,):
- self.spout_object = spout_object
- self.common = common
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.spout_object = ComponentObject()
- self.spout_object.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.common = ComponentCommon()
- self.common.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('SpoutSpec')
- if self.spout_object is not None:
- oprot.writeFieldBegin('spout_object', TType.STRUCT, 1)
- self.spout_object.write(oprot)
- oprot.writeFieldEnd()
- if self.common is not None:
- oprot.writeFieldBegin('common', TType.STRUCT, 2)
- self.common.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.spout_object is None:
- raise TProtocol.TProtocolException(message='Required field spout_object is unset!')
- if self.common is None:
- raise TProtocol.TProtocolException(message='Required field common is unset!')
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.spout_object)
- value = (value * 31) ^ hash(self.common)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class Bolt:
- """
- Attributes:
- - bolt_object
- - common
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'bolt_object', (ComponentObject, ComponentObject.thrift_spec), None, ), # 1
- (2, TType.STRUCT, 'common', (ComponentCommon, ComponentCommon.thrift_spec), None, ), # 2
- )
-
- def __init__(self, bolt_object=None, common=None,):
- self.bolt_object = bolt_object
- self.common = common
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.bolt_object = ComponentObject()
- self.bolt_object.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.common = ComponentCommon()
- self.common.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('Bolt')
- if self.bolt_object is not None:
- oprot.writeFieldBegin('bolt_object', TType.STRUCT, 1)
- self.bolt_object.write(oprot)
- oprot.writeFieldEnd()
- if self.common is not None:
- oprot.writeFieldBegin('common', TType.STRUCT, 2)
- self.common.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.bolt_object is None:
- raise TProtocol.TProtocolException(message='Required field bolt_object is unset!')
- if self.common is None:
- raise TProtocol.TProtocolException(message='Required field common is unset!')
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.bolt_object)
- value = (value * 31) ^ hash(self.common)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class StateSpoutSpec:
- """
- Attributes:
- - state_spout_object
- - common
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'state_spout_object', (ComponentObject, ComponentObject.thrift_spec), None, ), # 1
- (2, TType.STRUCT, 'common', (ComponentCommon, ComponentCommon.thrift_spec), None, ), # 2
- )
-
- def __init__(self, state_spout_object=None, common=None,):
- self.state_spout_object = state_spout_object
- self.common = common
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.state_spout_object = ComponentObject()
- self.state_spout_object.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.common = ComponentCommon()
- self.common.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('StateSpoutSpec')
- if self.state_spout_object is not None:
- oprot.writeFieldBegin('state_spout_object', TType.STRUCT, 1)
- self.state_spout_object.write(oprot)
- oprot.writeFieldEnd()
- if self.common is not None:
- oprot.writeFieldBegin('common', TType.STRUCT, 2)
- self.common.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.state_spout_object is None:
- raise TProtocol.TProtocolException(message='Required field state_spout_object is unset!')
- if self.common is None:
- raise TProtocol.TProtocolException(message='Required field common is unset!')
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.state_spout_object)
- value = (value * 31) ^ hash(self.common)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class SharedMemory:
- """
- Attributes:
- - name
- - on_heap
- - off_heap_worker
- - off_heap_node
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'name', None, None, ), # 1
- (2, TType.DOUBLE, 'on_heap', None, None, ), # 2
- (3, TType.DOUBLE, 'off_heap_worker', None, None, ), # 3
- (4, TType.DOUBLE, 'off_heap_node', None, None, ), # 4
- )
-
- def __init__(self, name=None, on_heap=None, off_heap_worker=None, off_heap_node=None,):
- self.name = name
- self.on_heap = on_heap
- self.off_heap_worker = off_heap_worker
- self.off_heap_node = off_heap_node
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.name = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.DOUBLE:
- self.on_heap = iprot.readDouble()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.DOUBLE:
- self.off_heap_worker = iprot.readDouble()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.DOUBLE:
- self.off_heap_node = iprot.readDouble()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('SharedMemory')
- if self.name is not None:
- oprot.writeFieldBegin('name', TType.STRING, 1)
- oprot.writeString(self.name.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.on_heap is not None:
- oprot.writeFieldBegin('on_heap', TType.DOUBLE, 2)
- oprot.writeDouble(self.on_heap)
- oprot.writeFieldEnd()
- if self.off_heap_worker is not None:
- oprot.writeFieldBegin('off_heap_worker', TType.DOUBLE, 3)
- oprot.writeDouble(self.off_heap_worker)
- oprot.writeFieldEnd()
- if self.off_heap_node is not None:
- oprot.writeFieldBegin('off_heap_node', TType.DOUBLE, 4)
- oprot.writeDouble(self.off_heap_node)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.name is None:
- raise TProtocol.TProtocolException(message='Required field name is unset!')
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.name)
- value = (value * 31) ^ hash(self.on_heap)
- value = (value * 31) ^ hash(self.off_heap_worker)
- value = (value * 31) ^ hash(self.off_heap_node)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class StormTopology:
- """
- Attributes:
- - spouts
- - bolts
- - state_spouts
- - worker_hooks
- - dependency_jars
- - dependency_artifacts
- - storm_version
- - jdk_version
- - component_to_shared_memory
- - shared_memory
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.MAP, 'spouts', (TType.STRING,None,TType.STRUCT,(SpoutSpec, SpoutSpec.thrift_spec)), None, ), # 1
- (2, TType.MAP, 'bolts', (TType.STRING,None,TType.STRUCT,(Bolt, Bolt.thrift_spec)), None, ), # 2
- (3, TType.MAP, 'state_spouts', (TType.STRING,None,TType.STRUCT,(StateSpoutSpec, StateSpoutSpec.thrift_spec)), None, ), # 3
- (4, TType.LIST, 'worker_hooks', (TType.STRING,None), None, ), # 4
- (5, TType.LIST, 'dependency_jars', (TType.STRING,None), None, ), # 5
- (6, TType.LIST, 'dependency_artifacts', (TType.STRING,None), None, ), # 6
- (7, TType.STRING, 'storm_version', None, None, ), # 7
- (8, TType.STRING, 'jdk_version', None, None, ), # 8
- (9, TType.MAP, 'component_to_shared_memory', (TType.STRING,None,TType.SET,(TType.STRING,None)), None, ), # 9
- (10, TType.MAP, 'shared_memory', (TType.STRING,None,TType.STRUCT,(SharedMemory, SharedMemory.thrift_spec)), None, ), # 10
- )
-
- def __init__(self, spouts=None, bolts=None, state_spouts=None, worker_hooks=None, dependency_jars=None, dependency_artifacts=None, storm_version=None, jdk_version=None, component_to_shared_memory=None, shared_memory=None,):
- self.spouts = spouts
- self.bolts = bolts
- self.state_spouts = state_spouts
- self.worker_hooks = worker_hooks
- self.dependency_jars = dependency_jars
- self.dependency_artifacts = dependency_artifacts
- self.storm_version = storm_version
- self.jdk_version = jdk_version
- self.component_to_shared_memory = component_to_shared_memory
- self.shared_memory = shared_memory
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.MAP:
- self.spouts = {}
- (_ktype40, _vtype41, _size39 ) = iprot.readMapBegin()
- for _i43 in xrange(_size39):
- _key44 = iprot.readString().decode('utf-8')
- _val45 = SpoutSpec()
- _val45.read(iprot)
- self.spouts[_key44] = _val45
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.MAP:
- self.bolts = {}
- (_ktype47, _vtype48, _size46 ) = iprot.readMapBegin()
- for _i50 in xrange(_size46):
- _key51 = iprot.readString().decode('utf-8')
- _val52 = Bolt()
- _val52.read(iprot)
- self.bolts[_key51] = _val52
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.MAP:
- self.state_spouts = {}
- (_ktype54, _vtype55, _size53 ) = iprot.readMapBegin()
- for _i57 in xrange(_size53):
- _key58 = iprot.readString().decode('utf-8')
- _val59 = StateSpoutSpec()
- _val59.read(iprot)
- self.state_spouts[_key58] = _val59
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.LIST:
- self.worker_hooks = []
- (_etype63, _size60) = iprot.readListBegin()
- for _i64 in xrange(_size60):
- _elem65 = iprot.readString()
- self.worker_hooks.append(_elem65)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.LIST:
- self.dependency_jars = []
- (_etype69, _size66) = iprot.readListBegin()
- for _i70 in xrange(_size66):
- _elem71 = iprot.readString().decode('utf-8')
- self.dependency_jars.append(_elem71)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.LIST:
- self.dependency_artifacts = []
- (_etype75, _size72) = iprot.readListBegin()
- for _i76 in xrange(_size72):
- _elem77 = iprot.readString().decode('utf-8')
- self.dependency_artifacts.append(_elem77)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 7:
- if ftype == TType.STRING:
- self.storm_version = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 8:
- if ftype == TType.STRING:
- self.jdk_version = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 9:
- if ftype == TType.MAP:
- self.component_to_shared_memory = {}
- (_ktype79, _vtype80, _size78 ) = iprot.readMapBegin()
- for _i82 in xrange(_size78):
- _key83 = iprot.readString().decode('utf-8')
- _val84 = set()
- (_etype88, _size85) = iprot.readSetBegin()
- for _i89 in xrange(_size85):
- _elem90 = iprot.readString().decode('utf-8')
- _val84.add(_elem90)
- iprot.readSetEnd()
- self.component_to_shared_memory[_key83] = _val84
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 10:
- if ftype == TType.MAP:
- self.shared_memory = {}
- (_ktype92, _vtype93, _size91 ) = iprot.readMapBegin()
- for _i95 in xrange(_size91):
- _key96 = iprot.readString().decode('utf-8')
- _val97 = SharedMemory()
- _val97.read(iprot)
- self.shared_memory[_key96] = _val97
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('StormTopology')
- if self.spouts is not None:
- oprot.writeFieldBegin('spouts', TType.MAP, 1)
- oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.spouts))
- for kiter98,viter99 in self.spouts.items():
- oprot.writeString(kiter98.encode('utf-8'))
- viter99.write(oprot)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.bolts is not None:
- oprot.writeFieldBegin('bolts', TType.MAP, 2)
- oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.bolts))
- for kiter100,viter101 in self.bolts.items():
- oprot.writeString(kiter100.encode('utf-8'))
- viter101.write(oprot)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.state_spouts is not None:
- oprot.writeFieldBegin('state_spouts', TType.MAP, 3)
- oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.state_spouts))
- for kiter102,viter103 in self.state_spouts.items():
- oprot.writeString(kiter102.encode('utf-8'))
- viter103.write(oprot)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.worker_hooks is not None:
- oprot.writeFieldBegin('worker_hooks', TType.LIST, 4)
- oprot.writeListBegin(TType.STRING, len(self.worker_hooks))
- for iter104 in self.worker_hooks:
- oprot.writeString(iter104)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.dependency_jars is not None:
- oprot.writeFieldBegin('dependency_jars', TType.LIST, 5)
- oprot.writeListBegin(TType.STRING, len(self.dependency_jars))
- for iter105 in self.dependency_jars:
- oprot.writeString(iter105.encode('utf-8'))
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.dependency_artifacts is not None:
- oprot.writeFieldBegin('dependency_artifacts', TType.LIST, 6)
- oprot.writeListBegin(TType.STRING, len(self.dependency_artifacts))
- for iter106 in self.dependency_artifacts:
- oprot.writeString(iter106.encode('utf-8'))
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.storm_version is not None:
- oprot.writeFieldBegin('storm_version', TType.STRING, 7)
- oprot.writeString(self.storm_version.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.jdk_version is not None:
- oprot.writeFieldBegin('jdk_version', TType.STRING, 8)
- oprot.writeString(self.jdk_version.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.component_to_shared_memory is not None:
- oprot.writeFieldBegin('component_to_shared_memory', TType.MAP, 9)
- oprot.writeMapBegin(TType.STRING, TType.SET, len(self.component_to_shared_memory))
- for kiter107,viter108 in self.component_to_shared_memory.items():
- oprot.writeString(kiter107.encode('utf-8'))
- oprot.writeSetBegin(TType.STRING, len(viter108))
- for iter109 in viter108:
- oprot.writeString(iter109.encode('utf-8'))
- oprot.writeSetEnd()
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.shared_memory is not None:
- oprot.writeFieldBegin('shared_memory', TType.MAP, 10)
- oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.shared_memory))
- for kiter110,viter111 in self.shared_memory.items():
- oprot.writeString(kiter110.encode('utf-8'))
- viter111.write(oprot)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.spouts is None:
- raise TProtocol.TProtocolException(message='Required field spouts is unset!')
- if self.bolts is None:
- raise TProtocol.TProtocolException(message='Required field bolts is unset!')
- if self.state_spouts is None:
- raise TProtocol.TProtocolException(message='Required field state_spouts is unset!')
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.spouts)
- value = (value * 31) ^ hash(self.bolts)
- value = (value * 31) ^ hash(self.state_spouts)
- value = (value * 31) ^ hash(self.worker_hooks)
- value = (value * 31) ^ hash(self.dependency_jars)
- value = (value * 31) ^ hash(self.dependency_artifacts)
- value = (value * 31) ^ hash(self.storm_version)
- value = (value * 31) ^ hash(self.jdk_version)
- value = (value * 31) ^ hash(self.component_to_shared_memory)
- value = (value * 31) ^ hash(self.shared_memory)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
+all_structs = []
-class AlreadyAliveException(TException):
- """
- Attributes:
- - msg
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'msg', None, None, ), # 1
- )
-
- def __init__(self, msg=None,):
- self.msg = msg
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.msg = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('AlreadyAliveException')
- if self.msg is not None:
- oprot.writeFieldBegin('msg', TType.STRING, 1)
- oprot.writeString(self.msg.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.msg is None:
- raise TProtocol.TProtocolException(message='Required field msg is unset!')
- return
-
-
- def __str__(self):
- return repr(self)
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.msg)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-class NotAliveException(TException):
- """
- Attributes:
- - msg
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'msg', None, None, ), # 1
- )
-
- def __init__(self, msg=None,):
- self.msg = msg
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.msg = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('NotAliveException')
- if self.msg is not None:
- oprot.writeFieldBegin('msg', TType.STRING, 1)
- oprot.writeString(self.msg.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.msg is None:
- raise TProtocol.TProtocolException(message='Required field msg is unset!')
- return
-
-
- def __str__(self):
- return repr(self)
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.msg)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
+class ComponentType(object):
+ BOLT = 1
+ SPOUT = 2
-class AuthorizationException(TException):
- """
- Attributes:
- - msg
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'msg', None, None, ), # 1
- )
-
- def __init__(self, msg=None,):
- self.msg = msg
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.msg = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('AuthorizationException')
- if self.msg is not None:
- oprot.writeFieldBegin('msg', TType.STRING, 1)
- oprot.writeString(self.msg.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.msg is None:
- raise TProtocol.TProtocolException(message='Required field msg is unset!')
- return
-
-
- def __str__(self):
- return repr(self)
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.msg)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
+ _VALUES_TO_NAMES = {
+ 1: "BOLT",
+ 2: "SPOUT",
+ }
-class InvalidTopologyException(TException):
- """
- Attributes:
- - msg
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'msg', None, None, ), # 1
- )
-
- def __init__(self, msg=None,):
- self.msg = msg
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.msg = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('InvalidTopologyException')
- if self.msg is not None:
- oprot.writeFieldBegin('msg', TType.STRING, 1)
- oprot.writeString(self.msg.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.msg is None:
- raise TProtocol.TProtocolException(message='Required field msg is unset!')
- return
-
-
- def __str__(self):
- return repr(self)
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.msg)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
+ _NAMES_TO_VALUES = {
+ "BOLT": 1,
+ "SPOUT": 2,
+ }
-class KeyNotFoundException(TException):
- """
- Attributes:
- - msg
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'msg', None, None, ), # 1
- )
-
- def __init__(self, msg=None,):
- self.msg = msg
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.msg = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('KeyNotFoundException')
- if self.msg is not None:
- oprot.writeFieldBegin('msg', TType.STRING, 1)
- oprot.writeString(self.msg.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.msg is None:
- raise TProtocol.TProtocolException(message='Required field msg is unset!')
- return
-
-
- def __str__(self):
- return repr(self)
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.msg)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-class KeyAlreadyExistsException(TException):
- """
- Attributes:
- - msg
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'msg', None, None, ), # 1
- )
-
- def __init__(self, msg=None,):
- self.msg = msg
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.msg = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('KeyAlreadyExistsException')
- if self.msg is not None:
- oprot.writeFieldBegin('msg', TType.STRING, 1)
- oprot.writeString(self.msg.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.msg is None:
- raise TProtocol.TProtocolException(message='Required field msg is unset!')
- return
-
-
- def __str__(self):
- return repr(self)
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.msg)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class TopologySummary:
- """
- Attributes:
- - id
- - name
- - num_tasks
- - num_executors
- - num_workers
- - uptime_secs
- - status
- - storm_version
- - topology_version
- - sched_status
- - owner
- - replication_count
- - requested_memonheap
- - requested_memoffheap
- - requested_cpu
- - assigned_memonheap
- - assigned_memoffheap
- - assigned_cpu
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'id', None, None, ), # 1
- (2, TType.STRING, 'name', None, None, ), # 2
- (3, TType.I32, 'num_tasks', None, None, ), # 3
- (4, TType.I32, 'num_executors', None, None, ), # 4
- (5, TType.I32, 'num_workers', None, None, ), # 5
- (6, TType.I32, 'uptime_secs', None, None, ), # 6
- (7, TType.STRING, 'status', None, None, ), # 7
- (8, TType.STRING, 'storm_version', None, None, ), # 8
- (9, TType.STRING, 'topology_version', None, None, ), # 9
- None, # 10
- None, # 11
- None, # 12
- None, # 13
- None, # 14
- None, # 15
- None, # 16
- None, # 17
- None, # 18
- None, # 19
- None, # 20
- None, # 21
- None, # 22
- None, # 23
- None, # 24
- None, # 25
- None, # 26
- None, # 27
- None, # 28
- None, # 29
- None, # 30
- None, # 31
- None, # 32
- None, # 33
- None, # 34
- None, # 35
- None, # 36
- None, # 37
- None, # 38
- None, # 39
- None, # 40
- None, # 41
- None, # 42
- None, # 43
- None, # 44
- None, # 45
- None, # 46
- None, # 47
- None, # 48
- None, # 49
- None, # 50
- None, # 51
- None, # 52
- None, # 53
- None, # 54
- None, # 55
- None, # 56
- None, # 57
- None, # 58
- None, # 59
- None, # 60
- None, # 61
- None, # 62
- None, # 63
- None, # 64
- None, # 65
- None, # 66
- None, # 67
- None, # 68
- None, # 69
- None, # 70
- None, # 71
- None, # 72
- None, # 73
- None, # 74
- None, # 75
- None, # 76
- None, # 77
- None, # 78
- None, # 79
- None, # 80
- None, # 81
- None, # 82
- None, # 83
- None, # 84
- None, # 85
- None, # 86
- None, # 87
- None, # 88
- None, # 89
- None, # 90
- None, # 91
- None, # 92
- None, # 93
- None, # 94
- None, # 95
- None, # 96
- None, # 97
- None, # 98
- None, # 99
- None, # 100
- None, # 101
- None, # 102
- None, # 103
- None, # 104
- None, # 105
- None, # 106
- None, # 107
- None, # 108
- None, # 109
- None, # 110
- None, # 111
- None, # 112
- None, # 113
- None, # 114
- None, # 115
- None, # 116
- None, # 117
- None, # 118
- None, # 119
- None, # 120
- None, # 121
- None, # 122
- None, # 123
- None, # 124
- None, # 125
- None, # 126
- None, # 127
- None, # 128
- None, # 129
- None, # 130
- None, # 131
- None, # 132
- None, # 133
- None, # 134
- None, # 135
- None, # 136
- None, # 137
- None, # 138
- None, # 139
- None, # 140
- None, # 141
- None, # 142
- None, # 143
- None, # 144
- None, # 145
- None, # 146
- None, # 147
- None, # 148
- None, # 149
- None, # 150
- None, # 151
- None, # 152
- None, # 153
- None, # 154
- None, # 155
- None, # 156
- None, # 157
- None, # 158
- None, # 159
- None, # 160
- None, # 161
- None, # 162
- None, # 163
- None, # 164
- None, # 165
- None, # 166
- None, # 167
- None, # 168
- None, # 169
- None, # 170
- None, # 171
- None, # 172
- None, # 173
- None, # 174
- None, # 175
- None, # 176
- None, # 177
- None, # 178
- None, # 179
- None, # 180
- None, # 181
- None, # 182
- None, # 183
- None, # 184
- None, # 185
- None, # 186
- None, # 187
- None, # 188
- None, # 189
- None, # 190
- None, # 191
- None, # 192
- None, # 193
- None, # 194
- None, # 195
- None, # 196
- None, # 197
- None, # 198
- None, # 199
- None, # 200
- None, # 201
- None, # 202
- None, # 203
- None, # 204
- None, # 205
- None, # 206
- None, # 207
- None, # 208
- None, # 209
- None, # 210
- None, # 211
- None, # 212
- None, # 213
- None, # 214
- None, # 215
- None, # 216
- None, # 217
- None, # 218
- None, # 219
- None, # 220
- None, # 221
- None, # 222
- None, # 223
- None, # 224
- None, # 225
- None, # 226
- None, # 227
- None, # 228
- None, # 229
- None, # 230
- None, # 231
- None, # 232
- None, # 233
- None, # 234
- None, # 235
- None, # 236
- None, # 237
- None, # 238
- None, # 239
- None, # 240
- None, # 241
- None, # 242
- None, # 243
- None, # 244
- None, # 245
- None, # 246
- None, # 247
- None, # 248
- None, # 249
- None, # 250
- None, # 251
- None, # 252
- None, # 253
- None, # 254
- None, # 255
- None, # 256
- None, # 257
- None, # 258
- None, # 259
- None, # 260
- None, # 261
- None, # 262
- None, # 263
- None, # 264
- None, # 265
- None, # 266
- None, # 267
- None, # 268
- None, # 269
- None, # 270
- None, # 271
- None, # 272
- None, # 273
- None, # 274
- None, # 275
- None, # 276
- None, # 277
- None, # 278
- None, # 279
- None, # 280
- None, # 281
- None, # 282
- None, # 283
- None, # 284
- None, # 285
- None, # 286
- None, # 287
- None, # 288
- None, # 289
- None, # 290
- None, # 291
- None, # 292
- None, # 293
- None, # 294
- None, # 295
- None, # 296
- None, # 297
- None, # 298
- None, # 299
- None, # 300
- None, # 301
- None, # 302
- None, # 303
- None, # 304
- None, # 305
- None, # 306
- None, # 307
- None, # 308
- None, # 309
- None, # 310
- None, # 311
- None, # 312
- None, # 313
- None, # 314
- None, # 315
- None, # 316
- None, # 317
- None, # 318
- None, # 319
- None, # 320
- None, # 321
- None, # 322
- None, # 323
- None, # 324
- None, # 325
- None, # 326
- None, # 327
- None, # 328
- None, # 329
- None, # 330
- None, # 331
- None, # 332
- None, # 333
- None, # 334
- None, # 335
- None, # 336
- None, # 337
- None, # 338
- None, # 339
- None, # 340
- None, # 341
- None, # 342
- None, # 343
- None, # 344
- None, # 345
- None, # 346
- None, # 347
- None, # 348
- None, # 349
- None, # 350
- None, # 351
- None, # 352
- None, # 353
- None, # 354
- None, # 355
- None, # 356
- None, # 357
- None, # 358
- None, # 359
- None, # 360
- None, # 361
- None, # 362
- None, # 363
- None, # 364
- None, # 365
- None, # 366
- None, # 367
- None, # 368
- None, # 369
- None, # 370
- None, # 371
- None, # 372
- None, # 373
- None, # 374
- None, # 375
- None, # 376
- None, # 377
- None, # 378
- None, # 379
- None, # 380
- None, # 381
- None, # 382
- None, # 383
- None, # 384
- None, # 385
- None, # 386
- None, # 387
- None, # 388
- None, # 389
- None, # 390
- None, # 391
- None, # 392
- None, # 393
- None, # 394
- None, # 395
- None, # 396
- None, # 397
- None, # 398
- None, # 399
- None, # 400
- None, # 401
- None, # 402
- None, # 403
- None, # 404
- None, # 405
- None, # 406
- None, # 407
- None, # 408
- None, # 409
- None, # 410
- None, # 411
- None, # 412
- None, # 413
- None, # 414
- None, # 415
- None, # 416
- None, # 417
- None, # 418
- None, # 419
- None, # 420
- None, # 421
- None, # 422
- None, # 423
- None, # 424
- None, # 425
- None, # 426
- None, # 427
- None, # 428
- None, # 429
- None, # 430
- None, # 431
- None, # 432
- None, # 433
- None, # 434
- None, # 435
- None, # 436
- None, # 437
- None, # 438
- None, # 439
- None, # 440
- None, # 441
- None, # 442
- None, # 443
- None, # 444
- None, # 445
- None, # 446
- None, # 447
- None, # 448
- None, # 449
- None, # 450
- None, # 451
- None, # 452
- None, # 453
- None, # 454
- None, # 455
- None, # 456
- None, # 457
- None, # 458
- None, # 459
- None, # 460
- None, # 461
- None, # 462
- None, # 463
- None, # 464
- None, # 465
- None, # 466
- None, # 467
- None, # 468
- None, # 469
- None, # 470
- None, # 471
- None, # 472
- None, # 473
- None, # 474
- None, # 475
- None, # 476
- None, # 477
- None, # 478
- None, # 479
- None, # 480
- None, # 481
- None, # 482
- None, # 483
- None, # 484
- None, # 485
- None, # 486
- None, # 487
- None, # 488
- None, # 489
- None, # 490
- None, # 491
- None, # 492
- None, # 493
- None, # 494
- None, # 495
- None, # 496
- None, # 497
- None, # 498
- None, # 499
- None, # 500
- None, # 501
- None, # 502
- None, # 503
- None, # 504
- None, # 505
- None, # 506
- None, # 507
- None, # 508
- None, # 509
- None, # 510
- None, # 511
- None, # 512
- (513, TType.STRING, 'sched_status', None, None, ), # 513
- (514, TType.STRING, 'owner', None, None, ), # 514
- (515, TType.I32, 'replication_count', None, None, ), # 515
- None, # 516
- None, # 517
- None, # 518
- None, # 519
- None, # 520
- (521, TType.DOUBLE, 'requested_memonheap', None, None, ), # 521
- (522, TType.DOUBLE, 'requested_memoffheap', None, None, ), # 522
- (523, TType.DOUBLE, 'requested_cpu', None, None, ), # 523
- (524, TType.DOUBLE, 'assigned_memonheap', None, None, ), # 524
- (525, TType.DOUBLE, 'assigned_memoffheap', None, None, ), # 525
- (526, TType.DOUBLE, 'assigned_cpu', None, None, ), # 526
- )
-
- def __init__(self, id=None, name=None, num_tasks=None, num_executors=None, num_workers=None, uptime_secs=None, status=None, storm_version=None, topology_version=None, sched_status=None, owner=None, replication_count=None, requested_memonheap=None, requested_memoffheap=None, requested_cpu=None, assigned_memonheap=None, assigned_memoffheap=None, assigned_cpu=None,):
- self.id = id
- self.name = name
- self.num_tasks = num_tasks
- self.num_executors = num_executors
- self.num_workers = num_workers
- self.uptime_secs = uptime_secs
- self.status = status
- self.storm_version = storm_version
- self.topology_version = topology_version
- self.sched_status = sched_status
- self.owner = owner
- self.replication_count = replication_count
- self.requested_memonheap = requested_memonheap
- self.requested_memoffheap = requested_memoffheap
- self.requested_cpu = requested_cpu
- self.assigned_memonheap = assigned_memonheap
- self.assigned_memoffheap = assigned_memoffheap
- self.assigned_cpu = assigned_cpu
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.id = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.name = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.I32:
- self.num_tasks = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.I32:
- self.num_executors = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I32:
- self.num_workers = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.I32:
- self.uptime_secs = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 7:
- if ftype == TType.STRING:
- self.status = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 8:
- if ftype == TType.STRING:
- self.storm_version = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 9:
- if ftype == TType.STRING:
- self.topology_version = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 513:
- if ftype == TType.STRING:
- self.sched_status = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 514:
- if ftype == TType.STRING:
- self.owner = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 515:
- if ftype == TType.I32:
- self.replication_count = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 521:
- if ftype == TType.DOUBLE:
- self.requested_memonheap = iprot.readDouble()
- else:
- iprot.skip(ftype)
- elif fid == 522:
- if ftype == TType.DOUBLE:
- self.requested_memoffheap = iprot.readDouble()
- else:
- iprot.skip(ftype)
- elif fid == 523:
- if ftype == TType.DOUBLE:
- self.requested_cpu = iprot.readDouble()
- else:
- iprot.skip(ftype)
- elif fid == 524:
- if ftype == TType.DOUBLE:
- self.assigned_memonheap = iprot.readDouble()
- else:
- iprot.skip(ftype)
- elif fid == 525:
- if ftype == TType.DOUBLE:
- self.assigned_memoffheap = iprot.readDouble()
- else:
- iprot.skip(ftype)
- elif fid == 526:
- if ftype == TType.DOUBLE:
- self.assigned_cpu = iprot.readDouble()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('TopologySummary')
- if self.id is not None:
- oprot.writeFieldBegin('id', TType.STRING, 1)
- oprot.writeString(self.id.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.name is not None:
- oprot.writeFieldBegin('name', TType.STRING, 2)
- oprot.writeString(self.name.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.num_tasks is not None:
- oprot.writeFieldBegin('num_tasks', TType.I32, 3)
- oprot.writeI32(self.num_tasks)
- oprot.writeFieldEnd()
- if self.num_executors is not None:
- oprot.writeFieldBegin('num_executors', TType.I32, 4)
- oprot.writeI32(self.num_executors)
- oprot.writeFieldEnd()
- if self.num_workers is not None:
- oprot.writeFieldBegin('num_workers', TType.I32, 5)
- oprot.writeI32(self.num_workers)
- oprot.writeFieldEnd()
- if self.uptime_secs is not None:
- oprot.writeFieldBegin('uptime_secs', TType.I32, 6)
- oprot.writeI32(self.uptime_secs)
- oprot.writeFieldEnd()
- if self.status is not None:
- oprot.writeFieldBegin('status', TType.STRING, 7)
- oprot.writeString(self.status.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.storm_version is not None:
- oprot.writeFieldBegin('storm_version', TType.STRING, 8)
- oprot.writeString(self.storm_version.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.topology_version is not None:
- oprot.writeFieldBegin('topology_version', TType.STRING, 9)
- oprot.writeString(self.topology_version.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.sched_status is not None:
- oprot.writeFieldBegin('sched_status', TType.STRING, 513)
- oprot.writeString(self.sched_status.encode('utf-8'))
- oprot.writeF
<TRUNCATED>
[37/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ComponentCommon.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ComponentCommon.java b/storm-client/src/jvm/org/apache/storm/generated/ComponentCommon.java
index 420ad60..1d83ce3 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ComponentCommon.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ComponentCommon.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon, ComponentCommon._Fields>, java.io.Serializable, Cloneable, Comparable<ComponentCommon> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComponentCommon");
@@ -60,16 +33,13 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
private static final org.apache.thrift.protocol.TField PARALLELISM_HINT_FIELD_DESC = new org.apache.thrift.protocol.TField("parallelism_hint", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.protocol.TField JSON_CONF_FIELD_DESC = new org.apache.thrift.protocol.TField("json_conf", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ComponentCommonStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ComponentCommonTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ComponentCommonStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ComponentCommonTupleSchemeFactory();
- private Map<GlobalStreamId,Grouping> inputs; // required
- private Map<String,StreamInfo> streams; // required
+ private java.util.Map<GlobalStreamId,Grouping> inputs; // required
+ private java.util.Map<java.lang.String,StreamInfo> streams; // required
private int parallelism_hint; // optional
- private String json_conf; // optional
+ private java.lang.String json_conf; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -78,10 +48,10 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
PARALLELISM_HINT((short)3, "parallelism_hint"),
JSON_CONF((short)4, "json_conf");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -110,21 +80,21 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -133,7 +103,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -142,9 +112,9 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
private static final int __PARALLELISM_HINT_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.PARALLELISM_HINT,_Fields.JSON_CONF};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.INPUTS, new org.apache.thrift.meta_data.FieldMetaData("inputs", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GlobalStreamId.class),
@@ -157,7 +127,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.JSON_CONF, new org.apache.thrift.meta_data.FieldMetaData("json_conf", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComponentCommon.class, metaDataMap);
}
@@ -165,8 +135,8 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
}
public ComponentCommon(
- Map<GlobalStreamId,Grouping> inputs,
- Map<String,StreamInfo> streams)
+ java.util.Map<GlobalStreamId,Grouping> inputs,
+ java.util.Map<java.lang.String,StreamInfo> streams)
{
this();
this.inputs = inputs;
@@ -179,8 +149,8 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
public ComponentCommon(ComponentCommon other) {
__isset_bitfield = other.__isset_bitfield;
if (other.is_set_inputs()) {
- Map<GlobalStreamId,Grouping> __this__inputs = new HashMap<GlobalStreamId,Grouping>(other.inputs.size());
- for (Map.Entry<GlobalStreamId, Grouping> other_element : other.inputs.entrySet()) {
+ java.util.Map<GlobalStreamId,Grouping> __this__inputs = new java.util.HashMap<GlobalStreamId,Grouping>(other.inputs.size());
+ for (java.util.Map.Entry<GlobalStreamId, Grouping> other_element : other.inputs.entrySet()) {
GlobalStreamId other_element_key = other_element.getKey();
Grouping other_element_value = other_element.getValue();
@@ -194,13 +164,13 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
this.inputs = __this__inputs;
}
if (other.is_set_streams()) {
- Map<String,StreamInfo> __this__streams = new HashMap<String,StreamInfo>(other.streams.size());
- for (Map.Entry<String, StreamInfo> other_element : other.streams.entrySet()) {
+ java.util.Map<java.lang.String,StreamInfo> __this__streams = new java.util.HashMap<java.lang.String,StreamInfo>(other.streams.size());
+ for (java.util.Map.Entry<java.lang.String, StreamInfo> other_element : other.streams.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
StreamInfo other_element_value = other_element.getValue();
- String __this__streams_copy_key = other_element_key;
+ java.lang.String __this__streams_copy_key = other_element_key;
StreamInfo __this__streams_copy_value = new StreamInfo(other_element_value);
@@ -233,16 +203,16 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
public void put_to_inputs(GlobalStreamId key, Grouping val) {
if (this.inputs == null) {
- this.inputs = new HashMap<GlobalStreamId,Grouping>();
+ this.inputs = new java.util.HashMap<GlobalStreamId,Grouping>();
}
this.inputs.put(key, val);
}
- public Map<GlobalStreamId,Grouping> get_inputs() {
+ public java.util.Map<GlobalStreamId,Grouping> get_inputs() {
return this.inputs;
}
- public void set_inputs(Map<GlobalStreamId,Grouping> inputs) {
+ public void set_inputs(java.util.Map<GlobalStreamId,Grouping> inputs) {
this.inputs = inputs;
}
@@ -265,18 +235,18 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
return (this.streams == null) ? 0 : this.streams.size();
}
- public void put_to_streams(String key, StreamInfo val) {
+ public void put_to_streams(java.lang.String key, StreamInfo val) {
if (this.streams == null) {
- this.streams = new HashMap<String,StreamInfo>();
+ this.streams = new java.util.HashMap<java.lang.String,StreamInfo>();
}
this.streams.put(key, val);
}
- public Map<String,StreamInfo> get_streams() {
+ public java.util.Map<java.lang.String,StreamInfo> get_streams() {
return this.streams;
}
- public void set_streams(Map<String,StreamInfo> streams) {
+ public void set_streams(java.util.Map<java.lang.String,StreamInfo> streams) {
this.streams = streams;
}
@@ -305,23 +275,23 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
}
public void unset_parallelism_hint() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARALLELISM_HINT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARALLELISM_HINT_ISSET_ID);
}
/** Returns true if field parallelism_hint is set (has been assigned a value) and false otherwise */
public boolean is_set_parallelism_hint() {
- return EncodingUtils.testBit(__isset_bitfield, __PARALLELISM_HINT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARALLELISM_HINT_ISSET_ID);
}
public void set_parallelism_hint_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARALLELISM_HINT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARALLELISM_HINT_ISSET_ID, value);
}
- public String get_json_conf() {
+ public java.lang.String get_json_conf() {
return this.json_conf;
}
- public void set_json_conf(String json_conf) {
+ public void set_json_conf(java.lang.String json_conf) {
this.json_conf = json_conf;
}
@@ -340,13 +310,13 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case INPUTS:
if (value == null) {
unset_inputs();
} else {
- set_inputs((Map<GlobalStreamId,Grouping>)value);
+ set_inputs((java.util.Map<GlobalStreamId,Grouping>)value);
}
break;
@@ -354,7 +324,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
if (value == null) {
unset_streams();
} else {
- set_streams((Map<String,StreamInfo>)value);
+ set_streams((java.util.Map<java.lang.String,StreamInfo>)value);
}
break;
@@ -362,7 +332,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
if (value == null) {
unset_parallelism_hint();
} else {
- set_parallelism_hint((Integer)value);
+ set_parallelism_hint((java.lang.Integer)value);
}
break;
@@ -370,14 +340,14 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
if (value == null) {
unset_json_conf();
} else {
- set_json_conf((String)value);
+ set_json_conf((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case INPUTS:
return get_inputs();
@@ -392,13 +362,13 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
return get_json_conf();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -411,11 +381,11 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
case JSON_CONF:
return is_set_json_conf();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ComponentCommon)
@@ -426,6 +396,8 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
public boolean equals(ComponentCommon that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_inputs = true && this.is_set_inputs();
boolean that_present_inputs = true && that.is_set_inputs();
@@ -468,29 +440,25 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_inputs = true && (is_set_inputs());
- list.add(present_inputs);
- if (present_inputs)
- list.add(inputs);
+ hashCode = hashCode * 8191 + ((is_set_inputs()) ? 131071 : 524287);
+ if (is_set_inputs())
+ hashCode = hashCode * 8191 + inputs.hashCode();
- boolean present_streams = true && (is_set_streams());
- list.add(present_streams);
- if (present_streams)
- list.add(streams);
+ hashCode = hashCode * 8191 + ((is_set_streams()) ? 131071 : 524287);
+ if (is_set_streams())
+ hashCode = hashCode * 8191 + streams.hashCode();
- boolean present_parallelism_hint = true && (is_set_parallelism_hint());
- list.add(present_parallelism_hint);
- if (present_parallelism_hint)
- list.add(parallelism_hint);
+ hashCode = hashCode * 8191 + ((is_set_parallelism_hint()) ? 131071 : 524287);
+ if (is_set_parallelism_hint())
+ hashCode = hashCode * 8191 + parallelism_hint;
- boolean present_json_conf = true && (is_set_json_conf());
- list.add(present_json_conf);
- if (present_json_conf)
- list.add(json_conf);
+ hashCode = hashCode * 8191 + ((is_set_json_conf()) ? 131071 : 524287);
+ if (is_set_json_conf())
+ hashCode = hashCode * 8191 + json_conf.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -501,7 +469,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_inputs()).compareTo(other.is_set_inputs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_inputs()).compareTo(other.is_set_inputs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -511,7 +479,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_streams()).compareTo(other.is_set_streams());
+ lastComparison = java.lang.Boolean.valueOf(is_set_streams()).compareTo(other.is_set_streams());
if (lastComparison != 0) {
return lastComparison;
}
@@ -521,7 +489,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_parallelism_hint()).compareTo(other.is_set_parallelism_hint());
+ lastComparison = java.lang.Boolean.valueOf(is_set_parallelism_hint()).compareTo(other.is_set_parallelism_hint());
if (lastComparison != 0) {
return lastComparison;
}
@@ -531,7 +499,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_json_conf()).compareTo(other.is_set_json_conf());
+ lastComparison = java.lang.Boolean.valueOf(is_set_json_conf()).compareTo(other.is_set_json_conf());
if (lastComparison != 0) {
return lastComparison;
}
@@ -549,16 +517,16 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ComponentCommon(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ComponentCommon(");
boolean first = true;
sb.append("inputs:");
@@ -617,7 +585,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -627,13 +595,13 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
}
}
- private static class ComponentCommonStandardSchemeFactory implements SchemeFactory {
+ private static class ComponentCommonStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ComponentCommonStandardScheme getScheme() {
return new ComponentCommonStandardScheme();
}
}
- private static class ComponentCommonStandardScheme extends StandardScheme<ComponentCommon> {
+ private static class ComponentCommonStandardScheme extends org.apache.thrift.scheme.StandardScheme<ComponentCommon> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ComponentCommon struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -649,7 +617,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin();
- struct.inputs = new HashMap<GlobalStreamId,Grouping>(2*_map24.size);
+ struct.inputs = new java.util.HashMap<GlobalStreamId,Grouping>(2*_map24.size);
GlobalStreamId _key25;
Grouping _val26;
for (int _i27 = 0; _i27 < _map24.size; ++_i27)
@@ -671,8 +639,8 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map28 = iprot.readMapBegin();
- struct.streams = new HashMap<String,StreamInfo>(2*_map28.size);
- String _key29;
+ struct.streams = new java.util.HashMap<java.lang.String,StreamInfo>(2*_map28.size);
+ java.lang.String _key29;
StreamInfo _val30;
for (int _i31 = 0; _i31 < _map28.size; ++_i31)
{
@@ -721,7 +689,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
oprot.writeFieldBegin(INPUTS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, struct.inputs.size()));
- for (Map.Entry<GlobalStreamId, Grouping> _iter32 : struct.inputs.entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, Grouping> _iter32 : struct.inputs.entrySet())
{
_iter32.getKey().write(oprot);
_iter32.getValue().write(oprot);
@@ -734,7 +702,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
oprot.writeFieldBegin(STREAMS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.streams.size()));
- for (Map.Entry<String, StreamInfo> _iter33 : struct.streams.entrySet())
+ for (java.util.Map.Entry<java.lang.String, StreamInfo> _iter33 : struct.streams.entrySet())
{
oprot.writeString(_iter33.getKey());
_iter33.getValue().write(oprot);
@@ -761,20 +729,20 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
}
- private static class ComponentCommonTupleSchemeFactory implements SchemeFactory {
+ private static class ComponentCommonTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ComponentCommonTupleScheme getScheme() {
return new ComponentCommonTupleScheme();
}
}
- private static class ComponentCommonTupleScheme extends TupleScheme<ComponentCommon> {
+ private static class ComponentCommonTupleScheme extends org.apache.thrift.scheme.TupleScheme<ComponentCommon> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ComponentCommon struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.inputs.size());
- for (Map.Entry<GlobalStreamId, Grouping> _iter34 : struct.inputs.entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, Grouping> _iter34 : struct.inputs.entrySet())
{
_iter34.getKey().write(oprot);
_iter34.getValue().write(oprot);
@@ -782,13 +750,13 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
}
{
oprot.writeI32(struct.streams.size());
- for (Map.Entry<String, StreamInfo> _iter35 : struct.streams.entrySet())
+ for (java.util.Map.Entry<java.lang.String, StreamInfo> _iter35 : struct.streams.entrySet())
{
oprot.writeString(_iter35.getKey());
_iter35.getValue().write(oprot);
}
}
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_parallelism_hint()) {
optionals.set(0);
}
@@ -806,10 +774,10 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ComponentCommon struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TMap _map36 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.inputs = new HashMap<GlobalStreamId,Grouping>(2*_map36.size);
+ struct.inputs = new java.util.HashMap<GlobalStreamId,Grouping>(2*_map36.size);
GlobalStreamId _key37;
Grouping _val38;
for (int _i39 = 0; _i39 < _map36.size; ++_i39)
@@ -824,8 +792,8 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
struct.set_inputs_isSet(true);
{
org.apache.thrift.protocol.TMap _map40 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.streams = new HashMap<String,StreamInfo>(2*_map40.size);
- String _key41;
+ struct.streams = new java.util.HashMap<java.lang.String,StreamInfo>(2*_map40.size);
+ java.lang.String _key41;
StreamInfo _val42;
for (int _i43 = 0; _i43 < _map40.size; ++_i43)
{
@@ -836,7 +804,7 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
}
}
struct.set_streams_isSet(true);
- BitSet incoming = iprot.readBitSet(2);
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.parallelism_hint = iprot.readI32();
struct.set_parallelism_hint_isSet(true);
@@ -848,5 +816,8 @@ public class ComponentCommon implements org.apache.thrift.TBase<ComponentCommon,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ComponentObject.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ComponentObject.java b/storm-client/src/jvm/org/apache/storm/generated/ComponentObject.java
index 94560a0..3ec8fee 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ComponentObject.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ComponentObject.java
@@ -16,41 +16,14 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, ComponentObject._Fields> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComponentObject");
private static final org.apache.thrift.protocol.TField SERIALIZED_JAVA_FIELD_DESC = new org.apache.thrift.protocol.TField("serialized_java", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -63,10 +36,10 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
SHELL((short)2, "shell"),
JAVA_OBJECT((short)3, "java_object");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -93,21 +66,21 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -116,21 +89,21 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SERIALIZED_JAVA, new org.apache.thrift.meta_data.FieldMetaData("serialized_java", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SERIALIZED_JAVA, new org.apache.thrift.meta_data.FieldMetaData("serialized_java", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- tmpMap.put(_Fields.SHELL, new org.apache.thrift.meta_data.FieldMetaData("shell", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.SHELL, new org.apache.thrift.meta_data.FieldMetaData("shell", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShellComponent.class)));
- tmpMap.put(_Fields.JAVA_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("java_object", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.JAVA_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("java_object", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JavaObject.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComponentObject.class, metaDataMap);
}
@@ -138,7 +111,7 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
super();
}
- public ComponentObject(_Fields setField, Object value) {
+ public ComponentObject(_Fields setField, java.lang.Object value) {
super(setField, value);
}
@@ -149,7 +122,7 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
return new ComponentObject(this);
}
- public static ComponentObject serialized_java(ByteBuffer value) {
+ public static ComponentObject serialized_java(java.nio.ByteBuffer value) {
ComponentObject x = new ComponentObject();
x.set_serialized_java(value);
return x;
@@ -157,7 +130,7 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
public static ComponentObject serialized_java(byte[] value) {
ComponentObject x = new ComponentObject();
- x.set_serialized_java(ByteBuffer.wrap(Arrays.copyOf(value, value.length)));
+ x.set_serialized_java(java.nio.ByteBuffer.wrap(value.clone()));
return x;
}
@@ -175,36 +148,36 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
@Override
- protected void checkType(_Fields setField, Object value) throws ClassCastException {
+ protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException {
switch (setField) {
case SERIALIZED_JAVA:
- if (value instanceof ByteBuffer) {
+ if (value instanceof java.nio.ByteBuffer) {
break;
}
- throw new ClassCastException("Was expecting value of type ByteBuffer for field 'serialized_java', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type java.nio.ByteBuffer for field 'serialized_java', but got " + value.getClass().getSimpleName());
case SHELL:
if (value instanceof ShellComponent) {
break;
}
- throw new ClassCastException("Was expecting value of type ShellComponent for field 'shell', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type ShellComponent for field 'shell', but got " + value.getClass().getSimpleName());
case JAVA_OBJECT:
if (value instanceof JavaObject) {
break;
}
- throw new ClassCastException("Was expecting value of type JavaObject for field 'java_object', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type JavaObject for field 'java_object', but got " + value.getClass().getSimpleName());
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@Override
- protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
+ protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(field.id);
if (setField != null) {
switch (setField) {
case SERIALIZED_JAVA:
if (field.type == SERIALIZED_JAVA_FIELD_DESC.type) {
- ByteBuffer serialized_java;
+ java.nio.ByteBuffer serialized_java;
serialized_java = iprot.readBinary();
return serialized_java;
} else {
@@ -232,7 +205,7 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
return null;
}
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
@@ -244,7 +217,7 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
switch (setField_) {
case SERIALIZED_JAVA:
- ByteBuffer serialized_java = (ByteBuffer)value_;
+ java.nio.ByteBuffer serialized_java = (java.nio.ByteBuffer)value_;
oprot.writeBinary(serialized_java);
return;
case SHELL:
@@ -256,17 +229,17 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
java_object.write(oprot);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@Override
- protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
+ protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(fieldID);
if (setField != null) {
switch (setField) {
case SERIALIZED_JAVA:
- ByteBuffer serialized_java;
+ java.nio.ByteBuffer serialized_java;
serialized_java = iprot.readBinary();
return serialized_java;
case SHELL:
@@ -280,10 +253,10 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
java_object.read(iprot);
return java_object;
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
- throw new TProtocolException("Couldn't find a field with field id " + fieldID);
+ throw new org.apache.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID);
}
}
@@ -291,7 +264,7 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
switch (setField_) {
case SERIALIZED_JAVA:
- ByteBuffer serialized_java = (ByteBuffer)value_;
+ java.nio.ByteBuffer serialized_java = (java.nio.ByteBuffer)value_;
oprot.writeBinary(serialized_java);
return;
case SHELL:
@@ -303,7 +276,7 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
java_object.write(oprot);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@@ -317,7 +290,7 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
case JAVA_OBJECT:
return JAVA_OBJECT_FIELD_DESC;
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@@ -338,24 +311,24 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
public byte[] get_serialized_java() {
set_serialized_java(org.apache.thrift.TBaseHelper.rightSize(buffer_for_serialized_java()));
- ByteBuffer b = buffer_for_serialized_java();
+ java.nio.ByteBuffer b = buffer_for_serialized_java();
return b == null ? null : b.array();
}
- public ByteBuffer buffer_for_serialized_java() {
+ public java.nio.ByteBuffer buffer_for_serialized_java() {
if (getSetField() == _Fields.SERIALIZED_JAVA) {
- return org.apache.thrift.TBaseHelper.copyBinary((ByteBuffer)getFieldValue());
+ return org.apache.thrift.TBaseHelper.copyBinary((java.nio.ByteBuffer)getFieldValue());
} else {
- throw new RuntimeException("Cannot get field 'serialized_java' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'serialized_java' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_serialized_java(byte[] value) {
- set_serialized_java(ByteBuffer.wrap(Arrays.copyOf(value, value.length)));
+ set_serialized_java(java.nio.ByteBuffer.wrap(value.clone()));
}
- public void set_serialized_java(ByteBuffer value) {
- if (value == null) throw new NullPointerException();
+ public void set_serialized_java(java.nio.ByteBuffer value) {
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.SERIALIZED_JAVA;
value_ = value;
}
@@ -364,12 +337,12 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
if (getSetField() == _Fields.SHELL) {
return (ShellComponent)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'shell' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'shell' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_shell(ShellComponent value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.SHELL;
value_ = value;
}
@@ -378,12 +351,12 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
if (getSetField() == _Fields.JAVA_OBJECT) {
return (JavaObject)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'java_object' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'java_object' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_java_object(JavaObject value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.JAVA_OBJECT;
value_ = value;
}
@@ -403,7 +376,7 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
}
- public boolean equals(Object other) {
+ public boolean equals(java.lang.Object other) {
if (other instanceof ComponentObject) {
return equals((ComponentObject)other);
} else {
@@ -427,12 +400,12 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>();
list.add(this.getClass().getName());
org.apache.thrift.TFieldIdEnum setField = getSetField();
if (setField != null) {
list.add(setField.getThriftFieldId());
- Object value = getFieldValue();
+ java.lang.Object value = getFieldValue();
if (value instanceof org.apache.thrift.TEnum) {
list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue());
} else {
@@ -450,7 +423,7 @@ public class ComponentObject extends org.apache.thrift.TUnion<ComponentObject, C
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
[43/43] storm git commit: Merge branch 'STORM-3061-thrift' of
https://github.com/revans2/incubator-storm into STORM-3061
Posted by bo...@apache.org.
Merge branch 'STORM-3061-thrift' of https://github.com/revans2/incubator-storm into STORM-3061
STORM-3061: thrift 0.11
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/9e97a075
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/9e97a075
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/9e97a075
Branch: refs/heads/master
Commit: 9e97a0758c013556b925f090ec39d9d1f383e6c9
Parents: 93ed601 1fd1e17
Author: Robert Evans <ev...@yahoo-inc.com>
Authored: Wed May 23 14:08:12 2018 -0500
Committer: Robert Evans <ev...@yahoo-inc.com>
Committed: Wed May 23 14:08:12 2018 -0500
----------------------------------------------------------------------
pom.xml | 2 +-
storm-client/src/genthrift.sh | 2 +-
.../apache/storm/generated/AccessControl.java | 148 +-
.../storm/generated/AccessControlType.java | 6 +-
.../storm/generated/AlreadyAliveException.java | 124 +-
.../org/apache/storm/generated/Assignment.java | 362 +-
.../storm/generated/AuthorizationException.java | 124 +-
.../storm/generated/BeginDownloadResult.java | 158 +-
.../jvm/org/apache/storm/generated/Bolt.java | 121 +-
.../storm/generated/BoltAggregateStats.java | 175 +-
.../org/apache/storm/generated/BoltStats.java | 440 +-
.../apache/storm/generated/ClusterSummary.java | 205 +-
.../storm/generated/ClusterWorkerHeartbeat.java | 185 +-
.../storm/generated/CommonAggregateStats.java | 260 +-
.../generated/ComponentAggregateStats.java | 143 +-
.../apache/storm/generated/ComponentCommon.java | 217 +-
.../apache/storm/generated/ComponentObject.java | 129 +-
.../storm/generated/ComponentPageInfo.java | 495 +-
.../apache/storm/generated/ComponentType.java | 6 +-
.../org/apache/storm/generated/Credentials.java | 144 +-
.../storm/generated/DRPCExceptionType.java | 6 +-
.../storm/generated/DRPCExecutionException.java | 137 +-
.../org/apache/storm/generated/DRPCRequest.java | 141 +-
.../apache/storm/generated/DebugOptions.java | 141 +-
.../apache/storm/generated/DistributedRPC.java | 368 +-
.../generated/DistributedRPCInvocations.java | 1106 +-
.../org/apache/storm/generated/ErrorInfo.java | 175 +-
.../storm/generated/ExecutorAggregateStats.java | 125 +-
.../apache/storm/generated/ExecutorInfo.java | 133 +-
.../storm/generated/ExecutorSpecificStats.java | 97 +-
.../apache/storm/generated/ExecutorStats.java | 253 +-
.../apache/storm/generated/ExecutorSummary.java | 193 +-
.../apache/storm/generated/GetInfoOptions.java | 116 +-
.../apache/storm/generated/GlobalStreamId.java | 141 +-
.../org/apache/storm/generated/Grouping.java | 199 +-
.../generated/HBAuthorizationException.java | 124 +-
.../storm/generated/HBExecutionException.java | 124 +-
.../org/apache/storm/generated/HBMessage.java | 142 +-
.../apache/storm/generated/HBMessageData.java | 179 +-
.../jvm/org/apache/storm/generated/HBNodes.java | 146 +-
.../jvm/org/apache/storm/generated/HBPulse.java | 151 +-
.../org/apache/storm/generated/HBRecords.java | 134 +-
.../storm/generated/HBServerMessageType.java | 6 +-
.../generated/InvalidTopologyException.java | 124 +-
.../org/apache/storm/generated/JavaObject.java | 149 +-
.../apache/storm/generated/JavaObjectArg.java | 211 +-
.../generated/KeyAlreadyExistsException.java | 124 +-
.../storm/generated/KeyNotFoundException.java | 124 +-
.../org/apache/storm/generated/KillOptions.java | 124 +-
.../storm/generated/LSApprovedWorkers.java | 140 +-
.../generated/LSSupervisorAssignments.java | 140 +-
.../apache/storm/generated/LSSupervisorId.java | 122 +-
.../apache/storm/generated/LSTopoHistory.java | 215 +-
.../storm/generated/LSTopoHistoryList.java | 130 +-
.../storm/generated/LSWorkerHeartbeat.java | 179 +-
.../apache/storm/generated/ListBlobsResult.java | 161 +-
.../apache/storm/generated/LocalAssignment.java | 196 +-
.../apache/storm/generated/LocalStateData.java | 146 +-
.../org/apache/storm/generated/LogConfig.java | 148 +-
.../org/apache/storm/generated/LogLevel.java | 184 +-
.../apache/storm/generated/LogLevelAction.java | 6 +-
.../jvm/org/apache/storm/generated/Nimbus.java | 14032 ++++-----
.../apache/storm/generated/NimbusSummary.java | 186 +-
.../org/apache/storm/generated/NodeInfo.java | 151 +-
.../storm/generated/NotAliveException.java | 124 +-
.../org/apache/storm/generated/NullStruct.java | 103 +-
.../apache/storm/generated/NumErrorsChoice.java | 6 +-
.../storm/generated/OwnerResourceSummary.java | 453 +-
.../storm/generated/PrivateWorkerKey.java | 162 +-
.../apache/storm/generated/ProfileAction.java | 6 +-
.../apache/storm/generated/ProfileRequest.java | 142 +-
.../storm/generated/ReadableBlobMeta.java | 127 +-
.../storm/generated/RebalanceOptions.java | 285 +-
.../storm/generated/SettableBlobMeta.java | 151 +-
.../apache/storm/generated/SharedMemory.java | 177 +-
.../apache/storm/generated/ShellComponent.java | 145 +-
.../storm/generated/SpecificAggregateStats.java | 97 +-
.../storm/generated/SpoutAggregateStats.java | 124 +-
.../org/apache/storm/generated/SpoutSpec.java | 121 +-
.../org/apache/storm/generated/SpoutStats.java | 292 +-
.../apache/storm/generated/StateSpoutSpec.java | 121 +-
.../org/apache/storm/generated/StormBase.java | 336 +-
.../apache/storm/generated/StormTopology.java | 483 +-
.../org/apache/storm/generated/StreamInfo.java | 157 +-
.../apache/storm/generated/SubmitOptions.java | 125 +-
.../org/apache/storm/generated/Supervisor.java | 803 +-
.../storm/generated/SupervisorAssignments.java | 152 +-
.../apache/storm/generated/SupervisorInfo.java | 587 +-
.../storm/generated/SupervisorPageInfo.java | 157 +-
.../storm/generated/SupervisorSummary.java | 334 +-
.../generated/SupervisorWorkerHeartbeat.java | 164 +-
.../generated/SupervisorWorkerHeartbeats.java | 149 +-
.../storm/generated/ThriftSerializedObject.java | 147 +-
.../storm/generated/TopologyActionOptions.java | 93 +-
.../storm/generated/TopologyHistoryInfo.java | 146 +-
.../apache/storm/generated/TopologyInfo.java | 508 +-
.../storm/generated/TopologyInitialStatus.java | 6 +-
.../storm/generated/TopologyPageInfo.java | 759 +-
.../apache/storm/generated/TopologyStats.java | 294 +-
.../apache/storm/generated/TopologyStatus.java | 6 +-
.../apache/storm/generated/TopologySummary.java | 449 +-
.../storm/generated/WorkerMetricList.java | 134 +-
.../storm/generated/WorkerMetricPoint.java | 209 +-
.../apache/storm/generated/WorkerMetrics.java | 165 +-
.../apache/storm/generated/WorkerResources.java | 262 +-
.../apache/storm/generated/WorkerSummary.java | 412 +-
.../org/apache/storm/generated/WorkerToken.java | 162 +-
.../apache/storm/generated/WorkerTokenInfo.java | 171 +-
.../storm/generated/WorkerTokenServiceType.java | 6 +-
storm-client/src/py/storm/DistributedRPC-remote | 125 +-
storm-client/src/py/storm/DistributedRPC.py | 531 +-
.../py/storm/DistributedRPCInvocations-remote | 155 +-
.../src/py/storm/DistributedRPCInvocations.py | 1637 +-
storm-client/src/py/storm/Nimbus-remote | 615 +-
storm-client/src/py/storm/Nimbus.py | 21130 +++++++------
storm-client/src/py/storm/Supervisor-remote | 145 +-
storm-client/src/py/storm/Supervisor.py | 1266 +-
storm-client/src/py/storm/constants.py | 9 +-
storm-client/src/py/storm/ttypes.py | 26309 ++++++++---------
119 files changed, 41924 insertions(+), 44785 deletions(-)
----------------------------------------------------------------------
[36/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ComponentPageInfo.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ComponentPageInfo.java b/storm-client/src/jvm/org/apache/storm/generated/ComponentPageInfo.java
index 377e733..bf37de2 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ComponentPageInfo.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ComponentPageInfo.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageInfo, ComponentPageInfo._Fields>, java.io.Serializable, Cloneable, Comparable<ComponentPageInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComponentPageInfo");
@@ -72,28 +45,25 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
private static final org.apache.thrift.protocol.TField TOPOLOGY_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("topology_status", org.apache.thrift.protocol.TType.STRING, (short)15);
private static final org.apache.thrift.protocol.TField RESOURCES_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("resources_map", org.apache.thrift.protocol.TType.MAP, (short)16);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ComponentPageInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ComponentPageInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ComponentPageInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ComponentPageInfoTupleSchemeFactory();
- private String component_id; // required
+ private java.lang.String component_id; // required
private ComponentType component_type; // required
- private String topology_id; // optional
- private String topology_name; // optional
+ private java.lang.String topology_id; // optional
+ private java.lang.String topology_name; // optional
private int num_executors; // optional
private int num_tasks; // optional
- private Map<String,ComponentAggregateStats> window_to_stats; // optional
- private Map<GlobalStreamId,ComponentAggregateStats> gsid_to_input_stats; // optional
- private Map<String,ComponentAggregateStats> sid_to_output_stats; // optional
- private List<ExecutorAggregateStats> exec_stats; // optional
- private List<ErrorInfo> errors; // optional
- private String eventlog_host; // optional
+ private java.util.Map<java.lang.String,ComponentAggregateStats> window_to_stats; // optional
+ private java.util.Map<GlobalStreamId,ComponentAggregateStats> gsid_to_input_stats; // optional
+ private java.util.Map<java.lang.String,ComponentAggregateStats> sid_to_output_stats; // optional
+ private java.util.List<ExecutorAggregateStats> exec_stats; // optional
+ private java.util.List<ErrorInfo> errors; // optional
+ private java.lang.String eventlog_host; // optional
private int eventlog_port; // optional
private DebugOptions debug_options; // optional
- private String topology_status; // optional
- private Map<String,Double> resources_map; // optional
+ private java.lang.String topology_status; // optional
+ private java.util.Map<java.lang.String,java.lang.Double> resources_map; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -118,10 +88,10 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
TOPOLOGY_STATUS((short)15, "topology_status"),
RESOURCES_MAP((short)16, "resources_map");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -174,21 +144,21 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -197,7 +167,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -208,9 +178,9 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
private static final int __EVENTLOG_PORT_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.TOPOLOGY_ID,_Fields.TOPOLOGY_NAME,_Fields.NUM_EXECUTORS,_Fields.NUM_TASKS,_Fields.WINDOW_TO_STATS,_Fields.GSID_TO_INPUT_STATS,_Fields.SID_TO_OUTPUT_STATS,_Fields.EXEC_STATS,_Fields.ERRORS,_Fields.EVENTLOG_HOST,_Fields.EVENTLOG_PORT,_Fields.DEBUG_OPTIONS,_Fields.TOPOLOGY_STATUS,_Fields.RESOURCES_MAP};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COMPONENT_ID, new org.apache.thrift.meta_data.FieldMetaData("component_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.COMPONENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("component_type", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -253,7 +223,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComponentPageInfo.class, metaDataMap);
}
@@ -261,7 +231,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
public ComponentPageInfo(
- String component_id,
+ java.lang.String component_id,
ComponentType component_type)
{
this();
@@ -289,13 +259,13 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
this.num_executors = other.num_executors;
this.num_tasks = other.num_tasks;
if (other.is_set_window_to_stats()) {
- Map<String,ComponentAggregateStats> __this__window_to_stats = new HashMap<String,ComponentAggregateStats>(other.window_to_stats.size());
- for (Map.Entry<String, ComponentAggregateStats> other_element : other.window_to_stats.entrySet()) {
+ java.util.Map<java.lang.String,ComponentAggregateStats> __this__window_to_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>(other.window_to_stats.size());
+ for (java.util.Map.Entry<java.lang.String, ComponentAggregateStats> other_element : other.window_to_stats.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
ComponentAggregateStats other_element_value = other_element.getValue();
- String __this__window_to_stats_copy_key = other_element_key;
+ java.lang.String __this__window_to_stats_copy_key = other_element_key;
ComponentAggregateStats __this__window_to_stats_copy_value = new ComponentAggregateStats(other_element_value);
@@ -304,8 +274,8 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
this.window_to_stats = __this__window_to_stats;
}
if (other.is_set_gsid_to_input_stats()) {
- Map<GlobalStreamId,ComponentAggregateStats> __this__gsid_to_input_stats = new HashMap<GlobalStreamId,ComponentAggregateStats>(other.gsid_to_input_stats.size());
- for (Map.Entry<GlobalStreamId, ComponentAggregateStats> other_element : other.gsid_to_input_stats.entrySet()) {
+ java.util.Map<GlobalStreamId,ComponentAggregateStats> __this__gsid_to_input_stats = new java.util.HashMap<GlobalStreamId,ComponentAggregateStats>(other.gsid_to_input_stats.size());
+ for (java.util.Map.Entry<GlobalStreamId, ComponentAggregateStats> other_element : other.gsid_to_input_stats.entrySet()) {
GlobalStreamId other_element_key = other_element.getKey();
ComponentAggregateStats other_element_value = other_element.getValue();
@@ -319,13 +289,13 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
this.gsid_to_input_stats = __this__gsid_to_input_stats;
}
if (other.is_set_sid_to_output_stats()) {
- Map<String,ComponentAggregateStats> __this__sid_to_output_stats = new HashMap<String,ComponentAggregateStats>(other.sid_to_output_stats.size());
- for (Map.Entry<String, ComponentAggregateStats> other_element : other.sid_to_output_stats.entrySet()) {
+ java.util.Map<java.lang.String,ComponentAggregateStats> __this__sid_to_output_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>(other.sid_to_output_stats.size());
+ for (java.util.Map.Entry<java.lang.String, ComponentAggregateStats> other_element : other.sid_to_output_stats.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
ComponentAggregateStats other_element_value = other_element.getValue();
- String __this__sid_to_output_stats_copy_key = other_element_key;
+ java.lang.String __this__sid_to_output_stats_copy_key = other_element_key;
ComponentAggregateStats __this__sid_to_output_stats_copy_value = new ComponentAggregateStats(other_element_value);
@@ -334,14 +304,14 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
this.sid_to_output_stats = __this__sid_to_output_stats;
}
if (other.is_set_exec_stats()) {
- List<ExecutorAggregateStats> __this__exec_stats = new ArrayList<ExecutorAggregateStats>(other.exec_stats.size());
+ java.util.List<ExecutorAggregateStats> __this__exec_stats = new java.util.ArrayList<ExecutorAggregateStats>(other.exec_stats.size());
for (ExecutorAggregateStats other_element : other.exec_stats) {
__this__exec_stats.add(new ExecutorAggregateStats(other_element));
}
this.exec_stats = __this__exec_stats;
}
if (other.is_set_errors()) {
- List<ErrorInfo> __this__errors = new ArrayList<ErrorInfo>(other.errors.size());
+ java.util.List<ErrorInfo> __this__errors = new java.util.ArrayList<ErrorInfo>(other.errors.size());
for (ErrorInfo other_element : other.errors) {
__this__errors.add(new ErrorInfo(other_element));
}
@@ -358,7 +328,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
this.topology_status = other.topology_status;
}
if (other.is_set_resources_map()) {
- Map<String,Double> __this__resources_map = new HashMap<String,Double>(other.resources_map);
+ java.util.Map<java.lang.String,java.lang.Double> __this__resources_map = new java.util.HashMap<java.lang.String,java.lang.Double>(other.resources_map);
this.resources_map = __this__resources_map;
}
}
@@ -390,11 +360,11 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
this.resources_map = null;
}
- public String get_component_id() {
+ public java.lang.String get_component_id() {
return this.component_id;
}
- public void set_component_id(String component_id) {
+ public void set_component_id(java.lang.String component_id) {
this.component_id = component_id;
}
@@ -444,11 +414,11 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
}
- public String get_topology_id() {
+ public java.lang.String get_topology_id() {
return this.topology_id;
}
- public void set_topology_id(String topology_id) {
+ public void set_topology_id(java.lang.String topology_id) {
this.topology_id = topology_id;
}
@@ -467,11 +437,11 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
}
- public String get_topology_name() {
+ public java.lang.String get_topology_name() {
return this.topology_name;
}
- public void set_topology_name(String topology_name) {
+ public void set_topology_name(java.lang.String topology_name) {
this.topology_name = topology_name;
}
@@ -500,16 +470,16 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
public void unset_num_executors() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
}
/** Returns true if field num_executors is set (has been assigned a value) and false otherwise */
public boolean is_set_num_executors() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
}
public void set_num_executors_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID, value);
}
public int get_num_tasks() {
@@ -522,34 +492,34 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
public void unset_num_tasks() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
}
/** Returns true if field num_tasks is set (has been assigned a value) and false otherwise */
public boolean is_set_num_tasks() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
}
public void set_num_tasks_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_TASKS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_TASKS_ISSET_ID, value);
}
public int get_window_to_stats_size() {
return (this.window_to_stats == null) ? 0 : this.window_to_stats.size();
}
- public void put_to_window_to_stats(String key, ComponentAggregateStats val) {
+ public void put_to_window_to_stats(java.lang.String key, ComponentAggregateStats val) {
if (this.window_to_stats == null) {
- this.window_to_stats = new HashMap<String,ComponentAggregateStats>();
+ this.window_to_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>();
}
this.window_to_stats.put(key, val);
}
- public Map<String,ComponentAggregateStats> get_window_to_stats() {
+ public java.util.Map<java.lang.String,ComponentAggregateStats> get_window_to_stats() {
return this.window_to_stats;
}
- public void set_window_to_stats(Map<String,ComponentAggregateStats> window_to_stats) {
+ public void set_window_to_stats(java.util.Map<java.lang.String,ComponentAggregateStats> window_to_stats) {
this.window_to_stats = window_to_stats;
}
@@ -574,16 +544,16 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
public void put_to_gsid_to_input_stats(GlobalStreamId key, ComponentAggregateStats val) {
if (this.gsid_to_input_stats == null) {
- this.gsid_to_input_stats = new HashMap<GlobalStreamId,ComponentAggregateStats>();
+ this.gsid_to_input_stats = new java.util.HashMap<GlobalStreamId,ComponentAggregateStats>();
}
this.gsid_to_input_stats.put(key, val);
}
- public Map<GlobalStreamId,ComponentAggregateStats> get_gsid_to_input_stats() {
+ public java.util.Map<GlobalStreamId,ComponentAggregateStats> get_gsid_to_input_stats() {
return this.gsid_to_input_stats;
}
- public void set_gsid_to_input_stats(Map<GlobalStreamId,ComponentAggregateStats> gsid_to_input_stats) {
+ public void set_gsid_to_input_stats(java.util.Map<GlobalStreamId,ComponentAggregateStats> gsid_to_input_stats) {
this.gsid_to_input_stats = gsid_to_input_stats;
}
@@ -606,18 +576,18 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return (this.sid_to_output_stats == null) ? 0 : this.sid_to_output_stats.size();
}
- public void put_to_sid_to_output_stats(String key, ComponentAggregateStats val) {
+ public void put_to_sid_to_output_stats(java.lang.String key, ComponentAggregateStats val) {
if (this.sid_to_output_stats == null) {
- this.sid_to_output_stats = new HashMap<String,ComponentAggregateStats>();
+ this.sid_to_output_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>();
}
this.sid_to_output_stats.put(key, val);
}
- public Map<String,ComponentAggregateStats> get_sid_to_output_stats() {
+ public java.util.Map<java.lang.String,ComponentAggregateStats> get_sid_to_output_stats() {
return this.sid_to_output_stats;
}
- public void set_sid_to_output_stats(Map<String,ComponentAggregateStats> sid_to_output_stats) {
+ public void set_sid_to_output_stats(java.util.Map<java.lang.String,ComponentAggregateStats> sid_to_output_stats) {
this.sid_to_output_stats = sid_to_output_stats;
}
@@ -646,16 +616,16 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
public void add_to_exec_stats(ExecutorAggregateStats elem) {
if (this.exec_stats == null) {
- this.exec_stats = new ArrayList<ExecutorAggregateStats>();
+ this.exec_stats = new java.util.ArrayList<ExecutorAggregateStats>();
}
this.exec_stats.add(elem);
}
- public List<ExecutorAggregateStats> get_exec_stats() {
+ public java.util.List<ExecutorAggregateStats> get_exec_stats() {
return this.exec_stats;
}
- public void set_exec_stats(List<ExecutorAggregateStats> exec_stats) {
+ public void set_exec_stats(java.util.List<ExecutorAggregateStats> exec_stats) {
this.exec_stats = exec_stats;
}
@@ -684,16 +654,16 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
public void add_to_errors(ErrorInfo elem) {
if (this.errors == null) {
- this.errors = new ArrayList<ErrorInfo>();
+ this.errors = new java.util.ArrayList<ErrorInfo>();
}
this.errors.add(elem);
}
- public List<ErrorInfo> get_errors() {
+ public java.util.List<ErrorInfo> get_errors() {
return this.errors;
}
- public void set_errors(List<ErrorInfo> errors) {
+ public void set_errors(java.util.List<ErrorInfo> errors) {
this.errors = errors;
}
@@ -712,11 +682,11 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
}
- public String get_eventlog_host() {
+ public java.lang.String get_eventlog_host() {
return this.eventlog_host;
}
- public void set_eventlog_host(String eventlog_host) {
+ public void set_eventlog_host(java.lang.String eventlog_host) {
this.eventlog_host = eventlog_host;
}
@@ -745,16 +715,16 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
public void unset_eventlog_port() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EVENTLOG_PORT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EVENTLOG_PORT_ISSET_ID);
}
/** Returns true if field eventlog_port is set (has been assigned a value) and false otherwise */
public boolean is_set_eventlog_port() {
- return EncodingUtils.testBit(__isset_bitfield, __EVENTLOG_PORT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EVENTLOG_PORT_ISSET_ID);
}
public void set_eventlog_port_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EVENTLOG_PORT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EVENTLOG_PORT_ISSET_ID, value);
}
public DebugOptions get_debug_options() {
@@ -780,11 +750,11 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
}
- public String get_topology_status() {
+ public java.lang.String get_topology_status() {
return this.topology_status;
}
- public void set_topology_status(String topology_status) {
+ public void set_topology_status(java.lang.String topology_status) {
this.topology_status = topology_status;
}
@@ -807,18 +777,18 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return (this.resources_map == null) ? 0 : this.resources_map.size();
}
- public void put_to_resources_map(String key, double val) {
+ public void put_to_resources_map(java.lang.String key, double val) {
if (this.resources_map == null) {
- this.resources_map = new HashMap<String,Double>();
+ this.resources_map = new java.util.HashMap<java.lang.String,java.lang.Double>();
}
this.resources_map.put(key, val);
}
- public Map<String,Double> get_resources_map() {
+ public java.util.Map<java.lang.String,java.lang.Double> get_resources_map() {
return this.resources_map;
}
- public void set_resources_map(Map<String,Double> resources_map) {
+ public void set_resources_map(java.util.Map<java.lang.String,java.lang.Double> resources_map) {
this.resources_map = resources_map;
}
@@ -837,13 +807,13 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case COMPONENT_ID:
if (value == null) {
unset_component_id();
} else {
- set_component_id((String)value);
+ set_component_id((java.lang.String)value);
}
break;
@@ -859,7 +829,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_topology_id();
} else {
- set_topology_id((String)value);
+ set_topology_id((java.lang.String)value);
}
break;
@@ -867,7 +837,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_topology_name();
} else {
- set_topology_name((String)value);
+ set_topology_name((java.lang.String)value);
}
break;
@@ -875,7 +845,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_num_executors();
} else {
- set_num_executors((Integer)value);
+ set_num_executors((java.lang.Integer)value);
}
break;
@@ -883,7 +853,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_num_tasks();
} else {
- set_num_tasks((Integer)value);
+ set_num_tasks((java.lang.Integer)value);
}
break;
@@ -891,7 +861,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_window_to_stats();
} else {
- set_window_to_stats((Map<String,ComponentAggregateStats>)value);
+ set_window_to_stats((java.util.Map<java.lang.String,ComponentAggregateStats>)value);
}
break;
@@ -899,7 +869,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_gsid_to_input_stats();
} else {
- set_gsid_to_input_stats((Map<GlobalStreamId,ComponentAggregateStats>)value);
+ set_gsid_to_input_stats((java.util.Map<GlobalStreamId,ComponentAggregateStats>)value);
}
break;
@@ -907,7 +877,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_sid_to_output_stats();
} else {
- set_sid_to_output_stats((Map<String,ComponentAggregateStats>)value);
+ set_sid_to_output_stats((java.util.Map<java.lang.String,ComponentAggregateStats>)value);
}
break;
@@ -915,7 +885,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_exec_stats();
} else {
- set_exec_stats((List<ExecutorAggregateStats>)value);
+ set_exec_stats((java.util.List<ExecutorAggregateStats>)value);
}
break;
@@ -923,7 +893,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_errors();
} else {
- set_errors((List<ErrorInfo>)value);
+ set_errors((java.util.List<ErrorInfo>)value);
}
break;
@@ -931,7 +901,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_eventlog_host();
} else {
- set_eventlog_host((String)value);
+ set_eventlog_host((java.lang.String)value);
}
break;
@@ -939,7 +909,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_eventlog_port();
} else {
- set_eventlog_port((Integer)value);
+ set_eventlog_port((java.lang.Integer)value);
}
break;
@@ -955,7 +925,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_topology_status();
} else {
- set_topology_status((String)value);
+ set_topology_status((java.lang.String)value);
}
break;
@@ -963,14 +933,14 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (value == null) {
unset_resources_map();
} else {
- set_resources_map((Map<String,Double>)value);
+ set_resources_map((java.util.Map<java.lang.String,java.lang.Double>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COMPONENT_ID:
return get_component_id();
@@ -1021,13 +991,13 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return get_resources_map();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -1064,11 +1034,11 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
case RESOURCES_MAP:
return is_set_resources_map();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ComponentPageInfo)
@@ -1079,6 +1049,8 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
public boolean equals(ComponentPageInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_component_id = true && this.is_set_component_id();
boolean that_present_component_id = true && that.is_set_component_id();
@@ -1229,89 +1201,73 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_component_id = true && (is_set_component_id());
- list.add(present_component_id);
- if (present_component_id)
- list.add(component_id);
-
- boolean present_component_type = true && (is_set_component_type());
- list.add(present_component_type);
- if (present_component_type)
- list.add(component_type.getValue());
-
- boolean present_topology_id = true && (is_set_topology_id());
- list.add(present_topology_id);
- if (present_topology_id)
- list.add(topology_id);
-
- boolean present_topology_name = true && (is_set_topology_name());
- list.add(present_topology_name);
- if (present_topology_name)
- list.add(topology_name);
-
- boolean present_num_executors = true && (is_set_num_executors());
- list.add(present_num_executors);
- if (present_num_executors)
- list.add(num_executors);
-
- boolean present_num_tasks = true && (is_set_num_tasks());
- list.add(present_num_tasks);
- if (present_num_tasks)
- list.add(num_tasks);
-
- boolean present_window_to_stats = true && (is_set_window_to_stats());
- list.add(present_window_to_stats);
- if (present_window_to_stats)
- list.add(window_to_stats);
-
- boolean present_gsid_to_input_stats = true && (is_set_gsid_to_input_stats());
- list.add(present_gsid_to_input_stats);
- if (present_gsid_to_input_stats)
- list.add(gsid_to_input_stats);
-
- boolean present_sid_to_output_stats = true && (is_set_sid_to_output_stats());
- list.add(present_sid_to_output_stats);
- if (present_sid_to_output_stats)
- list.add(sid_to_output_stats);
-
- boolean present_exec_stats = true && (is_set_exec_stats());
- list.add(present_exec_stats);
- if (present_exec_stats)
- list.add(exec_stats);
-
- boolean present_errors = true && (is_set_errors());
- list.add(present_errors);
- if (present_errors)
- list.add(errors);
-
- boolean present_eventlog_host = true && (is_set_eventlog_host());
- list.add(present_eventlog_host);
- if (present_eventlog_host)
- list.add(eventlog_host);
-
- boolean present_eventlog_port = true && (is_set_eventlog_port());
- list.add(present_eventlog_port);
- if (present_eventlog_port)
- list.add(eventlog_port);
-
- boolean present_debug_options = true && (is_set_debug_options());
- list.add(present_debug_options);
- if (present_debug_options)
- list.add(debug_options);
-
- boolean present_topology_status = true && (is_set_topology_status());
- list.add(present_topology_status);
- if (present_topology_status)
- list.add(topology_status);
-
- boolean present_resources_map = true && (is_set_resources_map());
- list.add(present_resources_map);
- if (present_resources_map)
- list.add(resources_map);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((is_set_component_id()) ? 131071 : 524287);
+ if (is_set_component_id())
+ hashCode = hashCode * 8191 + component_id.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_component_type()) ? 131071 : 524287);
+ if (is_set_component_type())
+ hashCode = hashCode * 8191 + component_type.getValue();
+
+ hashCode = hashCode * 8191 + ((is_set_topology_id()) ? 131071 : 524287);
+ if (is_set_topology_id())
+ hashCode = hashCode * 8191 + topology_id.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_topology_name()) ? 131071 : 524287);
+ if (is_set_topology_name())
+ hashCode = hashCode * 8191 + topology_name.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_num_executors()) ? 131071 : 524287);
+ if (is_set_num_executors())
+ hashCode = hashCode * 8191 + num_executors;
+
+ hashCode = hashCode * 8191 + ((is_set_num_tasks()) ? 131071 : 524287);
+ if (is_set_num_tasks())
+ hashCode = hashCode * 8191 + num_tasks;
+
+ hashCode = hashCode * 8191 + ((is_set_window_to_stats()) ? 131071 : 524287);
+ if (is_set_window_to_stats())
+ hashCode = hashCode * 8191 + window_to_stats.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_gsid_to_input_stats()) ? 131071 : 524287);
+ if (is_set_gsid_to_input_stats())
+ hashCode = hashCode * 8191 + gsid_to_input_stats.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_sid_to_output_stats()) ? 131071 : 524287);
+ if (is_set_sid_to_output_stats())
+ hashCode = hashCode * 8191 + sid_to_output_stats.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_exec_stats()) ? 131071 : 524287);
+ if (is_set_exec_stats())
+ hashCode = hashCode * 8191 + exec_stats.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_errors()) ? 131071 : 524287);
+ if (is_set_errors())
+ hashCode = hashCode * 8191 + errors.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_eventlog_host()) ? 131071 : 524287);
+ if (is_set_eventlog_host())
+ hashCode = hashCode * 8191 + eventlog_host.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_eventlog_port()) ? 131071 : 524287);
+ if (is_set_eventlog_port())
+ hashCode = hashCode * 8191 + eventlog_port;
+
+ hashCode = hashCode * 8191 + ((is_set_debug_options()) ? 131071 : 524287);
+ if (is_set_debug_options())
+ hashCode = hashCode * 8191 + debug_options.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_topology_status()) ? 131071 : 524287);
+ if (is_set_topology_status())
+ hashCode = hashCode * 8191 + topology_status.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_resources_map()) ? 131071 : 524287);
+ if (is_set_resources_map())
+ hashCode = hashCode * 8191 + resources_map.hashCode();
+
+ return hashCode;
}
@Override
@@ -1322,7 +1278,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_component_id()).compareTo(other.is_set_component_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_component_id()).compareTo(other.is_set_component_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1332,7 +1288,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_component_type()).compareTo(other.is_set_component_type());
+ lastComparison = java.lang.Boolean.valueOf(is_set_component_type()).compareTo(other.is_set_component_type());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1342,7 +1298,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1352,7 +1308,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_name()).compareTo(other.is_set_topology_name());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_name()).compareTo(other.is_set_topology_name());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1362,7 +1318,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_executors()).compareTo(other.is_set_num_executors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_executors()).compareTo(other.is_set_num_executors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1372,7 +1328,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_tasks()).compareTo(other.is_set_num_tasks());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_tasks()).compareTo(other.is_set_num_tasks());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1382,7 +1338,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_window_to_stats()).compareTo(other.is_set_window_to_stats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_window_to_stats()).compareTo(other.is_set_window_to_stats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1392,7 +1348,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_gsid_to_input_stats()).compareTo(other.is_set_gsid_to_input_stats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_gsid_to_input_stats()).compareTo(other.is_set_gsid_to_input_stats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1402,7 +1358,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_sid_to_output_stats()).compareTo(other.is_set_sid_to_output_stats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_sid_to_output_stats()).compareTo(other.is_set_sid_to_output_stats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1412,7 +1368,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_exec_stats()).compareTo(other.is_set_exec_stats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_exec_stats()).compareTo(other.is_set_exec_stats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1422,7 +1378,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_errors()).compareTo(other.is_set_errors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_errors()).compareTo(other.is_set_errors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1432,7 +1388,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_eventlog_host()).compareTo(other.is_set_eventlog_host());
+ lastComparison = java.lang.Boolean.valueOf(is_set_eventlog_host()).compareTo(other.is_set_eventlog_host());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1442,7 +1398,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_eventlog_port()).compareTo(other.is_set_eventlog_port());
+ lastComparison = java.lang.Boolean.valueOf(is_set_eventlog_port()).compareTo(other.is_set_eventlog_port());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1452,7 +1408,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_debug_options()).compareTo(other.is_set_debug_options());
+ lastComparison = java.lang.Boolean.valueOf(is_set_debug_options()).compareTo(other.is_set_debug_options());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1462,7 +1418,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_status()).compareTo(other.is_set_topology_status());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_status()).compareTo(other.is_set_topology_status());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1472,7 +1428,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_resources_map()).compareTo(other.is_set_resources_map());
+ lastComparison = java.lang.Boolean.valueOf(is_set_resources_map()).compareTo(other.is_set_resources_map());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1490,16 +1446,16 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ComponentPageInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ComponentPageInfo(");
boolean first = true;
sb.append("component_id:");
@@ -1673,7 +1629,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1683,13 +1639,13 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
}
- private static class ComponentPageInfoStandardSchemeFactory implements SchemeFactory {
+ private static class ComponentPageInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ComponentPageInfoStandardScheme getScheme() {
return new ComponentPageInfoStandardScheme();
}
}
- private static class ComponentPageInfoStandardScheme extends StandardScheme<ComponentPageInfo> {
+ private static class ComponentPageInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<ComponentPageInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ComponentPageInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1753,8 +1709,8 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map510 = iprot.readMapBegin();
- struct.window_to_stats = new HashMap<String,ComponentAggregateStats>(2*_map510.size);
- String _key511;
+ struct.window_to_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>(2*_map510.size);
+ java.lang.String _key511;
ComponentAggregateStats _val512;
for (int _i513 = 0; _i513 < _map510.size; ++_i513)
{
@@ -1774,7 +1730,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map514 = iprot.readMapBegin();
- struct.gsid_to_input_stats = new HashMap<GlobalStreamId,ComponentAggregateStats>(2*_map514.size);
+ struct.gsid_to_input_stats = new java.util.HashMap<GlobalStreamId,ComponentAggregateStats>(2*_map514.size);
GlobalStreamId _key515;
ComponentAggregateStats _val516;
for (int _i517 = 0; _i517 < _map514.size; ++_i517)
@@ -1796,8 +1752,8 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map518 = iprot.readMapBegin();
- struct.sid_to_output_stats = new HashMap<String,ComponentAggregateStats>(2*_map518.size);
- String _key519;
+ struct.sid_to_output_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>(2*_map518.size);
+ java.lang.String _key519;
ComponentAggregateStats _val520;
for (int _i521 = 0; _i521 < _map518.size; ++_i521)
{
@@ -1817,7 +1773,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list522 = iprot.readListBegin();
- struct.exec_stats = new ArrayList<ExecutorAggregateStats>(_list522.size);
+ struct.exec_stats = new java.util.ArrayList<ExecutorAggregateStats>(_list522.size);
ExecutorAggregateStats _elem523;
for (int _i524 = 0; _i524 < _list522.size; ++_i524)
{
@@ -1836,7 +1792,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list525 = iprot.readListBegin();
- struct.errors = new ArrayList<ErrorInfo>(_list525.size);
+ struct.errors = new java.util.ArrayList<ErrorInfo>(_list525.size);
ErrorInfo _elem526;
for (int _i527 = 0; _i527 < _list525.size; ++_i527)
{
@@ -1888,8 +1844,8 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map528 = iprot.readMapBegin();
- struct.resources_map = new HashMap<String,Double>(2*_map528.size);
- String _key529;
+ struct.resources_map = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map528.size);
+ java.lang.String _key529;
double _val530;
for (int _i531 = 0; _i531 < _map528.size; ++_i531)
{
@@ -1956,7 +1912,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
oprot.writeFieldBegin(WINDOW_TO_STATS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.window_to_stats.size()));
- for (Map.Entry<String, ComponentAggregateStats> _iter532 : struct.window_to_stats.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ComponentAggregateStats> _iter532 : struct.window_to_stats.entrySet())
{
oprot.writeString(_iter532.getKey());
_iter532.getValue().write(oprot);
@@ -1971,7 +1927,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
oprot.writeFieldBegin(GSID_TO_INPUT_STATS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, struct.gsid_to_input_stats.size()));
- for (Map.Entry<GlobalStreamId, ComponentAggregateStats> _iter533 : struct.gsid_to_input_stats.entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, ComponentAggregateStats> _iter533 : struct.gsid_to_input_stats.entrySet())
{
_iter533.getKey().write(oprot);
_iter533.getValue().write(oprot);
@@ -1986,7 +1942,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
oprot.writeFieldBegin(SID_TO_OUTPUT_STATS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.sid_to_output_stats.size()));
- for (Map.Entry<String, ComponentAggregateStats> _iter534 : struct.sid_to_output_stats.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ComponentAggregateStats> _iter534 : struct.sid_to_output_stats.entrySet())
{
oprot.writeString(_iter534.getKey());
_iter534.getValue().write(oprot);
@@ -2055,7 +2011,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
oprot.writeFieldBegin(RESOURCES_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, struct.resources_map.size()));
- for (Map.Entry<String, Double> _iter537 : struct.resources_map.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter537 : struct.resources_map.entrySet())
{
oprot.writeString(_iter537.getKey());
oprot.writeDouble(_iter537.getValue());
@@ -2071,20 +2027,20 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
- private static class ComponentPageInfoTupleSchemeFactory implements SchemeFactory {
+ private static class ComponentPageInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ComponentPageInfoTupleScheme getScheme() {
return new ComponentPageInfoTupleScheme();
}
}
- private static class ComponentPageInfoTupleScheme extends TupleScheme<ComponentPageInfo> {
+ private static class ComponentPageInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<ComponentPageInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ComponentPageInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.component_id);
oprot.writeI32(struct.component_type.getValue());
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_topology_id()) {
optionals.set(0);
}
@@ -2143,7 +2099,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (struct.is_set_window_to_stats()) {
{
oprot.writeI32(struct.window_to_stats.size());
- for (Map.Entry<String, ComponentAggregateStats> _iter538 : struct.window_to_stats.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ComponentAggregateStats> _iter538 : struct.window_to_stats.entrySet())
{
oprot.writeString(_iter538.getKey());
_iter538.getValue().write(oprot);
@@ -2153,7 +2109,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (struct.is_set_gsid_to_input_stats()) {
{
oprot.writeI32(struct.gsid_to_input_stats.size());
- for (Map.Entry<GlobalStreamId, ComponentAggregateStats> _iter539 : struct.gsid_to_input_stats.entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, ComponentAggregateStats> _iter539 : struct.gsid_to_input_stats.entrySet())
{
_iter539.getKey().write(oprot);
_iter539.getValue().write(oprot);
@@ -2163,7 +2119,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (struct.is_set_sid_to_output_stats()) {
{
oprot.writeI32(struct.sid_to_output_stats.size());
- for (Map.Entry<String, ComponentAggregateStats> _iter540 : struct.sid_to_output_stats.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ComponentAggregateStats> _iter540 : struct.sid_to_output_stats.entrySet())
{
oprot.writeString(_iter540.getKey());
_iter540.getValue().write(oprot);
@@ -2203,7 +2159,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (struct.is_set_resources_map()) {
{
oprot.writeI32(struct.resources_map.size());
- for (Map.Entry<String, Double> _iter543 : struct.resources_map.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter543 : struct.resources_map.entrySet())
{
oprot.writeString(_iter543.getKey());
oprot.writeDouble(_iter543.getValue());
@@ -2214,12 +2170,12 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ComponentPageInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.component_id = iprot.readString();
struct.set_component_id_isSet(true);
struct.component_type = org.apache.storm.generated.ComponentType.findByValue(iprot.readI32());
struct.set_component_type_isSet(true);
- BitSet incoming = iprot.readBitSet(14);
+ java.util.BitSet incoming = iprot.readBitSet(14);
if (incoming.get(0)) {
struct.topology_id = iprot.readString();
struct.set_topology_id_isSet(true);
@@ -2239,8 +2195,8 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (incoming.get(4)) {
{
org.apache.thrift.protocol.TMap _map544 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.window_to_stats = new HashMap<String,ComponentAggregateStats>(2*_map544.size);
- String _key545;
+ struct.window_to_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>(2*_map544.size);
+ java.lang.String _key545;
ComponentAggregateStats _val546;
for (int _i547 = 0; _i547 < _map544.size; ++_i547)
{
@@ -2255,7 +2211,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (incoming.get(5)) {
{
org.apache.thrift.protocol.TMap _map548 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.gsid_to_input_stats = new HashMap<GlobalStreamId,ComponentAggregateStats>(2*_map548.size);
+ struct.gsid_to_input_stats = new java.util.HashMap<GlobalStreamId,ComponentAggregateStats>(2*_map548.size);
GlobalStreamId _key549;
ComponentAggregateStats _val550;
for (int _i551 = 0; _i551 < _map548.size; ++_i551)
@@ -2272,8 +2228,8 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (incoming.get(6)) {
{
org.apache.thrift.protocol.TMap _map552 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.sid_to_output_stats = new HashMap<String,ComponentAggregateStats>(2*_map552.size);
- String _key553;
+ struct.sid_to_output_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>(2*_map552.size);
+ java.lang.String _key553;
ComponentAggregateStats _val554;
for (int _i555 = 0; _i555 < _map552.size; ++_i555)
{
@@ -2288,7 +2244,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (incoming.get(7)) {
{
org.apache.thrift.protocol.TList _list556 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.exec_stats = new ArrayList<ExecutorAggregateStats>(_list556.size);
+ struct.exec_stats = new java.util.ArrayList<ExecutorAggregateStats>(_list556.size);
ExecutorAggregateStats _elem557;
for (int _i558 = 0; _i558 < _list556.size; ++_i558)
{
@@ -2302,7 +2258,7 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (incoming.get(8)) {
{
org.apache.thrift.protocol.TList _list559 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.errors = new ArrayList<ErrorInfo>(_list559.size);
+ struct.errors = new java.util.ArrayList<ErrorInfo>(_list559.size);
ErrorInfo _elem560;
for (int _i561 = 0; _i561 < _list559.size; ++_i561)
{
@@ -2333,8 +2289,8 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
if (incoming.get(13)) {
{
org.apache.thrift.protocol.TMap _map562 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- struct.resources_map = new HashMap<String,Double>(2*_map562.size);
- String _key563;
+ struct.resources_map = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map562.size);
+ java.lang.String _key563;
double _val564;
for (int _i565 = 0; _i565 < _map562.size; ++_i565)
{
@@ -2348,5 +2304,8 @@ public class ComponentPageInfo implements org.apache.thrift.TBase<ComponentPageI
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ComponentType.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ComponentType.java b/storm-client/src/jvm/org/apache/storm/generated/ComponentType.java
index 7a9fd66..0c8a57e 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ComponentType.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ComponentType.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -24,10 +24,6 @@
package org.apache.storm.generated;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
public enum ComponentType implements org.apache.thrift.TEnum {
BOLT(1),
SPOUT(2);
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/Credentials.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/Credentials.java b/storm-client/src/jvm/org/apache/storm/generated/Credentials.java
index 84a8fb9..e4e7418 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/Credentials.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/Credentials.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class Credentials implements org.apache.thrift.TBase<Credentials, Credentials._Fields>, java.io.Serializable, Cloneable, Comparable<Credentials> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Credentials");
private static final org.apache.thrift.protocol.TField CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.MAP, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new CredentialsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new CredentialsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new CredentialsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new CredentialsTupleSchemeFactory();
- private Map<String,String> creds; // required
+ private java.util.Map<java.lang.String,java.lang.String> creds; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
CREDS((short)1, "creds");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,20 +88,20 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Credentials.class, metaDataMap);
}
@@ -139,7 +109,7 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
}
public Credentials(
- Map<String,String> creds)
+ java.util.Map<java.lang.String,java.lang.String> creds)
{
this();
this.creds = creds;
@@ -150,7 +120,7 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
*/
public Credentials(Credentials other) {
if (other.is_set_creds()) {
- Map<String,String> __this__creds = new HashMap<String,String>(other.creds);
+ java.util.Map<java.lang.String,java.lang.String> __this__creds = new java.util.HashMap<java.lang.String,java.lang.String>(other.creds);
this.creds = __this__creds;
}
}
@@ -168,18 +138,18 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
return (this.creds == null) ? 0 : this.creds.size();
}
- public void put_to_creds(String key, String val) {
+ public void put_to_creds(java.lang.String key, java.lang.String val) {
if (this.creds == null) {
- this.creds = new HashMap<String,String>();
+ this.creds = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.creds.put(key, val);
}
- public Map<String,String> get_creds() {
+ public java.util.Map<java.lang.String,java.lang.String> get_creds() {
return this.creds;
}
- public void set_creds(Map<String,String> creds) {
+ public void set_creds(java.util.Map<java.lang.String,java.lang.String> creds) {
this.creds = creds;
}
@@ -198,43 +168,43 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CREDS:
if (value == null) {
unset_creds();
} else {
- set_creds((Map<String,String>)value);
+ set_creds((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CREDS:
return get_creds();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case CREDS:
return is_set_creds();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof Credentials)
@@ -245,6 +215,8 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
public boolean equals(Credentials that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_creds = true && this.is_set_creds();
boolean that_present_creds = true && that.is_set_creds();
@@ -260,14 +232,13 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_creds = true && (is_set_creds());
- list.add(present_creds);
- if (present_creds)
- list.add(creds);
+ hashCode = hashCode * 8191 + ((is_set_creds()) ? 131071 : 524287);
+ if (is_set_creds())
+ hashCode = hashCode * 8191 + creds.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -278,7 +249,7 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_creds()).compareTo(other.is_set_creds());
+ lastComparison = java.lang.Boolean.valueOf(is_set_creds()).compareTo(other.is_set_creds());
if (lastComparison != 0) {
return lastComparison;
}
@@ -296,16 +267,16 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("Credentials(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Credentials(");
boolean first = true;
sb.append("creds:");
@@ -336,7 +307,7 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -344,13 +315,13 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
}
}
- private static class CredentialsStandardSchemeFactory implements SchemeFactory {
+ private static class CredentialsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public CredentialsStandardScheme getScheme() {
return new CredentialsStandardScheme();
}
}
- private static class CredentialsStandardScheme extends StandardScheme<Credentials> {
+ private static class CredentialsStandardScheme extends org.apache.thrift.scheme.StandardScheme<Credentials> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Credentials struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -366,9 +337,9 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map596 = iprot.readMapBegin();
- struct.creds = new HashMap<String,String>(2*_map596.size);
- String _key597;
- String _val598;
+ struct.creds = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map596.size);
+ java.lang.String _key597;
+ java.lang.String _val598;
for (int _i599 = 0; _i599 < _map596.size; ++_i599)
{
_key597 = iprot.readString();
@@ -399,7 +370,7 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
oprot.writeFieldBegin(CREDS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.creds.size()));
- for (Map.Entry<String, String> _iter600 : struct.creds.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter600 : struct.creds.entrySet())
{
oprot.writeString(_iter600.getKey());
oprot.writeString(_iter600.getValue());
@@ -414,20 +385,20 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
}
- private static class CredentialsTupleSchemeFactory implements SchemeFactory {
+ private static class CredentialsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public CredentialsTupleScheme getScheme() {
return new CredentialsTupleScheme();
}
}
- private static class CredentialsTupleScheme extends TupleScheme<Credentials> {
+ private static class CredentialsTupleScheme extends org.apache.thrift.scheme.TupleScheme<Credentials> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Credentials struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.creds.size());
- for (Map.Entry<String, String> _iter601 : struct.creds.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter601 : struct.creds.entrySet())
{
oprot.writeString(_iter601.getKey());
oprot.writeString(_iter601.getValue());
@@ -437,12 +408,12 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Credentials struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TMap _map602 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.creds = new HashMap<String,String>(2*_map602.size);
- String _key603;
- String _val604;
+ struct.creds = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map602.size);
+ java.lang.String _key603;
+ java.lang.String _val604;
for (int _i605 = 0; _i605 < _map602.size; ++_i605)
{
_key603 = iprot.readString();
@@ -454,5 +425,8 @@ public class Credentials implements org.apache.thrift.TBase<Credentials, Credent
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/DRPCExceptionType.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/DRPCExceptionType.java b/storm-client/src/jvm/org/apache/storm/generated/DRPCExceptionType.java
index 2ccf1b1..44bf0cb 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/DRPCExceptionType.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/DRPCExceptionType.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -24,10 +24,6 @@
package org.apache.storm.generated;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
public enum DRPCExceptionType implements org.apache.thrift.TEnum {
INTERNAL_ERROR(0),
SERVER_SHUTDOWN(1),
[07/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/WorkerMetrics.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/WorkerMetrics.java b/storm-client/src/jvm/org/apache/storm/generated/WorkerMetrics.java
index f7813fd..fca0694 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/WorkerMetrics.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/WorkerMetrics.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, WorkerMetrics._Fields>, java.io.Serializable, Cloneable, Comparable<WorkerMetrics> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkerMetrics");
@@ -60,15 +33,12 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField METRIC_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("metricList", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkerMetricsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkerMetricsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WorkerMetricsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WorkerMetricsTupleSchemeFactory();
- private String topologyId; // required
+ private java.lang.String topologyId; // required
private int port; // required
- private String hostname; // required
+ private java.lang.String hostname; // required
private WorkerMetricList metricList; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -78,10 +48,10 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
HOSTNAME((short)3, "hostname"),
METRIC_LIST((short)4, "metricList");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -110,21 +80,21 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -133,7 +103,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -141,9 +111,9 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
// isset id assignments
private static final int __PORT_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TOPOLOGY_ID, new org.apache.thrift.meta_data.FieldMetaData("topologyId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -152,7 +122,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.METRIC_LIST, new org.apache.thrift.meta_data.FieldMetaData("metricList", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkerMetricList.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkerMetrics.class, metaDataMap);
}
@@ -160,9 +130,9 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
public WorkerMetrics(
- String topologyId,
+ java.lang.String topologyId,
int port,
- String hostname,
+ java.lang.String hostname,
WorkerMetricList metricList)
{
this();
@@ -203,11 +173,11 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
this.metricList = null;
}
- public String get_topologyId() {
+ public java.lang.String get_topologyId() {
return this.topologyId;
}
- public void set_topologyId(String topologyId) {
+ public void set_topologyId(java.lang.String topologyId) {
this.topologyId = topologyId;
}
@@ -236,23 +206,23 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
public void unset_port() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean is_set_port() {
- return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
}
public void set_port_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
}
- public String get_hostname() {
+ public java.lang.String get_hostname() {
return this.hostname;
}
- public void set_hostname(String hostname) {
+ public void set_hostname(java.lang.String hostname) {
this.hostname = hostname;
}
@@ -294,13 +264,13 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TOPOLOGY_ID:
if (value == null) {
unset_topologyId();
} else {
- set_topologyId((String)value);
+ set_topologyId((java.lang.String)value);
}
break;
@@ -308,7 +278,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
if (value == null) {
unset_port();
} else {
- set_port((Integer)value);
+ set_port((java.lang.Integer)value);
}
break;
@@ -316,7 +286,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
if (value == null) {
unset_hostname();
} else {
- set_hostname((String)value);
+ set_hostname((java.lang.String)value);
}
break;
@@ -331,7 +301,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOPOLOGY_ID:
return get_topologyId();
@@ -346,13 +316,13 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
return get_metricList();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -365,11 +335,11 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
case METRIC_LIST:
return is_set_metricList();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof WorkerMetrics)
@@ -380,6 +350,8 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
public boolean equals(WorkerMetrics that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_topologyId = true && this.is_set_topologyId();
boolean that_present_topologyId = true && that.is_set_topologyId();
@@ -422,29 +394,23 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_topologyId = true && (is_set_topologyId());
- list.add(present_topologyId);
- if (present_topologyId)
- list.add(topologyId);
+ hashCode = hashCode * 8191 + ((is_set_topologyId()) ? 131071 : 524287);
+ if (is_set_topologyId())
+ hashCode = hashCode * 8191 + topologyId.hashCode();
- boolean present_port = true;
- list.add(present_port);
- if (present_port)
- list.add(port);
+ hashCode = hashCode * 8191 + port;
- boolean present_hostname = true && (is_set_hostname());
- list.add(present_hostname);
- if (present_hostname)
- list.add(hostname);
+ hashCode = hashCode * 8191 + ((is_set_hostname()) ? 131071 : 524287);
+ if (is_set_hostname())
+ hashCode = hashCode * 8191 + hostname.hashCode();
- boolean present_metricList = true && (is_set_metricList());
- list.add(present_metricList);
- if (present_metricList)
- list.add(metricList);
+ hashCode = hashCode * 8191 + ((is_set_metricList()) ? 131071 : 524287);
+ if (is_set_metricList())
+ hashCode = hashCode * 8191 + metricList.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -455,7 +421,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_topologyId()).compareTo(other.is_set_topologyId());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topologyId()).compareTo(other.is_set_topologyId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -465,7 +431,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
+ lastComparison = java.lang.Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
if (lastComparison != 0) {
return lastComparison;
}
@@ -475,7 +441,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_hostname()).compareTo(other.is_set_hostname());
+ lastComparison = java.lang.Boolean.valueOf(is_set_hostname()).compareTo(other.is_set_hostname());
if (lastComparison != 0) {
return lastComparison;
}
@@ -485,7 +451,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_metricList()).compareTo(other.is_set_metricList());
+ lastComparison = java.lang.Boolean.valueOf(is_set_metricList()).compareTo(other.is_set_metricList());
if (lastComparison != 0) {
return lastComparison;
}
@@ -503,16 +469,16 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("WorkerMetrics(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WorkerMetrics(");
boolean first = true;
sb.append("topologyId:");
@@ -578,7 +544,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -588,13 +554,13 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
}
- private static class WorkerMetricsStandardSchemeFactory implements SchemeFactory {
+ private static class WorkerMetricsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerMetricsStandardScheme getScheme() {
return new WorkerMetricsStandardScheme();
}
}
- private static class WorkerMetricsStandardScheme extends StandardScheme<WorkerMetrics> {
+ private static class WorkerMetricsStandardScheme extends org.apache.thrift.scheme.StandardScheme<WorkerMetrics> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WorkerMetrics struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -676,17 +642,17 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
- private static class WorkerMetricsTupleSchemeFactory implements SchemeFactory {
+ private static class WorkerMetricsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerMetricsTupleScheme getScheme() {
return new WorkerMetricsTupleScheme();
}
}
- private static class WorkerMetricsTupleScheme extends TupleScheme<WorkerMetrics> {
+ private static class WorkerMetricsTupleScheme extends org.apache.thrift.scheme.TupleScheme<WorkerMetrics> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkerMetrics struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.topologyId);
oprot.writeI32(struct.port);
oprot.writeString(struct.hostname);
@@ -695,7 +661,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WorkerMetrics struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.topologyId = iprot.readString();
struct.set_topologyId_isSet(true);
struct.port = iprot.readI32();
@@ -708,5 +674,8 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/WorkerResources.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/WorkerResources.java b/storm-client/src/jvm/org/apache/storm/generated/WorkerResources.java
index d25b5b0..fcd7791 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/WorkerResources.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/WorkerResources.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class WorkerResources implements org.apache.thrift.TBase<WorkerResources, WorkerResources._Fields>, java.io.Serializable, Cloneable, Comparable<WorkerResources> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkerResources");
@@ -63,19 +36,16 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
private static final org.apache.thrift.protocol.TField RESOURCES_FIELD_DESC = new org.apache.thrift.protocol.TField("resources", org.apache.thrift.protocol.TType.MAP, (short)6);
private static final org.apache.thrift.protocol.TField SHARED_RESOURCES_FIELD_DESC = new org.apache.thrift.protocol.TField("shared_resources", org.apache.thrift.protocol.TType.MAP, (short)7);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkerResourcesStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkerResourcesTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WorkerResourcesStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WorkerResourcesTupleSchemeFactory();
private double mem_on_heap; // optional
private double mem_off_heap; // optional
private double cpu; // optional
private double shared_mem_on_heap; // optional
private double shared_mem_off_heap; // optional
- private Map<String,Double> resources; // optional
- private Map<String,Double> shared_resources; // optional
+ private java.util.Map<java.lang.String,java.lang.Double> resources; // optional
+ private java.util.Map<java.lang.String,java.lang.Double> shared_resources; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -87,10 +57,10 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
RESOURCES((short)6, "resources"),
SHARED_RESOURCES((short)7, "shared_resources");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -125,21 +95,21 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -148,7 +118,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -161,9 +131,9 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
private static final int __SHARED_MEM_OFF_HEAP_ISSET_ID = 4;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.MEM_ON_HEAP,_Fields.MEM_OFF_HEAP,_Fields.CPU,_Fields.SHARED_MEM_ON_HEAP,_Fields.SHARED_MEM_OFF_HEAP,_Fields.RESOURCES,_Fields.SHARED_RESOURCES};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MEM_ON_HEAP, new org.apache.thrift.meta_data.FieldMetaData("mem_on_heap", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.MEM_OFF_HEAP, new org.apache.thrift.meta_data.FieldMetaData("mem_off_heap", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -182,7 +152,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkerResources.class, metaDataMap);
}
@@ -200,11 +170,11 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
this.shared_mem_on_heap = other.shared_mem_on_heap;
this.shared_mem_off_heap = other.shared_mem_off_heap;
if (other.is_set_resources()) {
- Map<String,Double> __this__resources = new HashMap<String,Double>(other.resources);
+ java.util.Map<java.lang.String,java.lang.Double> __this__resources = new java.util.HashMap<java.lang.String,java.lang.Double>(other.resources);
this.resources = __this__resources;
}
if (other.is_set_shared_resources()) {
- Map<String,Double> __this__shared_resources = new HashMap<String,Double>(other.shared_resources);
+ java.util.Map<java.lang.String,java.lang.Double> __this__shared_resources = new java.util.HashMap<java.lang.String,java.lang.Double>(other.shared_resources);
this.shared_resources = __this__shared_resources;
}
}
@@ -239,16 +209,16 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
public void unset_mem_on_heap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEM_ON_HEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MEM_ON_HEAP_ISSET_ID);
}
/** Returns true if field mem_on_heap is set (has been assigned a value) and false otherwise */
public boolean is_set_mem_on_heap() {
- return EncodingUtils.testBit(__isset_bitfield, __MEM_ON_HEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MEM_ON_HEAP_ISSET_ID);
}
public void set_mem_on_heap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEM_ON_HEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MEM_ON_HEAP_ISSET_ID, value);
}
public double get_mem_off_heap() {
@@ -261,16 +231,16 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
public void unset_mem_off_heap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEM_OFF_HEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MEM_OFF_HEAP_ISSET_ID);
}
/** Returns true if field mem_off_heap is set (has been assigned a value) and false otherwise */
public boolean is_set_mem_off_heap() {
- return EncodingUtils.testBit(__isset_bitfield, __MEM_OFF_HEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MEM_OFF_HEAP_ISSET_ID);
}
public void set_mem_off_heap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEM_OFF_HEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MEM_OFF_HEAP_ISSET_ID, value);
}
public double get_cpu() {
@@ -283,16 +253,16 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
public void unset_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CPU_ISSET_ID);
}
/** Returns true if field cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CPU_ISSET_ID);
}
public void set_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CPU_ISSET_ID, value);
}
public double get_shared_mem_on_heap() {
@@ -305,16 +275,16 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
public void unset_shared_mem_on_heap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHARED_MEM_ON_HEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SHARED_MEM_ON_HEAP_ISSET_ID);
}
/** Returns true if field shared_mem_on_heap is set (has been assigned a value) and false otherwise */
public boolean is_set_shared_mem_on_heap() {
- return EncodingUtils.testBit(__isset_bitfield, __SHARED_MEM_ON_HEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SHARED_MEM_ON_HEAP_ISSET_ID);
}
public void set_shared_mem_on_heap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHARED_MEM_ON_HEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SHARED_MEM_ON_HEAP_ISSET_ID, value);
}
public double get_shared_mem_off_heap() {
@@ -327,34 +297,34 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
public void unset_shared_mem_off_heap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHARED_MEM_OFF_HEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SHARED_MEM_OFF_HEAP_ISSET_ID);
}
/** Returns true if field shared_mem_off_heap is set (has been assigned a value) and false otherwise */
public boolean is_set_shared_mem_off_heap() {
- return EncodingUtils.testBit(__isset_bitfield, __SHARED_MEM_OFF_HEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SHARED_MEM_OFF_HEAP_ISSET_ID);
}
public void set_shared_mem_off_heap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHARED_MEM_OFF_HEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SHARED_MEM_OFF_HEAP_ISSET_ID, value);
}
public int get_resources_size() {
return (this.resources == null) ? 0 : this.resources.size();
}
- public void put_to_resources(String key, double val) {
+ public void put_to_resources(java.lang.String key, double val) {
if (this.resources == null) {
- this.resources = new HashMap<String,Double>();
+ this.resources = new java.util.HashMap<java.lang.String,java.lang.Double>();
}
this.resources.put(key, val);
}
- public Map<String,Double> get_resources() {
+ public java.util.Map<java.lang.String,java.lang.Double> get_resources() {
return this.resources;
}
- public void set_resources(Map<String,Double> resources) {
+ public void set_resources(java.util.Map<java.lang.String,java.lang.Double> resources) {
this.resources = resources;
}
@@ -377,18 +347,18 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return (this.shared_resources == null) ? 0 : this.shared_resources.size();
}
- public void put_to_shared_resources(String key, double val) {
+ public void put_to_shared_resources(java.lang.String key, double val) {
if (this.shared_resources == null) {
- this.shared_resources = new HashMap<String,Double>();
+ this.shared_resources = new java.util.HashMap<java.lang.String,java.lang.Double>();
}
this.shared_resources.put(key, val);
}
- public Map<String,Double> get_shared_resources() {
+ public java.util.Map<java.lang.String,java.lang.Double> get_shared_resources() {
return this.shared_resources;
}
- public void set_shared_resources(Map<String,Double> shared_resources) {
+ public void set_shared_resources(java.util.Map<java.lang.String,java.lang.Double> shared_resources) {
this.shared_resources = shared_resources;
}
@@ -407,13 +377,13 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MEM_ON_HEAP:
if (value == null) {
unset_mem_on_heap();
} else {
- set_mem_on_heap((Double)value);
+ set_mem_on_heap((java.lang.Double)value);
}
break;
@@ -421,7 +391,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (value == null) {
unset_mem_off_heap();
} else {
- set_mem_off_heap((Double)value);
+ set_mem_off_heap((java.lang.Double)value);
}
break;
@@ -429,7 +399,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (value == null) {
unset_cpu();
} else {
- set_cpu((Double)value);
+ set_cpu((java.lang.Double)value);
}
break;
@@ -437,7 +407,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (value == null) {
unset_shared_mem_on_heap();
} else {
- set_shared_mem_on_heap((Double)value);
+ set_shared_mem_on_heap((java.lang.Double)value);
}
break;
@@ -445,7 +415,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (value == null) {
unset_shared_mem_off_heap();
} else {
- set_shared_mem_off_heap((Double)value);
+ set_shared_mem_off_heap((java.lang.Double)value);
}
break;
@@ -453,7 +423,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (value == null) {
unset_resources();
} else {
- set_resources((Map<String,Double>)value);
+ set_resources((java.util.Map<java.lang.String,java.lang.Double>)value);
}
break;
@@ -461,14 +431,14 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (value == null) {
unset_shared_resources();
} else {
- set_shared_resources((Map<String,Double>)value);
+ set_shared_resources((java.util.Map<java.lang.String,java.lang.Double>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MEM_ON_HEAP:
return get_mem_on_heap();
@@ -492,13 +462,13 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return get_shared_resources();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -517,11 +487,11 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
case SHARED_RESOURCES:
return is_set_shared_resources();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof WorkerResources)
@@ -532,6 +502,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
public boolean equals(WorkerResources that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_mem_on_heap = true && this.is_set_mem_on_heap();
boolean that_present_mem_on_heap = true && that.is_set_mem_on_heap();
@@ -601,44 +573,37 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_mem_on_heap = true && (is_set_mem_on_heap());
- list.add(present_mem_on_heap);
- if (present_mem_on_heap)
- list.add(mem_on_heap);
+ hashCode = hashCode * 8191 + ((is_set_mem_on_heap()) ? 131071 : 524287);
+ if (is_set_mem_on_heap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mem_on_heap);
- boolean present_mem_off_heap = true && (is_set_mem_off_heap());
- list.add(present_mem_off_heap);
- if (present_mem_off_heap)
- list.add(mem_off_heap);
+ hashCode = hashCode * 8191 + ((is_set_mem_off_heap()) ? 131071 : 524287);
+ if (is_set_mem_off_heap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mem_off_heap);
- boolean present_cpu = true && (is_set_cpu());
- list.add(present_cpu);
- if (present_cpu)
- list.add(cpu);
+ hashCode = hashCode * 8191 + ((is_set_cpu()) ? 131071 : 524287);
+ if (is_set_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(cpu);
- boolean present_shared_mem_on_heap = true && (is_set_shared_mem_on_heap());
- list.add(present_shared_mem_on_heap);
- if (present_shared_mem_on_heap)
- list.add(shared_mem_on_heap);
+ hashCode = hashCode * 8191 + ((is_set_shared_mem_on_heap()) ? 131071 : 524287);
+ if (is_set_shared_mem_on_heap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(shared_mem_on_heap);
- boolean present_shared_mem_off_heap = true && (is_set_shared_mem_off_heap());
- list.add(present_shared_mem_off_heap);
- if (present_shared_mem_off_heap)
- list.add(shared_mem_off_heap);
+ hashCode = hashCode * 8191 + ((is_set_shared_mem_off_heap()) ? 131071 : 524287);
+ if (is_set_shared_mem_off_heap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(shared_mem_off_heap);
- boolean present_resources = true && (is_set_resources());
- list.add(present_resources);
- if (present_resources)
- list.add(resources);
+ hashCode = hashCode * 8191 + ((is_set_resources()) ? 131071 : 524287);
+ if (is_set_resources())
+ hashCode = hashCode * 8191 + resources.hashCode();
- boolean present_shared_resources = true && (is_set_shared_resources());
- list.add(present_shared_resources);
- if (present_shared_resources)
- list.add(shared_resources);
+ hashCode = hashCode * 8191 + ((is_set_shared_resources()) ? 131071 : 524287);
+ if (is_set_shared_resources())
+ hashCode = hashCode * 8191 + shared_resources.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -649,7 +614,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_mem_on_heap()).compareTo(other.is_set_mem_on_heap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_mem_on_heap()).compareTo(other.is_set_mem_on_heap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -659,7 +624,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_mem_off_heap()).compareTo(other.is_set_mem_off_heap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_mem_off_heap()).compareTo(other.is_set_mem_off_heap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -669,7 +634,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_cpu()).compareTo(other.is_set_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_cpu()).compareTo(other.is_set_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -679,7 +644,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_shared_mem_on_heap()).compareTo(other.is_set_shared_mem_on_heap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_shared_mem_on_heap()).compareTo(other.is_set_shared_mem_on_heap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -689,7 +654,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_shared_mem_off_heap()).compareTo(other.is_set_shared_mem_off_heap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_shared_mem_off_heap()).compareTo(other.is_set_shared_mem_off_heap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -699,7 +664,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_resources()).compareTo(other.is_set_resources());
+ lastComparison = java.lang.Boolean.valueOf(is_set_resources()).compareTo(other.is_set_resources());
if (lastComparison != 0) {
return lastComparison;
}
@@ -709,7 +674,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_shared_resources()).compareTo(other.is_set_shared_resources());
+ lastComparison = java.lang.Boolean.valueOf(is_set_shared_resources()).compareTo(other.is_set_shared_resources());
if (lastComparison != 0) {
return lastComparison;
}
@@ -727,16 +692,16 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("WorkerResources(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WorkerResources(");
boolean first = true;
if (is_set_mem_on_heap()) {
@@ -805,7 +770,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -815,13 +780,13 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
}
- private static class WorkerResourcesStandardSchemeFactory implements SchemeFactory {
+ private static class WorkerResourcesStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerResourcesStandardScheme getScheme() {
return new WorkerResourcesStandardScheme();
}
}
- private static class WorkerResourcesStandardScheme extends StandardScheme<WorkerResources> {
+ private static class WorkerResourcesStandardScheme extends org.apache.thrift.scheme.StandardScheme<WorkerResources> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WorkerResources struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -877,8 +842,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map666 = iprot.readMapBegin();
- struct.resources = new HashMap<String,Double>(2*_map666.size);
- String _key667;
+ struct.resources = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map666.size);
+ java.lang.String _key667;
double _val668;
for (int _i669 = 0; _i669 < _map666.size; ++_i669)
{
@@ -897,8 +862,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map670 = iprot.readMapBegin();
- struct.shared_resources = new HashMap<String,Double>(2*_map670.size);
- String _key671;
+ struct.shared_resources = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map670.size);
+ java.lang.String _key671;
double _val672;
for (int _i673 = 0; _i673 < _map670.size; ++_i673)
{
@@ -956,7 +921,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
oprot.writeFieldBegin(RESOURCES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, struct.resources.size()));
- for (Map.Entry<String, Double> _iter674 : struct.resources.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter674 : struct.resources.entrySet())
{
oprot.writeString(_iter674.getKey());
oprot.writeDouble(_iter674.getValue());
@@ -971,7 +936,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
oprot.writeFieldBegin(SHARED_RESOURCES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, struct.shared_resources.size()));
- for (Map.Entry<String, Double> _iter675 : struct.shared_resources.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter675 : struct.shared_resources.entrySet())
{
oprot.writeString(_iter675.getKey());
oprot.writeDouble(_iter675.getValue());
@@ -987,18 +952,18 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
- private static class WorkerResourcesTupleSchemeFactory implements SchemeFactory {
+ private static class WorkerResourcesTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerResourcesTupleScheme getScheme() {
return new WorkerResourcesTupleScheme();
}
}
- private static class WorkerResourcesTupleScheme extends TupleScheme<WorkerResources> {
+ private static class WorkerResourcesTupleScheme extends org.apache.thrift.scheme.TupleScheme<WorkerResources> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkerResources struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_mem_on_heap()) {
optionals.set(0);
}
@@ -1039,7 +1004,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (struct.is_set_resources()) {
{
oprot.writeI32(struct.resources.size());
- for (Map.Entry<String, Double> _iter676 : struct.resources.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter676 : struct.resources.entrySet())
{
oprot.writeString(_iter676.getKey());
oprot.writeDouble(_iter676.getValue());
@@ -1049,7 +1014,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (struct.is_set_shared_resources()) {
{
oprot.writeI32(struct.shared_resources.size());
- for (Map.Entry<String, Double> _iter677 : struct.shared_resources.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter677 : struct.shared_resources.entrySet())
{
oprot.writeString(_iter677.getKey());
oprot.writeDouble(_iter677.getValue());
@@ -1060,8 +1025,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WorkerResources struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(7);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
struct.mem_on_heap = iprot.readDouble();
struct.set_mem_on_heap_isSet(true);
@@ -1085,8 +1050,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (incoming.get(5)) {
{
org.apache.thrift.protocol.TMap _map678 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- struct.resources = new HashMap<String,Double>(2*_map678.size);
- String _key679;
+ struct.resources = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map678.size);
+ java.lang.String _key679;
double _val680;
for (int _i681 = 0; _i681 < _map678.size; ++_i681)
{
@@ -1100,8 +1065,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (incoming.get(6)) {
{
org.apache.thrift.protocol.TMap _map682 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- struct.shared_resources = new HashMap<String,Double>(2*_map682.size);
- String _key683;
+ struct.shared_resources = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map682.size);
+ java.lang.String _key683;
double _val684;
for (int _i685 = 0; _i685 < _map682.size; ++_i685)
{
@@ -1115,5 +1080,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[20/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SharedMemory.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SharedMemory.java b/storm-client/src/jvm/org/apache/storm/generated/SharedMemory.java
index f84f106..5efa346 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SharedMemory.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SharedMemory.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, SharedMemory._Fields>, java.io.Serializable, Cloneable, Comparable<SharedMemory> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SharedMemory");
@@ -60,13 +33,10 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
private static final org.apache.thrift.protocol.TField OFF_HEAP_WORKER_FIELD_DESC = new org.apache.thrift.protocol.TField("off_heap_worker", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
private static final org.apache.thrift.protocol.TField OFF_HEAP_NODE_FIELD_DESC = new org.apache.thrift.protocol.TField("off_heap_node", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SharedMemoryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SharedMemoryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SharedMemoryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SharedMemoryTupleSchemeFactory();
- private String name; // required
+ private java.lang.String name; // required
private double on_heap; // optional
private double off_heap_worker; // optional
private double off_heap_node; // optional
@@ -78,10 +48,10 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
OFF_HEAP_WORKER((short)3, "off_heap_worker"),
OFF_HEAP_NODE((short)4, "off_heap_node");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -110,21 +80,21 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -133,7 +103,7 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -144,9 +114,9 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
private static final int __OFF_HEAP_NODE_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.ON_HEAP,_Fields.OFF_HEAP_WORKER,_Fields.OFF_HEAP_NODE};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ON_HEAP, new org.apache.thrift.meta_data.FieldMetaData("on_heap", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -155,7 +125,7 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.OFF_HEAP_NODE, new org.apache.thrift.meta_data.FieldMetaData("off_heap_node", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SharedMemory.class, metaDataMap);
}
@@ -163,7 +133,7 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
}
public SharedMemory(
- String name)
+ java.lang.String name)
{
this();
this.name = name;
@@ -197,11 +167,11 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
this.off_heap_node = 0.0;
}
- public String get_name() {
+ public java.lang.String get_name() {
return this.name;
}
- public void set_name(String name) {
+ public void set_name(java.lang.String name) {
this.name = name;
}
@@ -230,16 +200,16 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
}
public void unset_on_heap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ON_HEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ON_HEAP_ISSET_ID);
}
/** Returns true if field on_heap is set (has been assigned a value) and false otherwise */
public boolean is_set_on_heap() {
- return EncodingUtils.testBit(__isset_bitfield, __ON_HEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ON_HEAP_ISSET_ID);
}
public void set_on_heap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ON_HEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ON_HEAP_ISSET_ID, value);
}
public double get_off_heap_worker() {
@@ -252,16 +222,16 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
}
public void unset_off_heap_worker() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OFF_HEAP_WORKER_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OFF_HEAP_WORKER_ISSET_ID);
}
/** Returns true if field off_heap_worker is set (has been assigned a value) and false otherwise */
public boolean is_set_off_heap_worker() {
- return EncodingUtils.testBit(__isset_bitfield, __OFF_HEAP_WORKER_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OFF_HEAP_WORKER_ISSET_ID);
}
public void set_off_heap_worker_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OFF_HEAP_WORKER_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OFF_HEAP_WORKER_ISSET_ID, value);
}
public double get_off_heap_node() {
@@ -274,25 +244,25 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
}
public void unset_off_heap_node() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OFF_HEAP_NODE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OFF_HEAP_NODE_ISSET_ID);
}
/** Returns true if field off_heap_node is set (has been assigned a value) and false otherwise */
public boolean is_set_off_heap_node() {
- return EncodingUtils.testBit(__isset_bitfield, __OFF_HEAP_NODE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OFF_HEAP_NODE_ISSET_ID);
}
public void set_off_heap_node_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OFF_HEAP_NODE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OFF_HEAP_NODE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case NAME:
if (value == null) {
unset_name();
} else {
- set_name((String)value);
+ set_name((java.lang.String)value);
}
break;
@@ -300,7 +270,7 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
if (value == null) {
unset_on_heap();
} else {
- set_on_heap((Double)value);
+ set_on_heap((java.lang.Double)value);
}
break;
@@ -308,7 +278,7 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
if (value == null) {
unset_off_heap_worker();
} else {
- set_off_heap_worker((Double)value);
+ set_off_heap_worker((java.lang.Double)value);
}
break;
@@ -316,14 +286,14 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
if (value == null) {
unset_off_heap_node();
} else {
- set_off_heap_node((Double)value);
+ set_off_heap_node((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NAME:
return get_name();
@@ -338,13 +308,13 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
return get_off_heap_node();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -357,11 +327,11 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
case OFF_HEAP_NODE:
return is_set_off_heap_node();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof SharedMemory)
@@ -372,6 +342,8 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
public boolean equals(SharedMemory that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_name = true && this.is_set_name();
boolean that_present_name = true && that.is_set_name();
@@ -414,29 +386,25 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_name = true && (is_set_name());
- list.add(present_name);
- if (present_name)
- list.add(name);
+ hashCode = hashCode * 8191 + ((is_set_name()) ? 131071 : 524287);
+ if (is_set_name())
+ hashCode = hashCode * 8191 + name.hashCode();
- boolean present_on_heap = true && (is_set_on_heap());
- list.add(present_on_heap);
- if (present_on_heap)
- list.add(on_heap);
+ hashCode = hashCode * 8191 + ((is_set_on_heap()) ? 131071 : 524287);
+ if (is_set_on_heap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(on_heap);
- boolean present_off_heap_worker = true && (is_set_off_heap_worker());
- list.add(present_off_heap_worker);
- if (present_off_heap_worker)
- list.add(off_heap_worker);
+ hashCode = hashCode * 8191 + ((is_set_off_heap_worker()) ? 131071 : 524287);
+ if (is_set_off_heap_worker())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(off_heap_worker);
- boolean present_off_heap_node = true && (is_set_off_heap_node());
- list.add(present_off_heap_node);
- if (present_off_heap_node)
- list.add(off_heap_node);
+ hashCode = hashCode * 8191 + ((is_set_off_heap_node()) ? 131071 : 524287);
+ if (is_set_off_heap_node())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(off_heap_node);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -447,7 +415,7 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
+ lastComparison = java.lang.Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
if (lastComparison != 0) {
return lastComparison;
}
@@ -457,7 +425,7 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_on_heap()).compareTo(other.is_set_on_heap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_on_heap()).compareTo(other.is_set_on_heap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -467,7 +435,7 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_off_heap_worker()).compareTo(other.is_set_off_heap_worker());
+ lastComparison = java.lang.Boolean.valueOf(is_set_off_heap_worker()).compareTo(other.is_set_off_heap_worker());
if (lastComparison != 0) {
return lastComparison;
}
@@ -477,7 +445,7 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_off_heap_node()).compareTo(other.is_set_off_heap_node());
+ lastComparison = java.lang.Boolean.valueOf(is_set_off_heap_node()).compareTo(other.is_set_off_heap_node());
if (lastComparison != 0) {
return lastComparison;
}
@@ -495,16 +463,16 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SharedMemory(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SharedMemory(");
boolean first = true;
sb.append("name:");
@@ -553,7 +521,7 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -563,13 +531,13 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
}
}
- private static class SharedMemoryStandardSchemeFactory implements SchemeFactory {
+ private static class SharedMemoryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SharedMemoryStandardScheme getScheme() {
return new SharedMemoryStandardScheme();
}
}
- private static class SharedMemoryStandardScheme extends StandardScheme<SharedMemory> {
+ private static class SharedMemoryStandardScheme extends org.apache.thrift.scheme.StandardScheme<SharedMemory> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SharedMemory struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -652,19 +620,19 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
}
- private static class SharedMemoryTupleSchemeFactory implements SchemeFactory {
+ private static class SharedMemoryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SharedMemoryTupleScheme getScheme() {
return new SharedMemoryTupleScheme();
}
}
- private static class SharedMemoryTupleScheme extends TupleScheme<SharedMemory> {
+ private static class SharedMemoryTupleScheme extends org.apache.thrift.scheme.TupleScheme<SharedMemory> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SharedMemory struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.name);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_on_heap()) {
optionals.set(0);
}
@@ -688,10 +656,10 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SharedMemory struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.name = iprot.readString();
struct.set_name_isSet(true);
- BitSet incoming = iprot.readBitSet(3);
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.on_heap = iprot.readDouble();
struct.set_on_heap_isSet(true);
@@ -707,5 +675,8 @@ public class SharedMemory implements org.apache.thrift.TBase<SharedMemory, Share
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ShellComponent.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ShellComponent.java b/storm-client/src/jvm/org/apache/storm/generated/ShellComponent.java
index 6941cb2..1d9ac63 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ShellComponent.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ShellComponent.java
@@ -16,66 +16,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, ShellComponent._Fields>, java.io.Serializable, Cloneable, Comparable<ShellComponent> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShellComponent");
private static final org.apache.thrift.protocol.TField EXECUTION_COMMAND_FIELD_DESC = new org.apache.thrift.protocol.TField("execution_command", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField SCRIPT_FIELD_DESC = new org.apache.thrift.protocol.TField("script", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ShellComponentStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ShellComponentTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ShellComponentStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ShellComponentTupleSchemeFactory();
- private String execution_command; // required
- private String script; // required
+ private java.lang.String execution_command; // required
+ private java.lang.String script; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EXECUTION_COMMAND((short)1, "execution_command"),
SCRIPT((short)2, "script");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,20 +93,20 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXECUTION_COMMAND, new org.apache.thrift.meta_data.FieldMetaData("execution_command", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SCRIPT, new org.apache.thrift.meta_data.FieldMetaData("script", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShellComponent.class, metaDataMap);
}
@@ -144,8 +114,8 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
}
public ShellComponent(
- String execution_command,
- String script)
+ java.lang.String execution_command,
+ java.lang.String script)
{
this();
this.execution_command = execution_command;
@@ -174,11 +144,11 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
this.script = null;
}
- public String get_execution_command() {
+ public java.lang.String get_execution_command() {
return this.execution_command;
}
- public void set_execution_command(String execution_command) {
+ public void set_execution_command(java.lang.String execution_command) {
this.execution_command = execution_command;
}
@@ -197,11 +167,11 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
}
}
- public String get_script() {
+ public java.lang.String get_script() {
return this.script;
}
- public void set_script(String script) {
+ public void set_script(java.lang.String script) {
this.script = script;
}
@@ -220,13 +190,13 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXECUTION_COMMAND:
if (value == null) {
unset_execution_command();
} else {
- set_execution_command((String)value);
+ set_execution_command((java.lang.String)value);
}
break;
@@ -234,14 +204,14 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
if (value == null) {
unset_script();
} else {
- set_script((String)value);
+ set_script((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXECUTION_COMMAND:
return get_execution_command();
@@ -250,13 +220,13 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
return get_script();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -265,11 +235,11 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
case SCRIPT:
return is_set_script();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ShellComponent)
@@ -280,6 +250,8 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
public boolean equals(ShellComponent that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_execution_command = true && this.is_set_execution_command();
boolean that_present_execution_command = true && that.is_set_execution_command();
@@ -304,19 +276,17 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_execution_command = true && (is_set_execution_command());
- list.add(present_execution_command);
- if (present_execution_command)
- list.add(execution_command);
+ hashCode = hashCode * 8191 + ((is_set_execution_command()) ? 131071 : 524287);
+ if (is_set_execution_command())
+ hashCode = hashCode * 8191 + execution_command.hashCode();
- boolean present_script = true && (is_set_script());
- list.add(present_script);
- if (present_script)
- list.add(script);
+ hashCode = hashCode * 8191 + ((is_set_script()) ? 131071 : 524287);
+ if (is_set_script())
+ hashCode = hashCode * 8191 + script.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -327,7 +297,7 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_execution_command()).compareTo(other.is_set_execution_command());
+ lastComparison = java.lang.Boolean.valueOf(is_set_execution_command()).compareTo(other.is_set_execution_command());
if (lastComparison != 0) {
return lastComparison;
}
@@ -337,7 +307,7 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_script()).compareTo(other.is_set_script());
+ lastComparison = java.lang.Boolean.valueOf(is_set_script()).compareTo(other.is_set_script());
if (lastComparison != 0) {
return lastComparison;
}
@@ -355,16 +325,16 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ShellComponent(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ShellComponent(");
boolean first = true;
sb.append("execution_command:");
@@ -399,7 +369,7 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -407,13 +377,13 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
}
}
- private static class ShellComponentStandardSchemeFactory implements SchemeFactory {
+ private static class ShellComponentStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ShellComponentStandardScheme getScheme() {
return new ShellComponentStandardScheme();
}
}
- private static class ShellComponentStandardScheme extends StandardScheme<ShellComponent> {
+ private static class ShellComponentStandardScheme extends org.apache.thrift.scheme.StandardScheme<ShellComponent> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ShellComponent struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -470,18 +440,18 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
}
- private static class ShellComponentTupleSchemeFactory implements SchemeFactory {
+ private static class ShellComponentTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ShellComponentTupleScheme getScheme() {
return new ShellComponentTupleScheme();
}
}
- private static class ShellComponentTupleScheme extends TupleScheme<ShellComponent> {
+ private static class ShellComponentTupleScheme extends org.apache.thrift.scheme.TupleScheme<ShellComponent> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ShellComponent struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_execution_command()) {
optionals.set(0);
}
@@ -499,8 +469,8 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ShellComponent struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.execution_command = iprot.readString();
struct.set_execution_command_isSet(true);
@@ -512,5 +482,8 @@ public class ShellComponent implements org.apache.thrift.TBase<ShellComponent, S
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SpecificAggregateStats.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SpecificAggregateStats.java b/storm-client/src/jvm/org/apache/storm/generated/SpecificAggregateStats.java
index 22bff71..293004b 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SpecificAggregateStats.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SpecificAggregateStats.java
@@ -16,41 +16,14 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAggregateStats, SpecificAggregateStats._Fields> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SpecificAggregateStats");
private static final org.apache.thrift.protocol.TField BOLT_FIELD_DESC = new org.apache.thrift.protocol.TField("bolt", org.apache.thrift.protocol.TType.STRUCT, (short)1);
@@ -61,10 +34,10 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
BOLT((short)1, "bolt"),
SPOUT((short)2, "spout");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -89,21 +62,21 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -112,19 +85,19 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.BOLT, new org.apache.thrift.meta_data.FieldMetaData("bolt", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.BOLT, new org.apache.thrift.meta_data.FieldMetaData("bolt", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BoltAggregateStats.class)));
- tmpMap.put(_Fields.SPOUT, new org.apache.thrift.meta_data.FieldMetaData("spout", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.SPOUT, new org.apache.thrift.meta_data.FieldMetaData("spout", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SpoutAggregateStats.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SpecificAggregateStats.class, metaDataMap);
}
@@ -132,7 +105,7 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
super();
}
- public SpecificAggregateStats(_Fields setField, Object value) {
+ public SpecificAggregateStats(_Fields setField, java.lang.Object value) {
super(setField, value);
}
@@ -157,25 +130,25 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
@Override
- protected void checkType(_Fields setField, Object value) throws ClassCastException {
+ protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException {
switch (setField) {
case BOLT:
if (value instanceof BoltAggregateStats) {
break;
}
- throw new ClassCastException("Was expecting value of type BoltAggregateStats for field 'bolt', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type BoltAggregateStats for field 'bolt', but got " + value.getClass().getSimpleName());
case SPOUT:
if (value instanceof SpoutAggregateStats) {
break;
}
- throw new ClassCastException("Was expecting value of type SpoutAggregateStats for field 'spout', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type SpoutAggregateStats for field 'spout', but got " + value.getClass().getSimpleName());
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@Override
- protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
+ protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(field.id);
if (setField != null) {
switch (setField) {
@@ -200,7 +173,7 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
return null;
}
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
@@ -220,12 +193,12 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
spout.write(oprot);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@Override
- protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
+ protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(fieldID);
if (setField != null) {
switch (setField) {
@@ -240,10 +213,10 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
spout.read(iprot);
return spout;
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
- throw new TProtocolException("Couldn't find a field with field id " + fieldID);
+ throw new org.apache.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID);
}
}
@@ -259,7 +232,7 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
spout.write(oprot);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@@ -271,7 +244,7 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
case SPOUT:
return SPOUT_FIELD_DESC;
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@@ -294,12 +267,12 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
if (getSetField() == _Fields.BOLT) {
return (BoltAggregateStats)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'bolt' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'bolt' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_bolt(BoltAggregateStats value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.BOLT;
value_ = value;
}
@@ -308,12 +281,12 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
if (getSetField() == _Fields.SPOUT) {
return (SpoutAggregateStats)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'spout' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'spout' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_spout(SpoutAggregateStats value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.SPOUT;
value_ = value;
}
@@ -328,7 +301,7 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
}
- public boolean equals(Object other) {
+ public boolean equals(java.lang.Object other) {
if (other instanceof SpecificAggregateStats) {
return equals((SpecificAggregateStats)other);
} else {
@@ -352,12 +325,12 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>();
list.add(this.getClass().getName());
org.apache.thrift.TFieldIdEnum setField = getSetField();
if (setField != null) {
list.add(setField.getThriftFieldId());
- Object value = getFieldValue();
+ java.lang.Object value = getFieldValue();
if (value instanceof org.apache.thrift.TEnum) {
list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue());
} else {
@@ -375,7 +348,7 @@ public class SpecificAggregateStats extends org.apache.thrift.TUnion<SpecificAgg
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SpoutAggregateStats.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SpoutAggregateStats.java b/storm-client/src/jvm/org/apache/storm/generated/SpoutAggregateStats.java
index 712bc35..796f6ad 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SpoutAggregateStats.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SpoutAggregateStats.java
@@ -16,52 +16,22 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggregateStats, SpoutAggregateStats._Fields>, java.io.Serializable, Cloneable, Comparable<SpoutAggregateStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SpoutAggregateStats");
private static final org.apache.thrift.protocol.TField COMPLETE_LATENCY_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("complete_latency_ms", org.apache.thrift.protocol.TType.DOUBLE, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SpoutAggregateStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SpoutAggregateStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SpoutAggregateStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SpoutAggregateStatsTupleSchemeFactory();
private double complete_latency_ms; // optional
@@ -69,10 +39,10 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
COMPLETE_LATENCY_MS((short)1, "complete_latency_ms");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,7 +88,7 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -127,12 +97,12 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
private static final int __COMPLETE_LATENCY_MS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.COMPLETE_LATENCY_MS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COMPLETE_LATENCY_MS, new org.apache.thrift.meta_data.FieldMetaData("complete_latency_ms", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SpoutAggregateStats.class, metaDataMap);
}
@@ -167,55 +137,55 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
}
public void unset_complete_latency_ms() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COMPLETE_LATENCY_MS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMPLETE_LATENCY_MS_ISSET_ID);
}
/** Returns true if field complete_latency_ms is set (has been assigned a value) and false otherwise */
public boolean is_set_complete_latency_ms() {
- return EncodingUtils.testBit(__isset_bitfield, __COMPLETE_LATENCY_MS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPLETE_LATENCY_MS_ISSET_ID);
}
public void set_complete_latency_ms_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPLETE_LATENCY_MS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMPLETE_LATENCY_MS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case COMPLETE_LATENCY_MS:
if (value == null) {
unset_complete_latency_ms();
} else {
- set_complete_latency_ms((Double)value);
+ set_complete_latency_ms((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COMPLETE_LATENCY_MS:
return get_complete_latency_ms();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case COMPLETE_LATENCY_MS:
return is_set_complete_latency_ms();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof SpoutAggregateStats)
@@ -226,6 +196,8 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
public boolean equals(SpoutAggregateStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_complete_latency_ms = true && this.is_set_complete_latency_ms();
boolean that_present_complete_latency_ms = true && that.is_set_complete_latency_ms();
@@ -241,14 +213,13 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_complete_latency_ms = true && (is_set_complete_latency_ms());
- list.add(present_complete_latency_ms);
- if (present_complete_latency_ms)
- list.add(complete_latency_ms);
+ hashCode = hashCode * 8191 + ((is_set_complete_latency_ms()) ? 131071 : 524287);
+ if (is_set_complete_latency_ms())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(complete_latency_ms);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -259,7 +230,7 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_complete_latency_ms()).compareTo(other.is_set_complete_latency_ms());
+ lastComparison = java.lang.Boolean.valueOf(is_set_complete_latency_ms()).compareTo(other.is_set_complete_latency_ms());
if (lastComparison != 0) {
return lastComparison;
}
@@ -277,16 +248,16 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SpoutAggregateStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SpoutAggregateStats(");
boolean first = true;
if (is_set_complete_latency_ms()) {
@@ -311,7 +282,7 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -321,13 +292,13 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
}
}
- private static class SpoutAggregateStatsStandardSchemeFactory implements SchemeFactory {
+ private static class SpoutAggregateStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SpoutAggregateStatsStandardScheme getScheme() {
return new SpoutAggregateStatsStandardScheme();
}
}
- private static class SpoutAggregateStatsStandardScheme extends StandardScheme<SpoutAggregateStats> {
+ private static class SpoutAggregateStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<SpoutAggregateStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SpoutAggregateStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -371,18 +342,18 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
}
- private static class SpoutAggregateStatsTupleSchemeFactory implements SchemeFactory {
+ private static class SpoutAggregateStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SpoutAggregateStatsTupleScheme getScheme() {
return new SpoutAggregateStatsTupleScheme();
}
}
- private static class SpoutAggregateStatsTupleScheme extends TupleScheme<SpoutAggregateStats> {
+ private static class SpoutAggregateStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<SpoutAggregateStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SpoutAggregateStats struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_complete_latency_ms()) {
optionals.set(0);
}
@@ -394,8 +365,8 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SpoutAggregateStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.complete_latency_ms = iprot.readDouble();
struct.set_complete_latency_ms_isSet(true);
@@ -403,5 +374,8 @@ public class SpoutAggregateStats implements org.apache.thrift.TBase<SpoutAggrega
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SpoutSpec.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SpoutSpec.java b/storm-client/src/jvm/org/apache/storm/generated/SpoutSpec.java
index bb7919e..e8a38c4 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SpoutSpec.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SpoutSpec.java
@@ -16,53 +16,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._Fields>, java.io.Serializable, Cloneable, Comparable<SpoutSpec> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SpoutSpec");
private static final org.apache.thrift.protocol.TField SPOUT_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("spout_object", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField COMMON_FIELD_DESC = new org.apache.thrift.protocol.TField("common", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SpoutSpecStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SpoutSpecTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SpoutSpecStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SpoutSpecTupleSchemeFactory();
private ComponentObject spout_object; // required
private ComponentCommon common; // required
@@ -72,10 +42,10 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
SPOUT_OBJECT((short)1, "spout_object"),
COMMON((short)2, "common");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,20 +93,20 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SPOUT_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("spout_object", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentObject.class)));
tmpMap.put(_Fields.COMMON, new org.apache.thrift.meta_data.FieldMetaData("common", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentCommon.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SpoutSpec.class, metaDataMap);
}
@@ -220,7 +190,7 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SPOUT_OBJECT:
if (value == null) {
@@ -241,7 +211,7 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SPOUT_OBJECT:
return get_spout_object();
@@ -250,13 +220,13 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
return get_common();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -265,11 +235,11 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
case COMMON:
return is_set_common();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof SpoutSpec)
@@ -280,6 +250,8 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
public boolean equals(SpoutSpec that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_spout_object = true && this.is_set_spout_object();
boolean that_present_spout_object = true && that.is_set_spout_object();
@@ -304,19 +276,17 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_spout_object = true && (is_set_spout_object());
- list.add(present_spout_object);
- if (present_spout_object)
- list.add(spout_object);
+ hashCode = hashCode * 8191 + ((is_set_spout_object()) ? 131071 : 524287);
+ if (is_set_spout_object())
+ hashCode = hashCode * 8191 + spout_object.hashCode();
- boolean present_common = true && (is_set_common());
- list.add(present_common);
- if (present_common)
- list.add(common);
+ hashCode = hashCode * 8191 + ((is_set_common()) ? 131071 : 524287);
+ if (is_set_common())
+ hashCode = hashCode * 8191 + common.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -327,7 +297,7 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_spout_object()).compareTo(other.is_set_spout_object());
+ lastComparison = java.lang.Boolean.valueOf(is_set_spout_object()).compareTo(other.is_set_spout_object());
if (lastComparison != 0) {
return lastComparison;
}
@@ -337,7 +307,7 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_common()).compareTo(other.is_set_common());
+ lastComparison = java.lang.Boolean.valueOf(is_set_common()).compareTo(other.is_set_common());
if (lastComparison != 0) {
return lastComparison;
}
@@ -355,16 +325,16 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SpoutSpec(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SpoutSpec(");
boolean first = true;
sb.append("spout_object:");
@@ -410,7 +380,7 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -418,13 +388,13 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
}
}
- private static class SpoutSpecStandardSchemeFactory implements SchemeFactory {
+ private static class SpoutSpecStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SpoutSpecStandardScheme getScheme() {
return new SpoutSpecStandardScheme();
}
}
- private static class SpoutSpecStandardScheme extends StandardScheme<SpoutSpec> {
+ private static class SpoutSpecStandardScheme extends org.apache.thrift.scheme.StandardScheme<SpoutSpec> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SpoutSpec struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -483,24 +453,24 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
}
- private static class SpoutSpecTupleSchemeFactory implements SchemeFactory {
+ private static class SpoutSpecTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SpoutSpecTupleScheme getScheme() {
return new SpoutSpecTupleScheme();
}
}
- private static class SpoutSpecTupleScheme extends TupleScheme<SpoutSpec> {
+ private static class SpoutSpecTupleScheme extends org.apache.thrift.scheme.TupleScheme<SpoutSpec> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SpoutSpec struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.spout_object.write(oprot);
struct.common.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SpoutSpec struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.spout_object = new ComponentObject();
struct.spout_object.read(iprot);
struct.set_spout_object_isSet(true);
@@ -510,5 +480,8 @@ public class SpoutSpec implements org.apache.thrift.TBase<SpoutSpec, SpoutSpec._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[08/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/TopologySummary.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/TopologySummary.java b/storm-client/src/jvm/org/apache/storm/generated/TopologySummary.java
index 48ed73c..19eccfd 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/TopologySummary.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/TopologySummary.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class TopologySummary implements org.apache.thrift.TBase<TopologySummary, TopologySummary._Fields>, java.io.Serializable, Cloneable, Comparable<TopologySummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TopologySummary");
@@ -74,23 +47,20 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
private static final org.apache.thrift.protocol.TField ASSIGNED_MEMOFFHEAP_FIELD_DESC = new org.apache.thrift.protocol.TField("assigned_memoffheap", org.apache.thrift.protocol.TType.DOUBLE, (short)525);
private static final org.apache.thrift.protocol.TField ASSIGNED_CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("assigned_cpu", org.apache.thrift.protocol.TType.DOUBLE, (short)526);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TopologySummaryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TopologySummaryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TopologySummaryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TopologySummaryTupleSchemeFactory();
- private String id; // required
- private String name; // required
+ private java.lang.String id; // required
+ private java.lang.String name; // required
private int num_tasks; // required
private int num_executors; // required
private int num_workers; // required
private int uptime_secs; // required
- private String status; // required
- private String storm_version; // optional
- private String topology_version; // optional
- private String sched_status; // optional
- private String owner; // optional
+ private java.lang.String status; // required
+ private java.lang.String storm_version; // optional
+ private java.lang.String topology_version; // optional
+ private java.lang.String sched_status; // optional
+ private java.lang.String owner; // optional
private int replication_count; // optional
private double requested_memonheap; // optional
private double requested_memoffheap; // optional
@@ -120,10 +90,10 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
ASSIGNED_MEMOFFHEAP((short)525, "assigned_memoffheap"),
ASSIGNED_CPU((short)526, "assigned_cpu");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -180,21 +150,21 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -203,7 +173,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -222,9 +192,9 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
private static final int __ASSIGNED_CPU_ISSET_ID = 10;
private short __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.STORM_VERSION,_Fields.TOPOLOGY_VERSION,_Fields.SCHED_STATUS,_Fields.OWNER,_Fields.REPLICATION_COUNT,_Fields.REQUESTED_MEMONHEAP,_Fields.REQUESTED_MEMOFFHEAP,_Fields.REQUESTED_CPU,_Fields.ASSIGNED_MEMONHEAP,_Fields.ASSIGNED_MEMOFFHEAP,_Fields.ASSIGNED_CPU};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -261,7 +231,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.ASSIGNED_CPU, new org.apache.thrift.meta_data.FieldMetaData("assigned_cpu", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TopologySummary.class, metaDataMap);
}
@@ -269,13 +239,13 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public TopologySummary(
- String id,
- String name,
+ java.lang.String id,
+ java.lang.String name,
int num_tasks,
int num_executors,
int num_workers,
int uptime_secs,
- String status)
+ java.lang.String status)
{
this();
this.id = id;
@@ -367,11 +337,11 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
this.assigned_cpu = 0.0;
}
- public String get_id() {
+ public java.lang.String get_id() {
return this.id;
}
- public void set_id(String id) {
+ public void set_id(java.lang.String id) {
this.id = id;
}
@@ -390,11 +360,11 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
}
- public String get_name() {
+ public java.lang.String get_name() {
return this.name;
}
- public void set_name(String name) {
+ public void set_name(java.lang.String name) {
this.name = name;
}
@@ -423,16 +393,16 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public void unset_num_tasks() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
}
/** Returns true if field num_tasks is set (has been assigned a value) and false otherwise */
public boolean is_set_num_tasks() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
}
public void set_num_tasks_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_TASKS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_TASKS_ISSET_ID, value);
}
public int get_num_executors() {
@@ -445,16 +415,16 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public void unset_num_executors() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
}
/** Returns true if field num_executors is set (has been assigned a value) and false otherwise */
public boolean is_set_num_executors() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
}
public void set_num_executors_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID, value);
}
public int get_num_workers() {
@@ -467,16 +437,16 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public void unset_num_workers() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
}
/** Returns true if field num_workers is set (has been assigned a value) and false otherwise */
public boolean is_set_num_workers() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
}
public void set_num_workers_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID, value);
}
public int get_uptime_secs() {
@@ -489,23 +459,23 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public void unset_uptime_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
/** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_uptime_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
public void set_uptime_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
}
- public String get_status() {
+ public java.lang.String get_status() {
return this.status;
}
- public void set_status(String status) {
+ public void set_status(java.lang.String status) {
this.status = status;
}
@@ -524,11 +494,11 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
}
- public String get_storm_version() {
+ public java.lang.String get_storm_version() {
return this.storm_version;
}
- public void set_storm_version(String storm_version) {
+ public void set_storm_version(java.lang.String storm_version) {
this.storm_version = storm_version;
}
@@ -547,11 +517,11 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
}
- public String get_topology_version() {
+ public java.lang.String get_topology_version() {
return this.topology_version;
}
- public void set_topology_version(String topology_version) {
+ public void set_topology_version(java.lang.String topology_version) {
this.topology_version = topology_version;
}
@@ -570,11 +540,11 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
}
- public String get_sched_status() {
+ public java.lang.String get_sched_status() {
return this.sched_status;
}
- public void set_sched_status(String sched_status) {
+ public void set_sched_status(java.lang.String sched_status) {
this.sched_status = sched_status;
}
@@ -593,11 +563,11 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
}
- public String get_owner() {
+ public java.lang.String get_owner() {
return this.owner;
}
- public void set_owner(String owner) {
+ public void set_owner(java.lang.String owner) {
this.owner = owner;
}
@@ -626,16 +596,16 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public void unset_replication_count() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID);
}
/** Returns true if field replication_count is set (has been assigned a value) and false otherwise */
public boolean is_set_replication_count() {
- return EncodingUtils.testBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID);
}
public void set_replication_count_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID, value);
}
public double get_requested_memonheap() {
@@ -648,16 +618,16 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public void unset_requested_memonheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
}
/** Returns true if field requested_memonheap is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_memonheap() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
}
public void set_requested_memonheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID, value);
}
public double get_requested_memoffheap() {
@@ -670,16 +640,16 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public void unset_requested_memoffheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
}
/** Returns true if field requested_memoffheap is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_memoffheap() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
}
public void set_requested_memoffheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID, value);
}
public double get_requested_cpu() {
@@ -692,16 +662,16 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public void unset_requested_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
}
/** Returns true if field requested_cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
}
public void set_requested_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID, value);
}
public double get_assigned_memonheap() {
@@ -714,16 +684,16 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public void unset_assigned_memonheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
}
/** Returns true if field assigned_memonheap is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_memonheap() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
}
public void set_assigned_memonheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID, value);
}
public double get_assigned_memoffheap() {
@@ -736,16 +706,16 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public void unset_assigned_memoffheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
}
/** Returns true if field assigned_memoffheap is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_memoffheap() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
}
public void set_assigned_memoffheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID, value);
}
public double get_assigned_cpu() {
@@ -758,25 +728,25 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public void unset_assigned_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
}
/** Returns true if field assigned_cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
}
public void set_assigned_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ID:
if (value == null) {
unset_id();
} else {
- set_id((String)value);
+ set_id((java.lang.String)value);
}
break;
@@ -784,7 +754,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_name();
} else {
- set_name((String)value);
+ set_name((java.lang.String)value);
}
break;
@@ -792,7 +762,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_num_tasks();
} else {
- set_num_tasks((Integer)value);
+ set_num_tasks((java.lang.Integer)value);
}
break;
@@ -800,7 +770,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_num_executors();
} else {
- set_num_executors((Integer)value);
+ set_num_executors((java.lang.Integer)value);
}
break;
@@ -808,7 +778,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_num_workers();
} else {
- set_num_workers((Integer)value);
+ set_num_workers((java.lang.Integer)value);
}
break;
@@ -816,7 +786,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_uptime_secs();
} else {
- set_uptime_secs((Integer)value);
+ set_uptime_secs((java.lang.Integer)value);
}
break;
@@ -824,7 +794,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_status();
} else {
- set_status((String)value);
+ set_status((java.lang.String)value);
}
break;
@@ -832,7 +802,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_storm_version();
} else {
- set_storm_version((String)value);
+ set_storm_version((java.lang.String)value);
}
break;
@@ -840,7 +810,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_topology_version();
} else {
- set_topology_version((String)value);
+ set_topology_version((java.lang.String)value);
}
break;
@@ -848,7 +818,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_sched_status();
} else {
- set_sched_status((String)value);
+ set_sched_status((java.lang.String)value);
}
break;
@@ -856,7 +826,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_owner();
} else {
- set_owner((String)value);
+ set_owner((java.lang.String)value);
}
break;
@@ -864,7 +834,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_replication_count();
} else {
- set_replication_count((Integer)value);
+ set_replication_count((java.lang.Integer)value);
}
break;
@@ -872,7 +842,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_requested_memonheap();
} else {
- set_requested_memonheap((Double)value);
+ set_requested_memonheap((java.lang.Double)value);
}
break;
@@ -880,7 +850,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_requested_memoffheap();
} else {
- set_requested_memoffheap((Double)value);
+ set_requested_memoffheap((java.lang.Double)value);
}
break;
@@ -888,7 +858,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_requested_cpu();
} else {
- set_requested_cpu((Double)value);
+ set_requested_cpu((java.lang.Double)value);
}
break;
@@ -896,7 +866,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_assigned_memonheap();
} else {
- set_assigned_memonheap((Double)value);
+ set_assigned_memonheap((java.lang.Double)value);
}
break;
@@ -904,7 +874,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_assigned_memoffheap();
} else {
- set_assigned_memoffheap((Double)value);
+ set_assigned_memoffheap((java.lang.Double)value);
}
break;
@@ -912,14 +882,14 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
if (value == null) {
unset_assigned_cpu();
} else {
- set_assigned_cpu((Double)value);
+ set_assigned_cpu((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return get_id();
@@ -976,13 +946,13 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return get_assigned_cpu();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -1023,11 +993,11 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
case ASSIGNED_CPU:
return is_set_assigned_cpu();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TopologySummary)
@@ -1038,6 +1008,8 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
public boolean equals(TopologySummary that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_id = true && this.is_set_id();
boolean that_present_id = true && that.is_set_id();
@@ -1206,99 +1178,73 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_id = true && (is_set_id());
- list.add(present_id);
- if (present_id)
- list.add(id);
-
- boolean present_name = true && (is_set_name());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_num_tasks = true;
- list.add(present_num_tasks);
- if (present_num_tasks)
- list.add(num_tasks);
-
- boolean present_num_executors = true;
- list.add(present_num_executors);
- if (present_num_executors)
- list.add(num_executors);
-
- boolean present_num_workers = true;
- list.add(present_num_workers);
- if (present_num_workers)
- list.add(num_workers);
-
- boolean present_uptime_secs = true;
- list.add(present_uptime_secs);
- if (present_uptime_secs)
- list.add(uptime_secs);
-
- boolean present_status = true && (is_set_status());
- list.add(present_status);
- if (present_status)
- list.add(status);
-
- boolean present_storm_version = true && (is_set_storm_version());
- list.add(present_storm_version);
- if (present_storm_version)
- list.add(storm_version);
-
- boolean present_topology_version = true && (is_set_topology_version());
- list.add(present_topology_version);
- if (present_topology_version)
- list.add(topology_version);
-
- boolean present_sched_status = true && (is_set_sched_status());
- list.add(present_sched_status);
- if (present_sched_status)
- list.add(sched_status);
-
- boolean present_owner = true && (is_set_owner());
- list.add(present_owner);
- if (present_owner)
- list.add(owner);
-
- boolean present_replication_count = true && (is_set_replication_count());
- list.add(present_replication_count);
- if (present_replication_count)
- list.add(replication_count);
-
- boolean present_requested_memonheap = true && (is_set_requested_memonheap());
- list.add(present_requested_memonheap);
- if (present_requested_memonheap)
- list.add(requested_memonheap);
-
- boolean present_requested_memoffheap = true && (is_set_requested_memoffheap());
- list.add(present_requested_memoffheap);
- if (present_requested_memoffheap)
- list.add(requested_memoffheap);
-
- boolean present_requested_cpu = true && (is_set_requested_cpu());
- list.add(present_requested_cpu);
- if (present_requested_cpu)
- list.add(requested_cpu);
-
- boolean present_assigned_memonheap = true && (is_set_assigned_memonheap());
- list.add(present_assigned_memonheap);
- if (present_assigned_memonheap)
- list.add(assigned_memonheap);
-
- boolean present_assigned_memoffheap = true && (is_set_assigned_memoffheap());
- list.add(present_assigned_memoffheap);
- if (present_assigned_memoffheap)
- list.add(assigned_memoffheap);
-
- boolean present_assigned_cpu = true && (is_set_assigned_cpu());
- list.add(present_assigned_cpu);
- if (present_assigned_cpu)
- list.add(assigned_cpu);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((is_set_id()) ? 131071 : 524287);
+ if (is_set_id())
+ hashCode = hashCode * 8191 + id.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_name()) ? 131071 : 524287);
+ if (is_set_name())
+ hashCode = hashCode * 8191 + name.hashCode();
+
+ hashCode = hashCode * 8191 + num_tasks;
+
+ hashCode = hashCode * 8191 + num_executors;
+
+ hashCode = hashCode * 8191 + num_workers;
+
+ hashCode = hashCode * 8191 + uptime_secs;
+
+ hashCode = hashCode * 8191 + ((is_set_status()) ? 131071 : 524287);
+ if (is_set_status())
+ hashCode = hashCode * 8191 + status.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_storm_version()) ? 131071 : 524287);
+ if (is_set_storm_version())
+ hashCode = hashCode * 8191 + storm_version.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_topology_version()) ? 131071 : 524287);
+ if (is_set_topology_version())
+ hashCode = hashCode * 8191 + topology_version.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_sched_status()) ? 131071 : 524287);
+ if (is_set_sched_status())
+ hashCode = hashCode * 8191 + sched_status.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_owner()) ? 131071 : 524287);
+ if (is_set_owner())
+ hashCode = hashCode * 8191 + owner.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_replication_count()) ? 131071 : 524287);
+ if (is_set_replication_count())
+ hashCode = hashCode * 8191 + replication_count;
+
+ hashCode = hashCode * 8191 + ((is_set_requested_memonheap()) ? 131071 : 524287);
+ if (is_set_requested_memonheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_memonheap);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_memoffheap()) ? 131071 : 524287);
+ if (is_set_requested_memoffheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_memoffheap);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_cpu()) ? 131071 : 524287);
+ if (is_set_requested_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_cpu);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_memonheap()) ? 131071 : 524287);
+ if (is_set_assigned_memonheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_memonheap);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_memoffheap()) ? 131071 : 524287);
+ if (is_set_assigned_memoffheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_memoffheap);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_cpu()) ? 131071 : 524287);
+ if (is_set_assigned_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_cpu);
+
+ return hashCode;
}
@Override
@@ -1309,7 +1255,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1319,7 +1265,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
+ lastComparison = java.lang.Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1329,7 +1275,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_tasks()).compareTo(other.is_set_num_tasks());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_tasks()).compareTo(other.is_set_num_tasks());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1339,7 +1285,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_executors()).compareTo(other.is_set_num_executors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_executors()).compareTo(other.is_set_num_executors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1349,7 +1295,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_workers()).compareTo(other.is_set_num_workers());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_workers()).compareTo(other.is_set_num_workers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1359,7 +1305,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1369,7 +1315,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_status()).compareTo(other.is_set_status());
+ lastComparison = java.lang.Boolean.valueOf(is_set_status()).compareTo(other.is_set_status());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1379,7 +1325,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_storm_version()).compareTo(other.is_set_storm_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_storm_version()).compareTo(other.is_set_storm_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1389,7 +1335,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_version()).compareTo(other.is_set_topology_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_version()).compareTo(other.is_set_topology_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1399,7 +1345,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_sched_status()).compareTo(other.is_set_sched_status());
+ lastComparison = java.lang.Boolean.valueOf(is_set_sched_status()).compareTo(other.is_set_sched_status());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1409,7 +1355,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
+ lastComparison = java.lang.Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1419,7 +1365,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_replication_count()).compareTo(other.is_set_replication_count());
+ lastComparison = java.lang.Boolean.valueOf(is_set_replication_count()).compareTo(other.is_set_replication_count());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1429,7 +1375,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_memonheap()).compareTo(other.is_set_requested_memonheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_memonheap()).compareTo(other.is_set_requested_memonheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1439,7 +1385,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_memoffheap()).compareTo(other.is_set_requested_memoffheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_memoffheap()).compareTo(other.is_set_requested_memoffheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1449,7 +1395,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_cpu()).compareTo(other.is_set_requested_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_cpu()).compareTo(other.is_set_requested_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1459,7 +1405,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_memonheap()).compareTo(other.is_set_assigned_memonheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_memonheap()).compareTo(other.is_set_assigned_memonheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1469,7 +1415,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_memoffheap()).compareTo(other.is_set_assigned_memoffheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_memoffheap()).compareTo(other.is_set_assigned_memoffheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1479,7 +1425,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_cpu()).compareTo(other.is_set_assigned_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_cpu()).compareTo(other.is_set_assigned_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1497,16 +1443,16 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TopologySummary(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TopologySummary(");
boolean first = true;
sb.append("id:");
@@ -1675,7 +1621,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1685,13 +1631,13 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
}
- private static class TopologySummaryStandardSchemeFactory implements SchemeFactory {
+ private static class TopologySummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TopologySummaryStandardScheme getScheme() {
return new TopologySummaryStandardScheme();
}
}
- private static class TopologySummaryStandardScheme extends StandardScheme<TopologySummary> {
+ private static class TopologySummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<TopologySummary> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TopologySummary struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1956,17 +1902,17 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
- private static class TopologySummaryTupleSchemeFactory implements SchemeFactory {
+ private static class TopologySummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TopologySummaryTupleScheme getScheme() {
return new TopologySummaryTupleScheme();
}
}
- private static class TopologySummaryTupleScheme extends TupleScheme<TopologySummary> {
+ private static class TopologySummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<TopologySummary> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TopologySummary struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.id);
oprot.writeString(struct.name);
oprot.writeI32(struct.num_tasks);
@@ -1974,7 +1920,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
oprot.writeI32(struct.num_workers);
oprot.writeI32(struct.uptime_secs);
oprot.writeString(struct.status);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_storm_version()) {
optionals.set(0);
}
@@ -2046,7 +1992,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TopologySummary struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.id = iprot.readString();
struct.set_id_isSet(true);
struct.name = iprot.readString();
@@ -2061,7 +2007,7 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
struct.set_uptime_secs_isSet(true);
struct.status = iprot.readString();
struct.set_status_isSet(true);
- BitSet incoming = iprot.readBitSet(11);
+ java.util.BitSet incoming = iprot.readBitSet(11);
if (incoming.get(0)) {
struct.storm_version = iprot.readString();
struct.set_storm_version_isSet(true);
@@ -2109,5 +2055,8 @@ public class TopologySummary implements org.apache.thrift.TBase<TopologySummary,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/WorkerMetricList.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/WorkerMetricList.java b/storm-client/src/jvm/org/apache/storm/generated/WorkerMetricList.java
index 764a4f9..a61ad9a 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/WorkerMetricList.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/WorkerMetricList.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricList, WorkerMetricList._Fields>, java.io.Serializable, Cloneable, Comparable<WorkerMetricList> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkerMetricList");
private static final org.apache.thrift.protocol.TField METRICS_FIELD_DESC = new org.apache.thrift.protocol.TField("metrics", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkerMetricListStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkerMetricListTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WorkerMetricListStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WorkerMetricListTupleSchemeFactory();
- private List<WorkerMetricPoint> metrics; // required
+ private java.util.List<WorkerMetricPoint> metrics; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
METRICS((short)1, "metrics");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,19 +88,19 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.METRICS, new org.apache.thrift.meta_data.FieldMetaData("metrics", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkerMetricPoint.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkerMetricList.class, metaDataMap);
}
@@ -138,7 +108,7 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
}
public WorkerMetricList(
- List<WorkerMetricPoint> metrics)
+ java.util.List<WorkerMetricPoint> metrics)
{
this();
this.metrics = metrics;
@@ -149,7 +119,7 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
*/
public WorkerMetricList(WorkerMetricList other) {
if (other.is_set_metrics()) {
- List<WorkerMetricPoint> __this__metrics = new ArrayList<WorkerMetricPoint>(other.metrics.size());
+ java.util.List<WorkerMetricPoint> __this__metrics = new java.util.ArrayList<WorkerMetricPoint>(other.metrics.size());
for (WorkerMetricPoint other_element : other.metrics) {
__this__metrics.add(new WorkerMetricPoint(other_element));
}
@@ -176,16 +146,16 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
public void add_to_metrics(WorkerMetricPoint elem) {
if (this.metrics == null) {
- this.metrics = new ArrayList<WorkerMetricPoint>();
+ this.metrics = new java.util.ArrayList<WorkerMetricPoint>();
}
this.metrics.add(elem);
}
- public List<WorkerMetricPoint> get_metrics() {
+ public java.util.List<WorkerMetricPoint> get_metrics() {
return this.metrics;
}
- public void set_metrics(List<WorkerMetricPoint> metrics) {
+ public void set_metrics(java.util.List<WorkerMetricPoint> metrics) {
this.metrics = metrics;
}
@@ -204,43 +174,43 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case METRICS:
if (value == null) {
unset_metrics();
} else {
- set_metrics((List<WorkerMetricPoint>)value);
+ set_metrics((java.util.List<WorkerMetricPoint>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case METRICS:
return get_metrics();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case METRICS:
return is_set_metrics();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof WorkerMetricList)
@@ -251,6 +221,8 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
public boolean equals(WorkerMetricList that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_metrics = true && this.is_set_metrics();
boolean that_present_metrics = true && that.is_set_metrics();
@@ -266,14 +238,13 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_metrics = true && (is_set_metrics());
- list.add(present_metrics);
- if (present_metrics)
- list.add(metrics);
+ hashCode = hashCode * 8191 + ((is_set_metrics()) ? 131071 : 524287);
+ if (is_set_metrics())
+ hashCode = hashCode * 8191 + metrics.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -284,7 +255,7 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_metrics()).compareTo(other.is_set_metrics());
+ lastComparison = java.lang.Boolean.valueOf(is_set_metrics()).compareTo(other.is_set_metrics());
if (lastComparison != 0) {
return lastComparison;
}
@@ -302,16 +273,16 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("WorkerMetricList(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WorkerMetricList(");
boolean first = true;
sb.append("metrics:");
@@ -338,7 +309,7 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -346,13 +317,13 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
}
}
- private static class WorkerMetricListStandardSchemeFactory implements SchemeFactory {
+ private static class WorkerMetricListStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerMetricListStandardScheme getScheme() {
return new WorkerMetricListStandardScheme();
}
}
- private static class WorkerMetricListStandardScheme extends StandardScheme<WorkerMetricList> {
+ private static class WorkerMetricListStandardScheme extends org.apache.thrift.scheme.StandardScheme<WorkerMetricList> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WorkerMetricList struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -368,7 +339,7 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list896 = iprot.readListBegin();
- struct.metrics = new ArrayList<WorkerMetricPoint>(_list896.size);
+ struct.metrics = new java.util.ArrayList<WorkerMetricPoint>(_list896.size);
WorkerMetricPoint _elem897;
for (int _i898 = 0; _i898 < _list896.size; ++_i898)
{
@@ -414,18 +385,18 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
}
- private static class WorkerMetricListTupleSchemeFactory implements SchemeFactory {
+ private static class WorkerMetricListTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerMetricListTupleScheme getScheme() {
return new WorkerMetricListTupleScheme();
}
}
- private static class WorkerMetricListTupleScheme extends TupleScheme<WorkerMetricList> {
+ private static class WorkerMetricListTupleScheme extends org.apache.thrift.scheme.TupleScheme<WorkerMetricList> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkerMetricList struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_metrics()) {
optionals.set(0);
}
@@ -443,12 +414,12 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WorkerMetricList struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list901 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.metrics = new ArrayList<WorkerMetricPoint>(_list901.size);
+ struct.metrics = new java.util.ArrayList<WorkerMetricPoint>(_list901.size);
WorkerMetricPoint _elem902;
for (int _i903 = 0; _i903 < _list901.size; ++_i903)
{
@@ -462,5 +433,8 @@ public class WorkerMetricList implements org.apache.thrift.TBase<WorkerMetricLis
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/WorkerMetricPoint.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/WorkerMetricPoint.java b/storm-client/src/jvm/org/apache/storm/generated/WorkerMetricPoint.java
index 719277a..c4633a5 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/WorkerMetricPoint.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/WorkerMetricPoint.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPoint, WorkerMetricPoint._Fields>, java.io.Serializable, Cloneable, Comparable<WorkerMetricPoint> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkerMetricPoint");
@@ -62,18 +35,15 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
private static final org.apache.thrift.protocol.TField EXECUTOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("executorId", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField STREAM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("streamId", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkerMetricPointStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkerMetricPointTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WorkerMetricPointStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WorkerMetricPointTupleSchemeFactory();
- private String metricName; // required
+ private java.lang.String metricName; // required
private long timestamp; // required
private double metricValue; // required
- private String componentId; // required
- private String executorId; // required
- private String streamId; // required
+ private java.lang.String componentId; // required
+ private java.lang.String executorId; // required
+ private java.lang.String streamId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -84,10 +54,10 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
EXECUTOR_ID((short)5, "executorId"),
STREAM_ID((short)6, "streamId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -120,21 +90,21 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -143,7 +113,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -152,9 +122,9 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
private static final int __TIMESTAMP_ISSET_ID = 0;
private static final int __METRICVALUE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.METRIC_NAME, new org.apache.thrift.meta_data.FieldMetaData("metricName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -167,7 +137,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STREAM_ID, new org.apache.thrift.meta_data.FieldMetaData("streamId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkerMetricPoint.class, metaDataMap);
}
@@ -175,12 +145,12 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
}
public WorkerMetricPoint(
- String metricName,
+ java.lang.String metricName,
long timestamp,
double metricValue,
- String componentId,
- String executorId,
- String streamId)
+ java.lang.String componentId,
+ java.lang.String executorId,
+ java.lang.String streamId)
{
this();
this.metricName = metricName;
@@ -230,11 +200,11 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
this.streamId = null;
}
- public String get_metricName() {
+ public java.lang.String get_metricName() {
return this.metricName;
}
- public void set_metricName(String metricName) {
+ public void set_metricName(java.lang.String metricName) {
this.metricName = metricName;
}
@@ -263,16 +233,16 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
}
public void unset_timestamp() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean is_set_timestamp() {
- return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void set_timestamp_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public double get_metricValue() {
@@ -285,23 +255,23 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
}
public void unset_metricValue() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __METRICVALUE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __METRICVALUE_ISSET_ID);
}
/** Returns true if field metricValue is set (has been assigned a value) and false otherwise */
public boolean is_set_metricValue() {
- return EncodingUtils.testBit(__isset_bitfield, __METRICVALUE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __METRICVALUE_ISSET_ID);
}
public void set_metricValue_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __METRICVALUE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __METRICVALUE_ISSET_ID, value);
}
- public String get_componentId() {
+ public java.lang.String get_componentId() {
return this.componentId;
}
- public void set_componentId(String componentId) {
+ public void set_componentId(java.lang.String componentId) {
this.componentId = componentId;
}
@@ -320,11 +290,11 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
}
}
- public String get_executorId() {
+ public java.lang.String get_executorId() {
return this.executorId;
}
- public void set_executorId(String executorId) {
+ public void set_executorId(java.lang.String executorId) {
this.executorId = executorId;
}
@@ -343,11 +313,11 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
}
}
- public String get_streamId() {
+ public java.lang.String get_streamId() {
return this.streamId;
}
- public void set_streamId(String streamId) {
+ public void set_streamId(java.lang.String streamId) {
this.streamId = streamId;
}
@@ -366,13 +336,13 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case METRIC_NAME:
if (value == null) {
unset_metricName();
} else {
- set_metricName((String)value);
+ set_metricName((java.lang.String)value);
}
break;
@@ -380,7 +350,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
if (value == null) {
unset_timestamp();
} else {
- set_timestamp((Long)value);
+ set_timestamp((java.lang.Long)value);
}
break;
@@ -388,7 +358,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
if (value == null) {
unset_metricValue();
} else {
- set_metricValue((Double)value);
+ set_metricValue((java.lang.Double)value);
}
break;
@@ -396,7 +366,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
if (value == null) {
unset_componentId();
} else {
- set_componentId((String)value);
+ set_componentId((java.lang.String)value);
}
break;
@@ -404,7 +374,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
if (value == null) {
unset_executorId();
} else {
- set_executorId((String)value);
+ set_executorId((java.lang.String)value);
}
break;
@@ -412,14 +382,14 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
if (value == null) {
unset_streamId();
} else {
- set_streamId((String)value);
+ set_streamId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case METRIC_NAME:
return get_metricName();
@@ -440,13 +410,13 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
return get_streamId();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -463,11 +433,11 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
case STREAM_ID:
return is_set_streamId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof WorkerMetricPoint)
@@ -478,6 +448,8 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
public boolean equals(WorkerMetricPoint that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_metricName = true && this.is_set_metricName();
boolean that_present_metricName = true && that.is_set_metricName();
@@ -538,39 +510,29 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_metricName = true && (is_set_metricName());
- list.add(present_metricName);
- if (present_metricName)
- list.add(metricName);
+ hashCode = hashCode * 8191 + ((is_set_metricName()) ? 131071 : 524287);
+ if (is_set_metricName())
+ hashCode = hashCode * 8191 + metricName.hashCode();
- boolean present_timestamp = true;
- list.add(present_timestamp);
- if (present_timestamp)
- list.add(timestamp);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
- boolean present_metricValue = true;
- list.add(present_metricValue);
- if (present_metricValue)
- list.add(metricValue);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(metricValue);
- boolean present_componentId = true && (is_set_componentId());
- list.add(present_componentId);
- if (present_componentId)
- list.add(componentId);
+ hashCode = hashCode * 8191 + ((is_set_componentId()) ? 131071 : 524287);
+ if (is_set_componentId())
+ hashCode = hashCode * 8191 + componentId.hashCode();
- boolean present_executorId = true && (is_set_executorId());
- list.add(present_executorId);
- if (present_executorId)
- list.add(executorId);
+ hashCode = hashCode * 8191 + ((is_set_executorId()) ? 131071 : 524287);
+ if (is_set_executorId())
+ hashCode = hashCode * 8191 + executorId.hashCode();
- boolean present_streamId = true && (is_set_streamId());
- list.add(present_streamId);
- if (present_streamId)
- list.add(streamId);
+ hashCode = hashCode * 8191 + ((is_set_streamId()) ? 131071 : 524287);
+ if (is_set_streamId())
+ hashCode = hashCode * 8191 + streamId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -581,7 +543,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_metricName()).compareTo(other.is_set_metricName());
+ lastComparison = java.lang.Boolean.valueOf(is_set_metricName()).compareTo(other.is_set_metricName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -591,7 +553,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_timestamp()).compareTo(other.is_set_timestamp());
+ lastComparison = java.lang.Boolean.valueOf(is_set_timestamp()).compareTo(other.is_set_timestamp());
if (lastComparison != 0) {
return lastComparison;
}
@@ -601,7 +563,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_metricValue()).compareTo(other.is_set_metricValue());
+ lastComparison = java.lang.Boolean.valueOf(is_set_metricValue()).compareTo(other.is_set_metricValue());
if (lastComparison != 0) {
return lastComparison;
}
@@ -611,7 +573,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_componentId()).compareTo(other.is_set_componentId());
+ lastComparison = java.lang.Boolean.valueOf(is_set_componentId()).compareTo(other.is_set_componentId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -621,7 +583,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_executorId()).compareTo(other.is_set_executorId());
+ lastComparison = java.lang.Boolean.valueOf(is_set_executorId()).compareTo(other.is_set_executorId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -631,7 +593,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_streamId()).compareTo(other.is_set_streamId());
+ lastComparison = java.lang.Boolean.valueOf(is_set_streamId()).compareTo(other.is_set_streamId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -649,16 +611,16 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("WorkerMetricPoint(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WorkerMetricPoint(");
boolean first = true;
sb.append("metricName:");
@@ -741,7 +703,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -751,13 +713,13 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
}
}
- private static class WorkerMetricPointStandardSchemeFactory implements SchemeFactory {
+ private static class WorkerMetricPointStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerMetricPointStandardScheme getScheme() {
return new WorkerMetricPointStandardScheme();
}
}
- private static class WorkerMetricPointStandardScheme extends StandardScheme<WorkerMetricPoint> {
+ private static class WorkerMetricPointStandardScheme extends org.apache.thrift.scheme.StandardScheme<WorkerMetricPoint> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WorkerMetricPoint struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -862,17 +824,17 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
}
- private static class WorkerMetricPointTupleSchemeFactory implements SchemeFactory {
+ private static class WorkerMetricPointTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerMetricPointTupleScheme getScheme() {
return new WorkerMetricPointTupleScheme();
}
}
- private static class WorkerMetricPointTupleScheme extends TupleScheme<WorkerMetricPoint> {
+ private static class WorkerMetricPointTupleScheme extends org.apache.thrift.scheme.TupleScheme<WorkerMetricPoint> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkerMetricPoint struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.metricName);
oprot.writeI64(struct.timestamp);
oprot.writeDouble(struct.metricValue);
@@ -883,7 +845,7 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WorkerMetricPoint struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.metricName = iprot.readString();
struct.set_metricName_isSet(true);
struct.timestamp = iprot.readI64();
@@ -899,5 +861,8 @@ public class WorkerMetricPoint implements org.apache.thrift.TBase<WorkerMetricPo
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[25/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LocalStateData.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/LocalStateData.java b/storm-client/src/jvm/org/apache/storm/generated/LocalStateData.java
index a99475f..8948a67 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/LocalStateData.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/LocalStateData.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, LocalStateData._Fields>, java.io.Serializable, Cloneable, Comparable<LocalStateData> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LocalStateData");
private static final org.apache.thrift.protocol.TField SERIALIZED_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("serialized_parts", org.apache.thrift.protocol.TType.MAP, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LocalStateDataStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LocalStateDataTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LocalStateDataStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LocalStateDataTupleSchemeFactory();
- private Map<String,ThriftSerializedObject> serialized_parts; // required
+ private java.util.Map<java.lang.String,ThriftSerializedObject> serialized_parts; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SERIALIZED_PARTS((short)1, "serialized_parts");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,20 +88,20 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SERIALIZED_PARTS, new org.apache.thrift.meta_data.FieldMetaData("serialized_parts", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftSerializedObject.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LocalStateData.class, metaDataMap);
}
@@ -139,7 +109,7 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
}
public LocalStateData(
- Map<String,ThriftSerializedObject> serialized_parts)
+ java.util.Map<java.lang.String,ThriftSerializedObject> serialized_parts)
{
this();
this.serialized_parts = serialized_parts;
@@ -150,13 +120,13 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
*/
public LocalStateData(LocalStateData other) {
if (other.is_set_serialized_parts()) {
- Map<String,ThriftSerializedObject> __this__serialized_parts = new HashMap<String,ThriftSerializedObject>(other.serialized_parts.size());
- for (Map.Entry<String, ThriftSerializedObject> other_element : other.serialized_parts.entrySet()) {
+ java.util.Map<java.lang.String,ThriftSerializedObject> __this__serialized_parts = new java.util.HashMap<java.lang.String,ThriftSerializedObject>(other.serialized_parts.size());
+ for (java.util.Map.Entry<java.lang.String, ThriftSerializedObject> other_element : other.serialized_parts.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
ThriftSerializedObject other_element_value = other_element.getValue();
- String __this__serialized_parts_copy_key = other_element_key;
+ java.lang.String __this__serialized_parts_copy_key = other_element_key;
ThriftSerializedObject __this__serialized_parts_copy_value = new ThriftSerializedObject(other_element_value);
@@ -179,18 +149,18 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
return (this.serialized_parts == null) ? 0 : this.serialized_parts.size();
}
- public void put_to_serialized_parts(String key, ThriftSerializedObject val) {
+ public void put_to_serialized_parts(java.lang.String key, ThriftSerializedObject val) {
if (this.serialized_parts == null) {
- this.serialized_parts = new HashMap<String,ThriftSerializedObject>();
+ this.serialized_parts = new java.util.HashMap<java.lang.String,ThriftSerializedObject>();
}
this.serialized_parts.put(key, val);
}
- public Map<String,ThriftSerializedObject> get_serialized_parts() {
+ public java.util.Map<java.lang.String,ThriftSerializedObject> get_serialized_parts() {
return this.serialized_parts;
}
- public void set_serialized_parts(Map<String,ThriftSerializedObject> serialized_parts) {
+ public void set_serialized_parts(java.util.Map<java.lang.String,ThriftSerializedObject> serialized_parts) {
this.serialized_parts = serialized_parts;
}
@@ -209,43 +179,43 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SERIALIZED_PARTS:
if (value == null) {
unset_serialized_parts();
} else {
- set_serialized_parts((Map<String,ThriftSerializedObject>)value);
+ set_serialized_parts((java.util.Map<java.lang.String,ThriftSerializedObject>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SERIALIZED_PARTS:
return get_serialized_parts();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SERIALIZED_PARTS:
return is_set_serialized_parts();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof LocalStateData)
@@ -256,6 +226,8 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
public boolean equals(LocalStateData that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_serialized_parts = true && this.is_set_serialized_parts();
boolean that_present_serialized_parts = true && that.is_set_serialized_parts();
@@ -271,14 +243,13 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_serialized_parts = true && (is_set_serialized_parts());
- list.add(present_serialized_parts);
- if (present_serialized_parts)
- list.add(serialized_parts);
+ hashCode = hashCode * 8191 + ((is_set_serialized_parts()) ? 131071 : 524287);
+ if (is_set_serialized_parts())
+ hashCode = hashCode * 8191 + serialized_parts.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -289,7 +260,7 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_serialized_parts()).compareTo(other.is_set_serialized_parts());
+ lastComparison = java.lang.Boolean.valueOf(is_set_serialized_parts()).compareTo(other.is_set_serialized_parts());
if (lastComparison != 0) {
return lastComparison;
}
@@ -307,16 +278,16 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LocalStateData(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LocalStateData(");
boolean first = true;
sb.append("serialized_parts:");
@@ -347,7 +318,7 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -355,13 +326,13 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
}
}
- private static class LocalStateDataStandardSchemeFactory implements SchemeFactory {
+ private static class LocalStateDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LocalStateDataStandardScheme getScheme() {
return new LocalStateDataStandardScheme();
}
}
- private static class LocalStateDataStandardScheme extends StandardScheme<LocalStateData> {
+ private static class LocalStateDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<LocalStateData> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LocalStateData struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -377,8 +348,8 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map782 = iprot.readMapBegin();
- struct.serialized_parts = new HashMap<String,ThriftSerializedObject>(2*_map782.size);
- String _key783;
+ struct.serialized_parts = new java.util.HashMap<java.lang.String,ThriftSerializedObject>(2*_map782.size);
+ java.lang.String _key783;
ThriftSerializedObject _val784;
for (int _i785 = 0; _i785 < _map782.size; ++_i785)
{
@@ -411,7 +382,7 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
oprot.writeFieldBegin(SERIALIZED_PARTS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.serialized_parts.size()));
- for (Map.Entry<String, ThriftSerializedObject> _iter786 : struct.serialized_parts.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ThriftSerializedObject> _iter786 : struct.serialized_parts.entrySet())
{
oprot.writeString(_iter786.getKey());
_iter786.getValue().write(oprot);
@@ -426,20 +397,20 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
}
- private static class LocalStateDataTupleSchemeFactory implements SchemeFactory {
+ private static class LocalStateDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LocalStateDataTupleScheme getScheme() {
return new LocalStateDataTupleScheme();
}
}
- private static class LocalStateDataTupleScheme extends TupleScheme<LocalStateData> {
+ private static class LocalStateDataTupleScheme extends org.apache.thrift.scheme.TupleScheme<LocalStateData> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LocalStateData struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.serialized_parts.size());
- for (Map.Entry<String, ThriftSerializedObject> _iter787 : struct.serialized_parts.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ThriftSerializedObject> _iter787 : struct.serialized_parts.entrySet())
{
oprot.writeString(_iter787.getKey());
_iter787.getValue().write(oprot);
@@ -449,11 +420,11 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LocalStateData struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TMap _map788 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.serialized_parts = new HashMap<String,ThriftSerializedObject>(2*_map788.size);
- String _key789;
+ struct.serialized_parts = new java.util.HashMap<java.lang.String,ThriftSerializedObject>(2*_map788.size);
+ java.lang.String _key789;
ThriftSerializedObject _val790;
for (int _i791 = 0; _i791 < _map788.size; ++_i791)
{
@@ -467,5 +438,8 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LogConfig.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/LogConfig.java b/storm-client/src/jvm/org/apache/storm/generated/LogConfig.java
index f44203f..9c6ed85 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/LogConfig.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/LogConfig.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._Fields>, java.io.Serializable, Cloneable, Comparable<LogConfig> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LogConfig");
private static final org.apache.thrift.protocol.TField NAMED_LOGGER_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("named_logger_level", org.apache.thrift.protocol.TType.MAP, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LogConfigStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LogConfigTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LogConfigStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LogConfigTupleSchemeFactory();
- private Map<String,LogLevel> named_logger_level; // optional
+ private java.util.Map<java.lang.String,LogLevel> named_logger_level; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
NAMED_LOGGER_LEVEL((short)2, "named_logger_level");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,21 +88,21 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.NAMED_LOGGER_LEVEL};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAMED_LOGGER_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("named_logger_level", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LogLevel.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LogConfig.class, metaDataMap);
}
@@ -144,13 +114,13 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
*/
public LogConfig(LogConfig other) {
if (other.is_set_named_logger_level()) {
- Map<String,LogLevel> __this__named_logger_level = new HashMap<String,LogLevel>(other.named_logger_level.size());
- for (Map.Entry<String, LogLevel> other_element : other.named_logger_level.entrySet()) {
+ java.util.Map<java.lang.String,LogLevel> __this__named_logger_level = new java.util.HashMap<java.lang.String,LogLevel>(other.named_logger_level.size());
+ for (java.util.Map.Entry<java.lang.String, LogLevel> other_element : other.named_logger_level.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
LogLevel other_element_value = other_element.getValue();
- String __this__named_logger_level_copy_key = other_element_key;
+ java.lang.String __this__named_logger_level_copy_key = other_element_key;
LogLevel __this__named_logger_level_copy_value = new LogLevel(other_element_value);
@@ -173,18 +143,18 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
return (this.named_logger_level == null) ? 0 : this.named_logger_level.size();
}
- public void put_to_named_logger_level(String key, LogLevel val) {
+ public void put_to_named_logger_level(java.lang.String key, LogLevel val) {
if (this.named_logger_level == null) {
- this.named_logger_level = new HashMap<String,LogLevel>();
+ this.named_logger_level = new java.util.HashMap<java.lang.String,LogLevel>();
}
this.named_logger_level.put(key, val);
}
- public Map<String,LogLevel> get_named_logger_level() {
+ public java.util.Map<java.lang.String,LogLevel> get_named_logger_level() {
return this.named_logger_level;
}
- public void set_named_logger_level(Map<String,LogLevel> named_logger_level) {
+ public void set_named_logger_level(java.util.Map<java.lang.String,LogLevel> named_logger_level) {
this.named_logger_level = named_logger_level;
}
@@ -203,43 +173,43 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case NAMED_LOGGER_LEVEL:
if (value == null) {
unset_named_logger_level();
} else {
- set_named_logger_level((Map<String,LogLevel>)value);
+ set_named_logger_level((java.util.Map<java.lang.String,LogLevel>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NAMED_LOGGER_LEVEL:
return get_named_logger_level();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case NAMED_LOGGER_LEVEL:
return is_set_named_logger_level();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof LogConfig)
@@ -250,6 +220,8 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
public boolean equals(LogConfig that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_named_logger_level = true && this.is_set_named_logger_level();
boolean that_present_named_logger_level = true && that.is_set_named_logger_level();
@@ -265,14 +237,13 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_named_logger_level = true && (is_set_named_logger_level());
- list.add(present_named_logger_level);
- if (present_named_logger_level)
- list.add(named_logger_level);
+ hashCode = hashCode * 8191 + ((is_set_named_logger_level()) ? 131071 : 524287);
+ if (is_set_named_logger_level())
+ hashCode = hashCode * 8191 + named_logger_level.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -283,7 +254,7 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_named_logger_level()).compareTo(other.is_set_named_logger_level());
+ lastComparison = java.lang.Boolean.valueOf(is_set_named_logger_level()).compareTo(other.is_set_named_logger_level());
if (lastComparison != 0) {
return lastComparison;
}
@@ -301,16 +272,16 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LogConfig(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LogConfig(");
boolean first = true;
if (is_set_named_logger_level()) {
@@ -339,7 +310,7 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -347,13 +318,13 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
}
}
- private static class LogConfigStandardSchemeFactory implements SchemeFactory {
+ private static class LogConfigStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LogConfigStandardScheme getScheme() {
return new LogConfigStandardScheme();
}
}
- private static class LogConfigStandardScheme extends StandardScheme<LogConfig> {
+ private static class LogConfigStandardScheme extends org.apache.thrift.scheme.StandardScheme<LogConfig> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LogConfig struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -369,8 +340,8 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map852 = iprot.readMapBegin();
- struct.named_logger_level = new HashMap<String,LogLevel>(2*_map852.size);
- String _key853;
+ struct.named_logger_level = new java.util.HashMap<java.lang.String,LogLevel>(2*_map852.size);
+ java.lang.String _key853;
LogLevel _val854;
for (int _i855 = 0; _i855 < _map852.size; ++_i855)
{
@@ -404,7 +375,7 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
oprot.writeFieldBegin(NAMED_LOGGER_LEVEL_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.named_logger_level.size()));
- for (Map.Entry<String, LogLevel> _iter856 : struct.named_logger_level.entrySet())
+ for (java.util.Map.Entry<java.lang.String, LogLevel> _iter856 : struct.named_logger_level.entrySet())
{
oprot.writeString(_iter856.getKey());
_iter856.getValue().write(oprot);
@@ -420,18 +391,18 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
}
- private static class LogConfigTupleSchemeFactory implements SchemeFactory {
+ private static class LogConfigTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LogConfigTupleScheme getScheme() {
return new LogConfigTupleScheme();
}
}
- private static class LogConfigTupleScheme extends TupleScheme<LogConfig> {
+ private static class LogConfigTupleScheme extends org.apache.thrift.scheme.TupleScheme<LogConfig> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LogConfig struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_named_logger_level()) {
optionals.set(0);
}
@@ -439,7 +410,7 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
if (struct.is_set_named_logger_level()) {
{
oprot.writeI32(struct.named_logger_level.size());
- for (Map.Entry<String, LogLevel> _iter857 : struct.named_logger_level.entrySet())
+ for (java.util.Map.Entry<java.lang.String, LogLevel> _iter857 : struct.named_logger_level.entrySet())
{
oprot.writeString(_iter857.getKey());
_iter857.getValue().write(oprot);
@@ -450,13 +421,13 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LogConfig struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map858 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.named_logger_level = new HashMap<String,LogLevel>(2*_map858.size);
- String _key859;
+ struct.named_logger_level = new java.util.HashMap<java.lang.String,LogLevel>(2*_map858.size);
+ java.lang.String _key859;
LogLevel _val860;
for (int _i861 = 0; _i861 < _map858.size; ++_i861)
{
@@ -471,5 +442,8 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LogLevel.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/LogLevel.java b/storm-client/src/jvm/org/apache/storm/generated/LogLevel.java
index 332cabb..c0180a8 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/LogLevel.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/LogLevel.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fields>, java.io.Serializable, Cloneable, Comparable<LogLevel> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LogLevel");
@@ -61,17 +34,14 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
private static final org.apache.thrift.protocol.TField RESET_LOG_LEVEL_TIMEOUT_EPOCH_FIELD_DESC = new org.apache.thrift.protocol.TField("reset_log_level_timeout_epoch", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField RESET_LOG_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("reset_log_level", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LogLevelStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LogLevelTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LogLevelStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LogLevelTupleSchemeFactory();
private LogLevelAction action; // required
- private String target_log_level; // optional
+ private java.lang.String target_log_level; // optional
private int reset_log_level_timeout_secs; // optional
private long reset_log_level_timeout_epoch; // optional
- private String reset_log_level; // optional
+ private java.lang.String reset_log_level; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -85,10 +55,10 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
RESET_LOG_LEVEL_TIMEOUT_EPOCH((short)4, "reset_log_level_timeout_epoch"),
RESET_LOG_LEVEL((short)5, "reset_log_level");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -119,21 +89,21 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -142,7 +112,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -152,9 +122,9 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
private static final int __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.TARGET_LOG_LEVEL,_Fields.RESET_LOG_LEVEL_TIMEOUT_SECS,_Fields.RESET_LOG_LEVEL_TIMEOUT_EPOCH,_Fields.RESET_LOG_LEVEL};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ACTION, new org.apache.thrift.meta_data.FieldMetaData("action", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LogLevelAction.class)));
tmpMap.put(_Fields.TARGET_LOG_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("target_log_level", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -165,7 +135,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.RESET_LOG_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("reset_log_level", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LogLevel.class, metaDataMap);
}
@@ -243,11 +213,11 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
}
}
- public String get_target_log_level() {
+ public java.lang.String get_target_log_level() {
return this.target_log_level;
}
- public void set_target_log_level(String target_log_level) {
+ public void set_target_log_level(java.lang.String target_log_level) {
this.target_log_level = target_log_level;
}
@@ -276,16 +246,16 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
}
public void unset_reset_log_level_timeout_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_SECS_ISSET_ID);
}
/** Returns true if field reset_log_level_timeout_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_reset_log_level_timeout_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_SECS_ISSET_ID);
}
public void set_reset_log_level_timeout_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_SECS_ISSET_ID, value);
}
public long get_reset_log_level_timeout_epoch() {
@@ -298,23 +268,23 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
}
public void unset_reset_log_level_timeout_epoch() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID);
}
/** Returns true if field reset_log_level_timeout_epoch is set (has been assigned a value) and false otherwise */
public boolean is_set_reset_log_level_timeout_epoch() {
- return EncodingUtils.testBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID);
}
public void set_reset_log_level_timeout_epoch_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID, value);
}
- public String get_reset_log_level() {
+ public java.lang.String get_reset_log_level() {
return this.reset_log_level;
}
- public void set_reset_log_level(String reset_log_level) {
+ public void set_reset_log_level(java.lang.String reset_log_level) {
this.reset_log_level = reset_log_level;
}
@@ -333,7 +303,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ACTION:
if (value == null) {
@@ -347,7 +317,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
if (value == null) {
unset_target_log_level();
} else {
- set_target_log_level((String)value);
+ set_target_log_level((java.lang.String)value);
}
break;
@@ -355,7 +325,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
if (value == null) {
unset_reset_log_level_timeout_secs();
} else {
- set_reset_log_level_timeout_secs((Integer)value);
+ set_reset_log_level_timeout_secs((java.lang.Integer)value);
}
break;
@@ -363,7 +333,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
if (value == null) {
unset_reset_log_level_timeout_epoch();
} else {
- set_reset_log_level_timeout_epoch((Long)value);
+ set_reset_log_level_timeout_epoch((java.lang.Long)value);
}
break;
@@ -371,14 +341,14 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
if (value == null) {
unset_reset_log_level();
} else {
- set_reset_log_level((String)value);
+ set_reset_log_level((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ACTION:
return get_action();
@@ -396,13 +366,13 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
return get_reset_log_level();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -417,11 +387,11 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
case RESET_LOG_LEVEL:
return is_set_reset_log_level();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof LogLevel)
@@ -432,6 +402,8 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
public boolean equals(LogLevel that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_action = true && this.is_set_action();
boolean that_present_action = true && that.is_set_action();
@@ -483,34 +455,29 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_action = true && (is_set_action());
- list.add(present_action);
- if (present_action)
- list.add(action.getValue());
+ hashCode = hashCode * 8191 + ((is_set_action()) ? 131071 : 524287);
+ if (is_set_action())
+ hashCode = hashCode * 8191 + action.getValue();
- boolean present_target_log_level = true && (is_set_target_log_level());
- list.add(present_target_log_level);
- if (present_target_log_level)
- list.add(target_log_level);
+ hashCode = hashCode * 8191 + ((is_set_target_log_level()) ? 131071 : 524287);
+ if (is_set_target_log_level())
+ hashCode = hashCode * 8191 + target_log_level.hashCode();
- boolean present_reset_log_level_timeout_secs = true && (is_set_reset_log_level_timeout_secs());
- list.add(present_reset_log_level_timeout_secs);
- if (present_reset_log_level_timeout_secs)
- list.add(reset_log_level_timeout_secs);
+ hashCode = hashCode * 8191 + ((is_set_reset_log_level_timeout_secs()) ? 131071 : 524287);
+ if (is_set_reset_log_level_timeout_secs())
+ hashCode = hashCode * 8191 + reset_log_level_timeout_secs;
- boolean present_reset_log_level_timeout_epoch = true && (is_set_reset_log_level_timeout_epoch());
- list.add(present_reset_log_level_timeout_epoch);
- if (present_reset_log_level_timeout_epoch)
- list.add(reset_log_level_timeout_epoch);
+ hashCode = hashCode * 8191 + ((is_set_reset_log_level_timeout_epoch()) ? 131071 : 524287);
+ if (is_set_reset_log_level_timeout_epoch())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(reset_log_level_timeout_epoch);
- boolean present_reset_log_level = true && (is_set_reset_log_level());
- list.add(present_reset_log_level);
- if (present_reset_log_level)
- list.add(reset_log_level);
+ hashCode = hashCode * 8191 + ((is_set_reset_log_level()) ? 131071 : 524287);
+ if (is_set_reset_log_level())
+ hashCode = hashCode * 8191 + reset_log_level.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -521,7 +488,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_action()).compareTo(other.is_set_action());
+ lastComparison = java.lang.Boolean.valueOf(is_set_action()).compareTo(other.is_set_action());
if (lastComparison != 0) {
return lastComparison;
}
@@ -531,7 +498,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_target_log_level()).compareTo(other.is_set_target_log_level());
+ lastComparison = java.lang.Boolean.valueOf(is_set_target_log_level()).compareTo(other.is_set_target_log_level());
if (lastComparison != 0) {
return lastComparison;
}
@@ -541,7 +508,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_reset_log_level_timeout_secs()).compareTo(other.is_set_reset_log_level_timeout_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_reset_log_level_timeout_secs()).compareTo(other.is_set_reset_log_level_timeout_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -551,7 +518,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_reset_log_level_timeout_epoch()).compareTo(other.is_set_reset_log_level_timeout_epoch());
+ lastComparison = java.lang.Boolean.valueOf(is_set_reset_log_level_timeout_epoch()).compareTo(other.is_set_reset_log_level_timeout_epoch());
if (lastComparison != 0) {
return lastComparison;
}
@@ -561,7 +528,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_reset_log_level()).compareTo(other.is_set_reset_log_level());
+ lastComparison = java.lang.Boolean.valueOf(is_set_reset_log_level()).compareTo(other.is_set_reset_log_level());
if (lastComparison != 0) {
return lastComparison;
}
@@ -579,16 +546,16 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LogLevel(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LogLevel(");
boolean first = true;
sb.append("action:");
@@ -651,7 +618,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -661,13 +628,13 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
}
}
- private static class LogLevelStandardSchemeFactory implements SchemeFactory {
+ private static class LogLevelStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LogLevelStandardScheme getScheme() {
return new LogLevelStandardScheme();
}
}
- private static class LogLevelStandardScheme extends StandardScheme<LogLevel> {
+ private static class LogLevelStandardScheme extends org.apache.thrift.scheme.StandardScheme<LogLevel> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LogLevel struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -767,19 +734,19 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
}
- private static class LogLevelTupleSchemeFactory implements SchemeFactory {
+ private static class LogLevelTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LogLevelTupleScheme getScheme() {
return new LogLevelTupleScheme();
}
}
- private static class LogLevelTupleScheme extends TupleScheme<LogLevel> {
+ private static class LogLevelTupleScheme extends org.apache.thrift.scheme.TupleScheme<LogLevel> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LogLevel struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.action.getValue());
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_target_log_level()) {
optionals.set(0);
}
@@ -809,10 +776,10 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LogLevel struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.action = org.apache.storm.generated.LogLevelAction.findByValue(iprot.readI32());
struct.set_action_isSet(true);
- BitSet incoming = iprot.readBitSet(4);
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.target_log_level = iprot.readString();
struct.set_target_log_level_isSet(true);
@@ -832,5 +799,8 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LogLevelAction.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/LogLevelAction.java b/storm-client/src/jvm/org/apache/storm/generated/LogLevelAction.java
index 1f0a41a..e317271 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/LogLevelAction.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/LogLevelAction.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -24,10 +24,6 @@
package org.apache.storm.generated;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
public enum LogLevelAction implements org.apache.thrift.TEnum {
UNCHANGED(1),
UPDATE(2),
[24/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/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 ddefe4c..ac105e1 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/Nimbus.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/Nimbus.java
@@ -16,63 +16,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class Nimbus {
public interface Iface {
- public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException;
+ public void submitTopology(java.lang.String name, java.lang.String uploadedJarLocation, java.lang.String jsonConf, StormTopology topology) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException;
- public void submitTopologyWithOpts(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, SubmitOptions options) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException;
+ public void submitTopologyWithOpts(java.lang.String name, java.lang.String uploadedJarLocation, java.lang.String jsonConf, StormTopology topology, SubmitOptions options) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException;
- public void killTopology(String name) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public void killTopology(java.lang.String name) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
- public void killTopologyWithOpts(String name, KillOptions options) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public void killTopologyWithOpts(java.lang.String name, KillOptions options) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
- public void activate(String name) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public void activate(java.lang.String name) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
- public void deactivate(String name) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public void deactivate(java.lang.String name) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
- public void rebalance(String name, RebalanceOptions options) throws NotAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException;
+ public void rebalance(java.lang.String name, RebalanceOptions options) throws NotAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException;
- public void setLogConfig(String name, LogConfig config) throws org.apache.thrift.TException;
+ public void setLogConfig(java.lang.String name, LogConfig config) throws org.apache.thrift.TException;
- public LogConfig getLogConfig(String name) throws org.apache.thrift.TException;
+ public LogConfig getLogConfig(java.lang.String name) throws org.apache.thrift.TException;
/**
* Enable/disable logging the tuples generated in topology via an internal EventLogger bolt. The component name is optional
@@ -86,96 +59,96 @@ public class Nimbus {
* @param enable
* @param samplingPercentage
*/
- public void debug(String name, String component, boolean enable, double samplingPercentage) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public void debug(java.lang.String name, java.lang.String component, boolean enable, double samplingPercentage) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
- public void setWorkerProfiler(String id, ProfileRequest profileRequest) throws org.apache.thrift.TException;
+ public void setWorkerProfiler(java.lang.String id, ProfileRequest profileRequest) throws org.apache.thrift.TException;
- public List<ProfileRequest> getComponentPendingProfileActions(String id, String component_id, ProfileAction action) throws org.apache.thrift.TException;
+ public java.util.List<ProfileRequest> getComponentPendingProfileActions(java.lang.String id, java.lang.String component_id, ProfileAction action) throws org.apache.thrift.TException;
- public void uploadNewCredentials(String name, Credentials creds) throws NotAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException;
+ public void uploadNewCredentials(java.lang.String name, Credentials creds) throws NotAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException;
- public String beginCreateBlob(String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException, org.apache.thrift.TException;
+ public java.lang.String beginCreateBlob(java.lang.String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException, org.apache.thrift.TException;
- public String beginUpdateBlob(String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
+ public java.lang.String beginUpdateBlob(java.lang.String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
- public void uploadBlobChunk(String session, ByteBuffer chunk) throws AuthorizationException, org.apache.thrift.TException;
+ public void uploadBlobChunk(java.lang.String session, java.nio.ByteBuffer chunk) throws AuthorizationException, org.apache.thrift.TException;
- public void finishBlobUpload(String session) throws AuthorizationException, org.apache.thrift.TException;
+ public void finishBlobUpload(java.lang.String session) throws AuthorizationException, org.apache.thrift.TException;
- public void cancelBlobUpload(String session) throws AuthorizationException, org.apache.thrift.TException;
+ public void cancelBlobUpload(java.lang.String session) throws AuthorizationException, org.apache.thrift.TException;
- public ReadableBlobMeta getBlobMeta(String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
+ public ReadableBlobMeta getBlobMeta(java.lang.String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
- public void setBlobMeta(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
+ public void setBlobMeta(java.lang.String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
- public BeginDownloadResult beginBlobDownload(String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
+ public BeginDownloadResult beginBlobDownload(java.lang.String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
- public ByteBuffer downloadBlobChunk(String session) throws AuthorizationException, org.apache.thrift.TException;
+ public java.nio.ByteBuffer downloadBlobChunk(java.lang.String session) throws AuthorizationException, org.apache.thrift.TException;
- public void deleteBlob(String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
+ public void deleteBlob(java.lang.String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
- public ListBlobsResult listBlobs(String session) throws org.apache.thrift.TException;
+ public ListBlobsResult listBlobs(java.lang.String session) throws org.apache.thrift.TException;
- public int getBlobReplication(String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
+ public int getBlobReplication(java.lang.String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
- public int updateBlobReplication(String key, int replication) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
+ public int updateBlobReplication(java.lang.String key, int replication) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException;
- public void createStateInZookeeper(String key) throws org.apache.thrift.TException;
+ public void createStateInZookeeper(java.lang.String key) throws org.apache.thrift.TException;
- public String beginFileUpload() throws AuthorizationException, org.apache.thrift.TException;
+ public java.lang.String beginFileUpload() throws AuthorizationException, org.apache.thrift.TException;
- public void uploadChunk(String location, ByteBuffer chunk) throws AuthorizationException, org.apache.thrift.TException;
+ public void uploadChunk(java.lang.String location, java.nio.ByteBuffer chunk) throws AuthorizationException, org.apache.thrift.TException;
- public void finishFileUpload(String location) throws AuthorizationException, org.apache.thrift.TException;
+ public void finishFileUpload(java.lang.String location) throws AuthorizationException, org.apache.thrift.TException;
- public String beginFileDownload(String file) throws AuthorizationException, org.apache.thrift.TException;
+ public java.lang.String beginFileDownload(java.lang.String file) throws AuthorizationException, org.apache.thrift.TException;
- public ByteBuffer downloadChunk(String id) throws AuthorizationException, org.apache.thrift.TException;
+ public java.nio.ByteBuffer downloadChunk(java.lang.String id) throws AuthorizationException, org.apache.thrift.TException;
- public String getNimbusConf() throws AuthorizationException, org.apache.thrift.TException;
+ public java.lang.String getNimbusConf() throws AuthorizationException, org.apache.thrift.TException;
public ClusterSummary getClusterInfo() throws AuthorizationException, org.apache.thrift.TException;
public NimbusSummary getLeader() throws AuthorizationException, org.apache.thrift.TException;
- public boolean isTopologyNameAllowed(String name) throws AuthorizationException, org.apache.thrift.TException;
+ public boolean isTopologyNameAllowed(java.lang.String name) throws AuthorizationException, org.apache.thrift.TException;
- public TopologyInfo getTopologyInfo(String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public TopologyInfo getTopologyInfo(java.lang.String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
- public TopologyInfo getTopologyInfoWithOpts(String id, GetInfoOptions options) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public TopologyInfo getTopologyInfoWithOpts(java.lang.String id, GetInfoOptions options) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
- public TopologyPageInfo getTopologyPageInfo(String id, String window, boolean is_include_sys) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public TopologyPageInfo getTopologyPageInfo(java.lang.String id, java.lang.String window, boolean is_include_sys) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
- public SupervisorPageInfo getSupervisorPageInfo(String id, String host, boolean is_include_sys) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public SupervisorPageInfo getSupervisorPageInfo(java.lang.String id, java.lang.String host, boolean is_include_sys) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
- public ComponentPageInfo getComponentPageInfo(String topology_id, String component_id, String window, boolean is_include_sys) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public ComponentPageInfo getComponentPageInfo(java.lang.String topology_id, java.lang.String component_id, java.lang.String window, boolean is_include_sys) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
- public String getTopologyConf(String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public java.lang.String getTopologyConf(java.lang.String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
/**
* Returns the compiled topology that contains ackers and metrics consumsers. Compare {@link #getUserTopology(String id)}.
*
* @param id
*/
- public StormTopology getTopology(String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public StormTopology getTopology(java.lang.String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
/**
* Returns the user specified topology as submitted originally. Compare {@link #getTopology(String id)}.
*
* @param id
*/
- public StormTopology getUserTopology(String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public StormTopology getUserTopology(java.lang.String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
- public TopologyHistoryInfo getTopologyHistory(String user) throws AuthorizationException, org.apache.thrift.TException;
+ public TopologyHistoryInfo getTopologyHistory(java.lang.String user) throws AuthorizationException, org.apache.thrift.TException;
- public List<OwnerResourceSummary> getOwnerResourceSummaries(String owner) throws AuthorizationException, org.apache.thrift.TException;
+ public java.util.List<OwnerResourceSummary> getOwnerResourceSummaries(java.lang.String owner) throws AuthorizationException, org.apache.thrift.TException;
/**
* Get assigned assignments for a specific supervisor
*
* @param node
*/
- public SupervisorAssignments getSupervisorAssignments(String node) throws AuthorizationException, org.apache.thrift.TException;
+ public SupervisorAssignments getSupervisorAssignments(java.lang.String node) throws AuthorizationException, org.apache.thrift.TException;
/**
* Send supervisor worker heartbeats for a specific supervisor
@@ -189,7 +162,7 @@ public class Nimbus {
*
* @param heatbeat
*/
- public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat) throws AuthorizationException, org.apache.thrift.TException;
+ public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat) throws AuthorizationException, NotAliveException, org.apache.thrift.TException;
public void processWorkerMetrics(WorkerMetrics metrics) throws org.apache.thrift.TException;
@@ -197,105 +170,105 @@ public class Nimbus {
public interface AsyncIface {
- public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void submitTopology(java.lang.String name, java.lang.String uploadedJarLocation, java.lang.String jsonConf, StormTopology topology, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void submitTopologyWithOpts(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, SubmitOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void submitTopologyWithOpts(java.lang.String name, java.lang.String uploadedJarLocation, java.lang.String jsonConf, StormTopology topology, SubmitOptions options, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void killTopology(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void killTopology(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void killTopologyWithOpts(String name, KillOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void killTopologyWithOpts(java.lang.String name, KillOptions options, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void activate(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void activate(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void deactivate(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void deactivate(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void rebalance(String name, RebalanceOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void rebalance(java.lang.String name, RebalanceOptions options, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setLogConfig(String name, LogConfig config, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setLogConfig(java.lang.String name, LogConfig config, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getLogConfig(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getLogConfig(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<LogConfig> resultHandler) throws org.apache.thrift.TException;
- public void debug(String name, String component, boolean enable, double samplingPercentage, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void debug(java.lang.String name, java.lang.String component, boolean enable, double samplingPercentage, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setWorkerProfiler(String id, ProfileRequest profileRequest, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setWorkerProfiler(java.lang.String id, ProfileRequest profileRequest, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getComponentPendingProfileActions(String id, String component_id, ProfileAction action, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getComponentPendingProfileActions(java.lang.String id, java.lang.String component_id, ProfileAction action, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ProfileRequest>> resultHandler) throws org.apache.thrift.TException;
- public void uploadNewCredentials(String name, Credentials creds, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void uploadNewCredentials(java.lang.String name, Credentials creds, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void beginCreateBlob(String key, SettableBlobMeta meta, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void beginCreateBlob(java.lang.String key, SettableBlobMeta meta, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void beginUpdateBlob(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void beginUpdateBlob(java.lang.String key, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void uploadBlobChunk(String session, ByteBuffer chunk, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void uploadBlobChunk(java.lang.String session, java.nio.ByteBuffer chunk, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void finishBlobUpload(String session, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void finishBlobUpload(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void cancelBlobUpload(String session, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void cancelBlobUpload(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getBlobMeta(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getBlobMeta(java.lang.String key, org.apache.thrift.async.AsyncMethodCallback<ReadableBlobMeta> resultHandler) throws org.apache.thrift.TException;
- public void setBlobMeta(String key, SettableBlobMeta meta, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setBlobMeta(java.lang.String key, SettableBlobMeta meta, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void beginBlobDownload(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void beginBlobDownload(java.lang.String key, org.apache.thrift.async.AsyncMethodCallback<BeginDownloadResult> resultHandler) throws org.apache.thrift.TException;
- public void downloadBlobChunk(String session, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void downloadBlobChunk(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException;
- public void deleteBlob(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void deleteBlob(java.lang.String key, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void listBlobs(String session, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void listBlobs(java.lang.String session, org.apache.thrift.async.AsyncMethodCallback<ListBlobsResult> resultHandler) throws org.apache.thrift.TException;
- public void getBlobReplication(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getBlobReplication(java.lang.String key, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException;
- public void updateBlobReplication(String key, int replication, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateBlobReplication(java.lang.String key, int replication, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException;
- public void createStateInZookeeper(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createStateInZookeeper(java.lang.String key, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void beginFileUpload(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void beginFileUpload(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void uploadChunk(String location, ByteBuffer chunk, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void uploadChunk(java.lang.String location, java.nio.ByteBuffer chunk, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void finishFileUpload(String location, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void finishFileUpload(java.lang.String location, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void beginFileDownload(String file, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void beginFileDownload(java.lang.String file, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void downloadChunk(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void downloadChunk(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException;
- public void getNimbusConf(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getNimbusConf(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void getClusterInfo(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getClusterInfo(org.apache.thrift.async.AsyncMethodCallback<ClusterSummary> resultHandler) throws org.apache.thrift.TException;
- public void getLeader(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getLeader(org.apache.thrift.async.AsyncMethodCallback<NimbusSummary> resultHandler) throws org.apache.thrift.TException;
- public void isTopologyNameAllowed(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void isTopologyNameAllowed(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void getTopologyInfo(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getTopologyInfo(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<TopologyInfo> resultHandler) throws org.apache.thrift.TException;
- public void getTopologyInfoWithOpts(String id, GetInfoOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getTopologyInfoWithOpts(java.lang.String id, GetInfoOptions options, org.apache.thrift.async.AsyncMethodCallback<TopologyInfo> resultHandler) throws org.apache.thrift.TException;
- public void getTopologyPageInfo(String id, String window, boolean is_include_sys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getTopologyPageInfo(java.lang.String id, java.lang.String window, boolean is_include_sys, org.apache.thrift.async.AsyncMethodCallback<TopologyPageInfo> resultHandler) throws org.apache.thrift.TException;
- public void getSupervisorPageInfo(String id, String host, boolean is_include_sys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getSupervisorPageInfo(java.lang.String id, java.lang.String host, boolean is_include_sys, org.apache.thrift.async.AsyncMethodCallback<SupervisorPageInfo> resultHandler) throws org.apache.thrift.TException;
- public void getComponentPageInfo(String topology_id, String component_id, String window, boolean is_include_sys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getComponentPageInfo(java.lang.String topology_id, java.lang.String component_id, java.lang.String window, boolean is_include_sys, org.apache.thrift.async.AsyncMethodCallback<ComponentPageInfo> resultHandler) throws org.apache.thrift.TException;
- public void getTopologyConf(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getTopologyConf(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void getTopology(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getTopology(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<StormTopology> resultHandler) throws org.apache.thrift.TException;
- public void getUserTopology(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getUserTopology(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<StormTopology> resultHandler) throws org.apache.thrift.TException;
- public void getTopologyHistory(String user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getTopologyHistory(java.lang.String user, org.apache.thrift.async.AsyncMethodCallback<TopologyHistoryInfo> resultHandler) throws org.apache.thrift.TException;
- public void getOwnerResourceSummaries(String owner, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getOwnerResourceSummaries(java.lang.String owner, org.apache.thrift.async.AsyncMethodCallback<java.util.List<OwnerResourceSummary>> resultHandler) throws org.apache.thrift.TException;
- public void getSupervisorAssignments(String node, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getSupervisorAssignments(java.lang.String node, org.apache.thrift.async.AsyncMethodCallback<SupervisorAssignments> resultHandler) throws org.apache.thrift.TException;
- public void sendSupervisorWorkerHeartbeats(SupervisorWorkerHeartbeats heartbeats, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void sendSupervisorWorkerHeartbeats(SupervisorWorkerHeartbeats heartbeats, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void processWorkerMetrics(WorkerMetrics metrics, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void processWorkerMetrics(WorkerMetrics metrics, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
}
@@ -319,13 +292,13 @@ public class Nimbus {
super(iprot, oprot);
}
- public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException
+ public void submitTopology(java.lang.String name, java.lang.String uploadedJarLocation, java.lang.String jsonConf, StormTopology topology) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException
{
send_submitTopology(name, uploadedJarLocation, jsonConf, topology);
recv_submitTopology();
}
- public void send_submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) throws org.apache.thrift.TException
+ public void send_submitTopology(java.lang.String name, java.lang.String uploadedJarLocation, java.lang.String jsonConf, StormTopology topology) throws org.apache.thrift.TException
{
submitTopology_args args = new submitTopology_args();
args.set_name(name);
@@ -351,13 +324,13 @@ public class Nimbus {
return;
}
- public void submitTopologyWithOpts(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, SubmitOptions options) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException
+ public void submitTopologyWithOpts(java.lang.String name, java.lang.String uploadedJarLocation, java.lang.String jsonConf, StormTopology topology, SubmitOptions options) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException
{
send_submitTopologyWithOpts(name, uploadedJarLocation, jsonConf, topology, options);
recv_submitTopologyWithOpts();
}
- public void send_submitTopologyWithOpts(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, SubmitOptions options) throws org.apache.thrift.TException
+ public void send_submitTopologyWithOpts(java.lang.String name, java.lang.String uploadedJarLocation, java.lang.String jsonConf, StormTopology topology, SubmitOptions options) throws org.apache.thrift.TException
{
submitTopologyWithOpts_args args = new submitTopologyWithOpts_args();
args.set_name(name);
@@ -384,13 +357,13 @@ public class Nimbus {
return;
}
- public void killTopology(String name) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public void killTopology(java.lang.String name) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_killTopology(name);
recv_killTopology();
}
- public void send_killTopology(String name) throws org.apache.thrift.TException
+ public void send_killTopology(java.lang.String name) throws org.apache.thrift.TException
{
killTopology_args args = new killTopology_args();
args.set_name(name);
@@ -410,13 +383,13 @@ public class Nimbus {
return;
}
- public void killTopologyWithOpts(String name, KillOptions options) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public void killTopologyWithOpts(java.lang.String name, KillOptions options) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_killTopologyWithOpts(name, options);
recv_killTopologyWithOpts();
}
- public void send_killTopologyWithOpts(String name, KillOptions options) throws org.apache.thrift.TException
+ public void send_killTopologyWithOpts(java.lang.String name, KillOptions options) throws org.apache.thrift.TException
{
killTopologyWithOpts_args args = new killTopologyWithOpts_args();
args.set_name(name);
@@ -437,13 +410,13 @@ public class Nimbus {
return;
}
- public void activate(String name) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public void activate(java.lang.String name) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_activate(name);
recv_activate();
}
- public void send_activate(String name) throws org.apache.thrift.TException
+ public void send_activate(java.lang.String name) throws org.apache.thrift.TException
{
activate_args args = new activate_args();
args.set_name(name);
@@ -463,13 +436,13 @@ public class Nimbus {
return;
}
- public void deactivate(String name) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public void deactivate(java.lang.String name) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_deactivate(name);
recv_deactivate();
}
- public void send_deactivate(String name) throws org.apache.thrift.TException
+ public void send_deactivate(java.lang.String name) throws org.apache.thrift.TException
{
deactivate_args args = new deactivate_args();
args.set_name(name);
@@ -489,13 +462,13 @@ public class Nimbus {
return;
}
- public void rebalance(String name, RebalanceOptions options) throws NotAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException
+ public void rebalance(java.lang.String name, RebalanceOptions options) throws NotAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException
{
send_rebalance(name, options);
recv_rebalance();
}
- public void send_rebalance(String name, RebalanceOptions options) throws org.apache.thrift.TException
+ public void send_rebalance(java.lang.String name, RebalanceOptions options) throws org.apache.thrift.TException
{
rebalance_args args = new rebalance_args();
args.set_name(name);
@@ -519,13 +492,13 @@ public class Nimbus {
return;
}
- public void setLogConfig(String name, LogConfig config) throws org.apache.thrift.TException
+ public void setLogConfig(java.lang.String name, LogConfig config) throws org.apache.thrift.TException
{
send_setLogConfig(name, config);
recv_setLogConfig();
}
- public void send_setLogConfig(String name, LogConfig config) throws org.apache.thrift.TException
+ public void send_setLogConfig(java.lang.String name, LogConfig config) throws org.apache.thrift.TException
{
setLogConfig_args args = new setLogConfig_args();
args.set_name(name);
@@ -540,13 +513,13 @@ public class Nimbus {
return;
}
- public LogConfig getLogConfig(String name) throws org.apache.thrift.TException
+ public LogConfig getLogConfig(java.lang.String name) throws org.apache.thrift.TException
{
send_getLogConfig(name);
return recv_getLogConfig();
}
- public void send_getLogConfig(String name) throws org.apache.thrift.TException
+ public void send_getLogConfig(java.lang.String name) throws org.apache.thrift.TException
{
getLogConfig_args args = new getLogConfig_args();
args.set_name(name);
@@ -563,13 +536,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLogConfig failed: unknown result");
}
- public void debug(String name, String component, boolean enable, double samplingPercentage) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public void debug(java.lang.String name, java.lang.String component, boolean enable, double samplingPercentage) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_debug(name, component, enable, samplingPercentage);
recv_debug();
}
- public void send_debug(String name, String component, boolean enable, double samplingPercentage) throws org.apache.thrift.TException
+ public void send_debug(java.lang.String name, java.lang.String component, boolean enable, double samplingPercentage) throws org.apache.thrift.TException
{
debug_args args = new debug_args();
args.set_name(name);
@@ -592,13 +565,13 @@ public class Nimbus {
return;
}
- public void setWorkerProfiler(String id, ProfileRequest profileRequest) throws org.apache.thrift.TException
+ public void setWorkerProfiler(java.lang.String id, ProfileRequest profileRequest) throws org.apache.thrift.TException
{
send_setWorkerProfiler(id, profileRequest);
recv_setWorkerProfiler();
}
- public void send_setWorkerProfiler(String id, ProfileRequest profileRequest) throws org.apache.thrift.TException
+ public void send_setWorkerProfiler(java.lang.String id, ProfileRequest profileRequest) throws org.apache.thrift.TException
{
setWorkerProfiler_args args = new setWorkerProfiler_args();
args.set_id(id);
@@ -613,13 +586,13 @@ public class Nimbus {
return;
}
- public List<ProfileRequest> getComponentPendingProfileActions(String id, String component_id, ProfileAction action) throws org.apache.thrift.TException
+ public java.util.List<ProfileRequest> getComponentPendingProfileActions(java.lang.String id, java.lang.String component_id, ProfileAction action) throws org.apache.thrift.TException
{
send_getComponentPendingProfileActions(id, component_id, action);
return recv_getComponentPendingProfileActions();
}
- public void send_getComponentPendingProfileActions(String id, String component_id, ProfileAction action) throws org.apache.thrift.TException
+ public void send_getComponentPendingProfileActions(java.lang.String id, java.lang.String component_id, ProfileAction action) throws org.apache.thrift.TException
{
getComponentPendingProfileActions_args args = new getComponentPendingProfileActions_args();
args.set_id(id);
@@ -628,7 +601,7 @@ public class Nimbus {
sendBase("getComponentPendingProfileActions", args);
}
- public List<ProfileRequest> recv_getComponentPendingProfileActions() throws org.apache.thrift.TException
+ public java.util.List<ProfileRequest> recv_getComponentPendingProfileActions() throws org.apache.thrift.TException
{
getComponentPendingProfileActions_result result = new getComponentPendingProfileActions_result();
receiveBase(result, "getComponentPendingProfileActions");
@@ -638,13 +611,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getComponentPendingProfileActions failed: unknown result");
}
- public void uploadNewCredentials(String name, Credentials creds) throws NotAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException
+ public void uploadNewCredentials(java.lang.String name, Credentials creds) throws NotAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException
{
send_uploadNewCredentials(name, creds);
recv_uploadNewCredentials();
}
- public void send_uploadNewCredentials(String name, Credentials creds) throws org.apache.thrift.TException
+ public void send_uploadNewCredentials(java.lang.String name, Credentials creds) throws org.apache.thrift.TException
{
uploadNewCredentials_args args = new uploadNewCredentials_args();
args.set_name(name);
@@ -668,13 +641,13 @@ public class Nimbus {
return;
}
- public String beginCreateBlob(String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException, org.apache.thrift.TException
+ public java.lang.String beginCreateBlob(java.lang.String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException, org.apache.thrift.TException
{
send_beginCreateBlob(key, meta);
return recv_beginCreateBlob();
}
- public void send_beginCreateBlob(String key, SettableBlobMeta meta) throws org.apache.thrift.TException
+ public void send_beginCreateBlob(java.lang.String key, SettableBlobMeta meta) throws org.apache.thrift.TException
{
beginCreateBlob_args args = new beginCreateBlob_args();
args.set_key(key);
@@ -682,7 +655,7 @@ public class Nimbus {
sendBase("beginCreateBlob", args);
}
- public String recv_beginCreateBlob() throws AuthorizationException, KeyAlreadyExistsException, org.apache.thrift.TException
+ public java.lang.String recv_beginCreateBlob() throws AuthorizationException, KeyAlreadyExistsException, org.apache.thrift.TException
{
beginCreateBlob_result result = new beginCreateBlob_result();
receiveBase(result, "beginCreateBlob");
@@ -698,20 +671,20 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginCreateBlob failed: unknown result");
}
- public String beginUpdateBlob(String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
+ public java.lang.String beginUpdateBlob(java.lang.String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
{
send_beginUpdateBlob(key);
return recv_beginUpdateBlob();
}
- public void send_beginUpdateBlob(String key) throws org.apache.thrift.TException
+ public void send_beginUpdateBlob(java.lang.String key) throws org.apache.thrift.TException
{
beginUpdateBlob_args args = new beginUpdateBlob_args();
args.set_key(key);
sendBase("beginUpdateBlob", args);
}
- public String recv_beginUpdateBlob() throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
+ public java.lang.String recv_beginUpdateBlob() throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
{
beginUpdateBlob_result result = new beginUpdateBlob_result();
receiveBase(result, "beginUpdateBlob");
@@ -727,13 +700,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginUpdateBlob failed: unknown result");
}
- public void uploadBlobChunk(String session, ByteBuffer chunk) throws AuthorizationException, org.apache.thrift.TException
+ public void uploadBlobChunk(java.lang.String session, java.nio.ByteBuffer chunk) throws AuthorizationException, org.apache.thrift.TException
{
send_uploadBlobChunk(session, chunk);
recv_uploadBlobChunk();
}
- public void send_uploadBlobChunk(String session, ByteBuffer chunk) throws org.apache.thrift.TException
+ public void send_uploadBlobChunk(java.lang.String session, java.nio.ByteBuffer chunk) throws org.apache.thrift.TException
{
uploadBlobChunk_args args = new uploadBlobChunk_args();
args.set_session(session);
@@ -751,13 +724,13 @@ public class Nimbus {
return;
}
- public void finishBlobUpload(String session) throws AuthorizationException, org.apache.thrift.TException
+ public void finishBlobUpload(java.lang.String session) throws AuthorizationException, org.apache.thrift.TException
{
send_finishBlobUpload(session);
recv_finishBlobUpload();
}
- public void send_finishBlobUpload(String session) throws org.apache.thrift.TException
+ public void send_finishBlobUpload(java.lang.String session) throws org.apache.thrift.TException
{
finishBlobUpload_args args = new finishBlobUpload_args();
args.set_session(session);
@@ -774,13 +747,13 @@ public class Nimbus {
return;
}
- public void cancelBlobUpload(String session) throws AuthorizationException, org.apache.thrift.TException
+ public void cancelBlobUpload(java.lang.String session) throws AuthorizationException, org.apache.thrift.TException
{
send_cancelBlobUpload(session);
recv_cancelBlobUpload();
}
- public void send_cancelBlobUpload(String session) throws org.apache.thrift.TException
+ public void send_cancelBlobUpload(java.lang.String session) throws org.apache.thrift.TException
{
cancelBlobUpload_args args = new cancelBlobUpload_args();
args.set_session(session);
@@ -797,13 +770,13 @@ public class Nimbus {
return;
}
- public ReadableBlobMeta getBlobMeta(String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
+ public ReadableBlobMeta getBlobMeta(java.lang.String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
{
send_getBlobMeta(key);
return recv_getBlobMeta();
}
- public void send_getBlobMeta(String key) throws org.apache.thrift.TException
+ public void send_getBlobMeta(java.lang.String key) throws org.apache.thrift.TException
{
getBlobMeta_args args = new getBlobMeta_args();
args.set_key(key);
@@ -826,13 +799,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBlobMeta failed: unknown result");
}
- public void setBlobMeta(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
+ public void setBlobMeta(java.lang.String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
{
send_setBlobMeta(key, meta);
recv_setBlobMeta();
}
- public void send_setBlobMeta(String key, SettableBlobMeta meta) throws org.apache.thrift.TException
+ public void send_setBlobMeta(java.lang.String key, SettableBlobMeta meta) throws org.apache.thrift.TException
{
setBlobMeta_args args = new setBlobMeta_args();
args.set_key(key);
@@ -853,13 +826,13 @@ public class Nimbus {
return;
}
- public BeginDownloadResult beginBlobDownload(String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
+ public BeginDownloadResult beginBlobDownload(java.lang.String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
{
send_beginBlobDownload(key);
return recv_beginBlobDownload();
}
- public void send_beginBlobDownload(String key) throws org.apache.thrift.TException
+ public void send_beginBlobDownload(java.lang.String key) throws org.apache.thrift.TException
{
beginBlobDownload_args args = new beginBlobDownload_args();
args.set_key(key);
@@ -882,20 +855,20 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginBlobDownload failed: unknown result");
}
- public ByteBuffer downloadBlobChunk(String session) throws AuthorizationException, org.apache.thrift.TException
+ public java.nio.ByteBuffer downloadBlobChunk(java.lang.String session) throws AuthorizationException, org.apache.thrift.TException
{
send_downloadBlobChunk(session);
return recv_downloadBlobChunk();
}
- public void send_downloadBlobChunk(String session) throws org.apache.thrift.TException
+ public void send_downloadBlobChunk(java.lang.String session) throws org.apache.thrift.TException
{
downloadBlobChunk_args args = new downloadBlobChunk_args();
args.set_session(session);
sendBase("downloadBlobChunk", args);
}
- public ByteBuffer recv_downloadBlobChunk() throws AuthorizationException, org.apache.thrift.TException
+ public java.nio.ByteBuffer recv_downloadBlobChunk() throws AuthorizationException, org.apache.thrift.TException
{
downloadBlobChunk_result result = new downloadBlobChunk_result();
receiveBase(result, "downloadBlobChunk");
@@ -908,13 +881,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "downloadBlobChunk failed: unknown result");
}
- public void deleteBlob(String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
+ public void deleteBlob(java.lang.String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
{
send_deleteBlob(key);
recv_deleteBlob();
}
- public void send_deleteBlob(String key) throws org.apache.thrift.TException
+ public void send_deleteBlob(java.lang.String key) throws org.apache.thrift.TException
{
deleteBlob_args args = new deleteBlob_args();
args.set_key(key);
@@ -934,13 +907,13 @@ public class Nimbus {
return;
}
- public ListBlobsResult listBlobs(String session) throws org.apache.thrift.TException
+ public ListBlobsResult listBlobs(java.lang.String session) throws org.apache.thrift.TException
{
send_listBlobs(session);
return recv_listBlobs();
}
- public void send_listBlobs(String session) throws org.apache.thrift.TException
+ public void send_listBlobs(java.lang.String session) throws org.apache.thrift.TException
{
listBlobs_args args = new listBlobs_args();
args.set_session(session);
@@ -957,13 +930,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listBlobs failed: unknown result");
}
- public int getBlobReplication(String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
+ public int getBlobReplication(java.lang.String key) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
{
send_getBlobReplication(key);
return recv_getBlobReplication();
}
- public void send_getBlobReplication(String key) throws org.apache.thrift.TException
+ public void send_getBlobReplication(java.lang.String key) throws org.apache.thrift.TException
{
getBlobReplication_args args = new getBlobReplication_args();
args.set_key(key);
@@ -986,13 +959,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBlobReplication failed: unknown result");
}
- public int updateBlobReplication(String key, int replication) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
+ public int updateBlobReplication(java.lang.String key, int replication) throws AuthorizationException, KeyNotFoundException, org.apache.thrift.TException
{
send_updateBlobReplication(key, replication);
return recv_updateBlobReplication();
}
- public void send_updateBlobReplication(String key, int replication) throws org.apache.thrift.TException
+ public void send_updateBlobReplication(java.lang.String key, int replication) throws org.apache.thrift.TException
{
updateBlobReplication_args args = new updateBlobReplication_args();
args.set_key(key);
@@ -1016,13 +989,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateBlobReplication failed: unknown result");
}
- public void createStateInZookeeper(String key) throws org.apache.thrift.TException
+ public void createStateInZookeeper(java.lang.String key) throws org.apache.thrift.TException
{
send_createStateInZookeeper(key);
recv_createStateInZookeeper();
}
- public void send_createStateInZookeeper(String key) throws org.apache.thrift.TException
+ public void send_createStateInZookeeper(java.lang.String key) throws org.apache.thrift.TException
{
createStateInZookeeper_args args = new createStateInZookeeper_args();
args.set_key(key);
@@ -1036,7 +1009,7 @@ public class Nimbus {
return;
}
- public String beginFileUpload() throws AuthorizationException, org.apache.thrift.TException
+ public java.lang.String beginFileUpload() throws AuthorizationException, org.apache.thrift.TException
{
send_beginFileUpload();
return recv_beginFileUpload();
@@ -1048,7 +1021,7 @@ public class Nimbus {
sendBase("beginFileUpload", args);
}
- public String recv_beginFileUpload() throws AuthorizationException, org.apache.thrift.TException
+ public java.lang.String recv_beginFileUpload() throws AuthorizationException, org.apache.thrift.TException
{
beginFileUpload_result result = new beginFileUpload_result();
receiveBase(result, "beginFileUpload");
@@ -1061,13 +1034,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginFileUpload failed: unknown result");
}
- public void uploadChunk(String location, ByteBuffer chunk) throws AuthorizationException, org.apache.thrift.TException
+ public void uploadChunk(java.lang.String location, java.nio.ByteBuffer chunk) throws AuthorizationException, org.apache.thrift.TException
{
send_uploadChunk(location, chunk);
recv_uploadChunk();
}
- public void send_uploadChunk(String location, ByteBuffer chunk) throws org.apache.thrift.TException
+ public void send_uploadChunk(java.lang.String location, java.nio.ByteBuffer chunk) throws org.apache.thrift.TException
{
uploadChunk_args args = new uploadChunk_args();
args.set_location(location);
@@ -1085,13 +1058,13 @@ public class Nimbus {
return;
}
- public void finishFileUpload(String location) throws AuthorizationException, org.apache.thrift.TException
+ public void finishFileUpload(java.lang.String location) throws AuthorizationException, org.apache.thrift.TException
{
send_finishFileUpload(location);
recv_finishFileUpload();
}
- public void send_finishFileUpload(String location) throws org.apache.thrift.TException
+ public void send_finishFileUpload(java.lang.String location) throws org.apache.thrift.TException
{
finishFileUpload_args args = new finishFileUpload_args();
args.set_location(location);
@@ -1108,20 +1081,20 @@ public class Nimbus {
return;
}
- public String beginFileDownload(String file) throws AuthorizationException, org.apache.thrift.TException
+ public java.lang.String beginFileDownload(java.lang.String file) throws AuthorizationException, org.apache.thrift.TException
{
send_beginFileDownload(file);
return recv_beginFileDownload();
}
- public void send_beginFileDownload(String file) throws org.apache.thrift.TException
+ public void send_beginFileDownload(java.lang.String file) throws org.apache.thrift.TException
{
beginFileDownload_args args = new beginFileDownload_args();
args.set_file(file);
sendBase("beginFileDownload", args);
}
- public String recv_beginFileDownload() throws AuthorizationException, org.apache.thrift.TException
+ public java.lang.String recv_beginFileDownload() throws AuthorizationException, org.apache.thrift.TException
{
beginFileDownload_result result = new beginFileDownload_result();
receiveBase(result, "beginFileDownload");
@@ -1134,20 +1107,20 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginFileDownload failed: unknown result");
}
- public ByteBuffer downloadChunk(String id) throws AuthorizationException, org.apache.thrift.TException
+ public java.nio.ByteBuffer downloadChunk(java.lang.String id) throws AuthorizationException, org.apache.thrift.TException
{
send_downloadChunk(id);
return recv_downloadChunk();
}
- public void send_downloadChunk(String id) throws org.apache.thrift.TException
+ public void send_downloadChunk(java.lang.String id) throws org.apache.thrift.TException
{
downloadChunk_args args = new downloadChunk_args();
args.set_id(id);
sendBase("downloadChunk", args);
}
- public ByteBuffer recv_downloadChunk() throws AuthorizationException, org.apache.thrift.TException
+ public java.nio.ByteBuffer recv_downloadChunk() throws AuthorizationException, org.apache.thrift.TException
{
downloadChunk_result result = new downloadChunk_result();
receiveBase(result, "downloadChunk");
@@ -1160,7 +1133,7 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "downloadChunk failed: unknown result");
}
- public String getNimbusConf() throws AuthorizationException, org.apache.thrift.TException
+ public java.lang.String getNimbusConf() throws AuthorizationException, org.apache.thrift.TException
{
send_getNimbusConf();
return recv_getNimbusConf();
@@ -1172,7 +1145,7 @@ public class Nimbus {
sendBase("getNimbusConf", args);
}
- public String recv_getNimbusConf() throws AuthorizationException, org.apache.thrift.TException
+ public java.lang.String recv_getNimbusConf() throws AuthorizationException, org.apache.thrift.TException
{
getNimbusConf_result result = new getNimbusConf_result();
receiveBase(result, "getNimbusConf");
@@ -1235,13 +1208,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLeader failed: unknown result");
}
- public boolean isTopologyNameAllowed(String name) throws AuthorizationException, org.apache.thrift.TException
+ public boolean isTopologyNameAllowed(java.lang.String name) throws AuthorizationException, org.apache.thrift.TException
{
send_isTopologyNameAllowed(name);
return recv_isTopologyNameAllowed();
}
- public void send_isTopologyNameAllowed(String name) throws org.apache.thrift.TException
+ public void send_isTopologyNameAllowed(java.lang.String name) throws org.apache.thrift.TException
{
isTopologyNameAllowed_args args = new isTopologyNameAllowed_args();
args.set_name(name);
@@ -1261,13 +1234,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isTopologyNameAllowed failed: unknown result");
}
- public TopologyInfo getTopologyInfo(String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public TopologyInfo getTopologyInfo(java.lang.String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_getTopologyInfo(id);
return recv_getTopologyInfo();
}
- public void send_getTopologyInfo(String id) throws org.apache.thrift.TException
+ public void send_getTopologyInfo(java.lang.String id) throws org.apache.thrift.TException
{
getTopologyInfo_args args = new getTopologyInfo_args();
args.set_id(id);
@@ -1290,13 +1263,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTopologyInfo failed: unknown result");
}
- public TopologyInfo getTopologyInfoWithOpts(String id, GetInfoOptions options) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public TopologyInfo getTopologyInfoWithOpts(java.lang.String id, GetInfoOptions options) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_getTopologyInfoWithOpts(id, options);
return recv_getTopologyInfoWithOpts();
}
- public void send_getTopologyInfoWithOpts(String id, GetInfoOptions options) throws org.apache.thrift.TException
+ public void send_getTopologyInfoWithOpts(java.lang.String id, GetInfoOptions options) throws org.apache.thrift.TException
{
getTopologyInfoWithOpts_args args = new getTopologyInfoWithOpts_args();
args.set_id(id);
@@ -1320,13 +1293,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTopologyInfoWithOpts failed: unknown result");
}
- public TopologyPageInfo getTopologyPageInfo(String id, String window, boolean is_include_sys) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public TopologyPageInfo getTopologyPageInfo(java.lang.String id, java.lang.String window, boolean is_include_sys) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_getTopologyPageInfo(id, window, is_include_sys);
return recv_getTopologyPageInfo();
}
- public void send_getTopologyPageInfo(String id, String window, boolean is_include_sys) throws org.apache.thrift.TException
+ public void send_getTopologyPageInfo(java.lang.String id, java.lang.String window, boolean is_include_sys) throws org.apache.thrift.TException
{
getTopologyPageInfo_args args = new getTopologyPageInfo_args();
args.set_id(id);
@@ -1351,13 +1324,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTopologyPageInfo failed: unknown result");
}
- public SupervisorPageInfo getSupervisorPageInfo(String id, String host, boolean is_include_sys) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public SupervisorPageInfo getSupervisorPageInfo(java.lang.String id, java.lang.String host, boolean is_include_sys) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_getSupervisorPageInfo(id, host, is_include_sys);
return recv_getSupervisorPageInfo();
}
- public void send_getSupervisorPageInfo(String id, String host, boolean is_include_sys) throws org.apache.thrift.TException
+ public void send_getSupervisorPageInfo(java.lang.String id, java.lang.String host, boolean is_include_sys) throws org.apache.thrift.TException
{
getSupervisorPageInfo_args args = new getSupervisorPageInfo_args();
args.set_id(id);
@@ -1382,13 +1355,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupervisorPageInfo failed: unknown result");
}
- public ComponentPageInfo getComponentPageInfo(String topology_id, String component_id, String window, boolean is_include_sys) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public ComponentPageInfo getComponentPageInfo(java.lang.String topology_id, java.lang.String component_id, java.lang.String window, boolean is_include_sys) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_getComponentPageInfo(topology_id, component_id, window, is_include_sys);
return recv_getComponentPageInfo();
}
- public void send_getComponentPageInfo(String topology_id, String component_id, String window, boolean is_include_sys) throws org.apache.thrift.TException
+ public void send_getComponentPageInfo(java.lang.String topology_id, java.lang.String component_id, java.lang.String window, boolean is_include_sys) throws org.apache.thrift.TException
{
getComponentPageInfo_args args = new getComponentPageInfo_args();
args.set_topology_id(topology_id);
@@ -1414,20 +1387,20 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getComponentPageInfo failed: unknown result");
}
- public String getTopologyConf(String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public java.lang.String getTopologyConf(java.lang.String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_getTopologyConf(id);
return recv_getTopologyConf();
}
- public void send_getTopologyConf(String id) throws org.apache.thrift.TException
+ public void send_getTopologyConf(java.lang.String id) throws org.apache.thrift.TException
{
getTopologyConf_args args = new getTopologyConf_args();
args.set_id(id);
sendBase("getTopologyConf", args);
}
- public String recv_getTopologyConf() throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public java.lang.String recv_getTopologyConf() throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
getTopologyConf_result result = new getTopologyConf_result();
receiveBase(result, "getTopologyConf");
@@ -1443,13 +1416,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTopologyConf failed: unknown result");
}
- public StormTopology getTopology(String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public StormTopology getTopology(java.lang.String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_getTopology(id);
return recv_getTopology();
}
- public void send_getTopology(String id) throws org.apache.thrift.TException
+ public void send_getTopology(java.lang.String id) throws org.apache.thrift.TException
{
getTopology_args args = new getTopology_args();
args.set_id(id);
@@ -1472,13 +1445,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTopology failed: unknown result");
}
- public StormTopology getUserTopology(String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public StormTopology getUserTopology(java.lang.String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_getUserTopology(id);
return recv_getUserTopology();
}
- public void send_getUserTopology(String id) throws org.apache.thrift.TException
+ public void send_getUserTopology(java.lang.String id) throws org.apache.thrift.TException
{
getUserTopology_args args = new getUserTopology_args();
args.set_id(id);
@@ -1501,13 +1474,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserTopology failed: unknown result");
}
- public TopologyHistoryInfo getTopologyHistory(String user) throws AuthorizationException, org.apache.thrift.TException
+ public TopologyHistoryInfo getTopologyHistory(java.lang.String user) throws AuthorizationException, org.apache.thrift.TException
{
send_getTopologyHistory(user);
return recv_getTopologyHistory();
}
- public void send_getTopologyHistory(String user) throws org.apache.thrift.TException
+ public void send_getTopologyHistory(java.lang.String user) throws org.apache.thrift.TException
{
getTopologyHistory_args args = new getTopologyHistory_args();
args.set_user(user);
@@ -1527,20 +1500,20 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTopologyHistory failed: unknown result");
}
- public List<OwnerResourceSummary> getOwnerResourceSummaries(String owner) throws AuthorizationException, org.apache.thrift.TException
+ public java.util.List<OwnerResourceSummary> getOwnerResourceSummaries(java.lang.String owner) throws AuthorizationException, org.apache.thrift.TException
{
send_getOwnerResourceSummaries(owner);
return recv_getOwnerResourceSummaries();
}
- public void send_getOwnerResourceSummaries(String owner) throws org.apache.thrift.TException
+ public void send_getOwnerResourceSummaries(java.lang.String owner) throws org.apache.thrift.TException
{
getOwnerResourceSummaries_args args = new getOwnerResourceSummaries_args();
args.set_owner(owner);
sendBase("getOwnerResourceSummaries", args);
}
- public List<OwnerResourceSummary> recv_getOwnerResourceSummaries() throws AuthorizationException, org.apache.thrift.TException
+ public java.util.List<OwnerResourceSummary> recv_getOwnerResourceSummaries() throws AuthorizationException, org.apache.thrift.TException
{
getOwnerResourceSummaries_result result = new getOwnerResourceSummaries_result();
receiveBase(result, "getOwnerResourceSummaries");
@@ -1553,13 +1526,13 @@ public class Nimbus {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOwnerResourceSummaries failed: unknown result");
}
- public SupervisorAssignments getSupervisorAssignments(String node) throws AuthorizationException, org.apache.thrift.TException
+ public SupervisorAssignments getSupervisorAssignments(java.lang.String node) throws AuthorizationException, org.apache.thrift.TException
{
send_getSupervisorAssignments(node);
return recv_getSupervisorAssignments();
}
- public void send_getSupervisorAssignments(String node) throws org.apache.thrift.TException
+ public void send_getSupervisorAssignments(java.lang.String node) throws org.apache.thrift.TException
{
getSupervisorAssignments_args args = new getSupervisorAssignments_args();
args.set_node(node);
@@ -1602,7 +1575,7 @@ public class Nimbus {
return;
}
- public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat) throws AuthorizationException, org.apache.thrift.TException
+ public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat) throws AuthorizationException, NotAliveException, org.apache.thrift.TException
{
send_sendSupervisorWorkerHeartbeat(heatbeat);
recv_sendSupervisorWorkerHeartbeat();
@@ -1615,13 +1588,16 @@ public class Nimbus {
sendBase("sendSupervisorWorkerHeartbeat", args);
}
- public void recv_sendSupervisorWorkerHeartbeat() throws AuthorizationException, org.apache.thrift.TException
+ public void recv_sendSupervisorWorkerHeartbeat() throws AuthorizationException, NotAliveException, org.apache.thrift.TException
{
sendSupervisorWorkerHeartbeat_result result = new sendSupervisorWorkerHeartbeat_result();
receiveBase(result, "sendSupervisorWorkerHeartbeat");
if (result.aze != null) {
throw result.aze;
}
+ if (result.e != null) {
+ throw result.e;
+ }
return;
}
@@ -1663,19 +1639,19 @@ public class Nimbus {
super(protocolFactory, clientManager, transport);
}
- public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void submitTopology(java.lang.String name, java.lang.String uploadedJarLocation, java.lang.String jsonConf, StormTopology topology, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
submitTopology_call method_call = new submitTopology_call(name, uploadedJarLocation, jsonConf, topology, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class submitTopology_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String name;
- private String uploadedJarLocation;
- private String jsonConf;
+ public static class submitTopology_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String name;
+ private java.lang.String uploadedJarLocation;
+ private java.lang.String jsonConf;
private StormTopology topology;
- public submitTopology_call(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public submitTopology_call(java.lang.String name, java.lang.String uploadedJarLocation, java.lang.String jsonConf, StormTopology topology, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.name = name;
this.uploadedJarLocation = uploadedJarLocation;
@@ -1694,30 +1670,30 @@ public class Nimbus {
prot.writeMessageEnd();
}
- public void getResult() throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException {
+ public Void getResult() throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_submitTopology();
+ return null;
}
}
- public void submitTopologyWithOpts(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, SubmitOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void submitTopologyWithOpts(java.lang.String name, java.lang.String uploadedJarLocation, java.lang.String jsonConf, StormTopology topology, SubmitOptions options, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
submitTopologyWithOpts_call method_call = new submitTopologyWithOpts_call(name, uploadedJarLocation, jsonConf, topology, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class submitTopologyWithOpts_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String name;
- private String uploadedJarLocation;
- private String jsonConf;
+ public static class submitTopologyWithOpts_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String name;
+ private java.lang.String uploadedJarLocation;
+ private java.lang.String jsonConf;
private StormTopology topology;
private SubmitOptions options;
- public submitTopologyWithOpts_call(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, SubmitOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public submitTopologyWithOpts_call(java.lang.String name, java.lang.String uploadedJarLocation, java.lang.String jsonConf, StormTopology topology, SubmitOptions options, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.name = name;
this.uploadedJarLocation = uploadedJarLocation;
@@ -1738,26 +1714,26 @@ public class Nimbus {
prot.writeMessageEnd();
}
- public void getResult() throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException {
+ public Void getResult() throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_submitTopologyWithOpts();
+ return null;
}
}
- public void killTopology(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void killTopology(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
killTopology_call method_call = new killTopology_call(name, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class killTopology_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String name;
- public killTopology_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class killTopology_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String name;
+ public killTopology_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.name = name;
}
@@ -1770,27 +1746,27 @@ public class Nimbus {
prot.writeMessageEnd();
}
- public void getResult() throws NotAliveException, AuthorizationException, org.apache.thrift.TException {
+ public Void getResult() throws NotAliveException, AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_killTopology();
+ return null;
}
}
- public void killTopologyWithOpts(String name, KillOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void killTopologyWithOpts(java.lang.String name, KillOptions options, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
killTopologyWithOpts_call method_call = new killTopologyWithOpts_call(name, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class killTopologyWithOpts_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String name;
+ public static class killTopologyWithOpts_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String name;
private KillOptions options;
- public killTopologyWithOpts_call(String name, KillOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public killTopologyWithOpts_call(java.lang.String name, KillOptions options, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.name = name;
this.options = options;
@@ -1805,26 +1781,26 @@ public class Nimbus {
prot.writeMessageEnd();
}
- public void getResult() throws NotAliveException, AuthorizationException, org.apache.thrift.TException {
+ public Void getResult() throws NotAliveException, AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_killTopologyWithOpts();
+ return null;
}
}
- public void activate(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void activate(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
activate_call method_call = new activate_call(name, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class activate_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String name;
- public activate_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class activate_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+
<TRUNCATED>
[10/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/TopologyPageInfo.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/TopologyPageInfo.java b/storm-client/src/jvm/org/apache/storm/generated/TopologyPageInfo.java
index 77728cd..f4a5a67 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/TopologyPageInfo.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/TopologyPageInfo.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInfo, TopologyPageInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TopologyPageInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TopologyPageInfo");
@@ -88,30 +61,27 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
private static final org.apache.thrift.protocol.TField ASSIGNED_REGULAR_OFF_HEAP_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("assigned_regular_off_heap_memory", org.apache.thrift.protocol.TType.DOUBLE, (short)533);
private static final org.apache.thrift.protocol.TField ASSIGNED_SHARED_OFF_HEAP_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("assigned_shared_off_heap_memory", org.apache.thrift.protocol.TType.DOUBLE, (short)534);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TopologyPageInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TopologyPageInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TopologyPageInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TopologyPageInfoTupleSchemeFactory();
- private String id; // required
- private String name; // optional
+ private java.lang.String id; // required
+ private java.lang.String name; // optional
private int uptime_secs; // optional
- private String status; // optional
+ private java.lang.String status; // optional
private int num_tasks; // optional
private int num_workers; // optional
private int num_executors; // optional
- private String topology_conf; // optional
- private Map<String,ComponentAggregateStats> id_to_spout_agg_stats; // optional
- private Map<String,ComponentAggregateStats> id_to_bolt_agg_stats; // optional
- private String sched_status; // optional
+ private java.lang.String topology_conf; // optional
+ private java.util.Map<java.lang.String,ComponentAggregateStats> id_to_spout_agg_stats; // optional
+ private java.util.Map<java.lang.String,ComponentAggregateStats> id_to_bolt_agg_stats; // optional
+ private java.lang.String sched_status; // optional
private TopologyStats topology_stats; // optional
- private String owner; // optional
+ private java.lang.String owner; // optional
private DebugOptions debug_options; // optional
private int replication_count; // optional
- private List<WorkerSummary> workers; // optional
- private String storm_version; // optional
- private String topology_version; // optional
+ private java.util.List<WorkerSummary> workers; // optional
+ private java.lang.String storm_version; // optional
+ private java.lang.String topology_version; // optional
private double requested_memonheap; // optional
private double requested_memoffheap; // optional
private double requested_cpu; // optional
@@ -162,10 +132,10 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
ASSIGNED_REGULAR_OFF_HEAP_MEMORY((short)533, "assigned_regular_off_heap_memory"),
ASSIGNED_SHARED_OFF_HEAP_MEMORY((short)534, "assigned_shared_off_heap_memory");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -250,21 +220,21 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -273,7 +243,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -300,9 +270,9 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
private static final int __ASSIGNED_SHARED_OFF_HEAP_MEMORY_ISSET_ID = 18;
private int __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.NAME,_Fields.UPTIME_SECS,_Fields.STATUS,_Fields.NUM_TASKS,_Fields.NUM_WORKERS,_Fields.NUM_EXECUTORS,_Fields.TOPOLOGY_CONF,_Fields.ID_TO_SPOUT_AGG_STATS,_Fields.ID_TO_BOLT_AGG_STATS,_Fields.SCHED_STATUS,_Fields.TOPOLOGY_STATS,_Fields.OWNER,_Fields.DEBUG_OPTIONS,_Fields.REPLICATION_COUNT,_Fields.WORKERS,_Fields.STORM_VERSION,_Fields.TOPOLOGY_VERSION,_Fields.REQUESTED_MEMONHEAP,_Fields.REQUESTED_MEMOFFHEAP,_Fields.REQUESTED_CPU,_Fields.ASSIGNED_MEMONHEAP,_Fields.ASSIGNED_MEMOFFHEAP,_Fields.ASSIGNED_CPU,_Fields.REQUESTED_REGULAR_ON_HEAP_MEMORY,_Fields.REQUESTED_SHARED_ON_HEAP_MEMORY,_Fields.REQUESTED_REGULAR_OFF_HEAP_MEMORY,_Fields.REQUESTED_SHARED_OFF_HEAP_MEMORY,_Fields.ASSIGNED_REGULAR_ON_HEAP_MEMORY,_Fields.ASSIGNED_SHARED_ON_HEAP_MEMORY,_Fields.ASSIGNED_REGULAR_OFF_HEAP_MEMORY,_Fields.ASSIGNED_SHARED_OFF_HEAP_MEMORY};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -372,7 +342,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.ASSIGNED_SHARED_OFF_HEAP_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("assigned_shared_off_heap_memory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TopologyPageInfo.class, metaDataMap);
}
@@ -380,7 +350,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public TopologyPageInfo(
- String id)
+ java.lang.String id)
{
this();
this.id = id;
@@ -408,13 +378,13 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
this.topology_conf = other.topology_conf;
}
if (other.is_set_id_to_spout_agg_stats()) {
- Map<String,ComponentAggregateStats> __this__id_to_spout_agg_stats = new HashMap<String,ComponentAggregateStats>(other.id_to_spout_agg_stats.size());
- for (Map.Entry<String, ComponentAggregateStats> other_element : other.id_to_spout_agg_stats.entrySet()) {
+ java.util.Map<java.lang.String,ComponentAggregateStats> __this__id_to_spout_agg_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>(other.id_to_spout_agg_stats.size());
+ for (java.util.Map.Entry<java.lang.String, ComponentAggregateStats> other_element : other.id_to_spout_agg_stats.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
ComponentAggregateStats other_element_value = other_element.getValue();
- String __this__id_to_spout_agg_stats_copy_key = other_element_key;
+ java.lang.String __this__id_to_spout_agg_stats_copy_key = other_element_key;
ComponentAggregateStats __this__id_to_spout_agg_stats_copy_value = new ComponentAggregateStats(other_element_value);
@@ -423,13 +393,13 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
this.id_to_spout_agg_stats = __this__id_to_spout_agg_stats;
}
if (other.is_set_id_to_bolt_agg_stats()) {
- Map<String,ComponentAggregateStats> __this__id_to_bolt_agg_stats = new HashMap<String,ComponentAggregateStats>(other.id_to_bolt_agg_stats.size());
- for (Map.Entry<String, ComponentAggregateStats> other_element : other.id_to_bolt_agg_stats.entrySet()) {
+ java.util.Map<java.lang.String,ComponentAggregateStats> __this__id_to_bolt_agg_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>(other.id_to_bolt_agg_stats.size());
+ for (java.util.Map.Entry<java.lang.String, ComponentAggregateStats> other_element : other.id_to_bolt_agg_stats.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
ComponentAggregateStats other_element_value = other_element.getValue();
- String __this__id_to_bolt_agg_stats_copy_key = other_element_key;
+ java.lang.String __this__id_to_bolt_agg_stats_copy_key = other_element_key;
ComponentAggregateStats __this__id_to_bolt_agg_stats_copy_value = new ComponentAggregateStats(other_element_value);
@@ -451,7 +421,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
this.replication_count = other.replication_count;
if (other.is_set_workers()) {
- List<WorkerSummary> __this__workers = new ArrayList<WorkerSummary>(other.workers.size());
+ java.util.List<WorkerSummary> __this__workers = new java.util.ArrayList<WorkerSummary>(other.workers.size());
for (WorkerSummary other_element : other.workers) {
__this__workers.add(new WorkerSummary(other_element));
}
@@ -538,11 +508,11 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
this.assigned_shared_off_heap_memory = 0.0;
}
- public String get_id() {
+ public java.lang.String get_id() {
return this.id;
}
- public void set_id(String id) {
+ public void set_id(java.lang.String id) {
this.id = id;
}
@@ -561,11 +531,11 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
}
- public String get_name() {
+ public java.lang.String get_name() {
return this.name;
}
- public void set_name(String name) {
+ public void set_name(java.lang.String name) {
this.name = name;
}
@@ -594,23 +564,23 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_uptime_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
/** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_uptime_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
public void set_uptime_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
}
- public String get_status() {
+ public java.lang.String get_status() {
return this.status;
}
- public void set_status(String status) {
+ public void set_status(java.lang.String status) {
this.status = status;
}
@@ -639,16 +609,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_num_tasks() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
}
/** Returns true if field num_tasks is set (has been assigned a value) and false otherwise */
public boolean is_set_num_tasks() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
}
public void set_num_tasks_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_TASKS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_TASKS_ISSET_ID, value);
}
public int get_num_workers() {
@@ -661,16 +631,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_num_workers() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
}
/** Returns true if field num_workers is set (has been assigned a value) and false otherwise */
public boolean is_set_num_workers() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
}
public void set_num_workers_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID, value);
}
public int get_num_executors() {
@@ -683,23 +653,23 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_num_executors() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
}
/** Returns true if field num_executors is set (has been assigned a value) and false otherwise */
public boolean is_set_num_executors() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
}
public void set_num_executors_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID, value);
}
- public String get_topology_conf() {
+ public java.lang.String get_topology_conf() {
return this.topology_conf;
}
- public void set_topology_conf(String topology_conf) {
+ public void set_topology_conf(java.lang.String topology_conf) {
this.topology_conf = topology_conf;
}
@@ -722,18 +692,18 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return (this.id_to_spout_agg_stats == null) ? 0 : this.id_to_spout_agg_stats.size();
}
- public void put_to_id_to_spout_agg_stats(String key, ComponentAggregateStats val) {
+ public void put_to_id_to_spout_agg_stats(java.lang.String key, ComponentAggregateStats val) {
if (this.id_to_spout_agg_stats == null) {
- this.id_to_spout_agg_stats = new HashMap<String,ComponentAggregateStats>();
+ this.id_to_spout_agg_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>();
}
this.id_to_spout_agg_stats.put(key, val);
}
- public Map<String,ComponentAggregateStats> get_id_to_spout_agg_stats() {
+ public java.util.Map<java.lang.String,ComponentAggregateStats> get_id_to_spout_agg_stats() {
return this.id_to_spout_agg_stats;
}
- public void set_id_to_spout_agg_stats(Map<String,ComponentAggregateStats> id_to_spout_agg_stats) {
+ public void set_id_to_spout_agg_stats(java.util.Map<java.lang.String,ComponentAggregateStats> id_to_spout_agg_stats) {
this.id_to_spout_agg_stats = id_to_spout_agg_stats;
}
@@ -756,18 +726,18 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return (this.id_to_bolt_agg_stats == null) ? 0 : this.id_to_bolt_agg_stats.size();
}
- public void put_to_id_to_bolt_agg_stats(String key, ComponentAggregateStats val) {
+ public void put_to_id_to_bolt_agg_stats(java.lang.String key, ComponentAggregateStats val) {
if (this.id_to_bolt_agg_stats == null) {
- this.id_to_bolt_agg_stats = new HashMap<String,ComponentAggregateStats>();
+ this.id_to_bolt_agg_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>();
}
this.id_to_bolt_agg_stats.put(key, val);
}
- public Map<String,ComponentAggregateStats> get_id_to_bolt_agg_stats() {
+ public java.util.Map<java.lang.String,ComponentAggregateStats> get_id_to_bolt_agg_stats() {
return this.id_to_bolt_agg_stats;
}
- public void set_id_to_bolt_agg_stats(Map<String,ComponentAggregateStats> id_to_bolt_agg_stats) {
+ public void set_id_to_bolt_agg_stats(java.util.Map<java.lang.String,ComponentAggregateStats> id_to_bolt_agg_stats) {
this.id_to_bolt_agg_stats = id_to_bolt_agg_stats;
}
@@ -786,11 +756,11 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
}
- public String get_sched_status() {
+ public java.lang.String get_sched_status() {
return this.sched_status;
}
- public void set_sched_status(String sched_status) {
+ public void set_sched_status(java.lang.String sched_status) {
this.sched_status = sched_status;
}
@@ -832,11 +802,11 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
}
- public String get_owner() {
+ public java.lang.String get_owner() {
return this.owner;
}
- public void set_owner(String owner) {
+ public void set_owner(java.lang.String owner) {
this.owner = owner;
}
@@ -888,16 +858,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_replication_count() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID);
}
/** Returns true if field replication_count is set (has been assigned a value) and false otherwise */
public boolean is_set_replication_count() {
- return EncodingUtils.testBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID);
}
public void set_replication_count_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID, value);
}
public int get_workers_size() {
@@ -910,16 +880,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
public void add_to_workers(WorkerSummary elem) {
if (this.workers == null) {
- this.workers = new ArrayList<WorkerSummary>();
+ this.workers = new java.util.ArrayList<WorkerSummary>();
}
this.workers.add(elem);
}
- public List<WorkerSummary> get_workers() {
+ public java.util.List<WorkerSummary> get_workers() {
return this.workers;
}
- public void set_workers(List<WorkerSummary> workers) {
+ public void set_workers(java.util.List<WorkerSummary> workers) {
this.workers = workers;
}
@@ -938,11 +908,11 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
}
- public String get_storm_version() {
+ public java.lang.String get_storm_version() {
return this.storm_version;
}
- public void set_storm_version(String storm_version) {
+ public void set_storm_version(java.lang.String storm_version) {
this.storm_version = storm_version;
}
@@ -961,11 +931,11 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
}
- public String get_topology_version() {
+ public java.lang.String get_topology_version() {
return this.topology_version;
}
- public void set_topology_version(String topology_version) {
+ public void set_topology_version(java.lang.String topology_version) {
this.topology_version = topology_version;
}
@@ -994,16 +964,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_requested_memonheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
}
/** Returns true if field requested_memonheap is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_memonheap() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
}
public void set_requested_memonheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID, value);
}
public double get_requested_memoffheap() {
@@ -1016,16 +986,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_requested_memoffheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
}
/** Returns true if field requested_memoffheap is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_memoffheap() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
}
public void set_requested_memoffheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID, value);
}
public double get_requested_cpu() {
@@ -1038,16 +1008,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_requested_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
}
/** Returns true if field requested_cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
}
public void set_requested_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID, value);
}
public double get_assigned_memonheap() {
@@ -1060,16 +1030,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_assigned_memonheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
}
/** Returns true if field assigned_memonheap is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_memonheap() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
}
public void set_assigned_memonheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID, value);
}
public double get_assigned_memoffheap() {
@@ -1082,16 +1052,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_assigned_memoffheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
}
/** Returns true if field assigned_memoffheap is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_memoffheap() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
}
public void set_assigned_memoffheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID, value);
}
public double get_assigned_cpu() {
@@ -1104,16 +1074,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_assigned_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
}
/** Returns true if field assigned_cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
}
public void set_assigned_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID, value);
}
public double get_requested_regular_on_heap_memory() {
@@ -1126,16 +1096,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_requested_regular_on_heap_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_REGULAR_ON_HEAP_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_REGULAR_ON_HEAP_MEMORY_ISSET_ID);
}
/** Returns true if field requested_regular_on_heap_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_regular_on_heap_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_REGULAR_ON_HEAP_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_REGULAR_ON_HEAP_MEMORY_ISSET_ID);
}
public void set_requested_regular_on_heap_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_REGULAR_ON_HEAP_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_REGULAR_ON_HEAP_MEMORY_ISSET_ID, value);
}
public double get_requested_shared_on_heap_memory() {
@@ -1148,16 +1118,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_requested_shared_on_heap_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_SHARED_ON_HEAP_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_SHARED_ON_HEAP_MEMORY_ISSET_ID);
}
/** Returns true if field requested_shared_on_heap_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_shared_on_heap_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_SHARED_ON_HEAP_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_SHARED_ON_HEAP_MEMORY_ISSET_ID);
}
public void set_requested_shared_on_heap_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_SHARED_ON_HEAP_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_SHARED_ON_HEAP_MEMORY_ISSET_ID, value);
}
public double get_requested_regular_off_heap_memory() {
@@ -1170,16 +1140,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_requested_regular_off_heap_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_REGULAR_OFF_HEAP_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_REGULAR_OFF_HEAP_MEMORY_ISSET_ID);
}
/** Returns true if field requested_regular_off_heap_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_regular_off_heap_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_REGULAR_OFF_HEAP_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_REGULAR_OFF_HEAP_MEMORY_ISSET_ID);
}
public void set_requested_regular_off_heap_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_REGULAR_OFF_HEAP_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_REGULAR_OFF_HEAP_MEMORY_ISSET_ID, value);
}
public double get_requested_shared_off_heap_memory() {
@@ -1192,16 +1162,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_requested_shared_off_heap_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_SHARED_OFF_HEAP_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_SHARED_OFF_HEAP_MEMORY_ISSET_ID);
}
/** Returns true if field requested_shared_off_heap_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_shared_off_heap_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_SHARED_OFF_HEAP_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_SHARED_OFF_HEAP_MEMORY_ISSET_ID);
}
public void set_requested_shared_off_heap_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_SHARED_OFF_HEAP_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_SHARED_OFF_HEAP_MEMORY_ISSET_ID, value);
}
public double get_assigned_regular_on_heap_memory() {
@@ -1214,16 +1184,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_assigned_regular_on_heap_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_REGULAR_ON_HEAP_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_REGULAR_ON_HEAP_MEMORY_ISSET_ID);
}
/** Returns true if field assigned_regular_on_heap_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_regular_on_heap_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_REGULAR_ON_HEAP_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_REGULAR_ON_HEAP_MEMORY_ISSET_ID);
}
public void set_assigned_regular_on_heap_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_REGULAR_ON_HEAP_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_REGULAR_ON_HEAP_MEMORY_ISSET_ID, value);
}
public double get_assigned_shared_on_heap_memory() {
@@ -1236,16 +1206,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_assigned_shared_on_heap_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_SHARED_ON_HEAP_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_SHARED_ON_HEAP_MEMORY_ISSET_ID);
}
/** Returns true if field assigned_shared_on_heap_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_shared_on_heap_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_SHARED_ON_HEAP_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_SHARED_ON_HEAP_MEMORY_ISSET_ID);
}
public void set_assigned_shared_on_heap_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_SHARED_ON_HEAP_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_SHARED_ON_HEAP_MEMORY_ISSET_ID, value);
}
public double get_assigned_regular_off_heap_memory() {
@@ -1258,16 +1228,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_assigned_regular_off_heap_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_REGULAR_OFF_HEAP_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_REGULAR_OFF_HEAP_MEMORY_ISSET_ID);
}
/** Returns true if field assigned_regular_off_heap_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_regular_off_heap_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_REGULAR_OFF_HEAP_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_REGULAR_OFF_HEAP_MEMORY_ISSET_ID);
}
public void set_assigned_regular_off_heap_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_REGULAR_OFF_HEAP_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_REGULAR_OFF_HEAP_MEMORY_ISSET_ID, value);
}
public double get_assigned_shared_off_heap_memory() {
@@ -1280,25 +1250,25 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void unset_assigned_shared_off_heap_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_SHARED_OFF_HEAP_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_SHARED_OFF_HEAP_MEMORY_ISSET_ID);
}
/** Returns true if field assigned_shared_off_heap_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_shared_off_heap_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_SHARED_OFF_HEAP_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_SHARED_OFF_HEAP_MEMORY_ISSET_ID);
}
public void set_assigned_shared_off_heap_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_SHARED_OFF_HEAP_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_SHARED_OFF_HEAP_MEMORY_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ID:
if (value == null) {
unset_id();
} else {
- set_id((String)value);
+ set_id((java.lang.String)value);
}
break;
@@ -1306,7 +1276,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_name();
} else {
- set_name((String)value);
+ set_name((java.lang.String)value);
}
break;
@@ -1314,7 +1284,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_uptime_secs();
} else {
- set_uptime_secs((Integer)value);
+ set_uptime_secs((java.lang.Integer)value);
}
break;
@@ -1322,7 +1292,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_status();
} else {
- set_status((String)value);
+ set_status((java.lang.String)value);
}
break;
@@ -1330,7 +1300,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_num_tasks();
} else {
- set_num_tasks((Integer)value);
+ set_num_tasks((java.lang.Integer)value);
}
break;
@@ -1338,7 +1308,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_num_workers();
} else {
- set_num_workers((Integer)value);
+ set_num_workers((java.lang.Integer)value);
}
break;
@@ -1346,7 +1316,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_num_executors();
} else {
- set_num_executors((Integer)value);
+ set_num_executors((java.lang.Integer)value);
}
break;
@@ -1354,7 +1324,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_topology_conf();
} else {
- set_topology_conf((String)value);
+ set_topology_conf((java.lang.String)value);
}
break;
@@ -1362,7 +1332,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_id_to_spout_agg_stats();
} else {
- set_id_to_spout_agg_stats((Map<String,ComponentAggregateStats>)value);
+ set_id_to_spout_agg_stats((java.util.Map<java.lang.String,ComponentAggregateStats>)value);
}
break;
@@ -1370,7 +1340,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_id_to_bolt_agg_stats();
} else {
- set_id_to_bolt_agg_stats((Map<String,ComponentAggregateStats>)value);
+ set_id_to_bolt_agg_stats((java.util.Map<java.lang.String,ComponentAggregateStats>)value);
}
break;
@@ -1378,7 +1348,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_sched_status();
} else {
- set_sched_status((String)value);
+ set_sched_status((java.lang.String)value);
}
break;
@@ -1394,7 +1364,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_owner();
} else {
- set_owner((String)value);
+ set_owner((java.lang.String)value);
}
break;
@@ -1410,7 +1380,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_replication_count();
} else {
- set_replication_count((Integer)value);
+ set_replication_count((java.lang.Integer)value);
}
break;
@@ -1418,7 +1388,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_workers();
} else {
- set_workers((List<WorkerSummary>)value);
+ set_workers((java.util.List<WorkerSummary>)value);
}
break;
@@ -1426,7 +1396,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_storm_version();
} else {
- set_storm_version((String)value);
+ set_storm_version((java.lang.String)value);
}
break;
@@ -1434,7 +1404,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_topology_version();
} else {
- set_topology_version((String)value);
+ set_topology_version((java.lang.String)value);
}
break;
@@ -1442,7 +1412,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_requested_memonheap();
} else {
- set_requested_memonheap((Double)value);
+ set_requested_memonheap((java.lang.Double)value);
}
break;
@@ -1450,7 +1420,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_requested_memoffheap();
} else {
- set_requested_memoffheap((Double)value);
+ set_requested_memoffheap((java.lang.Double)value);
}
break;
@@ -1458,7 +1428,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_requested_cpu();
} else {
- set_requested_cpu((Double)value);
+ set_requested_cpu((java.lang.Double)value);
}
break;
@@ -1466,7 +1436,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_assigned_memonheap();
} else {
- set_assigned_memonheap((Double)value);
+ set_assigned_memonheap((java.lang.Double)value);
}
break;
@@ -1474,7 +1444,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_assigned_memoffheap();
} else {
- set_assigned_memoffheap((Double)value);
+ set_assigned_memoffheap((java.lang.Double)value);
}
break;
@@ -1482,7 +1452,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_assigned_cpu();
} else {
- set_assigned_cpu((Double)value);
+ set_assigned_cpu((java.lang.Double)value);
}
break;
@@ -1490,7 +1460,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_requested_regular_on_heap_memory();
} else {
- set_requested_regular_on_heap_memory((Double)value);
+ set_requested_regular_on_heap_memory((java.lang.Double)value);
}
break;
@@ -1498,7 +1468,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_requested_shared_on_heap_memory();
} else {
- set_requested_shared_on_heap_memory((Double)value);
+ set_requested_shared_on_heap_memory((java.lang.Double)value);
}
break;
@@ -1506,7 +1476,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_requested_regular_off_heap_memory();
} else {
- set_requested_regular_off_heap_memory((Double)value);
+ set_requested_regular_off_heap_memory((java.lang.Double)value);
}
break;
@@ -1514,7 +1484,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_requested_shared_off_heap_memory();
} else {
- set_requested_shared_off_heap_memory((Double)value);
+ set_requested_shared_off_heap_memory((java.lang.Double)value);
}
break;
@@ -1522,7 +1492,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_assigned_regular_on_heap_memory();
} else {
- set_assigned_regular_on_heap_memory((Double)value);
+ set_assigned_regular_on_heap_memory((java.lang.Double)value);
}
break;
@@ -1530,7 +1500,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_assigned_shared_on_heap_memory();
} else {
- set_assigned_shared_on_heap_memory((Double)value);
+ set_assigned_shared_on_heap_memory((java.lang.Double)value);
}
break;
@@ -1538,7 +1508,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_assigned_regular_off_heap_memory();
} else {
- set_assigned_regular_off_heap_memory((Double)value);
+ set_assigned_regular_off_heap_memory((java.lang.Double)value);
}
break;
@@ -1546,14 +1516,14 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (value == null) {
unset_assigned_shared_off_heap_memory();
} else {
- set_assigned_shared_off_heap_memory((Double)value);
+ set_assigned_shared_off_heap_memory((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return get_id();
@@ -1652,13 +1622,13 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return get_assigned_shared_off_heap_memory();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -1727,11 +1697,11 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
case ASSIGNED_SHARED_OFF_HEAP_MEMORY:
return is_set_assigned_shared_off_heap_memory();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TopologyPageInfo)
@@ -1742,6 +1712,8 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
public boolean equals(TopologyPageInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_id = true && this.is_set_id();
boolean that_present_id = true && that.is_set_id();
@@ -2036,169 +2008,137 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_id = true && (is_set_id());
- list.add(present_id);
- if (present_id)
- list.add(id);
-
- boolean present_name = true && (is_set_name());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_uptime_secs = true && (is_set_uptime_secs());
- list.add(present_uptime_secs);
- if (present_uptime_secs)
- list.add(uptime_secs);
-
- boolean present_status = true && (is_set_status());
- list.add(present_status);
- if (present_status)
- list.add(status);
-
- boolean present_num_tasks = true && (is_set_num_tasks());
- list.add(present_num_tasks);
- if (present_num_tasks)
- list.add(num_tasks);
-
- boolean present_num_workers = true && (is_set_num_workers());
- list.add(present_num_workers);
- if (present_num_workers)
- list.add(num_workers);
-
- boolean present_num_executors = true && (is_set_num_executors());
- list.add(present_num_executors);
- if (present_num_executors)
- list.add(num_executors);
-
- boolean present_topology_conf = true && (is_set_topology_conf());
- list.add(present_topology_conf);
- if (present_topology_conf)
- list.add(topology_conf);
-
- boolean present_id_to_spout_agg_stats = true && (is_set_id_to_spout_agg_stats());
- list.add(present_id_to_spout_agg_stats);
- if (present_id_to_spout_agg_stats)
- list.add(id_to_spout_agg_stats);
-
- boolean present_id_to_bolt_agg_stats = true && (is_set_id_to_bolt_agg_stats());
- list.add(present_id_to_bolt_agg_stats);
- if (present_id_to_bolt_agg_stats)
- list.add(id_to_bolt_agg_stats);
-
- boolean present_sched_status = true && (is_set_sched_status());
- list.add(present_sched_status);
- if (present_sched_status)
- list.add(sched_status);
-
- boolean present_topology_stats = true && (is_set_topology_stats());
- list.add(present_topology_stats);
- if (present_topology_stats)
- list.add(topology_stats);
-
- boolean present_owner = true && (is_set_owner());
- list.add(present_owner);
- if (present_owner)
- list.add(owner);
-
- boolean present_debug_options = true && (is_set_debug_options());
- list.add(present_debug_options);
- if (present_debug_options)
- list.add(debug_options);
-
- boolean present_replication_count = true && (is_set_replication_count());
- list.add(present_replication_count);
- if (present_replication_count)
- list.add(replication_count);
-
- boolean present_workers = true && (is_set_workers());
- list.add(present_workers);
- if (present_workers)
- list.add(workers);
-
- boolean present_storm_version = true && (is_set_storm_version());
- list.add(present_storm_version);
- if (present_storm_version)
- list.add(storm_version);
-
- boolean present_topology_version = true && (is_set_topology_version());
- list.add(present_topology_version);
- if (present_topology_version)
- list.add(topology_version);
-
- boolean present_requested_memonheap = true && (is_set_requested_memonheap());
- list.add(present_requested_memonheap);
- if (present_requested_memonheap)
- list.add(requested_memonheap);
-
- boolean present_requested_memoffheap = true && (is_set_requested_memoffheap());
- list.add(present_requested_memoffheap);
- if (present_requested_memoffheap)
- list.add(requested_memoffheap);
-
- boolean present_requested_cpu = true && (is_set_requested_cpu());
- list.add(present_requested_cpu);
- if (present_requested_cpu)
- list.add(requested_cpu);
-
- boolean present_assigned_memonheap = true && (is_set_assigned_memonheap());
- list.add(present_assigned_memonheap);
- if (present_assigned_memonheap)
- list.add(assigned_memonheap);
-
- boolean present_assigned_memoffheap = true && (is_set_assigned_memoffheap());
- list.add(present_assigned_memoffheap);
- if (present_assigned_memoffheap)
- list.add(assigned_memoffheap);
-
- boolean present_assigned_cpu = true && (is_set_assigned_cpu());
- list.add(present_assigned_cpu);
- if (present_assigned_cpu)
- list.add(assigned_cpu);
-
- boolean present_requested_regular_on_heap_memory = true && (is_set_requested_regular_on_heap_memory());
- list.add(present_requested_regular_on_heap_memory);
- if (present_requested_regular_on_heap_memory)
- list.add(requested_regular_on_heap_memory);
-
- boolean present_requested_shared_on_heap_memory = true && (is_set_requested_shared_on_heap_memory());
- list.add(present_requested_shared_on_heap_memory);
- if (present_requested_shared_on_heap_memory)
- list.add(requested_shared_on_heap_memory);
-
- boolean present_requested_regular_off_heap_memory = true && (is_set_requested_regular_off_heap_memory());
- list.add(present_requested_regular_off_heap_memory);
- if (present_requested_regular_off_heap_memory)
- list.add(requested_regular_off_heap_memory);
-
- boolean present_requested_shared_off_heap_memory = true && (is_set_requested_shared_off_heap_memory());
- list.add(present_requested_shared_off_heap_memory);
- if (present_requested_shared_off_heap_memory)
- list.add(requested_shared_off_heap_memory);
-
- boolean present_assigned_regular_on_heap_memory = true && (is_set_assigned_regular_on_heap_memory());
- list.add(present_assigned_regular_on_heap_memory);
- if (present_assigned_regular_on_heap_memory)
- list.add(assigned_regular_on_heap_memory);
-
- boolean present_assigned_shared_on_heap_memory = true && (is_set_assigned_shared_on_heap_memory());
- list.add(present_assigned_shared_on_heap_memory);
- if (present_assigned_shared_on_heap_memory)
- list.add(assigned_shared_on_heap_memory);
-
- boolean present_assigned_regular_off_heap_memory = true && (is_set_assigned_regular_off_heap_memory());
- list.add(present_assigned_regular_off_heap_memory);
- if (present_assigned_regular_off_heap_memory)
- list.add(assigned_regular_off_heap_memory);
-
- boolean present_assigned_shared_off_heap_memory = true && (is_set_assigned_shared_off_heap_memory());
- list.add(present_assigned_shared_off_heap_memory);
- if (present_assigned_shared_off_heap_memory)
- list.add(assigned_shared_off_heap_memory);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((is_set_id()) ? 131071 : 524287);
+ if (is_set_id())
+ hashCode = hashCode * 8191 + id.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_name()) ? 131071 : 524287);
+ if (is_set_name())
+ hashCode = hashCode * 8191 + name.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_uptime_secs()) ? 131071 : 524287);
+ if (is_set_uptime_secs())
+ hashCode = hashCode * 8191 + uptime_secs;
+
+ hashCode = hashCode * 8191 + ((is_set_status()) ? 131071 : 524287);
+ if (is_set_status())
+ hashCode = hashCode * 8191 + status.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_num_tasks()) ? 131071 : 524287);
+ if (is_set_num_tasks())
+ hashCode = hashCode * 8191 + num_tasks;
+
+ hashCode = hashCode * 8191 + ((is_set_num_workers()) ? 131071 : 524287);
+ if (is_set_num_workers())
+ hashCode = hashCode * 8191 + num_workers;
+
+ hashCode = hashCode * 8191 + ((is_set_num_executors()) ? 131071 : 524287);
+ if (is_set_num_executors())
+ hashCode = hashCode * 8191 + num_executors;
+
+ hashCode = hashCode * 8191 + ((is_set_topology_conf()) ? 131071 : 524287);
+ if (is_set_topology_conf())
+ hashCode = hashCode * 8191 + topology_conf.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_id_to_spout_agg_stats()) ? 131071 : 524287);
+ if (is_set_id_to_spout_agg_stats())
+ hashCode = hashCode * 8191 + id_to_spout_agg_stats.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_id_to_bolt_agg_stats()) ? 131071 : 524287);
+ if (is_set_id_to_bolt_agg_stats())
+ hashCode = hashCode * 8191 + id_to_bolt_agg_stats.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_sched_status()) ? 131071 : 524287);
+ if (is_set_sched_status())
+ hashCode = hashCode * 8191 + sched_status.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_topology_stats()) ? 131071 : 524287);
+ if (is_set_topology_stats())
+ hashCode = hashCode * 8191 + topology_stats.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_owner()) ? 131071 : 524287);
+ if (is_set_owner())
+ hashCode = hashCode * 8191 + owner.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_debug_options()) ? 131071 : 524287);
+ if (is_set_debug_options())
+ hashCode = hashCode * 8191 + debug_options.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_replication_count()) ? 131071 : 524287);
+ if (is_set_replication_count())
+ hashCode = hashCode * 8191 + replication_count;
+
+ hashCode = hashCode * 8191 + ((is_set_workers()) ? 131071 : 524287);
+ if (is_set_workers())
+ hashCode = hashCode * 8191 + workers.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_storm_version()) ? 131071 : 524287);
+ if (is_set_storm_version())
+ hashCode = hashCode * 8191 + storm_version.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_topology_version()) ? 131071 : 524287);
+ if (is_set_topology_version())
+ hashCode = hashCode * 8191 + topology_version.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_requested_memonheap()) ? 131071 : 524287);
+ if (is_set_requested_memonheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_memonheap);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_memoffheap()) ? 131071 : 524287);
+ if (is_set_requested_memoffheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_memoffheap);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_cpu()) ? 131071 : 524287);
+ if (is_set_requested_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_cpu);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_memonheap()) ? 131071 : 524287);
+ if (is_set_assigned_memonheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_memonheap);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_memoffheap()) ? 131071 : 524287);
+ if (is_set_assigned_memoffheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_memoffheap);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_cpu()) ? 131071 : 524287);
+ if (is_set_assigned_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_cpu);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_regular_on_heap_memory()) ? 131071 : 524287);
+ if (is_set_requested_regular_on_heap_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_regular_on_heap_memory);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_shared_on_heap_memory()) ? 131071 : 524287);
+ if (is_set_requested_shared_on_heap_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_shared_on_heap_memory);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_regular_off_heap_memory()) ? 131071 : 524287);
+ if (is_set_requested_regular_off_heap_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_regular_off_heap_memory);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_shared_off_heap_memory()) ? 131071 : 524287);
+ if (is_set_requested_shared_off_heap_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_shared_off_heap_memory);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_regular_on_heap_memory()) ? 131071 : 524287);
+ if (is_set_assigned_regular_on_heap_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_regular_on_heap_memory);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_shared_on_heap_memory()) ? 131071 : 524287);
+ if (is_set_assigned_shared_on_heap_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_shared_on_heap_memory);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_regular_off_heap_memory()) ? 131071 : 524287);
+ if (is_set_assigned_regular_off_heap_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_regular_off_heap_memory);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_shared_off_heap_memory()) ? 131071 : 524287);
+ if (is_set_assigned_shared_off_heap_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_shared_off_heap_memory);
+
+ return hashCode;
}
@Override
@@ -2209,7 +2149,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2219,7 +2159,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
+ lastComparison = java.lang.Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2229,7 +2169,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2239,7 +2179,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_status()).compareTo(other.is_set_status());
+ lastComparison = java.lang.Boolean.valueOf(is_set_status()).compareTo(other.is_set_status());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2249,7 +2189,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_tasks()).compareTo(other.is_set_num_tasks());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_tasks()).compareTo(other.is_set_num_tasks());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2259,7 +2199,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_workers()).compareTo(other.is_set_num_workers());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_workers()).compareTo(other.is_set_num_workers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2269,7 +2209,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_executors()).compareTo(other.is_set_num_executors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_executors()).compareTo(other.is_set_num_executors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2279,7 +2219,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_conf()).compareTo(other.is_set_topology_conf());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_conf()).compareTo(other.is_set_topology_conf());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2289,7 +2229,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_id_to_spout_agg_stats()).compareTo(other.is_set_id_to_spout_agg_stats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_id_to_spout_agg_stats()).compareTo(other.is_set_id_to_spout_agg_stats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2299,7 +2239,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_id_to_bolt_agg_stats()).compareTo(other.is_set_id_to_bolt_agg_stats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_id_to_bolt_agg_stats()).compareTo(other.is_set_id_to_bolt_agg_stats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2309,7 +2249,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_sched_status()).compareTo(other.is_set_sched_status());
+ lastComparison = java.lang.Boolean.valueOf(is_set_sched_status()).compareTo(other.is_set_sched_status());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2319,7 +2259,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_stats()).compareTo(other.is_set_topology_stats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_stats()).compareTo(other.is_set_topology_stats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2329,7 +2269,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
+ lastComparison = java.lang.Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2339,7 +2279,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_debug_options()).compareTo(other.is_set_debug_options());
+ lastComparison = java.lang.Boolean.valueOf(is_set_debug_options()).compareTo(other.is_set_debug_options());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2349,7 +2289,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_replication_count()).compareTo(other.is_set_replication_count());
+ lastComparison = java.lang.Boolean.valueOf(is_set_replication_count()).compareTo(other.is_set_replication_count());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2359,7 +2299,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_workers()).compareTo(other.is_set_workers());
+ lastComparison = java.lang.Boolean.valueOf(is_set_workers()).compareTo(other.is_set_workers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2369,7 +2309,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_storm_version()).compareTo(other.is_set_storm_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_storm_version()).compareTo(other.is_set_storm_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2379,7 +2319,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_version()).compareTo(other.is_set_topology_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_version()).compareTo(other.is_set_topology_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2389,7 +2329,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_memonheap()).compareTo(other.is_set_requested_memonheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_memonheap()).compareTo(other.is_set_requested_memonheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2399,7 +2339,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_memoffheap()).compareTo(other.is_set_requested_memoffheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_memoffheap()).compareTo(other.is_set_requested_memoffheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2409,7 +2349,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_cpu()).compareTo(other.is_set_requested_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_cpu()).compareTo(other.is_set_requested_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2419,7 +2359,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_memonheap()).compareTo(other.is_set_assigned_memonheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_memonheap()).compareTo(other.is_set_assigned_memonheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2429,7 +2369,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_memoffheap()).compareTo(other.is_set_assigned_memoffheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_memoffheap()).compareTo(other.is_set_assigned_memoffheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2439,7 +2379,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_cpu()).compareTo(other.is_set_assigned_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_cpu()).compareTo(other.is_set_assigned_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2449,7 +2389,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_regular_on_heap_memory()).compareTo(other.is_set_requested_regular_on_heap_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_regular_on_heap_memory()).compareTo(other.is_set_requested_regular_on_heap_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2459,7 +2399,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_shared_on_heap_memory()).compareTo(other.is_set_requested_shared_on_heap_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_shared_on_heap_memory()).compareTo(other.is_set_requested_shared_on_heap_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2469,7 +2409,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_regular_off_heap_memory()).compareTo(other.is_set_requested_regular_off_heap_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_regular_off_heap_memory()).compareTo(other.is_set_requested_regular_off_heap_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2479,7 +2419,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_shared_off_heap_memory()).compareTo(other.is_set_requested_shared_off_heap_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_shared_off_heap_memory()).compareTo(other.is_set_requested_shared_off_heap_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2489,7 +2429,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_regular_on_heap_memory()).compareTo(other.is_set_assigned_regular_on_heap_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_regular_on_heap_memory()).compareTo(other.is_set_assigned_regular_on_heap_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2499,7 +2439,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_shared_on_heap_memory()).compareTo(other.is_set_assigned_shared_on_heap_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_shared_on_heap_memory()).compareTo(other.is_set_assigned_shared_on_heap_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2509,7 +2449,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_regular_off_heap_memory()).compareTo(other.is_set_assigned_regular_off_heap_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_regular_off_heap_memory()).compareTo(other.is_set_assigned_regular_off_heap_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2519,7 +2459,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_shared_off_heap_memory()).compareTo(other.is_set_assigned_shared_off_heap_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_shared_off_heap_memory()).compareTo(other.is_set_assigned_shared_off_heap_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2537,16 +2477,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TopologyPageInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TopologyPageInfo(");
boolean first = true;
sb.append("id:");
@@ -2817,7 +2757,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -2827,13 +2767,13 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
}
- private static class TopologyPageInfoStandardSchemeFactory implements SchemeFactory {
+ private static class TopologyPageInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TopologyPageInfoStandardScheme getScheme() {
return new TopologyPageInfoStandardScheme();
}
}
- private static class TopologyPageInfoStandardScheme extends StandardScheme<TopologyPageInfo> {
+ private static class TopologyPageInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TopologyPageInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TopologyPageInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -2913,8 +2853,8 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map482 = iprot.readMapBegin();
- struct.id_to_spout_agg_stats = new HashMap<String,ComponentAggregateStats>(2*_map482.size);
- String _key483;
+ struct.id_to_spout_agg_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>(2*_map482.size);
+ java.lang.String _key483;
ComponentAggregateStats _val484;
for (int _i485 = 0; _i485 < _map482.size; ++_i485)
{
@@ -2934,8 +2874,8 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map486 = iprot.readMapBegin();
- struct.id_to_bolt_agg_stats = new HashMap<String,ComponentAggregateStats>(2*_map486.size);
- String _key487;
+ struct.id_to_bolt_agg_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>(2*_map486.size);
+ java.lang.String _key487;
ComponentAggregateStats _val488;
for (int _i489 = 0; _i489 < _map486.size; ++_i489)
{
@@ -2997,7 +2937,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list490 = iprot.readListBegin();
- struct.workers = new ArrayList<WorkerSummary>(_list490.size);
+ struct.workers = new java.util.ArrayList<WorkerSummary>(_list490.size);
WorkerSummary _elem491;
for (int _i492 = 0; _i492 < _list490.size; ++_i492)
{
@@ -3204,7 +3144,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
oprot.writeFieldBegin(ID_TO_SPOUT_AGG_STATS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.id_to_spout_agg_stats.size()));
- for (Map.Entry<String, ComponentAggregateStats> _iter493 : struct.id_to_spout_agg_stats.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ComponentAggregateStats> _iter493 : struct.id_to_spout_agg_stats.entrySet())
{
oprot.writeString(_iter493.getKey());
_iter493.getValue().write(oprot);
@@ -3219,7 +3159,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
oprot.writeFieldBegin(ID_TO_BOLT_AGG_STATS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.id_to_bolt_agg_stats.size()));
- for (Map.Entry<String, ComponentAggregateStats> _iter494 : struct.id_to_bolt_agg_stats.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ComponentAggregateStats> _iter494 : struct.id_to_bolt_agg_stats.entrySet())
{
oprot.writeString(_iter494.getKey());
_iter494.getValue().write(oprot);
@@ -3366,19 +3306,19 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
}
- private static class TopologyPageInfoTupleSchemeFactory implements SchemeFactory {
+ private static class TopologyPageInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TopologyPageInfoTupleScheme getScheme() {
return new TopologyPageInfoTupleScheme();
}
}
- private static class TopologyPageInfoTupleScheme extends TupleScheme<TopologyPageInfo> {
+ private static class TopologyPageInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TopologyPageInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TopologyPageInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.id);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_name()) {
optionals.set(0);
}
@@ -3497,7 +3437,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (struct.is_set_id_to_spout_agg_stats()) {
{
oprot.writeI32(struct.id_to_spout_agg_stats.size());
- for (Map.Entry<String, ComponentAggregateStats> _iter496 : struct.id_to_spout_agg_stats.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ComponentAggregateStats> _iter496 : struct.id_to_spout_agg_stats.entrySet())
{
oprot.writeString(_iter496.getKey());
_iter496.getValue().write(oprot);
@@ -3507,7 +3447,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (struct.is_set_id_to_bolt_agg_stats()) {
{
oprot.writeI32(struct.id_to_bolt_agg_stats.size());
- for (Map.Entry<String, ComponentAggregateStats> _iter497 : struct.id_to_bolt_agg_stats.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ComponentAggregateStats> _iter497 : struct.id_to_bolt_agg_stats.entrySet())
{
oprot.writeString(_iter497.getKey());
_iter497.getValue().write(oprot);
@@ -3590,10 +3530,10 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TopologyPageInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.id = iprot.readString();
struct.set_id_isSet(true);
- BitSet incoming = iprot.readBitSet(31);
+ java.util.BitSet incoming = iprot.readBitSet(31);
if (incoming.get(0)) {
struct.name = iprot.readString();
struct.set_name_isSet(true);
@@ -3625,8 +3565,8 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (incoming.get(7)) {
{
org.apache.thrift.protocol.TMap _map499 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.id_to_spout_agg_stats = new HashMap<String,ComponentAggregateStats>(2*_map499.size);
- String _key500;
+ struct.id_to_spout_agg_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>(2*_map499.size);
+ java.lang.String _key500;
ComponentAggregateStats _val501;
for (int _i502 = 0; _i502 < _map499.size; ++_i502)
{
@@ -3641,8 +3581,8 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (incoming.get(8)) {
{
org.apache.thrift.protocol.TMap _map503 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.id_to_bolt_agg_stats = new HashMap<String,ComponentAggregateStats>(2*_map503.size);
- String _key504;
+ struct.id_to_bolt_agg_stats = new java.util.HashMap<java.lang.String,ComponentAggregateStats>(2*_map503.size);
+ java.lang.String _key504;
ComponentAggregateStats _val505;
for (int _i506 = 0; _i506 < _map503.size; ++_i506)
{
@@ -3679,7 +3619,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf
if (incoming.get(14)) {
{
org.apache.thrift.protocol.TList _list507 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.workers = new ArrayList<WorkerSummary>(_list507.size);
+ struct.workers = new java.util.ArrayList<WorkerSummary>(_list507.size);
WorkerSummary _elem508;
for (int _i509 = 0; _i509 < _list507.size; ++_i509)
{
@@ -3757,5 +3697,8 @@ public class TopologyPageInfo implements org.apache.thri
<TRUNCATED>
[32/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ErrorInfo.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ErrorInfo.java b/storm-client/src/jvm/org/apache/storm/generated/ErrorInfo.java
index 2ab536d..915b6cf 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ErrorInfo.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ErrorInfo.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._Fields>, java.io.Serializable, Cloneable, Comparable<ErrorInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ErrorInfo");
@@ -60,15 +33,12 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ErrorInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ErrorInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ErrorInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ErrorInfoTupleSchemeFactory();
- private String error; // required
+ private java.lang.String error; // required
private int error_time_secs; // required
- private String host; // optional
+ private java.lang.String host; // optional
private int port; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -78,10 +48,10 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
HOST((short)3, "host"),
PORT((short)4, "port");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -110,21 +80,21 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -133,7 +103,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -143,9 +113,9 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
private static final int __PORT_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.HOST,_Fields.PORT};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ERROR_TIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("error_time_secs", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -154,7 +124,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ErrorInfo.class, metaDataMap);
}
@@ -162,7 +132,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
}
public ErrorInfo(
- String error,
+ java.lang.String error,
int error_time_secs)
{
this();
@@ -200,11 +170,11 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
this.port = 0;
}
- public String get_error() {
+ public java.lang.String get_error() {
return this.error;
}
- public void set_error(String error) {
+ public void set_error(java.lang.String error) {
this.error = error;
}
@@ -233,23 +203,23 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
}
public void unset_error_time_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERROR_TIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ERROR_TIME_SECS_ISSET_ID);
}
/** Returns true if field error_time_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_error_time_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __ERROR_TIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ERROR_TIME_SECS_ISSET_ID);
}
public void set_error_time_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERROR_TIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ERROR_TIME_SECS_ISSET_ID, value);
}
- public String get_host() {
+ public java.lang.String get_host() {
return this.host;
}
- public void set_host(String host) {
+ public void set_host(java.lang.String host) {
this.host = host;
}
@@ -278,25 +248,25 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
}
public void unset_port() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean is_set_port() {
- return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
}
public void set_port_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ERROR:
if (value == null) {
unset_error();
} else {
- set_error((String)value);
+ set_error((java.lang.String)value);
}
break;
@@ -304,7 +274,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
if (value == null) {
unset_error_time_secs();
} else {
- set_error_time_secs((Integer)value);
+ set_error_time_secs((java.lang.Integer)value);
}
break;
@@ -312,7 +282,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
if (value == null) {
unset_host();
} else {
- set_host((String)value);
+ set_host((java.lang.String)value);
}
break;
@@ -320,14 +290,14 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
if (value == null) {
unset_port();
} else {
- set_port((Integer)value);
+ set_port((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ERROR:
return get_error();
@@ -342,13 +312,13 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
return get_port();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -361,11 +331,11 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
case PORT:
return is_set_port();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ErrorInfo)
@@ -376,6 +346,8 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
public boolean equals(ErrorInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_error = true && this.is_set_error();
boolean that_present_error = true && that.is_set_error();
@@ -418,29 +390,23 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_error = true && (is_set_error());
- list.add(present_error);
- if (present_error)
- list.add(error);
+ hashCode = hashCode * 8191 + ((is_set_error()) ? 131071 : 524287);
+ if (is_set_error())
+ hashCode = hashCode * 8191 + error.hashCode();
- boolean present_error_time_secs = true;
- list.add(present_error_time_secs);
- if (present_error_time_secs)
- list.add(error_time_secs);
+ hashCode = hashCode * 8191 + error_time_secs;
- boolean present_host = true && (is_set_host());
- list.add(present_host);
- if (present_host)
- list.add(host);
+ hashCode = hashCode * 8191 + ((is_set_host()) ? 131071 : 524287);
+ if (is_set_host())
+ hashCode = hashCode * 8191 + host.hashCode();
- boolean present_port = true && (is_set_port());
- list.add(present_port);
- if (present_port)
- list.add(port);
+ hashCode = hashCode * 8191 + ((is_set_port()) ? 131071 : 524287);
+ if (is_set_port())
+ hashCode = hashCode * 8191 + port;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -451,7 +417,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_error()).compareTo(other.is_set_error());
+ lastComparison = java.lang.Boolean.valueOf(is_set_error()).compareTo(other.is_set_error());
if (lastComparison != 0) {
return lastComparison;
}
@@ -461,7 +427,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_error_time_secs()).compareTo(other.is_set_error_time_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_error_time_secs()).compareTo(other.is_set_error_time_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -471,7 +437,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_host()).compareTo(other.is_set_host());
+ lastComparison = java.lang.Boolean.valueOf(is_set_host()).compareTo(other.is_set_host());
if (lastComparison != 0) {
return lastComparison;
}
@@ -481,7 +447,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
+ lastComparison = java.lang.Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
if (lastComparison != 0) {
return lastComparison;
}
@@ -499,16 +465,16 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ErrorInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ErrorInfo(");
boolean first = true;
sb.append("error:");
@@ -563,7 +529,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -573,13 +539,13 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
}
}
- private static class ErrorInfoStandardSchemeFactory implements SchemeFactory {
+ private static class ErrorInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ErrorInfoStandardScheme getScheme() {
return new ErrorInfoStandardScheme();
}
}
- private static class ErrorInfoStandardScheme extends StandardScheme<ErrorInfo> {
+ private static class ErrorInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<ErrorInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ErrorInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -662,20 +628,20 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
}
- private static class ErrorInfoTupleSchemeFactory implements SchemeFactory {
+ private static class ErrorInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ErrorInfoTupleScheme getScheme() {
return new ErrorInfoTupleScheme();
}
}
- private static class ErrorInfoTupleScheme extends TupleScheme<ErrorInfo> {
+ private static class ErrorInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<ErrorInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ErrorInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.error);
oprot.writeI32(struct.error_time_secs);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_host()) {
optionals.set(0);
}
@@ -693,12 +659,12 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ErrorInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.error = iprot.readString();
struct.set_error_isSet(true);
struct.error_time_secs = iprot.readI32();
struct.set_error_time_secs_isSet(true);
- BitSet incoming = iprot.readBitSet(2);
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.host = iprot.readString();
struct.set_host_isSet(true);
@@ -710,5 +676,8 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ExecutorAggregateStats.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ExecutorAggregateStats.java b/storm-client/src/jvm/org/apache/storm/generated/ExecutorAggregateStats.java
index 5bc85e0..8091aca 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ExecutorAggregateStats.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ExecutorAggregateStats.java
@@ -16,53 +16,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorAggregateStats, ExecutorAggregateStats._Fields>, java.io.Serializable, Cloneable, Comparable<ExecutorAggregateStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecutorAggregateStats");
private static final org.apache.thrift.protocol.TField EXEC_SUMMARY_FIELD_DESC = new org.apache.thrift.protocol.TField("exec_summary", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("stats", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ExecutorAggregateStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ExecutorAggregateStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ExecutorAggregateStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ExecutorAggregateStatsTupleSchemeFactory();
private ExecutorSummary exec_summary; // optional
private ComponentAggregateStats stats; // optional
@@ -72,10 +42,10 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
EXEC_SUMMARY((short)1, "exec_summary"),
STATS((short)2, "stats");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,21 +93,21 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.EXEC_SUMMARY,_Fields.STATS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXEC_SUMMARY, new org.apache.thrift.meta_data.FieldMetaData("exec_summary", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutorSummary.class)));
tmpMap.put(_Fields.STATS, new org.apache.thrift.meta_data.FieldMetaData("stats", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentAggregateStats.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecutorAggregateStats.class, metaDataMap);
}
@@ -212,7 +182,7 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXEC_SUMMARY:
if (value == null) {
@@ -233,7 +203,7 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXEC_SUMMARY:
return get_exec_summary();
@@ -242,13 +212,13 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
return get_stats();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -257,11 +227,11 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
case STATS:
return is_set_stats();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ExecutorAggregateStats)
@@ -272,6 +242,8 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
public boolean equals(ExecutorAggregateStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_exec_summary = true && this.is_set_exec_summary();
boolean that_present_exec_summary = true && that.is_set_exec_summary();
@@ -296,19 +268,17 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_exec_summary = true && (is_set_exec_summary());
- list.add(present_exec_summary);
- if (present_exec_summary)
- list.add(exec_summary);
+ hashCode = hashCode * 8191 + ((is_set_exec_summary()) ? 131071 : 524287);
+ if (is_set_exec_summary())
+ hashCode = hashCode * 8191 + exec_summary.hashCode();
- boolean present_stats = true && (is_set_stats());
- list.add(present_stats);
- if (present_stats)
- list.add(stats);
+ hashCode = hashCode * 8191 + ((is_set_stats()) ? 131071 : 524287);
+ if (is_set_stats())
+ hashCode = hashCode * 8191 + stats.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -319,7 +289,7 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_exec_summary()).compareTo(other.is_set_exec_summary());
+ lastComparison = java.lang.Boolean.valueOf(is_set_exec_summary()).compareTo(other.is_set_exec_summary());
if (lastComparison != 0) {
return lastComparison;
}
@@ -329,7 +299,7 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_stats()).compareTo(other.is_set_stats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_stats()).compareTo(other.is_set_stats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -347,16 +317,16 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ExecutorAggregateStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ExecutorAggregateStats(");
boolean first = true;
if (is_set_exec_summary()) {
@@ -401,7 +371,7 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -409,13 +379,13 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
}
}
- private static class ExecutorAggregateStatsStandardSchemeFactory implements SchemeFactory {
+ private static class ExecutorAggregateStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ExecutorAggregateStatsStandardScheme getScheme() {
return new ExecutorAggregateStatsStandardScheme();
}
}
- private static class ExecutorAggregateStatsStandardScheme extends StandardScheme<ExecutorAggregateStats> {
+ private static class ExecutorAggregateStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ExecutorAggregateStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ExecutorAggregateStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -478,18 +448,18 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
}
- private static class ExecutorAggregateStatsTupleSchemeFactory implements SchemeFactory {
+ private static class ExecutorAggregateStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ExecutorAggregateStatsTupleScheme getScheme() {
return new ExecutorAggregateStatsTupleScheme();
}
}
- private static class ExecutorAggregateStatsTupleScheme extends TupleScheme<ExecutorAggregateStats> {
+ private static class ExecutorAggregateStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ExecutorAggregateStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ExecutorAggregateStats struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_exec_summary()) {
optionals.set(0);
}
@@ -507,8 +477,8 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ExecutorAggregateStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.exec_summary = new ExecutorSummary();
struct.exec_summary.read(iprot);
@@ -522,5 +492,8 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ExecutorInfo.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ExecutorInfo.java b/storm-client/src/jvm/org/apache/storm/generated/ExecutorInfo.java
index b3d7bab..24796c4 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ExecutorInfo.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ExecutorInfo.java
@@ -16,53 +16,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, ExecutorInfo._Fields>, java.io.Serializable, Cloneable, Comparable<ExecutorInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecutorInfo");
private static final org.apache.thrift.protocol.TField TASK_START_FIELD_DESC = new org.apache.thrift.protocol.TField("task_start", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField TASK_END_FIELD_DESC = new org.apache.thrift.protocol.TField("task_end", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ExecutorInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ExecutorInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ExecutorInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ExecutorInfoTupleSchemeFactory();
private int task_start; // required
private int task_end; // required
@@ -72,10 +42,10 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
TASK_START((short)1, "task_start"),
TASK_END((short)2, "task_end");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,7 +93,7 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -132,14 +102,14 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
private static final int __TASK_START_ISSET_ID = 0;
private static final int __TASK_END_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TASK_START, new org.apache.thrift.meta_data.FieldMetaData("task_start", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.TASK_END, new org.apache.thrift.meta_data.FieldMetaData("task_end", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecutorInfo.class, metaDataMap);
}
@@ -188,16 +158,16 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
}
public void unset_task_start() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TASK_START_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TASK_START_ISSET_ID);
}
/** Returns true if field task_start is set (has been assigned a value) and false otherwise */
public boolean is_set_task_start() {
- return EncodingUtils.testBit(__isset_bitfield, __TASK_START_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TASK_START_ISSET_ID);
}
public void set_task_start_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TASK_START_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TASK_START_ISSET_ID, value);
}
public int get_task_end() {
@@ -210,25 +180,25 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
}
public void unset_task_end() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TASK_END_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TASK_END_ISSET_ID);
}
/** Returns true if field task_end is set (has been assigned a value) and false otherwise */
public boolean is_set_task_end() {
- return EncodingUtils.testBit(__isset_bitfield, __TASK_END_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TASK_END_ISSET_ID);
}
public void set_task_end_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TASK_END_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TASK_END_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TASK_START:
if (value == null) {
unset_task_start();
} else {
- set_task_start((Integer)value);
+ set_task_start((java.lang.Integer)value);
}
break;
@@ -236,14 +206,14 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
if (value == null) {
unset_task_end();
} else {
- set_task_end((Integer)value);
+ set_task_end((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TASK_START:
return get_task_start();
@@ -252,13 +222,13 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
return get_task_end();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -267,11 +237,11 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
case TASK_END:
return is_set_task_end();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ExecutorInfo)
@@ -282,6 +252,8 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
public boolean equals(ExecutorInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_task_start = true;
boolean that_present_task_start = true;
@@ -306,19 +278,13 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_task_start = true;
- list.add(present_task_start);
- if (present_task_start)
- list.add(task_start);
+ hashCode = hashCode * 8191 + task_start;
- boolean present_task_end = true;
- list.add(present_task_end);
- if (present_task_end)
- list.add(task_end);
+ hashCode = hashCode * 8191 + task_end;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -329,7 +295,7 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_task_start()).compareTo(other.is_set_task_start());
+ lastComparison = java.lang.Boolean.valueOf(is_set_task_start()).compareTo(other.is_set_task_start());
if (lastComparison != 0) {
return lastComparison;
}
@@ -339,7 +305,7 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_task_end()).compareTo(other.is_set_task_end());
+ lastComparison = java.lang.Boolean.valueOf(is_set_task_end()).compareTo(other.is_set_task_end());
if (lastComparison != 0) {
return lastComparison;
}
@@ -357,16 +323,16 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ExecutorInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ExecutorInfo(");
boolean first = true;
sb.append("task_start:");
@@ -401,7 +367,7 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -411,13 +377,13 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
}
}
- private static class ExecutorInfoStandardSchemeFactory implements SchemeFactory {
+ private static class ExecutorInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ExecutorInfoStandardScheme getScheme() {
return new ExecutorInfoStandardScheme();
}
}
- private static class ExecutorInfoStandardScheme extends StandardScheme<ExecutorInfo> {
+ private static class ExecutorInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<ExecutorInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ExecutorInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -470,24 +436,24 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
}
- private static class ExecutorInfoTupleSchemeFactory implements SchemeFactory {
+ private static class ExecutorInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ExecutorInfoTupleScheme getScheme() {
return new ExecutorInfoTupleScheme();
}
}
- private static class ExecutorInfoTupleScheme extends TupleScheme<ExecutorInfo> {
+ private static class ExecutorInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<ExecutorInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ExecutorInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.task_start);
oprot.writeI32(struct.task_end);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ExecutorInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.task_start = iprot.readI32();
struct.set_task_start_isSet(true);
struct.task_end = iprot.readI32();
@@ -495,5 +461,8 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ExecutorSpecificStats.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ExecutorSpecificStats.java b/storm-client/src/jvm/org/apache/storm/generated/ExecutorSpecificStats.java
index d91f197..7e7e230 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ExecutorSpecificStats.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ExecutorSpecificStats.java
@@ -16,41 +16,14 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpecificStats, ExecutorSpecificStats._Fields> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecutorSpecificStats");
private static final org.apache.thrift.protocol.TField BOLT_FIELD_DESC = new org.apache.thrift.protocol.TField("bolt", org.apache.thrift.protocol.TType.STRUCT, (short)1);
@@ -61,10 +34,10 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
BOLT((short)1, "bolt"),
SPOUT((short)2, "spout");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -89,21 +62,21 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -112,19 +85,19 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.BOLT, new org.apache.thrift.meta_data.FieldMetaData("bolt", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.BOLT, new org.apache.thrift.meta_data.FieldMetaData("bolt", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BoltStats.class)));
- tmpMap.put(_Fields.SPOUT, new org.apache.thrift.meta_data.FieldMetaData("spout", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.SPOUT, new org.apache.thrift.meta_data.FieldMetaData("spout", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SpoutStats.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecutorSpecificStats.class, metaDataMap);
}
@@ -132,7 +105,7 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
super();
}
- public ExecutorSpecificStats(_Fields setField, Object value) {
+ public ExecutorSpecificStats(_Fields setField, java.lang.Object value) {
super(setField, value);
}
@@ -157,25 +130,25 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
@Override
- protected void checkType(_Fields setField, Object value) throws ClassCastException {
+ protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException {
switch (setField) {
case BOLT:
if (value instanceof BoltStats) {
break;
}
- throw new ClassCastException("Was expecting value of type BoltStats for field 'bolt', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type BoltStats for field 'bolt', but got " + value.getClass().getSimpleName());
case SPOUT:
if (value instanceof SpoutStats) {
break;
}
- throw new ClassCastException("Was expecting value of type SpoutStats for field 'spout', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type SpoutStats for field 'spout', but got " + value.getClass().getSimpleName());
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@Override
- protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
+ protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(field.id);
if (setField != null) {
switch (setField) {
@@ -200,7 +173,7 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
return null;
}
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
@@ -220,12 +193,12 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
spout.write(oprot);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@Override
- protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
+ protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(fieldID);
if (setField != null) {
switch (setField) {
@@ -240,10 +213,10 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
spout.read(iprot);
return spout;
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
- throw new TProtocolException("Couldn't find a field with field id " + fieldID);
+ throw new org.apache.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID);
}
}
@@ -259,7 +232,7 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
spout.write(oprot);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@@ -271,7 +244,7 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
case SPOUT:
return SPOUT_FIELD_DESC;
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@@ -294,12 +267,12 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
if (getSetField() == _Fields.BOLT) {
return (BoltStats)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'bolt' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'bolt' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_bolt(BoltStats value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.BOLT;
value_ = value;
}
@@ -308,12 +281,12 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
if (getSetField() == _Fields.SPOUT) {
return (SpoutStats)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'spout' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'spout' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_spout(SpoutStats value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.SPOUT;
value_ = value;
}
@@ -328,7 +301,7 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
}
- public boolean equals(Object other) {
+ public boolean equals(java.lang.Object other) {
if (other instanceof ExecutorSpecificStats) {
return equals((ExecutorSpecificStats)other);
} else {
@@ -352,12 +325,12 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>();
list.add(this.getClass().getName());
org.apache.thrift.TFieldIdEnum setField = getSetField();
if (setField != null) {
list.add(setField.getThriftFieldId());
- Object value = getFieldValue();
+ java.lang.Object value = getFieldValue();
if (value instanceof org.apache.thrift.TEnum) {
list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue());
} else {
@@ -375,7 +348,7 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
[14/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SupervisorAssignments.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SupervisorAssignments.java b/storm-client/src/jvm/org/apache/storm/generated/SupervisorAssignments.java
index 1cfb946..d0111ec 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SupervisorAssignments.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SupervisorAssignments.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class SupervisorAssignments implements org.apache.thrift.TBase<SupervisorAssignments, SupervisorAssignments._Fields>, java.io.Serializable, Cloneable, Comparable<SupervisorAssignments> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SupervisorAssignments");
private static final org.apache.thrift.protocol.TField STORM_ASSIGNMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("storm_assignment", org.apache.thrift.protocol.TType.MAP, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SupervisorAssignmentsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SupervisorAssignmentsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SupervisorAssignmentsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SupervisorAssignmentsTupleSchemeFactory();
- private Map<String,Assignment> storm_assignment; // optional
+ private java.util.Map<java.lang.String,Assignment> storm_assignment; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
STORM_ASSIGNMENT((short)1, "storm_assignment");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,26 +88,26 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.STORM_ASSIGNMENT};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.STORM_ASSIGNMENT, new org.apache.thrift.meta_data.FieldMetaData("storm_assignment", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Assignment.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SupervisorAssignments.class, metaDataMap);
}
public SupervisorAssignments() {
- this.storm_assignment = new HashMap<String,Assignment>();
+ this.storm_assignment = new java.util.HashMap<java.lang.String,Assignment>();
}
@@ -146,13 +116,13 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
*/
public SupervisorAssignments(SupervisorAssignments other) {
if (other.is_set_storm_assignment()) {
- Map<String,Assignment> __this__storm_assignment = new HashMap<String,Assignment>(other.storm_assignment.size());
- for (Map.Entry<String, Assignment> other_element : other.storm_assignment.entrySet()) {
+ java.util.Map<java.lang.String,Assignment> __this__storm_assignment = new java.util.HashMap<java.lang.String,Assignment>(other.storm_assignment.size());
+ for (java.util.Map.Entry<java.lang.String, Assignment> other_element : other.storm_assignment.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
Assignment other_element_value = other_element.getValue();
- String __this__storm_assignment_copy_key = other_element_key;
+ java.lang.String __this__storm_assignment_copy_key = other_element_key;
Assignment __this__storm_assignment_copy_value = new Assignment(other_element_value);
@@ -168,7 +138,7 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
@Override
public void clear() {
- this.storm_assignment = new HashMap<String,Assignment>();
+ this.storm_assignment = new java.util.HashMap<java.lang.String,Assignment>();
}
@@ -176,18 +146,18 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
return (this.storm_assignment == null) ? 0 : this.storm_assignment.size();
}
- public void put_to_storm_assignment(String key, Assignment val) {
+ public void put_to_storm_assignment(java.lang.String key, Assignment val) {
if (this.storm_assignment == null) {
- this.storm_assignment = new HashMap<String,Assignment>();
+ this.storm_assignment = new java.util.HashMap<java.lang.String,Assignment>();
}
this.storm_assignment.put(key, val);
}
- public Map<String,Assignment> get_storm_assignment() {
+ public java.util.Map<java.lang.String,Assignment> get_storm_assignment() {
return this.storm_assignment;
}
- public void set_storm_assignment(Map<String,Assignment> storm_assignment) {
+ public void set_storm_assignment(java.util.Map<java.lang.String,Assignment> storm_assignment) {
this.storm_assignment = storm_assignment;
}
@@ -206,43 +176,43 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case STORM_ASSIGNMENT:
if (value == null) {
unset_storm_assignment();
} else {
- set_storm_assignment((Map<String,Assignment>)value);
+ set_storm_assignment((java.util.Map<java.lang.String,Assignment>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case STORM_ASSIGNMENT:
return get_storm_assignment();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case STORM_ASSIGNMENT:
return is_set_storm_assignment();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof SupervisorAssignments)
@@ -253,6 +223,8 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
public boolean equals(SupervisorAssignments that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_storm_assignment = true && this.is_set_storm_assignment();
boolean that_present_storm_assignment = true && that.is_set_storm_assignment();
@@ -268,14 +240,13 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_storm_assignment = true && (is_set_storm_assignment());
- list.add(present_storm_assignment);
- if (present_storm_assignment)
- list.add(storm_assignment);
+ hashCode = hashCode * 8191 + ((is_set_storm_assignment()) ? 131071 : 524287);
+ if (is_set_storm_assignment())
+ hashCode = hashCode * 8191 + storm_assignment.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -286,7 +257,7 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_storm_assignment()).compareTo(other.is_set_storm_assignment());
+ lastComparison = java.lang.Boolean.valueOf(is_set_storm_assignment()).compareTo(other.is_set_storm_assignment());
if (lastComparison != 0) {
return lastComparison;
}
@@ -304,16 +275,16 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SupervisorAssignments(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SupervisorAssignments(");
boolean first = true;
if (is_set_storm_assignment()) {
@@ -342,7 +313,7 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -350,13 +321,13 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
}
}
- private static class SupervisorAssignmentsStandardSchemeFactory implements SchemeFactory {
+ private static class SupervisorAssignmentsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SupervisorAssignmentsStandardScheme getScheme() {
return new SupervisorAssignmentsStandardScheme();
}
}
- private static class SupervisorAssignmentsStandardScheme extends StandardScheme<SupervisorAssignments> {
+ private static class SupervisorAssignmentsStandardScheme extends org.apache.thrift.scheme.StandardScheme<SupervisorAssignments> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SupervisorAssignments struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -372,8 +343,8 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map886 = iprot.readMapBegin();
- struct.storm_assignment = new HashMap<String,Assignment>(2*_map886.size);
- String _key887;
+ struct.storm_assignment = new java.util.HashMap<java.lang.String,Assignment>(2*_map886.size);
+ java.lang.String _key887;
Assignment _val888;
for (int _i889 = 0; _i889 < _map886.size; ++_i889)
{
@@ -407,7 +378,7 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
oprot.writeFieldBegin(STORM_ASSIGNMENT_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.storm_assignment.size()));
- for (Map.Entry<String, Assignment> _iter890 : struct.storm_assignment.entrySet())
+ for (java.util.Map.Entry<java.lang.String, Assignment> _iter890 : struct.storm_assignment.entrySet())
{
oprot.writeString(_iter890.getKey());
_iter890.getValue().write(oprot);
@@ -423,18 +394,18 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
}
- private static class SupervisorAssignmentsTupleSchemeFactory implements SchemeFactory {
+ private static class SupervisorAssignmentsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SupervisorAssignmentsTupleScheme getScheme() {
return new SupervisorAssignmentsTupleScheme();
}
}
- private static class SupervisorAssignmentsTupleScheme extends TupleScheme<SupervisorAssignments> {
+ private static class SupervisorAssignmentsTupleScheme extends org.apache.thrift.scheme.TupleScheme<SupervisorAssignments> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SupervisorAssignments struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_storm_assignment()) {
optionals.set(0);
}
@@ -442,7 +413,7 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
if (struct.is_set_storm_assignment()) {
{
oprot.writeI32(struct.storm_assignment.size());
- for (Map.Entry<String, Assignment> _iter891 : struct.storm_assignment.entrySet())
+ for (java.util.Map.Entry<java.lang.String, Assignment> _iter891 : struct.storm_assignment.entrySet())
{
oprot.writeString(_iter891.getKey());
_iter891.getValue().write(oprot);
@@ -453,13 +424,13 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SupervisorAssignments struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map892 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.storm_assignment = new HashMap<String,Assignment>(2*_map892.size);
- String _key893;
+ struct.storm_assignment = new java.util.HashMap<java.lang.String,Assignment>(2*_map892.size);
+ java.lang.String _key893;
Assignment _val894;
for (int _i895 = 0; _i895 < _map892.size; ++_i895)
{
@@ -474,5 +445,8 @@ public class SupervisorAssignments implements org.apache.thrift.TBase<Supervisor
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SupervisorInfo.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SupervisorInfo.java b/storm-client/src/jvm/org/apache/storm/generated/SupervisorInfo.java
index 6d2a051..3312601 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SupervisorInfo.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SupervisorInfo.java
@@ -16,90 +16,60 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, SupervisorInfo._Fields>, java.io.Serializable, Cloneable, Comparable<SupervisorInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SupervisorInfo");
private static final org.apache.thrift.protocol.TField TIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("time_secs", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField ASSIGNMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("assignment_id", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField SERVER_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("server_port", org.apache.thrift.protocol.TType.I32, (short)4);
- private static final org.apache.thrift.protocol.TField USED_PORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("used_ports", org.apache.thrift.protocol.TType.LIST, (short)5);
- private static final org.apache.thrift.protocol.TField META_FIELD_DESC = new org.apache.thrift.protocol.TField("meta", org.apache.thrift.protocol.TType.LIST, (short)6);
- private static final org.apache.thrift.protocol.TField SCHEDULER_META_FIELD_DESC = new org.apache.thrift.protocol.TField("scheduler_meta", org.apache.thrift.protocol.TType.MAP, (short)7);
- private static final org.apache.thrift.protocol.TField UPTIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("uptime_secs", org.apache.thrift.protocol.TType.I64, (short)8);
- private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)9);
- private static final org.apache.thrift.protocol.TField RESOURCES_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("resources_map", org.apache.thrift.protocol.TType.MAP, (short)10);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SupervisorInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SupervisorInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.protocol.TField USED_PORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("used_ports", org.apache.thrift.protocol.TType.LIST, (short)4);
+ private static final org.apache.thrift.protocol.TField META_FIELD_DESC = new org.apache.thrift.protocol.TField("meta", org.apache.thrift.protocol.TType.LIST, (short)5);
+ private static final org.apache.thrift.protocol.TField SCHEDULER_META_FIELD_DESC = new org.apache.thrift.protocol.TField("scheduler_meta", org.apache.thrift.protocol.TType.MAP, (short)6);
+ private static final org.apache.thrift.protocol.TField UPTIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("uptime_secs", org.apache.thrift.protocol.TType.I64, (short)7);
+ private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)8);
+ private static final org.apache.thrift.protocol.TField RESOURCES_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("resources_map", org.apache.thrift.protocol.TType.MAP, (short)9);
+ private static final org.apache.thrift.protocol.TField SERVER_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("server_port", org.apache.thrift.protocol.TType.I32, (short)10);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SupervisorInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SupervisorInfoTupleSchemeFactory();
private long time_secs; // required
- private String hostname; // required
- private String assignment_id; // optional
- private int server_port; // optional
- private List<Long> used_ports; // optional
- private List<Long> meta; // optional
- private Map<String,String> scheduler_meta; // optional
+ private java.lang.String hostname; // required
+ private java.lang.String assignment_id; // optional
+ private java.util.List<java.lang.Long> used_ports; // optional
+ private java.util.List<java.lang.Long> meta; // optional
+ private java.util.Map<java.lang.String,java.lang.String> scheduler_meta; // optional
private long uptime_secs; // optional
- private String version; // optional
- private Map<String,Double> resources_map; // optional
+ private java.lang.String version; // optional
+ private java.util.Map<java.lang.String,java.lang.Double> resources_map; // optional
+ private int server_port; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TIME_SECS((short)1, "time_secs"),
HOSTNAME((short)2, "hostname"),
ASSIGNMENT_ID((short)3, "assignment_id"),
- SERVER_PORT((short)4, "server_port"),
- USED_PORTS((short)5, "used_ports"),
- META((short)6, "meta"),
- SCHEDULER_META((short)7, "scheduler_meta"),
- UPTIME_SECS((short)8, "uptime_secs"),
- VERSION((short)9, "version"),
- RESOURCES_MAP((short)10, "resources_map");
+ USED_PORTS((short)4, "used_ports"),
+ META((short)5, "meta"),
+ SCHEDULER_META((short)6, "scheduler_meta"),
+ UPTIME_SECS((short)7, "uptime_secs"),
+ VERSION((short)8, "version"),
+ RESOURCES_MAP((short)9, "resources_map"),
+ SERVER_PORT((short)10, "server_port");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -115,20 +85,20 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return HOSTNAME;
case 3: // ASSIGNMENT_ID
return ASSIGNMENT_ID;
- case 4: // SERVER_PORT
- return SERVER_PORT;
- case 5: // USED_PORTS
+ case 4: // USED_PORTS
return USED_PORTS;
- case 6: // META
+ case 5: // META
return META;
- case 7: // SCHEDULER_META
+ case 6: // SCHEDULER_META
return SCHEDULER_META;
- case 8: // UPTIME_SECS
+ case 7: // UPTIME_SECS
return UPTIME_SECS;
- case 9: // VERSION
+ case 8: // VERSION
return VERSION;
- case 10: // RESOURCES_MAP
+ case 9: // RESOURCES_MAP
return RESOURCES_MAP;
+ case 10: // SERVER_PORT
+ return SERVER_PORT;
default:
return null;
}
@@ -140,21 +110,21 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -163,28 +133,26 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TIME_SECS_ISSET_ID = 0;
- private static final int __SERVER_PORT_ISSET_ID = 1;
- private static final int __UPTIME_SECS_ISSET_ID = 2;
+ private static final int __UPTIME_SECS_ISSET_ID = 1;
+ private static final int __SERVER_PORT_ISSET_ID = 2;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.ASSIGNMENT_ID,_Fields.SERVER_PORT,_Fields.USED_PORTS,_Fields.META,_Fields.SCHEDULER_META,_Fields.UPTIME_SECS,_Fields.VERSION,_Fields.RESOURCES_MAP};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ private static final _Fields optionals[] = {_Fields.ASSIGNMENT_ID,_Fields.USED_PORTS,_Fields.META,_Fields.SCHEDULER_META,_Fields.UPTIME_SECS,_Fields.VERSION,_Fields.RESOURCES_MAP,_Fields.SERVER_PORT};
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("time_secs", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ASSIGNMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("assignment_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.SERVER_PORT, new org.apache.thrift.meta_data.FieldMetaData("server_port", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.USED_PORTS, new org.apache.thrift.meta_data.FieldMetaData("used_ports", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
@@ -203,7 +171,9 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ tmpMap.put(_Fields.SERVER_PORT, new org.apache.thrift.meta_data.FieldMetaData("server_port", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SupervisorInfo.class, metaDataMap);
}
@@ -212,7 +182,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
public SupervisorInfo(
long time_secs,
- String hostname)
+ java.lang.String hostname)
{
this();
this.time_secs = time_secs;
@@ -232,17 +202,16 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
if (other.is_set_assignment_id()) {
this.assignment_id = other.assignment_id;
}
- this.server_port = other.server_port;
if (other.is_set_used_ports()) {
- List<Long> __this__used_ports = new ArrayList<Long>(other.used_ports);
+ java.util.List<java.lang.Long> __this__used_ports = new java.util.ArrayList<java.lang.Long>(other.used_ports);
this.used_ports = __this__used_ports;
}
if (other.is_set_meta()) {
- List<Long> __this__meta = new ArrayList<Long>(other.meta);
+ java.util.List<java.lang.Long> __this__meta = new java.util.ArrayList<java.lang.Long>(other.meta);
this.meta = __this__meta;
}
if (other.is_set_scheduler_meta()) {
- Map<String,String> __this__scheduler_meta = new HashMap<String,String>(other.scheduler_meta);
+ java.util.Map<java.lang.String,java.lang.String> __this__scheduler_meta = new java.util.HashMap<java.lang.String,java.lang.String>(other.scheduler_meta);
this.scheduler_meta = __this__scheduler_meta;
}
this.uptime_secs = other.uptime_secs;
@@ -250,9 +219,10 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
this.version = other.version;
}
if (other.is_set_resources_map()) {
- Map<String,Double> __this__resources_map = new HashMap<String,Double>(other.resources_map);
+ java.util.Map<java.lang.String,java.lang.Double> __this__resources_map = new java.util.HashMap<java.lang.String,java.lang.Double>(other.resources_map);
this.resources_map = __this__resources_map;
}
+ this.server_port = other.server_port;
}
public SupervisorInfo deepCopy() {
@@ -265,8 +235,6 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
this.time_secs = 0;
this.hostname = null;
this.assignment_id = null;
- set_server_port_isSet(false);
- this.server_port = 0;
this.used_ports = null;
this.meta = null;
this.scheduler_meta = null;
@@ -274,6 +242,8 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
this.uptime_secs = 0;
this.version = null;
this.resources_map = null;
+ set_server_port_isSet(false);
+ this.server_port = 0;
}
public long get_time_secs() {
@@ -286,23 +256,23 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
public void unset_time_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
}
/** Returns true if field time_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_time_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
}
public void set_time_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_SECS_ISSET_ID, value);
}
- public String get_hostname() {
+ public java.lang.String get_hostname() {
return this.hostname;
}
- public void set_hostname(String hostname) {
+ public void set_hostname(java.lang.String hostname) {
this.hostname = hostname;
}
@@ -321,11 +291,11 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
}
- public String get_assignment_id() {
+ public java.lang.String get_assignment_id() {
return this.assignment_id;
}
- public void set_assignment_id(String assignment_id) {
+ public void set_assignment_id(java.lang.String assignment_id) {
this.assignment_id = assignment_id;
}
@@ -344,48 +314,26 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
}
- public int get_server_port() {
- return this.server_port;
- }
-
- public void set_server_port(int server_port) {
- this.server_port = server_port;
- set_server_port_isSet(true);
- }
-
- public void unset_server_port() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SERVER_PORT_ISSET_ID);
- }
-
- /** Returns true if field server_port is set (has been assigned a value) and false otherwise */
- public boolean is_set_server_port() {
- return EncodingUtils.testBit(__isset_bitfield, __SERVER_PORT_ISSET_ID);
- }
-
- public void set_server_port_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SERVER_PORT_ISSET_ID, value);
- }
-
public int get_used_ports_size() {
return (this.used_ports == null) ? 0 : this.used_ports.size();
}
- public java.util.Iterator<Long> get_used_ports_iterator() {
+ public java.util.Iterator<java.lang.Long> get_used_ports_iterator() {
return (this.used_ports == null) ? null : this.used_ports.iterator();
}
public void add_to_used_ports(long elem) {
if (this.used_ports == null) {
- this.used_ports = new ArrayList<Long>();
+ this.used_ports = new java.util.ArrayList<java.lang.Long>();
}
this.used_ports.add(elem);
}
- public List<Long> get_used_ports() {
+ public java.util.List<java.lang.Long> get_used_ports() {
return this.used_ports;
}
- public void set_used_ports(List<Long> used_ports) {
+ public void set_used_ports(java.util.List<java.lang.Long> used_ports) {
this.used_ports = used_ports;
}
@@ -408,22 +356,22 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return (this.meta == null) ? 0 : this.meta.size();
}
- public java.util.Iterator<Long> get_meta_iterator() {
+ public java.util.Iterator<java.lang.Long> get_meta_iterator() {
return (this.meta == null) ? null : this.meta.iterator();
}
public void add_to_meta(long elem) {
if (this.meta == null) {
- this.meta = new ArrayList<Long>();
+ this.meta = new java.util.ArrayList<java.lang.Long>();
}
this.meta.add(elem);
}
- public List<Long> get_meta() {
+ public java.util.List<java.lang.Long> get_meta() {
return this.meta;
}
- public void set_meta(List<Long> meta) {
+ public void set_meta(java.util.List<java.lang.Long> meta) {
this.meta = meta;
}
@@ -446,18 +394,18 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return (this.scheduler_meta == null) ? 0 : this.scheduler_meta.size();
}
- public void put_to_scheduler_meta(String key, String val) {
+ public void put_to_scheduler_meta(java.lang.String key, java.lang.String val) {
if (this.scheduler_meta == null) {
- this.scheduler_meta = new HashMap<String,String>();
+ this.scheduler_meta = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.scheduler_meta.put(key, val);
}
- public Map<String,String> get_scheduler_meta() {
+ public java.util.Map<java.lang.String,java.lang.String> get_scheduler_meta() {
return this.scheduler_meta;
}
- public void set_scheduler_meta(Map<String,String> scheduler_meta) {
+ public void set_scheduler_meta(java.util.Map<java.lang.String,java.lang.String> scheduler_meta) {
this.scheduler_meta = scheduler_meta;
}
@@ -486,23 +434,23 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
public void unset_uptime_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
/** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_uptime_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
public void set_uptime_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
}
- public String get_version() {
+ public java.lang.String get_version() {
return this.version;
}
- public void set_version(String version) {
+ public void set_version(java.lang.String version) {
this.version = version;
}
@@ -525,18 +473,18 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return (this.resources_map == null) ? 0 : this.resources_map.size();
}
- public void put_to_resources_map(String key, double val) {
+ public void put_to_resources_map(java.lang.String key, double val) {
if (this.resources_map == null) {
- this.resources_map = new HashMap<String,Double>();
+ this.resources_map = new java.util.HashMap<java.lang.String,java.lang.Double>();
}
this.resources_map.put(key, val);
}
- public Map<String,Double> get_resources_map() {
+ public java.util.Map<java.lang.String,java.lang.Double> get_resources_map() {
return this.resources_map;
}
- public void set_resources_map(Map<String,Double> resources_map) {
+ public void set_resources_map(java.util.Map<java.lang.String,java.lang.Double> resources_map) {
this.resources_map = resources_map;
}
@@ -555,13 +503,35 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public int get_server_port() {
+ return this.server_port;
+ }
+
+ public void set_server_port(int server_port) {
+ this.server_port = server_port;
+ set_server_port_isSet(true);
+ }
+
+ public void unset_server_port() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SERVER_PORT_ISSET_ID);
+ }
+
+ /** Returns true if field server_port is set (has been assigned a value) and false otherwise */
+ public boolean is_set_server_port() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SERVER_PORT_ISSET_ID);
+ }
+
+ public void set_server_port_isSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SERVER_PORT_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TIME_SECS:
if (value == null) {
unset_time_secs();
} else {
- set_time_secs((Long)value);
+ set_time_secs((java.lang.Long)value);
}
break;
@@ -569,7 +539,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
if (value == null) {
unset_hostname();
} else {
- set_hostname((String)value);
+ set_hostname((java.lang.String)value);
}
break;
@@ -577,15 +547,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
if (value == null) {
unset_assignment_id();
} else {
- set_assignment_id((String)value);
- }
- break;
-
- case SERVER_PORT:
- if (value == null) {
- unset_server_port();
- } else {
- set_server_port((Integer)value);
+ set_assignment_id((java.lang.String)value);
}
break;
@@ -593,7 +555,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
if (value == null) {
unset_used_ports();
} else {
- set_used_ports((List<Long>)value);
+ set_used_ports((java.util.List<java.lang.Long>)value);
}
break;
@@ -601,7 +563,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
if (value == null) {
unset_meta();
} else {
- set_meta((List<Long>)value);
+ set_meta((java.util.List<java.lang.Long>)value);
}
break;
@@ -609,7 +571,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
if (value == null) {
unset_scheduler_meta();
} else {
- set_scheduler_meta((Map<String,String>)value);
+ set_scheduler_meta((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
@@ -617,7 +579,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
if (value == null) {
unset_uptime_secs();
} else {
- set_uptime_secs((Long)value);
+ set_uptime_secs((java.lang.Long)value);
}
break;
@@ -625,7 +587,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
if (value == null) {
unset_version();
} else {
- set_version((String)value);
+ set_version((java.lang.String)value);
}
break;
@@ -633,14 +595,22 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
if (value == null) {
unset_resources_map();
} else {
- set_resources_map((Map<String,Double>)value);
+ set_resources_map((java.util.Map<java.lang.String,java.lang.Double>)value);
+ }
+ break;
+
+ case SERVER_PORT:
+ if (value == null) {
+ unset_server_port();
+ } else {
+ set_server_port((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TIME_SECS:
return get_time_secs();
@@ -651,9 +621,6 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
case ASSIGNMENT_ID:
return get_assignment_id();
- case SERVER_PORT:
- return get_server_port();
-
case USED_PORTS:
return get_used_ports();
@@ -672,14 +639,17 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
case RESOURCES_MAP:
return get_resources_map();
+ case SERVER_PORT:
+ return get_server_port();
+
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -689,8 +659,6 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return is_set_hostname();
case ASSIGNMENT_ID:
return is_set_assignment_id();
- case SERVER_PORT:
- return is_set_server_port();
case USED_PORTS:
return is_set_used_ports();
case META:
@@ -703,12 +671,14 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return is_set_version();
case RESOURCES_MAP:
return is_set_resources_map();
+ case SERVER_PORT:
+ return is_set_server_port();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof SupervisorInfo)
@@ -719,6 +689,8 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
public boolean equals(SupervisorInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_time_secs = true;
boolean that_present_time_secs = true;
@@ -747,15 +719,6 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return false;
}
- boolean this_present_server_port = true && this.is_set_server_port();
- boolean that_present_server_port = true && that.is_set_server_port();
- if (this_present_server_port || that_present_server_port) {
- if (!(this_present_server_port && that_present_server_port))
- return false;
- if (this.server_port != that.server_port)
- return false;
- }
-
boolean this_present_used_ports = true && this.is_set_used_ports();
boolean that_present_used_ports = true && that.is_set_used_ports();
if (this_present_used_ports || that_present_used_ports) {
@@ -810,64 +773,61 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return false;
}
+ boolean this_present_server_port = true && this.is_set_server_port();
+ boolean that_present_server_port = true && that.is_set_server_port();
+ if (this_present_server_port || that_present_server_port) {
+ if (!(this_present_server_port && that_present_server_port))
+ return false;
+ if (this.server_port != that.server_port)
+ return false;
+ }
+
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_time_secs = true;
- list.add(present_time_secs);
- if (present_time_secs)
- list.add(time_secs);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(time_secs);
- boolean present_hostname = true && (is_set_hostname());
- list.add(present_hostname);
- if (present_hostname)
- list.add(hostname);
+ hashCode = hashCode * 8191 + ((is_set_hostname()) ? 131071 : 524287);
+ if (is_set_hostname())
+ hashCode = hashCode * 8191 + hostname.hashCode();
- boolean present_assignment_id = true && (is_set_assignment_id());
- list.add(present_assignment_id);
- if (present_assignment_id)
- list.add(assignment_id);
+ hashCode = hashCode * 8191 + ((is_set_assignment_id()) ? 131071 : 524287);
+ if (is_set_assignment_id())
+ hashCode = hashCode * 8191 + assignment_id.hashCode();
- boolean present_server_port = true && (is_set_server_port());
- list.add(present_server_port);
- if (present_server_port)
- list.add(server_port);
+ hashCode = hashCode * 8191 + ((is_set_used_ports()) ? 131071 : 524287);
+ if (is_set_used_ports())
+ hashCode = hashCode * 8191 + used_ports.hashCode();
- boolean present_used_ports = true && (is_set_used_ports());
- list.add(present_used_ports);
- if (present_used_ports)
- list.add(used_ports);
+ hashCode = hashCode * 8191 + ((is_set_meta()) ? 131071 : 524287);
+ if (is_set_meta())
+ hashCode = hashCode * 8191 + meta.hashCode();
- boolean present_meta = true && (is_set_meta());
- list.add(present_meta);
- if (present_meta)
- list.add(meta);
+ hashCode = hashCode * 8191 + ((is_set_scheduler_meta()) ? 131071 : 524287);
+ if (is_set_scheduler_meta())
+ hashCode = hashCode * 8191 + scheduler_meta.hashCode();
- boolean present_scheduler_meta = true && (is_set_scheduler_meta());
- list.add(present_scheduler_meta);
- if (present_scheduler_meta)
- list.add(scheduler_meta);
+ hashCode = hashCode * 8191 + ((is_set_uptime_secs()) ? 131071 : 524287);
+ if (is_set_uptime_secs())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(uptime_secs);
- boolean present_uptime_secs = true && (is_set_uptime_secs());
- list.add(present_uptime_secs);
- if (present_uptime_secs)
- list.add(uptime_secs);
+ hashCode = hashCode * 8191 + ((is_set_version()) ? 131071 : 524287);
+ if (is_set_version())
+ hashCode = hashCode * 8191 + version.hashCode();
- boolean present_version = true && (is_set_version());
- list.add(present_version);
- if (present_version)
- list.add(version);
+ hashCode = hashCode * 8191 + ((is_set_resources_map()) ? 131071 : 524287);
+ if (is_set_resources_map())
+ hashCode = hashCode * 8191 + resources_map.hashCode();
- boolean present_resources_map = true && (is_set_resources_map());
- list.add(present_resources_map);
- if (present_resources_map)
- list.add(resources_map);
+ hashCode = hashCode * 8191 + ((is_set_server_port()) ? 131071 : 524287);
+ if (is_set_server_port())
+ hashCode = hashCode * 8191 + server_port;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -878,7 +838,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -888,7 +848,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_hostname()).compareTo(other.is_set_hostname());
+ lastComparison = java.lang.Boolean.valueOf(is_set_hostname()).compareTo(other.is_set_hostname());
if (lastComparison != 0) {
return lastComparison;
}
@@ -898,7 +858,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assignment_id()).compareTo(other.is_set_assignment_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assignment_id()).compareTo(other.is_set_assignment_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -908,17 +868,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_server_port()).compareTo(other.is_set_server_port());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_server_port()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.server_port, other.server_port);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_used_ports()).compareTo(other.is_set_used_ports());
+ lastComparison = java.lang.Boolean.valueOf(is_set_used_ports()).compareTo(other.is_set_used_ports());
if (lastComparison != 0) {
return lastComparison;
}
@@ -928,7 +878,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_meta()).compareTo(other.is_set_meta());
+ lastComparison = java.lang.Boolean.valueOf(is_set_meta()).compareTo(other.is_set_meta());
if (lastComparison != 0) {
return lastComparison;
}
@@ -938,7 +888,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_scheduler_meta()).compareTo(other.is_set_scheduler_meta());
+ lastComparison = java.lang.Boolean.valueOf(is_set_scheduler_meta()).compareTo(other.is_set_scheduler_meta());
if (lastComparison != 0) {
return lastComparison;
}
@@ -948,7 +898,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -958,7 +908,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -968,7 +918,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_resources_map()).compareTo(other.is_set_resources_map());
+ lastComparison = java.lang.Boolean.valueOf(is_set_resources_map()).compareTo(other.is_set_resources_map());
if (lastComparison != 0) {
return lastComparison;
}
@@ -978,6 +928,16 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
return lastComparison;
}
}
+ lastComparison = java.lang.Boolean.valueOf(is_set_server_port()).compareTo(other.is_set_server_port());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_server_port()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.server_port, other.server_port);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -986,16 +946,16 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SupervisorInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SupervisorInfo(");
boolean first = true;
sb.append("time_secs:");
@@ -1019,12 +979,6 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
first = false;
}
- if (is_set_server_port()) {
- if (!first) sb.append(", ");
- sb.append("server_port:");
- sb.append(this.server_port);
- first = false;
- }
if (is_set_used_ports()) {
if (!first) sb.append(", ");
sb.append("used_ports:");
@@ -1081,6 +1035,12 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
first = false;
}
+ if (is_set_server_port()) {
+ if (!first) sb.append(", ");
+ sb.append("server_port:");
+ sb.append(this.server_port);
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -1106,7 +1066,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1116,13 +1076,13 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
}
- private static class SupervisorInfoStandardSchemeFactory implements SchemeFactory {
+ private static class SupervisorInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SupervisorInfoStandardScheme getScheme() {
return new SupervisorInfoStandardScheme();
}
}
- private static class SupervisorInfoStandardScheme extends StandardScheme<SupervisorInfo> {
+ private static class SupervisorInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<SupervisorInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SupervisorInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1158,19 +1118,11 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 4: // SERVER_PORT
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.server_port = iprot.readI32();
- struct.set_server_port_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // USED_PORTS
+ case 4: // USED_PORTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list622 = iprot.readListBegin();
- struct.used_ports = new ArrayList<Long>(_list622.size);
+ struct.used_ports = new java.util.ArrayList<java.lang.Long>(_list622.size);
long _elem623;
for (int _i624 = 0; _i624 < _list622.size; ++_i624)
{
@@ -1184,11 +1136,11 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 6: // META
+ case 5: // META
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list625 = iprot.readListBegin();
- struct.meta = new ArrayList<Long>(_list625.size);
+ struct.meta = new java.util.ArrayList<java.lang.Long>(_list625.size);
long _elem626;
for (int _i627 = 0; _i627 < _list625.size; ++_i627)
{
@@ -1202,13 +1154,13 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 7: // SCHEDULER_META
+ case 6: // SCHEDULER_META
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map628 = iprot.readMapBegin();
- struct.scheduler_meta = new HashMap<String,String>(2*_map628.size);
- String _key629;
- String _val630;
+ struct.scheduler_meta = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map628.size);
+ java.lang.String _key629;
+ java.lang.String _val630;
for (int _i631 = 0; _i631 < _map628.size; ++_i631)
{
_key629 = iprot.readString();
@@ -1222,7 +1174,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 8: // UPTIME_SECS
+ case 7: // UPTIME_SECS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.uptime_secs = iprot.readI64();
struct.set_uptime_secs_isSet(true);
@@ -1230,7 +1182,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 9: // VERSION
+ case 8: // VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.version = iprot.readString();
struct.set_version_isSet(true);
@@ -1238,12 +1190,12 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 10: // RESOURCES_MAP
+ case 9: // RESOURCES_MAP
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map632 = iprot.readMapBegin();
- struct.resources_map = new HashMap<String,Double>(2*_map632.size);
- String _key633;
+ struct.resources_map = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map632.size);
+ java.lang.String _key633;
double _val634;
for (int _i635 = 0; _i635 < _map632.size; ++_i635)
{
@@ -1258,6 +1210,14 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 10: // SERVER_PORT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.server_port = iprot.readI32();
+ struct.set_server_port_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1286,11 +1246,6 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
oprot.writeFieldEnd();
}
}
- if (struct.is_set_server_port()) {
- oprot.writeFieldBegin(SERVER_PORT_FIELD_DESC);
- oprot.writeI32(struct.server_port);
- oprot.writeFieldEnd();
- }
if (struct.used_ports != null) {
if (struct.is_set_used_ports()) {
oprot.writeFieldBegin(USED_PORTS_FIELD_DESC);
@@ -1324,7 +1279,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
oprot.writeFieldBegin(SCHEDULER_META_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.scheduler_meta.size()));
- for (Map.Entry<String, String> _iter638 : struct.scheduler_meta.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter638 : struct.scheduler_meta.entrySet())
{
oprot.writeString(_iter638.getKey());
oprot.writeString(_iter638.getValue());
@@ -1351,7 +1306,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
oprot.writeFieldBegin(RESOURCES_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, struct.resources_map.size()));
- for (Map.Entry<String, Double> _iter639 : struct.resources_map.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter639 : struct.resources_map.entrySet())
{
oprot.writeString(_iter639.getKey());
oprot.writeDouble(_iter639.getValue());
@@ -1361,57 +1316,59 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
oprot.writeFieldEnd();
}
}
+ if (struct.is_set_server_port()) {
+ oprot.writeFieldBegin(SERVER_PORT_FIELD_DESC);
+ oprot.writeI32(struct.server_port);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
- private static class SupervisorInfoTupleSchemeFactory implements SchemeFactory {
+ private static class SupervisorInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SupervisorInfoTupleScheme getScheme() {
return new SupervisorInfoTupleScheme();
}
}
- private static class SupervisorInfoTupleScheme extends TupleScheme<SupervisorInfo> {
+ private static class SupervisorInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<SupervisorInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SupervisorInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.time_secs);
oprot.writeString(struct.hostname);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_assignment_id()) {
optionals.set(0);
}
- if (struct.is_set_server_port()) {
+ if (struct.is_set_used_ports()) {
optionals.set(1);
}
- if (struct.is_set_used_ports()) {
+ if (struct.is_set_meta()) {
optionals.set(2);
}
- if (struct.is_set_meta()) {
+ if (struct.is_set_scheduler_meta()) {
optionals.set(3);
}
- if (struct.is_set_scheduler_meta()) {
+ if (struct.is_set_uptime_secs()) {
optionals.set(4);
}
- if (struct.is_set_uptime_secs()) {
+ if (struct.is_set_version()) {
optionals.set(5);
}
- if (struct.is_set_version()) {
+ if (struct.is_set_resources_map()) {
optionals.set(6);
}
- if (struct.is_set_resources_map()) {
+ if (struct.is_set_server_port()) {
optionals.set(7);
}
oprot.writeBitSet(optionals, 8);
if (struct.is_set_assignment_id()) {
oprot.writeString(struct.assignment_id);
}
- if (struct.is_set_server_port()) {
- oprot.writeI32(struct.server_port);
- }
if (struct.is_set_used_ports()) {
{
oprot.writeI32(struct.used_ports.size());
@@ -1433,7 +1390,7 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
if (struct.is_set_scheduler_meta()) {
{
oprot.writeI32(struct.scheduler_meta.size());
- for (Map.Entry<String, String> _iter642 : struct.scheduler_meta.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter642 : struct.scheduler_meta.entrySet())
{
oprot.writeString(_iter642.getKey());
oprot.writeString(_iter642.getValue());
@@ -1449,35 +1406,34 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
if (struct.is_set_resources_map()) {
{
oprot.writeI32(struct.resources_map.size());
- for (Map.Entry<String, Double> _iter643 : struct.resources_map.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter643 : struct.resources_map.entrySet())
{
oprot.writeString(_iter643.getKey());
oprot.writeDouble(_iter643.getValue());
}
}
}
+ if (struct.is_set_server_port()) {
+ oprot.writeI32(struct.server_port);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SupervisorInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.time_secs = iprot.readI64();
struct.set_time_secs_isSet(true);
struct.hostname = iprot.readString();
struct.set_hostname_isSet(true);
- BitSet incoming = iprot.readBitSet(8);
+ java.util.BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
struct.assignment_id = iprot.readString();
struct.set_assignment_id_isSet(true);
}
if (incoming.get(1)) {
- struct.server_port = iprot.readI32();
- struct.set_server_port_isSet(true);
- }
- if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list644 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.used_ports = new ArrayList<Long>(_list644.size);
+ struct.used_ports = new java.util.ArrayList<java.lang.Long>(_list644.size);
long _elem645;
for (int _i646 = 0; _i646 < _list644.size; ++_i646)
{
@@ -1487,10 +1443,10 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
struct.set_used_ports_isSet(true);
}
- if (incoming.get(3)) {
+ if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list647 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.meta = new ArrayList<Long>(_list647.size);
+ struct.meta = new java.util.ArrayList<java.lang.Long>(_list647.size);
long _elem648;
for (int _i649 = 0; _i649 < _list647.size; ++_i649)
{
@@ -1500,12 +1456,12 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
struct.set_meta_isSet(true);
}
- if (incoming.get(4)) {
+ if (incoming.get(3)) {
{
org.apache.thrift.protocol.TMap _map650 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.scheduler_meta = new HashMap<String,String>(2*_map650.size);
- String _key651;
- String _val652;
+ struct.scheduler_meta = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map650.size);
+ java.lang.String _key651;
+ java.lang.String _val652;
for (int _i653 = 0; _i653 < _map650.size; ++_i653)
{
_key651 = iprot.readString();
@@ -1515,19 +1471,19 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
struct.set_scheduler_meta_isSet(true);
}
- if (incoming.get(5)) {
+ if (incoming.get(4)) {
struct.uptime_secs = iprot.readI64();
struct.set_uptime_secs_isSet(true);
}
- if (incoming.get(6)) {
+ if (incoming.get(5)) {
struct.version = iprot.readString();
struct.set_version_isSet(true);
}
- if (incoming.get(7)) {
+ if (incoming.get(6)) {
{
org.apache.thrift.protocol.TMap _map654 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- struct.resources_map = new HashMap<String,Double>(2*_map654.size);
- String _key655;
+ struct.resources_map = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map654.size);
+ java.lang.String _key655;
double _val656;
for (int _i657 = 0; _i657 < _map654.size; ++_i657)
{
@@ -1538,8 +1494,15 @@ public class SupervisorInfo implements org.apache.thrift.TBase<SupervisorInfo, S
}
struct.set_resources_map_isSet(true);
}
+ if (incoming.get(7)) {
+ struct.server_port = iprot.readI32();
+ struct.set_server_port_isSet(true);
+ }
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[06/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/WorkerSummary.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/WorkerSummary.java b/storm-client/src/jvm/org/apache/storm/generated/WorkerSummary.java
index 31c02a1..2530abf 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/WorkerSummary.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/WorkerSummary.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, WorkerSummary._Fields>, java.io.Serializable, Cloneable, Comparable<WorkerSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkerSummary");
@@ -71,19 +44,16 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
private static final org.apache.thrift.protocol.TField ASSIGNED_MEMOFFHEAP_FIELD_DESC = new org.apache.thrift.protocol.TField("assigned_memoffheap", org.apache.thrift.protocol.TType.DOUBLE, (short)525);
private static final org.apache.thrift.protocol.TField ASSIGNED_CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("assigned_cpu", org.apache.thrift.protocol.TType.DOUBLE, (short)526);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkerSummaryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkerSummaryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WorkerSummaryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WorkerSummaryTupleSchemeFactory();
- private String supervisor_id; // optional
- private String host; // optional
+ private java.lang.String supervisor_id; // optional
+ private java.lang.String host; // optional
private int port; // optional
- private String topology_id; // optional
- private String topology_name; // optional
+ private java.lang.String topology_id; // optional
+ private java.lang.String topology_name; // optional
private int num_executors; // optional
- private Map<String,Long> component_to_num_tasks; // optional
+ private java.util.Map<java.lang.String,java.lang.Long> component_to_num_tasks; // optional
private int time_secs; // optional
private int uptime_secs; // optional
private double requested_memonheap; // optional
@@ -111,10 +81,10 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
ASSIGNED_MEMOFFHEAP((short)525, "assigned_memoffheap"),
ASSIGNED_CPU((short)526, "assigned_cpu");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -165,21 +135,21 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -188,7 +158,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -206,9 +176,9 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
private static final int __ASSIGNED_CPU_ISSET_ID = 9;
private short __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.SUPERVISOR_ID,_Fields.HOST,_Fields.PORT,_Fields.TOPOLOGY_ID,_Fields.TOPOLOGY_NAME,_Fields.NUM_EXECUTORS,_Fields.COMPONENT_TO_NUM_TASKS,_Fields.TIME_SECS,_Fields.UPTIME_SECS,_Fields.REQUESTED_MEMONHEAP,_Fields.REQUESTED_MEMOFFHEAP,_Fields.REQUESTED_CPU,_Fields.ASSIGNED_MEMONHEAP,_Fields.ASSIGNED_MEMOFFHEAP,_Fields.ASSIGNED_CPU};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUPERVISOR_ID, new org.apache.thrift.meta_data.FieldMetaData("supervisor_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -241,7 +211,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.ASSIGNED_CPU, new org.apache.thrift.meta_data.FieldMetaData("assigned_cpu", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkerSummary.class, metaDataMap);
}
@@ -268,7 +238,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
this.num_executors = other.num_executors;
if (other.is_set_component_to_num_tasks()) {
- Map<String,Long> __this__component_to_num_tasks = new HashMap<String,Long>(other.component_to_num_tasks);
+ java.util.Map<java.lang.String,java.lang.Long> __this__component_to_num_tasks = new java.util.HashMap<java.lang.String,java.lang.Long>(other.component_to_num_tasks);
this.component_to_num_tasks = __this__component_to_num_tasks;
}
this.time_secs = other.time_secs;
@@ -314,11 +284,11 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
this.assigned_cpu = 0.0;
}
- public String get_supervisor_id() {
+ public java.lang.String get_supervisor_id() {
return this.supervisor_id;
}
- public void set_supervisor_id(String supervisor_id) {
+ public void set_supervisor_id(java.lang.String supervisor_id) {
this.supervisor_id = supervisor_id;
}
@@ -337,11 +307,11 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
}
- public String get_host() {
+ public java.lang.String get_host() {
return this.host;
}
- public void set_host(String host) {
+ public void set_host(java.lang.String host) {
this.host = host;
}
@@ -370,23 +340,23 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
public void unset_port() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean is_set_port() {
- return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
}
public void set_port_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
}
- public String get_topology_id() {
+ public java.lang.String get_topology_id() {
return this.topology_id;
}
- public void set_topology_id(String topology_id) {
+ public void set_topology_id(java.lang.String topology_id) {
this.topology_id = topology_id;
}
@@ -405,11 +375,11 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
}
- public String get_topology_name() {
+ public java.lang.String get_topology_name() {
return this.topology_name;
}
- public void set_topology_name(String topology_name) {
+ public void set_topology_name(java.lang.String topology_name) {
this.topology_name = topology_name;
}
@@ -438,34 +408,34 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
public void unset_num_executors() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
}
/** Returns true if field num_executors is set (has been assigned a value) and false otherwise */
public boolean is_set_num_executors() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
}
public void set_num_executors_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID, value);
}
public int get_component_to_num_tasks_size() {
return (this.component_to_num_tasks == null) ? 0 : this.component_to_num_tasks.size();
}
- public void put_to_component_to_num_tasks(String key, long val) {
+ public void put_to_component_to_num_tasks(java.lang.String key, long val) {
if (this.component_to_num_tasks == null) {
- this.component_to_num_tasks = new HashMap<String,Long>();
+ this.component_to_num_tasks = new java.util.HashMap<java.lang.String,java.lang.Long>();
}
this.component_to_num_tasks.put(key, val);
}
- public Map<String,Long> get_component_to_num_tasks() {
+ public java.util.Map<java.lang.String,java.lang.Long> get_component_to_num_tasks() {
return this.component_to_num_tasks;
}
- public void set_component_to_num_tasks(Map<String,Long> component_to_num_tasks) {
+ public void set_component_to_num_tasks(java.util.Map<java.lang.String,java.lang.Long> component_to_num_tasks) {
this.component_to_num_tasks = component_to_num_tasks;
}
@@ -494,16 +464,16 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
public void unset_time_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
}
/** Returns true if field time_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_time_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
}
public void set_time_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_SECS_ISSET_ID, value);
}
public int get_uptime_secs() {
@@ -516,16 +486,16 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
public void unset_uptime_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
/** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_uptime_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
public void set_uptime_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
}
public double get_requested_memonheap() {
@@ -538,16 +508,16 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
public void unset_requested_memonheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
}
/** Returns true if field requested_memonheap is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_memonheap() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
}
public void set_requested_memonheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID, value);
}
public double get_requested_memoffheap() {
@@ -560,16 +530,16 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
public void unset_requested_memoffheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
}
/** Returns true if field requested_memoffheap is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_memoffheap() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
}
public void set_requested_memoffheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID, value);
}
public double get_requested_cpu() {
@@ -582,16 +552,16 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
public void unset_requested_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
}
/** Returns true if field requested_cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
}
public void set_requested_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID, value);
}
public double get_assigned_memonheap() {
@@ -604,16 +574,16 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
public void unset_assigned_memonheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
}
/** Returns true if field assigned_memonheap is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_memonheap() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
}
public void set_assigned_memonheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID, value);
}
public double get_assigned_memoffheap() {
@@ -626,16 +596,16 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
public void unset_assigned_memoffheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
}
/** Returns true if field assigned_memoffheap is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_memoffheap() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
}
public void set_assigned_memoffheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID, value);
}
public double get_assigned_cpu() {
@@ -648,25 +618,25 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
public void unset_assigned_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
}
/** Returns true if field assigned_cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
}
public void set_assigned_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUPERVISOR_ID:
if (value == null) {
unset_supervisor_id();
} else {
- set_supervisor_id((String)value);
+ set_supervisor_id((java.lang.String)value);
}
break;
@@ -674,7 +644,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_host();
} else {
- set_host((String)value);
+ set_host((java.lang.String)value);
}
break;
@@ -682,7 +652,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_port();
} else {
- set_port((Integer)value);
+ set_port((java.lang.Integer)value);
}
break;
@@ -690,7 +660,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_topology_id();
} else {
- set_topology_id((String)value);
+ set_topology_id((java.lang.String)value);
}
break;
@@ -698,7 +668,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_topology_name();
} else {
- set_topology_name((String)value);
+ set_topology_name((java.lang.String)value);
}
break;
@@ -706,7 +676,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_num_executors();
} else {
- set_num_executors((Integer)value);
+ set_num_executors((java.lang.Integer)value);
}
break;
@@ -714,7 +684,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_component_to_num_tasks();
} else {
- set_component_to_num_tasks((Map<String,Long>)value);
+ set_component_to_num_tasks((java.util.Map<java.lang.String,java.lang.Long>)value);
}
break;
@@ -722,7 +692,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_time_secs();
} else {
- set_time_secs((Integer)value);
+ set_time_secs((java.lang.Integer)value);
}
break;
@@ -730,7 +700,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_uptime_secs();
} else {
- set_uptime_secs((Integer)value);
+ set_uptime_secs((java.lang.Integer)value);
}
break;
@@ -738,7 +708,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_requested_memonheap();
} else {
- set_requested_memonheap((Double)value);
+ set_requested_memonheap((java.lang.Double)value);
}
break;
@@ -746,7 +716,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_requested_memoffheap();
} else {
- set_requested_memoffheap((Double)value);
+ set_requested_memoffheap((java.lang.Double)value);
}
break;
@@ -754,7 +724,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_requested_cpu();
} else {
- set_requested_cpu((Double)value);
+ set_requested_cpu((java.lang.Double)value);
}
break;
@@ -762,7 +732,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_assigned_memonheap();
} else {
- set_assigned_memonheap((Double)value);
+ set_assigned_memonheap((java.lang.Double)value);
}
break;
@@ -770,7 +740,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_assigned_memoffheap();
} else {
- set_assigned_memoffheap((Double)value);
+ set_assigned_memoffheap((java.lang.Double)value);
}
break;
@@ -778,14 +748,14 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (value == null) {
unset_assigned_cpu();
} else {
- set_assigned_cpu((Double)value);
+ set_assigned_cpu((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUPERVISOR_ID:
return get_supervisor_id();
@@ -833,13 +803,13 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return get_assigned_cpu();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -874,11 +844,11 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
case ASSIGNED_CPU:
return is_set_assigned_cpu();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof WorkerSummary)
@@ -889,6 +859,8 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
public boolean equals(WorkerSummary that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_supervisor_id = true && this.is_set_supervisor_id();
boolean that_present_supervisor_id = true && that.is_set_supervisor_id();
@@ -1030,84 +1002,69 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_supervisor_id = true && (is_set_supervisor_id());
- list.add(present_supervisor_id);
- if (present_supervisor_id)
- list.add(supervisor_id);
-
- boolean present_host = true && (is_set_host());
- list.add(present_host);
- if (present_host)
- list.add(host);
-
- boolean present_port = true && (is_set_port());
- list.add(present_port);
- if (present_port)
- list.add(port);
-
- boolean present_topology_id = true && (is_set_topology_id());
- list.add(present_topology_id);
- if (present_topology_id)
- list.add(topology_id);
-
- boolean present_topology_name = true && (is_set_topology_name());
- list.add(present_topology_name);
- if (present_topology_name)
- list.add(topology_name);
-
- boolean present_num_executors = true && (is_set_num_executors());
- list.add(present_num_executors);
- if (present_num_executors)
- list.add(num_executors);
-
- boolean present_component_to_num_tasks = true && (is_set_component_to_num_tasks());
- list.add(present_component_to_num_tasks);
- if (present_component_to_num_tasks)
- list.add(component_to_num_tasks);
-
- boolean present_time_secs = true && (is_set_time_secs());
- list.add(present_time_secs);
- if (present_time_secs)
- list.add(time_secs);
-
- boolean present_uptime_secs = true && (is_set_uptime_secs());
- list.add(present_uptime_secs);
- if (present_uptime_secs)
- list.add(uptime_secs);
-
- boolean present_requested_memonheap = true && (is_set_requested_memonheap());
- list.add(present_requested_memonheap);
- if (present_requested_memonheap)
- list.add(requested_memonheap);
-
- boolean present_requested_memoffheap = true && (is_set_requested_memoffheap());
- list.add(present_requested_memoffheap);
- if (present_requested_memoffheap)
- list.add(requested_memoffheap);
-
- boolean present_requested_cpu = true && (is_set_requested_cpu());
- list.add(present_requested_cpu);
- if (present_requested_cpu)
- list.add(requested_cpu);
-
- boolean present_assigned_memonheap = true && (is_set_assigned_memonheap());
- list.add(present_assigned_memonheap);
- if (present_assigned_memonheap)
- list.add(assigned_memonheap);
-
- boolean present_assigned_memoffheap = true && (is_set_assigned_memoffheap());
- list.add(present_assigned_memoffheap);
- if (present_assigned_memoffheap)
- list.add(assigned_memoffheap);
-
- boolean present_assigned_cpu = true && (is_set_assigned_cpu());
- list.add(present_assigned_cpu);
- if (present_assigned_cpu)
- list.add(assigned_cpu);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((is_set_supervisor_id()) ? 131071 : 524287);
+ if (is_set_supervisor_id())
+ hashCode = hashCode * 8191 + supervisor_id.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_host()) ? 131071 : 524287);
+ if (is_set_host())
+ hashCode = hashCode * 8191 + host.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_port()) ? 131071 : 524287);
+ if (is_set_port())
+ hashCode = hashCode * 8191 + port;
+
+ hashCode = hashCode * 8191 + ((is_set_topology_id()) ? 131071 : 524287);
+ if (is_set_topology_id())
+ hashCode = hashCode * 8191 + topology_id.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_topology_name()) ? 131071 : 524287);
+ if (is_set_topology_name())
+ hashCode = hashCode * 8191 + topology_name.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_num_executors()) ? 131071 : 524287);
+ if (is_set_num_executors())
+ hashCode = hashCode * 8191 + num_executors;
+
+ hashCode = hashCode * 8191 + ((is_set_component_to_num_tasks()) ? 131071 : 524287);
+ if (is_set_component_to_num_tasks())
+ hashCode = hashCode * 8191 + component_to_num_tasks.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_time_secs()) ? 131071 : 524287);
+ if (is_set_time_secs())
+ hashCode = hashCode * 8191 + time_secs;
+
+ hashCode = hashCode * 8191 + ((is_set_uptime_secs()) ? 131071 : 524287);
+ if (is_set_uptime_secs())
+ hashCode = hashCode * 8191 + uptime_secs;
+
+ hashCode = hashCode * 8191 + ((is_set_requested_memonheap()) ? 131071 : 524287);
+ if (is_set_requested_memonheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_memonheap);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_memoffheap()) ? 131071 : 524287);
+ if (is_set_requested_memoffheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_memoffheap);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_cpu()) ? 131071 : 524287);
+ if (is_set_requested_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_cpu);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_memonheap()) ? 131071 : 524287);
+ if (is_set_assigned_memonheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_memonheap);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_memoffheap()) ? 131071 : 524287);
+ if (is_set_assigned_memoffheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_memoffheap);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_cpu()) ? 131071 : 524287);
+ if (is_set_assigned_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_cpu);
+
+ return hashCode;
}
@Override
@@ -1118,7 +1075,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_supervisor_id()).compareTo(other.is_set_supervisor_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_supervisor_id()).compareTo(other.is_set_supervisor_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1128,7 +1085,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_host()).compareTo(other.is_set_host());
+ lastComparison = java.lang.Boolean.valueOf(is_set_host()).compareTo(other.is_set_host());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1138,7 +1095,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
+ lastComparison = java.lang.Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1148,7 +1105,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1158,7 +1115,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_name()).compareTo(other.is_set_topology_name());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_name()).compareTo(other.is_set_topology_name());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1168,7 +1125,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_executors()).compareTo(other.is_set_num_executors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_executors()).compareTo(other.is_set_num_executors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1178,7 +1135,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_component_to_num_tasks()).compareTo(other.is_set_component_to_num_tasks());
+ lastComparison = java.lang.Boolean.valueOf(is_set_component_to_num_tasks()).compareTo(other.is_set_component_to_num_tasks());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1188,7 +1145,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1198,7 +1155,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1208,7 +1165,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_memonheap()).compareTo(other.is_set_requested_memonheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_memonheap()).compareTo(other.is_set_requested_memonheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1218,7 +1175,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_memoffheap()).compareTo(other.is_set_requested_memoffheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_memoffheap()).compareTo(other.is_set_requested_memoffheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1228,7 +1185,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_cpu()).compareTo(other.is_set_requested_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_cpu()).compareTo(other.is_set_requested_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1238,7 +1195,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_memonheap()).compareTo(other.is_set_assigned_memonheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_memonheap()).compareTo(other.is_set_assigned_memonheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1248,7 +1205,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_memoffheap()).compareTo(other.is_set_assigned_memoffheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_memoffheap()).compareTo(other.is_set_assigned_memoffheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1258,7 +1215,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_cpu()).compareTo(other.is_set_assigned_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_cpu()).compareTo(other.is_set_assigned_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1276,16 +1233,16 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("WorkerSummary(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WorkerSummary(");
boolean first = true;
if (is_set_supervisor_id()) {
@@ -1414,7 +1371,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1424,13 +1381,13 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
}
- private static class WorkerSummaryStandardSchemeFactory implements SchemeFactory {
+ private static class WorkerSummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerSummaryStandardScheme getScheme() {
return new WorkerSummaryStandardScheme();
}
}
- private static class WorkerSummaryStandardScheme extends StandardScheme<WorkerSummary> {
+ private static class WorkerSummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<WorkerSummary> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WorkerSummary struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1494,8 +1451,8 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map456 = iprot.readMapBegin();
- struct.component_to_num_tasks = new HashMap<String,Long>(2*_map456.size);
- String _key457;
+ struct.component_to_num_tasks = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map456.size);
+ java.lang.String _key457;
long _val458;
for (int _i459 = 0; _i459 < _map456.size; ++_i459)
{
@@ -1630,7 +1587,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
oprot.writeFieldBegin(COMPONENT_TO_NUM_TASKS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.component_to_num_tasks.size()));
- for (Map.Entry<String, Long> _iter460 : struct.component_to_num_tasks.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter460 : struct.component_to_num_tasks.entrySet())
{
oprot.writeString(_iter460.getKey());
oprot.writeI64(_iter460.getValue());
@@ -1686,18 +1643,18 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
- private static class WorkerSummaryTupleSchemeFactory implements SchemeFactory {
+ private static class WorkerSummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerSummaryTupleScheme getScheme() {
return new WorkerSummaryTupleScheme();
}
}
- private static class WorkerSummaryTupleScheme extends TupleScheme<WorkerSummary> {
+ private static class WorkerSummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<WorkerSummary> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkerSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_supervisor_id()) {
optionals.set(0);
}
@@ -1765,7 +1722,7 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (struct.is_set_component_to_num_tasks()) {
{
oprot.writeI32(struct.component_to_num_tasks.size());
- for (Map.Entry<String, Long> _iter461 : struct.component_to_num_tasks.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter461 : struct.component_to_num_tasks.entrySet())
{
oprot.writeString(_iter461.getKey());
oprot.writeI64(_iter461.getValue());
@@ -1800,8 +1757,8 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WorkerSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(15);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(15);
if (incoming.get(0)) {
struct.supervisor_id = iprot.readString();
struct.set_supervisor_id_isSet(true);
@@ -1829,8 +1786,8 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
if (incoming.get(6)) {
{
org.apache.thrift.protocol.TMap _map462 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.component_to_num_tasks = new HashMap<String,Long>(2*_map462.size);
- String _key463;
+ struct.component_to_num_tasks = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map462.size);
+ java.lang.String _key463;
long _val464;
for (int _i465 = 0; _i465 < _map462.size; ++_i465)
{
@@ -1876,5 +1833,8 @@ public class WorkerSummary implements org.apache.thrift.TBase<WorkerSummary, Wor
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/WorkerToken.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/WorkerToken.java b/storm-client/src/jvm/org/apache/storm/generated/WorkerToken.java
index 917efbd..b578783 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/WorkerToken.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/WorkerToken.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerToken._Fields>, java.io.Serializable, Cloneable, Comparable<WorkerToken> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkerToken");
@@ -59,15 +32,12 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
private static final org.apache.thrift.protocol.TField INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("info", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField SIGNATURE_FIELD_DESC = new org.apache.thrift.protocol.TField("signature", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkerTokenStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkerTokenTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WorkerTokenStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WorkerTokenTupleSchemeFactory();
private WorkerTokenServiceType serviceType; // required
- private ByteBuffer info; // required
- private ByteBuffer signature; // required
+ private java.nio.ByteBuffer info; // required
+ private java.nio.ByteBuffer signature; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -79,10 +49,10 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
INFO((short)2, "info"),
SIGNATURE((short)3, "signature");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -109,21 +79,21 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -132,22 +102,22 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SERVICE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("serviceType", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, WorkerTokenServiceType.class)));
tmpMap.put(_Fields.INFO, new org.apache.thrift.meta_data.FieldMetaData("info", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.SIGNATURE, new org.apache.thrift.meta_data.FieldMetaData("signature", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkerToken.class, metaDataMap);
}
@@ -156,8 +126,8 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
public WorkerToken(
WorkerTokenServiceType serviceType,
- ByteBuffer info,
- ByteBuffer signature)
+ java.nio.ByteBuffer info,
+ java.nio.ByteBuffer signature)
{
this();
this.serviceType = serviceType;
@@ -227,15 +197,15 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
return info == null ? null : info.array();
}
- public ByteBuffer buffer_for_info() {
+ public java.nio.ByteBuffer buffer_for_info() {
return org.apache.thrift.TBaseHelper.copyBinary(info);
}
public void set_info(byte[] info) {
- this.info = info == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(info, info.length));
+ this.info = info == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(info.clone());
}
- public void set_info(ByteBuffer info) {
+ public void set_info(java.nio.ByteBuffer info) {
this.info = org.apache.thrift.TBaseHelper.copyBinary(info);
}
@@ -259,15 +229,15 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
return signature == null ? null : signature.array();
}
- public ByteBuffer buffer_for_signature() {
+ public java.nio.ByteBuffer buffer_for_signature() {
return org.apache.thrift.TBaseHelper.copyBinary(signature);
}
public void set_signature(byte[] signature) {
- this.signature = signature == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(signature, signature.length));
+ this.signature = signature == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(signature.clone());
}
- public void set_signature(ByteBuffer signature) {
+ public void set_signature(java.nio.ByteBuffer signature) {
this.signature = org.apache.thrift.TBaseHelper.copyBinary(signature);
}
@@ -286,7 +256,7 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SERVICE_TYPE:
if (value == null) {
@@ -300,7 +270,11 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
if (value == null) {
unset_info();
} else {
- set_info((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ set_info((byte[])value);
+ } else {
+ set_info((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -308,14 +282,18 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
if (value == null) {
unset_signature();
} else {
- set_signature((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ set_signature((byte[])value);
+ } else {
+ set_signature((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SERVICE_TYPE:
return get_serviceType();
@@ -327,13 +305,13 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
return get_signature();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -344,11 +322,11 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
case SIGNATURE:
return is_set_signature();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof WorkerToken)
@@ -359,6 +337,8 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
public boolean equals(WorkerToken that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_serviceType = true && this.is_set_serviceType();
boolean that_present_serviceType = true && that.is_set_serviceType();
@@ -392,24 +372,21 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_serviceType = true && (is_set_serviceType());
- list.add(present_serviceType);
- if (present_serviceType)
- list.add(serviceType.getValue());
+ hashCode = hashCode * 8191 + ((is_set_serviceType()) ? 131071 : 524287);
+ if (is_set_serviceType())
+ hashCode = hashCode * 8191 + serviceType.getValue();
- boolean present_info = true && (is_set_info());
- list.add(present_info);
- if (present_info)
- list.add(info);
+ hashCode = hashCode * 8191 + ((is_set_info()) ? 131071 : 524287);
+ if (is_set_info())
+ hashCode = hashCode * 8191 + info.hashCode();
- boolean present_signature = true && (is_set_signature());
- list.add(present_signature);
- if (present_signature)
- list.add(signature);
+ hashCode = hashCode * 8191 + ((is_set_signature()) ? 131071 : 524287);
+ if (is_set_signature())
+ hashCode = hashCode * 8191 + signature.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -420,7 +397,7 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_serviceType()).compareTo(other.is_set_serviceType());
+ lastComparison = java.lang.Boolean.valueOf(is_set_serviceType()).compareTo(other.is_set_serviceType());
if (lastComparison != 0) {
return lastComparison;
}
@@ -430,7 +407,7 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_info()).compareTo(other.is_set_info());
+ lastComparison = java.lang.Boolean.valueOf(is_set_info()).compareTo(other.is_set_info());
if (lastComparison != 0) {
return lastComparison;
}
@@ -440,7 +417,7 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_signature()).compareTo(other.is_set_signature());
+ lastComparison = java.lang.Boolean.valueOf(is_set_signature()).compareTo(other.is_set_signature());
if (lastComparison != 0) {
return lastComparison;
}
@@ -458,16 +435,16 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("WorkerToken(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WorkerToken(");
boolean first = true;
sb.append("serviceType:");
@@ -522,7 +499,7 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -530,13 +507,13 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
}
}
- private static class WorkerTokenStandardSchemeFactory implements SchemeFactory {
+ private static class WorkerTokenStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerTokenStandardScheme getScheme() {
return new WorkerTokenStandardScheme();
}
}
- private static class WorkerTokenStandardScheme extends StandardScheme<WorkerToken> {
+ private static class WorkerTokenStandardScheme extends org.apache.thrift.scheme.StandardScheme<WorkerToken> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WorkerToken struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -606,17 +583,17 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
}
- private static class WorkerTokenTupleSchemeFactory implements SchemeFactory {
+ private static class WorkerTokenTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerTokenTupleScheme getScheme() {
return new WorkerTokenTupleScheme();
}
}
- private static class WorkerTokenTupleScheme extends TupleScheme<WorkerToken> {
+ private static class WorkerTokenTupleScheme extends org.apache.thrift.scheme.TupleScheme<WorkerToken> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkerToken struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.serviceType.getValue());
oprot.writeBinary(struct.info);
oprot.writeBinary(struct.signature);
@@ -624,7 +601,7 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WorkerToken struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.serviceType = org.apache.storm.generated.WorkerTokenServiceType.findByValue(iprot.readI32());
struct.set_serviceType_isSet(true);
struct.info = iprot.readBinary();
@@ -634,5 +611,8 @@ public class WorkerToken implements org.apache.thrift.TBase<WorkerToken, WorkerT
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/WorkerTokenInfo.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/WorkerTokenInfo.java b/storm-client/src/jvm/org/apache/storm/generated/WorkerTokenInfo.java
index 7d876ae..292f734 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/WorkerTokenInfo.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/WorkerTokenInfo.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo, WorkerTokenInfo._Fields>, java.io.Serializable, Cloneable, Comparable<WorkerTokenInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkerTokenInfo");
@@ -60,14 +33,11 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
private static final org.apache.thrift.protocol.TField SECRET_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("secretVersion", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField EXPIRATION_TIME_MILLIS_FIELD_DESC = new org.apache.thrift.protocol.TField("expirationTimeMillis", org.apache.thrift.protocol.TType.I64, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkerTokenInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkerTokenInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WorkerTokenInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WorkerTokenInfoTupleSchemeFactory();
- private String userName; // required
- private String topologyId; // required
+ private java.lang.String userName; // required
+ private java.lang.String topologyId; // required
private long secretVersion; // required
private long expirationTimeMillis; // required
@@ -78,10 +48,10 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
SECRET_VERSION((short)3, "secretVersion"),
EXPIRATION_TIME_MILLIS((short)4, "expirationTimeMillis");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -110,21 +80,21 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -133,7 +103,7 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -142,9 +112,9 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
private static final int __SECRETVERSION_ISSET_ID = 0;
private static final int __EXPIRATIONTIMEMILLIS_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TOPOLOGY_ID, new org.apache.thrift.meta_data.FieldMetaData("topologyId", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -153,7 +123,7 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.EXPIRATION_TIME_MILLIS, new org.apache.thrift.meta_data.FieldMetaData("expirationTimeMillis", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkerTokenInfo.class, metaDataMap);
}
@@ -161,8 +131,8 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
}
public WorkerTokenInfo(
- String userName,
- String topologyId,
+ java.lang.String userName,
+ java.lang.String topologyId,
long secretVersion,
long expirationTimeMillis)
{
@@ -204,11 +174,11 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
this.expirationTimeMillis = 0;
}
- public String get_userName() {
+ public java.lang.String get_userName() {
return this.userName;
}
- public void set_userName(String userName) {
+ public void set_userName(java.lang.String userName) {
this.userName = userName;
}
@@ -227,11 +197,11 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
}
}
- public String get_topologyId() {
+ public java.lang.String get_topologyId() {
return this.topologyId;
}
- public void set_topologyId(String topologyId) {
+ public void set_topologyId(java.lang.String topologyId) {
this.topologyId = topologyId;
}
@@ -260,16 +230,16 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
}
public void unset_secretVersion() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SECRETVERSION_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SECRETVERSION_ISSET_ID);
}
/** Returns true if field secretVersion is set (has been assigned a value) and false otherwise */
public boolean is_set_secretVersion() {
- return EncodingUtils.testBit(__isset_bitfield, __SECRETVERSION_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SECRETVERSION_ISSET_ID);
}
public void set_secretVersion_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SECRETVERSION_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SECRETVERSION_ISSET_ID, value);
}
public long get_expirationTimeMillis() {
@@ -282,25 +252,25 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
}
public void unset_expirationTimeMillis() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRATIONTIMEMILLIS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXPIRATIONTIMEMILLIS_ISSET_ID);
}
/** Returns true if field expirationTimeMillis is set (has been assigned a value) and false otherwise */
public boolean is_set_expirationTimeMillis() {
- return EncodingUtils.testBit(__isset_bitfield, __EXPIRATIONTIMEMILLIS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPIRATIONTIMEMILLIS_ISSET_ID);
}
public void set_expirationTimeMillis_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRATIONTIMEMILLIS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXPIRATIONTIMEMILLIS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case USER_NAME:
if (value == null) {
unset_userName();
} else {
- set_userName((String)value);
+ set_userName((java.lang.String)value);
}
break;
@@ -308,7 +278,7 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
if (value == null) {
unset_topologyId();
} else {
- set_topologyId((String)value);
+ set_topologyId((java.lang.String)value);
}
break;
@@ -316,7 +286,7 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
if (value == null) {
unset_secretVersion();
} else {
- set_secretVersion((Long)value);
+ set_secretVersion((java.lang.Long)value);
}
break;
@@ -324,14 +294,14 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
if (value == null) {
unset_expirationTimeMillis();
} else {
- set_expirationTimeMillis((Long)value);
+ set_expirationTimeMillis((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_NAME:
return get_userName();
@@ -346,13 +316,13 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
return get_expirationTimeMillis();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -365,11 +335,11 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
case EXPIRATION_TIME_MILLIS:
return is_set_expirationTimeMillis();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof WorkerTokenInfo)
@@ -380,6 +350,8 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
public boolean equals(WorkerTokenInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userName = true && this.is_set_userName();
boolean that_present_userName = true && that.is_set_userName();
@@ -422,29 +394,21 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userName = true && (is_set_userName());
- list.add(present_userName);
- if (present_userName)
- list.add(userName);
+ hashCode = hashCode * 8191 + ((is_set_userName()) ? 131071 : 524287);
+ if (is_set_userName())
+ hashCode = hashCode * 8191 + userName.hashCode();
- boolean present_topologyId = true && (is_set_topologyId());
- list.add(present_topologyId);
- if (present_topologyId)
- list.add(topologyId);
+ hashCode = hashCode * 8191 + ((is_set_topologyId()) ? 131071 : 524287);
+ if (is_set_topologyId())
+ hashCode = hashCode * 8191 + topologyId.hashCode();
- boolean present_secretVersion = true;
- list.add(present_secretVersion);
- if (present_secretVersion)
- list.add(secretVersion);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(secretVersion);
- boolean present_expirationTimeMillis = true;
- list.add(present_expirationTimeMillis);
- if (present_expirationTimeMillis)
- list.add(expirationTimeMillis);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(expirationTimeMillis);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -455,7 +419,7 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_userName()).compareTo(other.is_set_userName());
+ lastComparison = java.lang.Boolean.valueOf(is_set_userName()).compareTo(other.is_set_userName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -465,7 +429,7 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topologyId()).compareTo(other.is_set_topologyId());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topologyId()).compareTo(other.is_set_topologyId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -475,7 +439,7 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_secretVersion()).compareTo(other.is_set_secretVersion());
+ lastComparison = java.lang.Boolean.valueOf(is_set_secretVersion()).compareTo(other.is_set_secretVersion());
if (lastComparison != 0) {
return lastComparison;
}
@@ -485,7 +449,7 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_expirationTimeMillis()).compareTo(other.is_set_expirationTimeMillis());
+ lastComparison = java.lang.Boolean.valueOf(is_set_expirationTimeMillis()).compareTo(other.is_set_expirationTimeMillis());
if (lastComparison != 0) {
return lastComparison;
}
@@ -503,16 +467,16 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("WorkerTokenInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WorkerTokenInfo(");
boolean first = true;
sb.append("userName:");
@@ -571,7 +535,7 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -581,13 +545,13 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
}
}
- private static class WorkerTokenInfoStandardSchemeFactory implements SchemeFactory {
+ private static class WorkerTokenInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerTokenInfoStandardScheme getScheme() {
return new WorkerTokenInfoStandardScheme();
}
}
- private static class WorkerTokenInfoStandardScheme extends StandardScheme<WorkerTokenInfo> {
+ private static class WorkerTokenInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<WorkerTokenInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WorkerTokenInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -666,17 +630,17 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
}
- private static class WorkerTokenInfoTupleSchemeFactory implements SchemeFactory {
+ private static class WorkerTokenInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerTokenInfoTupleScheme getScheme() {
return new WorkerTokenInfoTupleScheme();
}
}
- private static class WorkerTokenInfoTupleScheme extends TupleScheme<WorkerTokenInfo> {
+ private static class WorkerTokenInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<WorkerTokenInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkerTokenInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.userName);
oprot.writeString(struct.topologyId);
oprot.writeI64(struct.secretVersion);
@@ -685,7 +649,7 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WorkerTokenInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.userName = iprot.readString();
struct.set_userName_isSet(true);
struct.topologyId = iprot.readString();
@@ -697,5 +661,8 @@ public class WorkerTokenInfo implements org.apache.thrift.TBase<WorkerTokenInfo,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/WorkerTokenServiceType.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/WorkerTokenServiceType.java b/storm-client/src/jvm/org/apache/storm/generated/WorkerTokenServiceType.java
index 3602c97..38ba3b6 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/WorkerTokenServiceType.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/WorkerTokenServiceType.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -24,10 +24,6 @@
package org.apache.storm.generated;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
public enum WorkerTokenServiceType implements org.apache.thrift.TEnum {
NIMBUS(0),
DRPC(1),
[16/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SubmitOptions.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SubmitOptions.java b/storm-client/src/jvm/org/apache/storm/generated/SubmitOptions.java
index 2287244..7471d79 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SubmitOptions.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SubmitOptions.java
@@ -16,53 +16,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, SubmitOptions._Fields>, java.io.Serializable, Cloneable, Comparable<SubmitOptions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SubmitOptions");
private static final org.apache.thrift.protocol.TField INITIAL_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("initial_status", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SubmitOptionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SubmitOptionsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SubmitOptionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SubmitOptionsTupleSchemeFactory();
private TopologyInitialStatus initial_status; // required
private Credentials creds; // optional
@@ -76,10 +46,10 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
INITIAL_STATUS((short)1, "initial_status"),
CREDS((short)2, "creds");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -104,21 +74,21 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -127,21 +97,21 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.CREDS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.INITIAL_STATUS, new org.apache.thrift.meta_data.FieldMetaData("initial_status", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TopologyInitialStatus.class)));
tmpMap.put(_Fields.CREDS, new org.apache.thrift.meta_data.FieldMetaData("creds", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Credentials.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SubmitOptions.class, metaDataMap);
}
@@ -231,7 +201,7 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case INITIAL_STATUS:
if (value == null) {
@@ -252,7 +222,7 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case INITIAL_STATUS:
return get_initial_status();
@@ -261,13 +231,13 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
return get_creds();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -276,11 +246,11 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
case CREDS:
return is_set_creds();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof SubmitOptions)
@@ -291,6 +261,8 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
public boolean equals(SubmitOptions that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_initial_status = true && this.is_set_initial_status();
boolean that_present_initial_status = true && that.is_set_initial_status();
@@ -315,19 +287,17 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_initial_status = true && (is_set_initial_status());
- list.add(present_initial_status);
- if (present_initial_status)
- list.add(initial_status.getValue());
+ hashCode = hashCode * 8191 + ((is_set_initial_status()) ? 131071 : 524287);
+ if (is_set_initial_status())
+ hashCode = hashCode * 8191 + initial_status.getValue();
- boolean present_creds = true && (is_set_creds());
- list.add(present_creds);
- if (present_creds)
- list.add(creds);
+ hashCode = hashCode * 8191 + ((is_set_creds()) ? 131071 : 524287);
+ if (is_set_creds())
+ hashCode = hashCode * 8191 + creds.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -338,7 +308,7 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_initial_status()).compareTo(other.is_set_initial_status());
+ lastComparison = java.lang.Boolean.valueOf(is_set_initial_status()).compareTo(other.is_set_initial_status());
if (lastComparison != 0) {
return lastComparison;
}
@@ -348,7 +318,7 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_creds()).compareTo(other.is_set_creds());
+ lastComparison = java.lang.Boolean.valueOf(is_set_creds()).compareTo(other.is_set_creds());
if (lastComparison != 0) {
return lastComparison;
}
@@ -366,16 +336,16 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SubmitOptions(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SubmitOptions(");
boolean first = true;
sb.append("initial_status:");
@@ -419,7 +389,7 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -427,13 +397,13 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
}
}
- private static class SubmitOptionsStandardSchemeFactory implements SchemeFactory {
+ private static class SubmitOptionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SubmitOptionsStandardScheme getScheme() {
return new SubmitOptionsStandardScheme();
}
}
- private static class SubmitOptionsStandardScheme extends StandardScheme<SubmitOptions> {
+ private static class SubmitOptionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<SubmitOptions> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SubmitOptions struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -493,19 +463,19 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
}
- private static class SubmitOptionsTupleSchemeFactory implements SchemeFactory {
+ private static class SubmitOptionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SubmitOptionsTupleScheme getScheme() {
return new SubmitOptionsTupleScheme();
}
}
- private static class SubmitOptionsTupleScheme extends TupleScheme<SubmitOptions> {
+ private static class SubmitOptionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<SubmitOptions> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SubmitOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.initial_status.getValue());
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_creds()) {
optionals.set(0);
}
@@ -517,10 +487,10 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SubmitOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.initial_status = org.apache.storm.generated.TopologyInitialStatus.findByValue(iprot.readI32());
struct.set_initial_status_isSet(true);
- BitSet incoming = iprot.readBitSet(1);
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.creds = new Credentials();
struct.creds.read(iprot);
@@ -529,5 +499,8 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[17/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/StormTopology.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/StormTopology.java b/storm-client/src/jvm/org/apache/storm/generated/StormTopology.java
index 7594220..8a7a931 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/StormTopology.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/StormTopology.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class StormTopology implements org.apache.thrift.TBase<StormTopology, StormTopology._Fields>, java.io.Serializable, Cloneable, Comparable<StormTopology> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StormTopology");
@@ -66,22 +39,19 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
private static final org.apache.thrift.protocol.TField COMPONENT_TO_SHARED_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("component_to_shared_memory", org.apache.thrift.protocol.TType.MAP, (short)9);
private static final org.apache.thrift.protocol.TField SHARED_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("shared_memory", org.apache.thrift.protocol.TType.MAP, (short)10);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new StormTopologyStandardSchemeFactory());
- schemes.put(TupleScheme.class, new StormTopologyTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new StormTopologyStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new StormTopologyTupleSchemeFactory();
- private Map<String,SpoutSpec> spouts; // required
- private Map<String,Bolt> bolts; // required
- private Map<String,StateSpoutSpec> state_spouts; // required
- private List<ByteBuffer> worker_hooks; // optional
- private List<String> dependency_jars; // optional
- private List<String> dependency_artifacts; // optional
- private String storm_version; // optional
- private String jdk_version; // optional
- private Map<String,Set<String>> component_to_shared_memory; // optional
- private Map<String,SharedMemory> shared_memory; // optional
+ private java.util.Map<java.lang.String,SpoutSpec> spouts; // required
+ private java.util.Map<java.lang.String,Bolt> bolts; // required
+ private java.util.Map<java.lang.String,StateSpoutSpec> state_spouts; // required
+ private java.util.List<java.nio.ByteBuffer> worker_hooks; // optional
+ private java.util.List<java.lang.String> dependency_jars; // optional
+ private java.util.List<java.lang.String> dependency_artifacts; // optional
+ private java.lang.String storm_version; // optional
+ private java.lang.String jdk_version; // optional
+ private java.util.Map<java.lang.String,java.util.Set<java.lang.String>> component_to_shared_memory; // optional
+ private java.util.Map<java.lang.String,SharedMemory> shared_memory; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -96,10 +66,10 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
COMPONENT_TO_SHARED_MEMORY((short)9, "component_to_shared_memory"),
SHARED_MEMORY((short)10, "shared_memory");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -140,21 +110,21 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -163,16 +133,16 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.WORKER_HOOKS,_Fields.DEPENDENCY_JARS,_Fields.DEPENDENCY_ARTIFACTS,_Fields.STORM_VERSION,_Fields.JDK_VERSION,_Fields.COMPONENT_TO_SHARED_MEMORY,_Fields.SHARED_MEMORY};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SPOUTS, new org.apache.thrift.meta_data.FieldMetaData("spouts", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
@@ -207,7 +177,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SharedMemory.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StormTopology.class, metaDataMap);
}
@@ -215,9 +185,9 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
}
public StormTopology(
- Map<String,SpoutSpec> spouts,
- Map<String,Bolt> bolts,
- Map<String,StateSpoutSpec> state_spouts)
+ java.util.Map<java.lang.String,SpoutSpec> spouts,
+ java.util.Map<java.lang.String,Bolt> bolts,
+ java.util.Map<java.lang.String,StateSpoutSpec> state_spouts)
{
this();
this.spouts = spouts;
@@ -230,13 +200,13 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
*/
public StormTopology(StormTopology other) {
if (other.is_set_spouts()) {
- Map<String,SpoutSpec> __this__spouts = new HashMap<String,SpoutSpec>(other.spouts.size());
- for (Map.Entry<String, SpoutSpec> other_element : other.spouts.entrySet()) {
+ java.util.Map<java.lang.String,SpoutSpec> __this__spouts = new java.util.HashMap<java.lang.String,SpoutSpec>(other.spouts.size());
+ for (java.util.Map.Entry<java.lang.String, SpoutSpec> other_element : other.spouts.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
SpoutSpec other_element_value = other_element.getValue();
- String __this__spouts_copy_key = other_element_key;
+ java.lang.String __this__spouts_copy_key = other_element_key;
SpoutSpec __this__spouts_copy_value = new SpoutSpec(other_element_value);
@@ -245,13 +215,13 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
this.spouts = __this__spouts;
}
if (other.is_set_bolts()) {
- Map<String,Bolt> __this__bolts = new HashMap<String,Bolt>(other.bolts.size());
- for (Map.Entry<String, Bolt> other_element : other.bolts.entrySet()) {
+ java.util.Map<java.lang.String,Bolt> __this__bolts = new java.util.HashMap<java.lang.String,Bolt>(other.bolts.size());
+ for (java.util.Map.Entry<java.lang.String, Bolt> other_element : other.bolts.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
Bolt other_element_value = other_element.getValue();
- String __this__bolts_copy_key = other_element_key;
+ java.lang.String __this__bolts_copy_key = other_element_key;
Bolt __this__bolts_copy_value = new Bolt(other_element_value);
@@ -260,13 +230,13 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
this.bolts = __this__bolts;
}
if (other.is_set_state_spouts()) {
- Map<String,StateSpoutSpec> __this__state_spouts = new HashMap<String,StateSpoutSpec>(other.state_spouts.size());
- for (Map.Entry<String, StateSpoutSpec> other_element : other.state_spouts.entrySet()) {
+ java.util.Map<java.lang.String,StateSpoutSpec> __this__state_spouts = new java.util.HashMap<java.lang.String,StateSpoutSpec>(other.state_spouts.size());
+ for (java.util.Map.Entry<java.lang.String, StateSpoutSpec> other_element : other.state_spouts.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
StateSpoutSpec other_element_value = other_element.getValue();
- String __this__state_spouts_copy_key = other_element_key;
+ java.lang.String __this__state_spouts_copy_key = other_element_key;
StateSpoutSpec __this__state_spouts_copy_value = new StateSpoutSpec(other_element_value);
@@ -275,15 +245,15 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
this.state_spouts = __this__state_spouts;
}
if (other.is_set_worker_hooks()) {
- List<ByteBuffer> __this__worker_hooks = new ArrayList<ByteBuffer>(other.worker_hooks);
+ java.util.List<java.nio.ByteBuffer> __this__worker_hooks = new java.util.ArrayList<java.nio.ByteBuffer>(other.worker_hooks);
this.worker_hooks = __this__worker_hooks;
}
if (other.is_set_dependency_jars()) {
- List<String> __this__dependency_jars = new ArrayList<String>(other.dependency_jars);
+ java.util.List<java.lang.String> __this__dependency_jars = new java.util.ArrayList<java.lang.String>(other.dependency_jars);
this.dependency_jars = __this__dependency_jars;
}
if (other.is_set_dependency_artifacts()) {
- List<String> __this__dependency_artifacts = new ArrayList<String>(other.dependency_artifacts);
+ java.util.List<java.lang.String> __this__dependency_artifacts = new java.util.ArrayList<java.lang.String>(other.dependency_artifacts);
this.dependency_artifacts = __this__dependency_artifacts;
}
if (other.is_set_storm_version()) {
@@ -293,28 +263,28 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
this.jdk_version = other.jdk_version;
}
if (other.is_set_component_to_shared_memory()) {
- Map<String,Set<String>> __this__component_to_shared_memory = new HashMap<String,Set<String>>(other.component_to_shared_memory.size());
- for (Map.Entry<String, Set<String>> other_element : other.component_to_shared_memory.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Set<java.lang.String>> __this__component_to_shared_memory = new java.util.HashMap<java.lang.String,java.util.Set<java.lang.String>>(other.component_to_shared_memory.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Set<java.lang.String>> other_element : other.component_to_shared_memory.entrySet()) {
- String other_element_key = other_element.getKey();
- Set<String> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Set<java.lang.String> other_element_value = other_element.getValue();
- String __this__component_to_shared_memory_copy_key = other_element_key;
+ java.lang.String __this__component_to_shared_memory_copy_key = other_element_key;
- Set<String> __this__component_to_shared_memory_copy_value = new HashSet<String>(other_element_value);
+ java.util.Set<java.lang.String> __this__component_to_shared_memory_copy_value = new java.util.HashSet<java.lang.String>(other_element_value);
__this__component_to_shared_memory.put(__this__component_to_shared_memory_copy_key, __this__component_to_shared_memory_copy_value);
}
this.component_to_shared_memory = __this__component_to_shared_memory;
}
if (other.is_set_shared_memory()) {
- Map<String,SharedMemory> __this__shared_memory = new HashMap<String,SharedMemory>(other.shared_memory.size());
- for (Map.Entry<String, SharedMemory> other_element : other.shared_memory.entrySet()) {
+ java.util.Map<java.lang.String,SharedMemory> __this__shared_memory = new java.util.HashMap<java.lang.String,SharedMemory>(other.shared_memory.size());
+ for (java.util.Map.Entry<java.lang.String, SharedMemory> other_element : other.shared_memory.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
SharedMemory other_element_value = other_element.getValue();
- String __this__shared_memory_copy_key = other_element_key;
+ java.lang.String __this__shared_memory_copy_key = other_element_key;
SharedMemory __this__shared_memory_copy_value = new SharedMemory(other_element_value);
@@ -346,18 +316,18 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return (this.spouts == null) ? 0 : this.spouts.size();
}
- public void put_to_spouts(String key, SpoutSpec val) {
+ public void put_to_spouts(java.lang.String key, SpoutSpec val) {
if (this.spouts == null) {
- this.spouts = new HashMap<String,SpoutSpec>();
+ this.spouts = new java.util.HashMap<java.lang.String,SpoutSpec>();
}
this.spouts.put(key, val);
}
- public Map<String,SpoutSpec> get_spouts() {
+ public java.util.Map<java.lang.String,SpoutSpec> get_spouts() {
return this.spouts;
}
- public void set_spouts(Map<String,SpoutSpec> spouts) {
+ public void set_spouts(java.util.Map<java.lang.String,SpoutSpec> spouts) {
this.spouts = spouts;
}
@@ -380,18 +350,18 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return (this.bolts == null) ? 0 : this.bolts.size();
}
- public void put_to_bolts(String key, Bolt val) {
+ public void put_to_bolts(java.lang.String key, Bolt val) {
if (this.bolts == null) {
- this.bolts = new HashMap<String,Bolt>();
+ this.bolts = new java.util.HashMap<java.lang.String,Bolt>();
}
this.bolts.put(key, val);
}
- public Map<String,Bolt> get_bolts() {
+ public java.util.Map<java.lang.String,Bolt> get_bolts() {
return this.bolts;
}
- public void set_bolts(Map<String,Bolt> bolts) {
+ public void set_bolts(java.util.Map<java.lang.String,Bolt> bolts) {
this.bolts = bolts;
}
@@ -414,18 +384,18 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return (this.state_spouts == null) ? 0 : this.state_spouts.size();
}
- public void put_to_state_spouts(String key, StateSpoutSpec val) {
+ public void put_to_state_spouts(java.lang.String key, StateSpoutSpec val) {
if (this.state_spouts == null) {
- this.state_spouts = new HashMap<String,StateSpoutSpec>();
+ this.state_spouts = new java.util.HashMap<java.lang.String,StateSpoutSpec>();
}
this.state_spouts.put(key, val);
}
- public Map<String,StateSpoutSpec> get_state_spouts() {
+ public java.util.Map<java.lang.String,StateSpoutSpec> get_state_spouts() {
return this.state_spouts;
}
- public void set_state_spouts(Map<String,StateSpoutSpec> state_spouts) {
+ public void set_state_spouts(java.util.Map<java.lang.String,StateSpoutSpec> state_spouts) {
this.state_spouts = state_spouts;
}
@@ -448,22 +418,22 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return (this.worker_hooks == null) ? 0 : this.worker_hooks.size();
}
- public java.util.Iterator<ByteBuffer> get_worker_hooks_iterator() {
+ public java.util.Iterator<java.nio.ByteBuffer> get_worker_hooks_iterator() {
return (this.worker_hooks == null) ? null : this.worker_hooks.iterator();
}
- public void add_to_worker_hooks(ByteBuffer elem) {
+ public void add_to_worker_hooks(java.nio.ByteBuffer elem) {
if (this.worker_hooks == null) {
- this.worker_hooks = new ArrayList<ByteBuffer>();
+ this.worker_hooks = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.worker_hooks.add(elem);
}
- public List<ByteBuffer> get_worker_hooks() {
+ public java.util.List<java.nio.ByteBuffer> get_worker_hooks() {
return this.worker_hooks;
}
- public void set_worker_hooks(List<ByteBuffer> worker_hooks) {
+ public void set_worker_hooks(java.util.List<java.nio.ByteBuffer> worker_hooks) {
this.worker_hooks = worker_hooks;
}
@@ -486,22 +456,22 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return (this.dependency_jars == null) ? 0 : this.dependency_jars.size();
}
- public java.util.Iterator<String> get_dependency_jars_iterator() {
+ public java.util.Iterator<java.lang.String> get_dependency_jars_iterator() {
return (this.dependency_jars == null) ? null : this.dependency_jars.iterator();
}
- public void add_to_dependency_jars(String elem) {
+ public void add_to_dependency_jars(java.lang.String elem) {
if (this.dependency_jars == null) {
- this.dependency_jars = new ArrayList<String>();
+ this.dependency_jars = new java.util.ArrayList<java.lang.String>();
}
this.dependency_jars.add(elem);
}
- public List<String> get_dependency_jars() {
+ public java.util.List<java.lang.String> get_dependency_jars() {
return this.dependency_jars;
}
- public void set_dependency_jars(List<String> dependency_jars) {
+ public void set_dependency_jars(java.util.List<java.lang.String> dependency_jars) {
this.dependency_jars = dependency_jars;
}
@@ -524,22 +494,22 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return (this.dependency_artifacts == null) ? 0 : this.dependency_artifacts.size();
}
- public java.util.Iterator<String> get_dependency_artifacts_iterator() {
+ public java.util.Iterator<java.lang.String> get_dependency_artifacts_iterator() {
return (this.dependency_artifacts == null) ? null : this.dependency_artifacts.iterator();
}
- public void add_to_dependency_artifacts(String elem) {
+ public void add_to_dependency_artifacts(java.lang.String elem) {
if (this.dependency_artifacts == null) {
- this.dependency_artifacts = new ArrayList<String>();
+ this.dependency_artifacts = new java.util.ArrayList<java.lang.String>();
}
this.dependency_artifacts.add(elem);
}
- public List<String> get_dependency_artifacts() {
+ public java.util.List<java.lang.String> get_dependency_artifacts() {
return this.dependency_artifacts;
}
- public void set_dependency_artifacts(List<String> dependency_artifacts) {
+ public void set_dependency_artifacts(java.util.List<java.lang.String> dependency_artifacts) {
this.dependency_artifacts = dependency_artifacts;
}
@@ -558,11 +528,11 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
}
}
- public String get_storm_version() {
+ public java.lang.String get_storm_version() {
return this.storm_version;
}
- public void set_storm_version(String storm_version) {
+ public void set_storm_version(java.lang.String storm_version) {
this.storm_version = storm_version;
}
@@ -581,11 +551,11 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
}
}
- public String get_jdk_version() {
+ public java.lang.String get_jdk_version() {
return this.jdk_version;
}
- public void set_jdk_version(String jdk_version) {
+ public void set_jdk_version(java.lang.String jdk_version) {
this.jdk_version = jdk_version;
}
@@ -608,18 +578,18 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return (this.component_to_shared_memory == null) ? 0 : this.component_to_shared_memory.size();
}
- public void put_to_component_to_shared_memory(String key, Set<String> val) {
+ public void put_to_component_to_shared_memory(java.lang.String key, java.util.Set<java.lang.String> val) {
if (this.component_to_shared_memory == null) {
- this.component_to_shared_memory = new HashMap<String,Set<String>>();
+ this.component_to_shared_memory = new java.util.HashMap<java.lang.String,java.util.Set<java.lang.String>>();
}
this.component_to_shared_memory.put(key, val);
}
- public Map<String,Set<String>> get_component_to_shared_memory() {
+ public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> get_component_to_shared_memory() {
return this.component_to_shared_memory;
}
- public void set_component_to_shared_memory(Map<String,Set<String>> component_to_shared_memory) {
+ public void set_component_to_shared_memory(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> component_to_shared_memory) {
this.component_to_shared_memory = component_to_shared_memory;
}
@@ -642,18 +612,18 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return (this.shared_memory == null) ? 0 : this.shared_memory.size();
}
- public void put_to_shared_memory(String key, SharedMemory val) {
+ public void put_to_shared_memory(java.lang.String key, SharedMemory val) {
if (this.shared_memory == null) {
- this.shared_memory = new HashMap<String,SharedMemory>();
+ this.shared_memory = new java.util.HashMap<java.lang.String,SharedMemory>();
}
this.shared_memory.put(key, val);
}
- public Map<String,SharedMemory> get_shared_memory() {
+ public java.util.Map<java.lang.String,SharedMemory> get_shared_memory() {
return this.shared_memory;
}
- public void set_shared_memory(Map<String,SharedMemory> shared_memory) {
+ public void set_shared_memory(java.util.Map<java.lang.String,SharedMemory> shared_memory) {
this.shared_memory = shared_memory;
}
@@ -672,13 +642,13 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SPOUTS:
if (value == null) {
unset_spouts();
} else {
- set_spouts((Map<String,SpoutSpec>)value);
+ set_spouts((java.util.Map<java.lang.String,SpoutSpec>)value);
}
break;
@@ -686,7 +656,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (value == null) {
unset_bolts();
} else {
- set_bolts((Map<String,Bolt>)value);
+ set_bolts((java.util.Map<java.lang.String,Bolt>)value);
}
break;
@@ -694,7 +664,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (value == null) {
unset_state_spouts();
} else {
- set_state_spouts((Map<String,StateSpoutSpec>)value);
+ set_state_spouts((java.util.Map<java.lang.String,StateSpoutSpec>)value);
}
break;
@@ -702,7 +672,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (value == null) {
unset_worker_hooks();
} else {
- set_worker_hooks((List<ByteBuffer>)value);
+ set_worker_hooks((java.util.List<java.nio.ByteBuffer>)value);
}
break;
@@ -710,7 +680,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (value == null) {
unset_dependency_jars();
} else {
- set_dependency_jars((List<String>)value);
+ set_dependency_jars((java.util.List<java.lang.String>)value);
}
break;
@@ -718,7 +688,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (value == null) {
unset_dependency_artifacts();
} else {
- set_dependency_artifacts((List<String>)value);
+ set_dependency_artifacts((java.util.List<java.lang.String>)value);
}
break;
@@ -726,7 +696,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (value == null) {
unset_storm_version();
} else {
- set_storm_version((String)value);
+ set_storm_version((java.lang.String)value);
}
break;
@@ -734,7 +704,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (value == null) {
unset_jdk_version();
} else {
- set_jdk_version((String)value);
+ set_jdk_version((java.lang.String)value);
}
break;
@@ -742,7 +712,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (value == null) {
unset_component_to_shared_memory();
} else {
- set_component_to_shared_memory((Map<String,Set<String>>)value);
+ set_component_to_shared_memory((java.util.Map<java.lang.String,java.util.Set<java.lang.String>>)value);
}
break;
@@ -750,14 +720,14 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (value == null) {
unset_shared_memory();
} else {
- set_shared_memory((Map<String,SharedMemory>)value);
+ set_shared_memory((java.util.Map<java.lang.String,SharedMemory>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SPOUTS:
return get_spouts();
@@ -790,13 +760,13 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return get_shared_memory();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -821,11 +791,11 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
case SHARED_MEMORY:
return is_set_shared_memory();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof StormTopology)
@@ -836,6 +806,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
public boolean equals(StormTopology that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_spouts = true && this.is_set_spouts();
boolean that_present_spouts = true && that.is_set_spouts();
@@ -932,59 +904,49 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_spouts = true && (is_set_spouts());
- list.add(present_spouts);
- if (present_spouts)
- list.add(spouts);
+ hashCode = hashCode * 8191 + ((is_set_spouts()) ? 131071 : 524287);
+ if (is_set_spouts())
+ hashCode = hashCode * 8191 + spouts.hashCode();
- boolean present_bolts = true && (is_set_bolts());
- list.add(present_bolts);
- if (present_bolts)
- list.add(bolts);
+ hashCode = hashCode * 8191 + ((is_set_bolts()) ? 131071 : 524287);
+ if (is_set_bolts())
+ hashCode = hashCode * 8191 + bolts.hashCode();
- boolean present_state_spouts = true && (is_set_state_spouts());
- list.add(present_state_spouts);
- if (present_state_spouts)
- list.add(state_spouts);
+ hashCode = hashCode * 8191 + ((is_set_state_spouts()) ? 131071 : 524287);
+ if (is_set_state_spouts())
+ hashCode = hashCode * 8191 + state_spouts.hashCode();
- boolean present_worker_hooks = true && (is_set_worker_hooks());
- list.add(present_worker_hooks);
- if (present_worker_hooks)
- list.add(worker_hooks);
+ hashCode = hashCode * 8191 + ((is_set_worker_hooks()) ? 131071 : 524287);
+ if (is_set_worker_hooks())
+ hashCode = hashCode * 8191 + worker_hooks.hashCode();
- boolean present_dependency_jars = true && (is_set_dependency_jars());
- list.add(present_dependency_jars);
- if (present_dependency_jars)
- list.add(dependency_jars);
+ hashCode = hashCode * 8191 + ((is_set_dependency_jars()) ? 131071 : 524287);
+ if (is_set_dependency_jars())
+ hashCode = hashCode * 8191 + dependency_jars.hashCode();
- boolean present_dependency_artifacts = true && (is_set_dependency_artifacts());
- list.add(present_dependency_artifacts);
- if (present_dependency_artifacts)
- list.add(dependency_artifacts);
+ hashCode = hashCode * 8191 + ((is_set_dependency_artifacts()) ? 131071 : 524287);
+ if (is_set_dependency_artifacts())
+ hashCode = hashCode * 8191 + dependency_artifacts.hashCode();
- boolean present_storm_version = true && (is_set_storm_version());
- list.add(present_storm_version);
- if (present_storm_version)
- list.add(storm_version);
+ hashCode = hashCode * 8191 + ((is_set_storm_version()) ? 131071 : 524287);
+ if (is_set_storm_version())
+ hashCode = hashCode * 8191 + storm_version.hashCode();
- boolean present_jdk_version = true && (is_set_jdk_version());
- list.add(present_jdk_version);
- if (present_jdk_version)
- list.add(jdk_version);
+ hashCode = hashCode * 8191 + ((is_set_jdk_version()) ? 131071 : 524287);
+ if (is_set_jdk_version())
+ hashCode = hashCode * 8191 + jdk_version.hashCode();
- boolean present_component_to_shared_memory = true && (is_set_component_to_shared_memory());
- list.add(present_component_to_shared_memory);
- if (present_component_to_shared_memory)
- list.add(component_to_shared_memory);
+ hashCode = hashCode * 8191 + ((is_set_component_to_shared_memory()) ? 131071 : 524287);
+ if (is_set_component_to_shared_memory())
+ hashCode = hashCode * 8191 + component_to_shared_memory.hashCode();
- boolean present_shared_memory = true && (is_set_shared_memory());
- list.add(present_shared_memory);
- if (present_shared_memory)
- list.add(shared_memory);
+ hashCode = hashCode * 8191 + ((is_set_shared_memory()) ? 131071 : 524287);
+ if (is_set_shared_memory())
+ hashCode = hashCode * 8191 + shared_memory.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -995,7 +957,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_spouts()).compareTo(other.is_set_spouts());
+ lastComparison = java.lang.Boolean.valueOf(is_set_spouts()).compareTo(other.is_set_spouts());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1005,7 +967,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_bolts()).compareTo(other.is_set_bolts());
+ lastComparison = java.lang.Boolean.valueOf(is_set_bolts()).compareTo(other.is_set_bolts());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1015,7 +977,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_state_spouts()).compareTo(other.is_set_state_spouts());
+ lastComparison = java.lang.Boolean.valueOf(is_set_state_spouts()).compareTo(other.is_set_state_spouts());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1025,7 +987,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_worker_hooks()).compareTo(other.is_set_worker_hooks());
+ lastComparison = java.lang.Boolean.valueOf(is_set_worker_hooks()).compareTo(other.is_set_worker_hooks());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1035,7 +997,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_dependency_jars()).compareTo(other.is_set_dependency_jars());
+ lastComparison = java.lang.Boolean.valueOf(is_set_dependency_jars()).compareTo(other.is_set_dependency_jars());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1045,7 +1007,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_dependency_artifacts()).compareTo(other.is_set_dependency_artifacts());
+ lastComparison = java.lang.Boolean.valueOf(is_set_dependency_artifacts()).compareTo(other.is_set_dependency_artifacts());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1055,7 +1017,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_storm_version()).compareTo(other.is_set_storm_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_storm_version()).compareTo(other.is_set_storm_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1065,7 +1027,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_jdk_version()).compareTo(other.is_set_jdk_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_jdk_version()).compareTo(other.is_set_jdk_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1075,7 +1037,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_component_to_shared_memory()).compareTo(other.is_set_component_to_shared_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_component_to_shared_memory()).compareTo(other.is_set_component_to_shared_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1085,7 +1047,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_shared_memory()).compareTo(other.is_set_shared_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_shared_memory()).compareTo(other.is_set_shared_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1103,16 +1065,16 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("StormTopology(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("StormTopology(");
boolean first = true;
sb.append("spouts:");
@@ -1237,7 +1199,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -1245,13 +1207,13 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
}
}
- private static class StormTopologyStandardSchemeFactory implements SchemeFactory {
+ private static class StormTopologyStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public StormTopologyStandardScheme getScheme() {
return new StormTopologyStandardScheme();
}
}
- private static class StormTopologyStandardScheme extends StandardScheme<StormTopology> {
+ private static class StormTopologyStandardScheme extends org.apache.thrift.scheme.StandardScheme<StormTopology> {
public void read(org.apache.thrift.protocol.TProtocol iprot, StormTopology struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1267,8 +1229,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map44 = iprot.readMapBegin();
- struct.spouts = new HashMap<String,SpoutSpec>(2*_map44.size);
- String _key45;
+ struct.spouts = new java.util.HashMap<java.lang.String,SpoutSpec>(2*_map44.size);
+ java.lang.String _key45;
SpoutSpec _val46;
for (int _i47 = 0; _i47 < _map44.size; ++_i47)
{
@@ -1288,8 +1250,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map48 = iprot.readMapBegin();
- struct.bolts = new HashMap<String,Bolt>(2*_map48.size);
- String _key49;
+ struct.bolts = new java.util.HashMap<java.lang.String,Bolt>(2*_map48.size);
+ java.lang.String _key49;
Bolt _val50;
for (int _i51 = 0; _i51 < _map48.size; ++_i51)
{
@@ -1309,8 +1271,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map52 = iprot.readMapBegin();
- struct.state_spouts = new HashMap<String,StateSpoutSpec>(2*_map52.size);
- String _key53;
+ struct.state_spouts = new java.util.HashMap<java.lang.String,StateSpoutSpec>(2*_map52.size);
+ java.lang.String _key53;
StateSpoutSpec _val54;
for (int _i55 = 0; _i55 < _map52.size; ++_i55)
{
@@ -1330,8 +1292,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
- struct.worker_hooks = new ArrayList<ByteBuffer>(_list56.size);
- ByteBuffer _elem57;
+ struct.worker_hooks = new java.util.ArrayList<java.nio.ByteBuffer>(_list56.size);
+ java.nio.ByteBuffer _elem57;
for (int _i58 = 0; _i58 < _list56.size; ++_i58)
{
_elem57 = iprot.readBinary();
@@ -1348,8 +1310,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list59 = iprot.readListBegin();
- struct.dependency_jars = new ArrayList<String>(_list59.size);
- String _elem60;
+ struct.dependency_jars = new java.util.ArrayList<java.lang.String>(_list59.size);
+ java.lang.String _elem60;
for (int _i61 = 0; _i61 < _list59.size; ++_i61)
{
_elem60 = iprot.readString();
@@ -1366,8 +1328,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list62 = iprot.readListBegin();
- struct.dependency_artifacts = new ArrayList<String>(_list62.size);
- String _elem63;
+ struct.dependency_artifacts = new java.util.ArrayList<java.lang.String>(_list62.size);
+ java.lang.String _elem63;
for (int _i64 = 0; _i64 < _list62.size; ++_i64)
{
_elem63 = iprot.readString();
@@ -1400,16 +1362,16 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map65 = iprot.readMapBegin();
- struct.component_to_shared_memory = new HashMap<String,Set<String>>(2*_map65.size);
- String _key66;
- Set<String> _val67;
+ struct.component_to_shared_memory = new java.util.HashMap<java.lang.String,java.util.Set<java.lang.String>>(2*_map65.size);
+ java.lang.String _key66;
+ java.util.Set<java.lang.String> _val67;
for (int _i68 = 0; _i68 < _map65.size; ++_i68)
{
_key66 = iprot.readString();
{
org.apache.thrift.protocol.TSet _set69 = iprot.readSetBegin();
- _val67 = new HashSet<String>(2*_set69.size);
- String _elem70;
+ _val67 = new java.util.HashSet<java.lang.String>(2*_set69.size);
+ java.lang.String _elem70;
for (int _i71 = 0; _i71 < _set69.size; ++_i71)
{
_elem70 = iprot.readString();
@@ -1430,8 +1392,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map72 = iprot.readMapBegin();
- struct.shared_memory = new HashMap<String,SharedMemory>(2*_map72.size);
- String _key73;
+ struct.shared_memory = new java.util.HashMap<java.lang.String,SharedMemory>(2*_map72.size);
+ java.lang.String _key73;
SharedMemory _val74;
for (int _i75 = 0; _i75 < _map72.size; ++_i75)
{
@@ -1464,7 +1426,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
oprot.writeFieldBegin(SPOUTS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.spouts.size()));
- for (Map.Entry<String, SpoutSpec> _iter76 : struct.spouts.entrySet())
+ for (java.util.Map.Entry<java.lang.String, SpoutSpec> _iter76 : struct.spouts.entrySet())
{
oprot.writeString(_iter76.getKey());
_iter76.getValue().write(oprot);
@@ -1477,7 +1439,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
oprot.writeFieldBegin(BOLTS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.bolts.size()));
- for (Map.Entry<String, Bolt> _iter77 : struct.bolts.entrySet())
+ for (java.util.Map.Entry<java.lang.String, Bolt> _iter77 : struct.bolts.entrySet())
{
oprot.writeString(_iter77.getKey());
_iter77.getValue().write(oprot);
@@ -1490,7 +1452,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
oprot.writeFieldBegin(STATE_SPOUTS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.state_spouts.size()));
- for (Map.Entry<String, StateSpoutSpec> _iter78 : struct.state_spouts.entrySet())
+ for (java.util.Map.Entry<java.lang.String, StateSpoutSpec> _iter78 : struct.state_spouts.entrySet())
{
oprot.writeString(_iter78.getKey());
_iter78.getValue().write(oprot);
@@ -1504,7 +1466,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
oprot.writeFieldBegin(WORKER_HOOKS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.worker_hooks.size()));
- for (ByteBuffer _iter79 : struct.worker_hooks)
+ for (java.nio.ByteBuffer _iter79 : struct.worker_hooks)
{
oprot.writeBinary(_iter79);
}
@@ -1518,7 +1480,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
oprot.writeFieldBegin(DEPENDENCY_JARS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.dependency_jars.size()));
- for (String _iter80 : struct.dependency_jars)
+ for (java.lang.String _iter80 : struct.dependency_jars)
{
oprot.writeString(_iter80);
}
@@ -1532,7 +1494,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
oprot.writeFieldBegin(DEPENDENCY_ARTIFACTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.dependency_artifacts.size()));
- for (String _iter81 : struct.dependency_artifacts)
+ for (java.lang.String _iter81 : struct.dependency_artifacts)
{
oprot.writeString(_iter81);
}
@@ -1560,12 +1522,12 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
oprot.writeFieldBegin(COMPONENT_TO_SHARED_MEMORY_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, struct.component_to_shared_memory.size()));
- for (Map.Entry<String, Set<String>> _iter82 : struct.component_to_shared_memory.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Set<java.lang.String>> _iter82 : struct.component_to_shared_memory.entrySet())
{
oprot.writeString(_iter82.getKey());
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, _iter82.getValue().size()));
- for (String _iter83 : _iter82.getValue())
+ for (java.lang.String _iter83 : _iter82.getValue())
{
oprot.writeString(_iter83);
}
@@ -1582,7 +1544,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
oprot.writeFieldBegin(SHARED_MEMORY_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.shared_memory.size()));
- for (Map.Entry<String, SharedMemory> _iter84 : struct.shared_memory.entrySet())
+ for (java.util.Map.Entry<java.lang.String, SharedMemory> _iter84 : struct.shared_memory.entrySet())
{
oprot.writeString(_iter84.getKey());
_iter84.getValue().write(oprot);
@@ -1598,20 +1560,20 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
}
- private static class StormTopologyTupleSchemeFactory implements SchemeFactory {
+ private static class StormTopologyTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public StormTopologyTupleScheme getScheme() {
return new StormTopologyTupleScheme();
}
}
- private static class StormTopologyTupleScheme extends TupleScheme<StormTopology> {
+ private static class StormTopologyTupleScheme extends org.apache.thrift.scheme.TupleScheme<StormTopology> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, StormTopology struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.spouts.size());
- for (Map.Entry<String, SpoutSpec> _iter85 : struct.spouts.entrySet())
+ for (java.util.Map.Entry<java.lang.String, SpoutSpec> _iter85 : struct.spouts.entrySet())
{
oprot.writeString(_iter85.getKey());
_iter85.getValue().write(oprot);
@@ -1619,7 +1581,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
}
{
oprot.writeI32(struct.bolts.size());
- for (Map.Entry<String, Bolt> _iter86 : struct.bolts.entrySet())
+ for (java.util.Map.Entry<java.lang.String, Bolt> _iter86 : struct.bolts.entrySet())
{
oprot.writeString(_iter86.getKey());
_iter86.getValue().write(oprot);
@@ -1627,13 +1589,13 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
}
{
oprot.writeI32(struct.state_spouts.size());
- for (Map.Entry<String, StateSpoutSpec> _iter87 : struct.state_spouts.entrySet())
+ for (java.util.Map.Entry<java.lang.String, StateSpoutSpec> _iter87 : struct.state_spouts.entrySet())
{
oprot.writeString(_iter87.getKey());
_iter87.getValue().write(oprot);
}
}
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_worker_hooks()) {
optionals.set(0);
}
@@ -1659,7 +1621,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (struct.is_set_worker_hooks()) {
{
oprot.writeI32(struct.worker_hooks.size());
- for (ByteBuffer _iter88 : struct.worker_hooks)
+ for (java.nio.ByteBuffer _iter88 : struct.worker_hooks)
{
oprot.writeBinary(_iter88);
}
@@ -1668,7 +1630,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (struct.is_set_dependency_jars()) {
{
oprot.writeI32(struct.dependency_jars.size());
- for (String _iter89 : struct.dependency_jars)
+ for (java.lang.String _iter89 : struct.dependency_jars)
{
oprot.writeString(_iter89);
}
@@ -1677,7 +1639,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (struct.is_set_dependency_artifacts()) {
{
oprot.writeI32(struct.dependency_artifacts.size());
- for (String _iter90 : struct.dependency_artifacts)
+ for (java.lang.String _iter90 : struct.dependency_artifacts)
{
oprot.writeString(_iter90);
}
@@ -1692,12 +1654,12 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (struct.is_set_component_to_shared_memory()) {
{
oprot.writeI32(struct.component_to_shared_memory.size());
- for (Map.Entry<String, Set<String>> _iter91 : struct.component_to_shared_memory.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Set<java.lang.String>> _iter91 : struct.component_to_shared_memory.entrySet())
{
oprot.writeString(_iter91.getKey());
{
oprot.writeI32(_iter91.getValue().size());
- for (String _iter92 : _iter91.getValue())
+ for (java.lang.String _iter92 : _iter91.getValue())
{
oprot.writeString(_iter92);
}
@@ -1708,7 +1670,7 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (struct.is_set_shared_memory()) {
{
oprot.writeI32(struct.shared_memory.size());
- for (Map.Entry<String, SharedMemory> _iter93 : struct.shared_memory.entrySet())
+ for (java.util.Map.Entry<java.lang.String, SharedMemory> _iter93 : struct.shared_memory.entrySet())
{
oprot.writeString(_iter93.getKey());
_iter93.getValue().write(oprot);
@@ -1719,11 +1681,11 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, StormTopology struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TMap _map94 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.spouts = new HashMap<String,SpoutSpec>(2*_map94.size);
- String _key95;
+ struct.spouts = new java.util.HashMap<java.lang.String,SpoutSpec>(2*_map94.size);
+ java.lang.String _key95;
SpoutSpec _val96;
for (int _i97 = 0; _i97 < _map94.size; ++_i97)
{
@@ -1736,8 +1698,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
struct.set_spouts_isSet(true);
{
org.apache.thrift.protocol.TMap _map98 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.bolts = new HashMap<String,Bolt>(2*_map98.size);
- String _key99;
+ struct.bolts = new java.util.HashMap<java.lang.String,Bolt>(2*_map98.size);
+ java.lang.String _key99;
Bolt _val100;
for (int _i101 = 0; _i101 < _map98.size; ++_i101)
{
@@ -1750,8 +1712,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
struct.set_bolts_isSet(true);
{
org.apache.thrift.protocol.TMap _map102 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.state_spouts = new HashMap<String,StateSpoutSpec>(2*_map102.size);
- String _key103;
+ struct.state_spouts = new java.util.HashMap<java.lang.String,StateSpoutSpec>(2*_map102.size);
+ java.lang.String _key103;
StateSpoutSpec _val104;
for (int _i105 = 0; _i105 < _map102.size; ++_i105)
{
@@ -1762,12 +1724,12 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
}
}
struct.set_state_spouts_isSet(true);
- BitSet incoming = iprot.readBitSet(7);
+ java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list106 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.worker_hooks = new ArrayList<ByteBuffer>(_list106.size);
- ByteBuffer _elem107;
+ struct.worker_hooks = new java.util.ArrayList<java.nio.ByteBuffer>(_list106.size);
+ java.nio.ByteBuffer _elem107;
for (int _i108 = 0; _i108 < _list106.size; ++_i108)
{
_elem107 = iprot.readBinary();
@@ -1779,8 +1741,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list109 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.dependency_jars = new ArrayList<String>(_list109.size);
- String _elem110;
+ struct.dependency_jars = new java.util.ArrayList<java.lang.String>(_list109.size);
+ java.lang.String _elem110;
for (int _i111 = 0; _i111 < _list109.size; ++_i111)
{
_elem110 = iprot.readString();
@@ -1792,8 +1754,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list112 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.dependency_artifacts = new ArrayList<String>(_list112.size);
- String _elem113;
+ struct.dependency_artifacts = new java.util.ArrayList<java.lang.String>(_list112.size);
+ java.lang.String _elem113;
for (int _i114 = 0; _i114 < _list112.size; ++_i114)
{
_elem113 = iprot.readString();
@@ -1813,16 +1775,16 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (incoming.get(5)) {
{
org.apache.thrift.protocol.TMap _map115 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, iprot.readI32());
- struct.component_to_shared_memory = new HashMap<String,Set<String>>(2*_map115.size);
- String _key116;
- Set<String> _val117;
+ struct.component_to_shared_memory = new java.util.HashMap<java.lang.String,java.util.Set<java.lang.String>>(2*_map115.size);
+ java.lang.String _key116;
+ java.util.Set<java.lang.String> _val117;
for (int _i118 = 0; _i118 < _map115.size; ++_i118)
{
_key116 = iprot.readString();
{
org.apache.thrift.protocol.TSet _set119 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- _val117 = new HashSet<String>(2*_set119.size);
- String _elem120;
+ _val117 = new java.util.HashSet<java.lang.String>(2*_set119.size);
+ java.lang.String _elem120;
for (int _i121 = 0; _i121 < _set119.size; ++_i121)
{
_elem120 = iprot.readString();
@@ -1837,8 +1799,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
if (incoming.get(6)) {
{
org.apache.thrift.protocol.TMap _map122 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.shared_memory = new HashMap<String,SharedMemory>(2*_map122.size);
- String _key123;
+ struct.shared_memory = new java.util.HashMap<java.lang.String,SharedMemory>(2*_map122.size);
+ java.lang.String _key123;
SharedMemory _val124;
for (int _i125 = 0; _i125 < _map122.size; ++_i125)
{
@@ -1853,5 +1815,8 @@ public class StormTopology implements org.apache.thrift.TBase<StormTopology, Sto
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/StreamInfo.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/StreamInfo.java b/storm-client/src/jvm/org/apache/storm/generated/StreamInfo.java
index bb78631..2f29b7c 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/StreamInfo.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/StreamInfo.java
@@ -16,55 +16,25 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInfo._Fields>, java.io.Serializable, Cloneable, Comparable<StreamInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StreamInfo");
private static final org.apache.thrift.protocol.TField OUTPUT_FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("output_fields", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField DIRECT_FIELD_DESC = new org.apache.thrift.protocol.TField("direct", org.apache.thrift.protocol.TType.BOOL, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new StreamInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new StreamInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new StreamInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new StreamInfoTupleSchemeFactory();
- private List<String> output_fields; // required
+ private java.util.List<java.lang.String> output_fields; // required
private boolean direct; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -72,10 +42,10 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
OUTPUT_FIELDS((short)1, "output_fields"),
DIRECT((short)2, "direct");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,7 +93,7 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -131,15 +101,15 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
// isset id assignments
private static final int __DIRECT_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.OUTPUT_FIELDS, new org.apache.thrift.meta_data.FieldMetaData("output_fields", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.DIRECT, new org.apache.thrift.meta_data.FieldMetaData("direct", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StreamInfo.class, metaDataMap);
}
@@ -147,7 +117,7 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
}
public StreamInfo(
- List<String> output_fields,
+ java.util.List<java.lang.String> output_fields,
boolean direct)
{
this();
@@ -162,7 +132,7 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
public StreamInfo(StreamInfo other) {
__isset_bitfield = other.__isset_bitfield;
if (other.is_set_output_fields()) {
- List<String> __this__output_fields = new ArrayList<String>(other.output_fields);
+ java.util.List<java.lang.String> __this__output_fields = new java.util.ArrayList<java.lang.String>(other.output_fields);
this.output_fields = __this__output_fields;
}
this.direct = other.direct;
@@ -183,22 +153,22 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
return (this.output_fields == null) ? 0 : this.output_fields.size();
}
- public java.util.Iterator<String> get_output_fields_iterator() {
+ public java.util.Iterator<java.lang.String> get_output_fields_iterator() {
return (this.output_fields == null) ? null : this.output_fields.iterator();
}
- public void add_to_output_fields(String elem) {
+ public void add_to_output_fields(java.lang.String elem) {
if (this.output_fields == null) {
- this.output_fields = new ArrayList<String>();
+ this.output_fields = new java.util.ArrayList<java.lang.String>();
}
this.output_fields.add(elem);
}
- public List<String> get_output_fields() {
+ public java.util.List<java.lang.String> get_output_fields() {
return this.output_fields;
}
- public void set_output_fields(List<String> output_fields) {
+ public void set_output_fields(java.util.List<java.lang.String> output_fields) {
this.output_fields = output_fields;
}
@@ -227,25 +197,25 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
}
public void unset_direct() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DIRECT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DIRECT_ISSET_ID);
}
/** Returns true if field direct is set (has been assigned a value) and false otherwise */
public boolean is_set_direct() {
- return EncodingUtils.testBit(__isset_bitfield, __DIRECT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DIRECT_ISSET_ID);
}
public void set_direct_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DIRECT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DIRECT_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case OUTPUT_FIELDS:
if (value == null) {
unset_output_fields();
} else {
- set_output_fields((List<String>)value);
+ set_output_fields((java.util.List<java.lang.String>)value);
}
break;
@@ -253,14 +223,14 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
if (value == null) {
unset_direct();
} else {
- set_direct((Boolean)value);
+ set_direct((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case OUTPUT_FIELDS:
return get_output_fields();
@@ -269,13 +239,13 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
return is_direct();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -284,11 +254,11 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
case DIRECT:
return is_set_direct();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof StreamInfo)
@@ -299,6 +269,8 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
public boolean equals(StreamInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_output_fields = true && this.is_set_output_fields();
boolean that_present_output_fields = true && that.is_set_output_fields();
@@ -323,19 +295,15 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_output_fields = true && (is_set_output_fields());
- list.add(present_output_fields);
- if (present_output_fields)
- list.add(output_fields);
+ hashCode = hashCode * 8191 + ((is_set_output_fields()) ? 131071 : 524287);
+ if (is_set_output_fields())
+ hashCode = hashCode * 8191 + output_fields.hashCode();
- boolean present_direct = true;
- list.add(present_direct);
- if (present_direct)
- list.add(direct);
+ hashCode = hashCode * 8191 + ((direct) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -346,7 +314,7 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_output_fields()).compareTo(other.is_set_output_fields());
+ lastComparison = java.lang.Boolean.valueOf(is_set_output_fields()).compareTo(other.is_set_output_fields());
if (lastComparison != 0) {
return lastComparison;
}
@@ -356,7 +324,7 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_direct()).compareTo(other.is_set_direct());
+ lastComparison = java.lang.Boolean.valueOf(is_set_direct()).compareTo(other.is_set_direct());
if (lastComparison != 0) {
return lastComparison;
}
@@ -374,16 +342,16 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("StreamInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("StreamInfo(");
boolean first = true;
sb.append("output_fields:");
@@ -422,7 +390,7 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -432,13 +400,13 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
}
}
- private static class StreamInfoStandardSchemeFactory implements SchemeFactory {
+ private static class StreamInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public StreamInfoStandardScheme getScheme() {
return new StreamInfoStandardScheme();
}
}
- private static class StreamInfoStandardScheme extends StandardScheme<StreamInfo> {
+ private static class StreamInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<StreamInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, StreamInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -454,8 +422,8 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
- struct.output_fields = new ArrayList<String>(_list16.size);
- String _elem17;
+ struct.output_fields = new java.util.ArrayList<java.lang.String>(_list16.size);
+ java.lang.String _elem17;
for (int _i18 = 0; _i18 < _list16.size; ++_i18)
{
_elem17 = iprot.readString();
@@ -493,7 +461,7 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
oprot.writeFieldBegin(OUTPUT_FIELDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.output_fields.size()));
- for (String _iter19 : struct.output_fields)
+ for (java.lang.String _iter19 : struct.output_fields)
{
oprot.writeString(_iter19);
}
@@ -510,20 +478,20 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
}
- private static class StreamInfoTupleSchemeFactory implements SchemeFactory {
+ private static class StreamInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public StreamInfoTupleScheme getScheme() {
return new StreamInfoTupleScheme();
}
}
- private static class StreamInfoTupleScheme extends TupleScheme<StreamInfo> {
+ private static class StreamInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<StreamInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, StreamInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.output_fields.size());
- for (String _iter20 : struct.output_fields)
+ for (java.lang.String _iter20 : struct.output_fields)
{
oprot.writeString(_iter20);
}
@@ -533,11 +501,11 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, StreamInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.output_fields = new ArrayList<String>(_list21.size);
- String _elem22;
+ struct.output_fields = new java.util.ArrayList<java.lang.String>(_list21.size);
+ java.lang.String _elem22;
for (int _i23 = 0; _i23 < _list21.size; ++_i23)
{
_elem22 = iprot.readString();
@@ -550,5 +518,8 @@ public class StreamInfo implements org.apache.thrift.TBase<StreamInfo, StreamInf
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[39/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/BoltStats.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/BoltStats.java b/storm-client/src/jvm/org/apache/storm/generated/BoltStats.java
index 14800a6..dd84c66 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/BoltStats.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/BoltStats.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._Fields>, java.io.Serializable, Cloneable, Comparable<BoltStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BoltStats");
@@ -61,17 +34,14 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
private static final org.apache.thrift.protocol.TField EXECUTED_FIELD_DESC = new org.apache.thrift.protocol.TField("executed", org.apache.thrift.protocol.TType.MAP, (short)4);
private static final org.apache.thrift.protocol.TField EXECUTE_MS_AVG_FIELD_DESC = new org.apache.thrift.protocol.TField("execute_ms_avg", org.apache.thrift.protocol.TType.MAP, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new BoltStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new BoltStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new BoltStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new BoltStatsTupleSchemeFactory();
- private Map<String,Map<GlobalStreamId,Long>> acked; // required
- private Map<String,Map<GlobalStreamId,Long>> failed; // required
- private Map<String,Map<GlobalStreamId,Double>> process_ms_avg; // required
- private Map<String,Map<GlobalStreamId,Long>> executed; // required
- private Map<String,Map<GlobalStreamId,Double>> execute_ms_avg; // required
+ private java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> acked; // required
+ private java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> failed; // required
+ private java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>> process_ms_avg; // required
+ private java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> executed; // required
+ private java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>> execute_ms_avg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -81,10 +51,10 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
EXECUTED((short)4, "executed"),
EXECUTE_MS_AVG((short)5, "execute_ms_avg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -115,21 +85,21 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -138,15 +108,15 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ACKED, new org.apache.thrift.meta_data.FieldMetaData("acked", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
@@ -177,7 +147,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GlobalStreamId.class),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BoltStats.class, metaDataMap);
}
@@ -185,11 +155,11 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
public BoltStats(
- Map<String,Map<GlobalStreamId,Long>> acked,
- Map<String,Map<GlobalStreamId,Long>> failed,
- Map<String,Map<GlobalStreamId,Double>> process_ms_avg,
- Map<String,Map<GlobalStreamId,Long>> executed,
- Map<String,Map<GlobalStreamId,Double>> execute_ms_avg)
+ java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> acked,
+ java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> failed,
+ java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>> process_ms_avg,
+ java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> executed,
+ java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>> execute_ms_avg)
{
this();
this.acked = acked;
@@ -204,23 +174,23 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
*/
public BoltStats(BoltStats other) {
if (other.is_set_acked()) {
- Map<String,Map<GlobalStreamId,Long>> __this__acked = new HashMap<String,Map<GlobalStreamId,Long>>(other.acked.size());
- for (Map.Entry<String, Map<GlobalStreamId,Long>> other_element : other.acked.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> __this__acked = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>(other.acked.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Long>> other_element : other.acked.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Long> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<GlobalStreamId,java.lang.Long> other_element_value = other_element.getValue();
- String __this__acked_copy_key = other_element_key;
+ java.lang.String __this__acked_copy_key = other_element_key;
- Map<GlobalStreamId,Long> __this__acked_copy_value = new HashMap<GlobalStreamId,Long>(other_element_value.size());
- for (Map.Entry<GlobalStreamId, Long> other_element_value_element : other_element_value.entrySet()) {
+ java.util.Map<GlobalStreamId,java.lang.Long> __this__acked_copy_value = new java.util.HashMap<GlobalStreamId,java.lang.Long>(other_element_value.size());
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Long> other_element_value_element : other_element_value.entrySet()) {
GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Long other_element_value_element_value = other_element_value_element.getValue();
+ java.lang.Long other_element_value_element_value = other_element_value_element.getValue();
GlobalStreamId __this__acked_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
- Long __this__acked_copy_value_copy_value = other_element_value_element_value;
+ java.lang.Long __this__acked_copy_value_copy_value = other_element_value_element_value;
__this__acked_copy_value.put(__this__acked_copy_value_copy_key, __this__acked_copy_value_copy_value);
}
@@ -230,23 +200,23 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
this.acked = __this__acked;
}
if (other.is_set_failed()) {
- Map<String,Map<GlobalStreamId,Long>> __this__failed = new HashMap<String,Map<GlobalStreamId,Long>>(other.failed.size());
- for (Map.Entry<String, Map<GlobalStreamId,Long>> other_element : other.failed.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> __this__failed = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>(other.failed.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Long>> other_element : other.failed.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Long> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<GlobalStreamId,java.lang.Long> other_element_value = other_element.getValue();
- String __this__failed_copy_key = other_element_key;
+ java.lang.String __this__failed_copy_key = other_element_key;
- Map<GlobalStreamId,Long> __this__failed_copy_value = new HashMap<GlobalStreamId,Long>(other_element_value.size());
- for (Map.Entry<GlobalStreamId, Long> other_element_value_element : other_element_value.entrySet()) {
+ java.util.Map<GlobalStreamId,java.lang.Long> __this__failed_copy_value = new java.util.HashMap<GlobalStreamId,java.lang.Long>(other_element_value.size());
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Long> other_element_value_element : other_element_value.entrySet()) {
GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Long other_element_value_element_value = other_element_value_element.getValue();
+ java.lang.Long other_element_value_element_value = other_element_value_element.getValue();
GlobalStreamId __this__failed_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
- Long __this__failed_copy_value_copy_value = other_element_value_element_value;
+ java.lang.Long __this__failed_copy_value_copy_value = other_element_value_element_value;
__this__failed_copy_value.put(__this__failed_copy_value_copy_key, __this__failed_copy_value_copy_value);
}
@@ -256,23 +226,23 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
this.failed = __this__failed;
}
if (other.is_set_process_ms_avg()) {
- Map<String,Map<GlobalStreamId,Double>> __this__process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(other.process_ms_avg.size());
- for (Map.Entry<String, Map<GlobalStreamId,Double>> other_element : other.process_ms_avg.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>> __this__process_ms_avg = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>>(other.process_ms_avg.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Double>> other_element : other.process_ms_avg.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Double> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<GlobalStreamId,java.lang.Double> other_element_value = other_element.getValue();
- String __this__process_ms_avg_copy_key = other_element_key;
+ java.lang.String __this__process_ms_avg_copy_key = other_element_key;
- Map<GlobalStreamId,Double> __this__process_ms_avg_copy_value = new HashMap<GlobalStreamId,Double>(other_element_value.size());
- for (Map.Entry<GlobalStreamId, Double> other_element_value_element : other_element_value.entrySet()) {
+ java.util.Map<GlobalStreamId,java.lang.Double> __this__process_ms_avg_copy_value = new java.util.HashMap<GlobalStreamId,java.lang.Double>(other_element_value.size());
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Double> other_element_value_element : other_element_value.entrySet()) {
GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Double other_element_value_element_value = other_element_value_element.getValue();
+ java.lang.Double other_element_value_element_value = other_element_value_element.getValue();
GlobalStreamId __this__process_ms_avg_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
- Double __this__process_ms_avg_copy_value_copy_value = other_element_value_element_value;
+ java.lang.Double __this__process_ms_avg_copy_value_copy_value = other_element_value_element_value;
__this__process_ms_avg_copy_value.put(__this__process_ms_avg_copy_value_copy_key, __this__process_ms_avg_copy_value_copy_value);
}
@@ -282,23 +252,23 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
this.process_ms_avg = __this__process_ms_avg;
}
if (other.is_set_executed()) {
- Map<String,Map<GlobalStreamId,Long>> __this__executed = new HashMap<String,Map<GlobalStreamId,Long>>(other.executed.size());
- for (Map.Entry<String, Map<GlobalStreamId,Long>> other_element : other.executed.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> __this__executed = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>(other.executed.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Long>> other_element : other.executed.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Long> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<GlobalStreamId,java.lang.Long> other_element_value = other_element.getValue();
- String __this__executed_copy_key = other_element_key;
+ java.lang.String __this__executed_copy_key = other_element_key;
- Map<GlobalStreamId,Long> __this__executed_copy_value = new HashMap<GlobalStreamId,Long>(other_element_value.size());
- for (Map.Entry<GlobalStreamId, Long> other_element_value_element : other_element_value.entrySet()) {
+ java.util.Map<GlobalStreamId,java.lang.Long> __this__executed_copy_value = new java.util.HashMap<GlobalStreamId,java.lang.Long>(other_element_value.size());
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Long> other_element_value_element : other_element_value.entrySet()) {
GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Long other_element_value_element_value = other_element_value_element.getValue();
+ java.lang.Long other_element_value_element_value = other_element_value_element.getValue();
GlobalStreamId __this__executed_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
- Long __this__executed_copy_value_copy_value = other_element_value_element_value;
+ java.lang.Long __this__executed_copy_value_copy_value = other_element_value_element_value;
__this__executed_copy_value.put(__this__executed_copy_value_copy_key, __this__executed_copy_value_copy_value);
}
@@ -308,23 +278,23 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
this.executed = __this__executed;
}
if (other.is_set_execute_ms_avg()) {
- Map<String,Map<GlobalStreamId,Double>> __this__execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(other.execute_ms_avg.size());
- for (Map.Entry<String, Map<GlobalStreamId,Double>> other_element : other.execute_ms_avg.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>> __this__execute_ms_avg = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>>(other.execute_ms_avg.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Double>> other_element : other.execute_ms_avg.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Double> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<GlobalStreamId,java.lang.Double> other_element_value = other_element.getValue();
- String __this__execute_ms_avg_copy_key = other_element_key;
+ java.lang.String __this__execute_ms_avg_copy_key = other_element_key;
- Map<GlobalStreamId,Double> __this__execute_ms_avg_copy_value = new HashMap<GlobalStreamId,Double>(other_element_value.size());
- for (Map.Entry<GlobalStreamId, Double> other_element_value_element : other_element_value.entrySet()) {
+ java.util.Map<GlobalStreamId,java.lang.Double> __this__execute_ms_avg_copy_value = new java.util.HashMap<GlobalStreamId,java.lang.Double>(other_element_value.size());
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Double> other_element_value_element : other_element_value.entrySet()) {
GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Double other_element_value_element_value = other_element_value_element.getValue();
+ java.lang.Double other_element_value_element_value = other_element_value_element.getValue();
GlobalStreamId __this__execute_ms_avg_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
- Double __this__execute_ms_avg_copy_value_copy_value = other_element_value_element_value;
+ java.lang.Double __this__execute_ms_avg_copy_value_copy_value = other_element_value_element_value;
__this__execute_ms_avg_copy_value.put(__this__execute_ms_avg_copy_value_copy_key, __this__execute_ms_avg_copy_value_copy_value);
}
@@ -352,18 +322,18 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
return (this.acked == null) ? 0 : this.acked.size();
}
- public void put_to_acked(String key, Map<GlobalStreamId,Long> val) {
+ public void put_to_acked(java.lang.String key, java.util.Map<GlobalStreamId,java.lang.Long> val) {
if (this.acked == null) {
- this.acked = new HashMap<String,Map<GlobalStreamId,Long>>();
+ this.acked = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>();
}
this.acked.put(key, val);
}
- public Map<String,Map<GlobalStreamId,Long>> get_acked() {
+ public java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> get_acked() {
return this.acked;
}
- public void set_acked(Map<String,Map<GlobalStreamId,Long>> acked) {
+ public void set_acked(java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> acked) {
this.acked = acked;
}
@@ -386,18 +356,18 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
return (this.failed == null) ? 0 : this.failed.size();
}
- public void put_to_failed(String key, Map<GlobalStreamId,Long> val) {
+ public void put_to_failed(java.lang.String key, java.util.Map<GlobalStreamId,java.lang.Long> val) {
if (this.failed == null) {
- this.failed = new HashMap<String,Map<GlobalStreamId,Long>>();
+ this.failed = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>();
}
this.failed.put(key, val);
}
- public Map<String,Map<GlobalStreamId,Long>> get_failed() {
+ public java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> get_failed() {
return this.failed;
}
- public void set_failed(Map<String,Map<GlobalStreamId,Long>> failed) {
+ public void set_failed(java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> failed) {
this.failed = failed;
}
@@ -420,18 +390,18 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
return (this.process_ms_avg == null) ? 0 : this.process_ms_avg.size();
}
- public void put_to_process_ms_avg(String key, Map<GlobalStreamId,Double> val) {
+ public void put_to_process_ms_avg(java.lang.String key, java.util.Map<GlobalStreamId,java.lang.Double> val) {
if (this.process_ms_avg == null) {
- this.process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>();
+ this.process_ms_avg = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>>();
}
this.process_ms_avg.put(key, val);
}
- public Map<String,Map<GlobalStreamId,Double>> get_process_ms_avg() {
+ public java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>> get_process_ms_avg() {
return this.process_ms_avg;
}
- public void set_process_ms_avg(Map<String,Map<GlobalStreamId,Double>> process_ms_avg) {
+ public void set_process_ms_avg(java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>> process_ms_avg) {
this.process_ms_avg = process_ms_avg;
}
@@ -454,18 +424,18 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
return (this.executed == null) ? 0 : this.executed.size();
}
- public void put_to_executed(String key, Map<GlobalStreamId,Long> val) {
+ public void put_to_executed(java.lang.String key, java.util.Map<GlobalStreamId,java.lang.Long> val) {
if (this.executed == null) {
- this.executed = new HashMap<String,Map<GlobalStreamId,Long>>();
+ this.executed = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>();
}
this.executed.put(key, val);
}
- public Map<String,Map<GlobalStreamId,Long>> get_executed() {
+ public java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> get_executed() {
return this.executed;
}
- public void set_executed(Map<String,Map<GlobalStreamId,Long>> executed) {
+ public void set_executed(java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>> executed) {
this.executed = executed;
}
@@ -488,18 +458,18 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
return (this.execute_ms_avg == null) ? 0 : this.execute_ms_avg.size();
}
- public void put_to_execute_ms_avg(String key, Map<GlobalStreamId,Double> val) {
+ public void put_to_execute_ms_avg(java.lang.String key, java.util.Map<GlobalStreamId,java.lang.Double> val) {
if (this.execute_ms_avg == null) {
- this.execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>();
+ this.execute_ms_avg = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>>();
}
this.execute_ms_avg.put(key, val);
}
- public Map<String,Map<GlobalStreamId,Double>> get_execute_ms_avg() {
+ public java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>> get_execute_ms_avg() {
return this.execute_ms_avg;
}
- public void set_execute_ms_avg(Map<String,Map<GlobalStreamId,Double>> execute_ms_avg) {
+ public void set_execute_ms_avg(java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>> execute_ms_avg) {
this.execute_ms_avg = execute_ms_avg;
}
@@ -518,13 +488,13 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ACKED:
if (value == null) {
unset_acked();
} else {
- set_acked((Map<String,Map<GlobalStreamId,Long>>)value);
+ set_acked((java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>)value);
}
break;
@@ -532,7 +502,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
if (value == null) {
unset_failed();
} else {
- set_failed((Map<String,Map<GlobalStreamId,Long>>)value);
+ set_failed((java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>)value);
}
break;
@@ -540,7 +510,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
if (value == null) {
unset_process_ms_avg();
} else {
- set_process_ms_avg((Map<String,Map<GlobalStreamId,Double>>)value);
+ set_process_ms_avg((java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>>)value);
}
break;
@@ -548,7 +518,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
if (value == null) {
unset_executed();
} else {
- set_executed((Map<String,Map<GlobalStreamId,Long>>)value);
+ set_executed((java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>)value);
}
break;
@@ -556,14 +526,14 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
if (value == null) {
unset_execute_ms_avg();
} else {
- set_execute_ms_avg((Map<String,Map<GlobalStreamId,Double>>)value);
+ set_execute_ms_avg((java.util.Map<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ACKED:
return get_acked();
@@ -581,13 +551,13 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
return get_execute_ms_avg();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -602,11 +572,11 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
case EXECUTE_MS_AVG:
return is_set_execute_ms_avg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof BoltStats)
@@ -617,6 +587,8 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
public boolean equals(BoltStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_acked = true && this.is_set_acked();
boolean that_present_acked = true && that.is_set_acked();
@@ -668,34 +640,29 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_acked = true && (is_set_acked());
- list.add(present_acked);
- if (present_acked)
- list.add(acked);
-
- boolean present_failed = true && (is_set_failed());
- list.add(present_failed);
- if (present_failed)
- list.add(failed);
-
- boolean present_process_ms_avg = true && (is_set_process_ms_avg());
- list.add(present_process_ms_avg);
- if (present_process_ms_avg)
- list.add(process_ms_avg);
-
- boolean present_executed = true && (is_set_executed());
- list.add(present_executed);
- if (present_executed)
- list.add(executed);
-
- boolean present_execute_ms_avg = true && (is_set_execute_ms_avg());
- list.add(present_execute_ms_avg);
- if (present_execute_ms_avg)
- list.add(execute_ms_avg);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((is_set_acked()) ? 131071 : 524287);
+ if (is_set_acked())
+ hashCode = hashCode * 8191 + acked.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_failed()) ? 131071 : 524287);
+ if (is_set_failed())
+ hashCode = hashCode * 8191 + failed.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_process_ms_avg()) ? 131071 : 524287);
+ if (is_set_process_ms_avg())
+ hashCode = hashCode * 8191 + process_ms_avg.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_executed()) ? 131071 : 524287);
+ if (is_set_executed())
+ hashCode = hashCode * 8191 + executed.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_execute_ms_avg()) ? 131071 : 524287);
+ if (is_set_execute_ms_avg())
+ hashCode = hashCode * 8191 + execute_ms_avg.hashCode();
+
+ return hashCode;
}
@Override
@@ -706,7 +673,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_acked()).compareTo(other.is_set_acked());
+ lastComparison = java.lang.Boolean.valueOf(is_set_acked()).compareTo(other.is_set_acked());
if (lastComparison != 0) {
return lastComparison;
}
@@ -716,7 +683,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_failed()).compareTo(other.is_set_failed());
+ lastComparison = java.lang.Boolean.valueOf(is_set_failed()).compareTo(other.is_set_failed());
if (lastComparison != 0) {
return lastComparison;
}
@@ -726,7 +693,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_process_ms_avg()).compareTo(other.is_set_process_ms_avg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_process_ms_avg()).compareTo(other.is_set_process_ms_avg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -736,7 +703,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_executed()).compareTo(other.is_set_executed());
+ lastComparison = java.lang.Boolean.valueOf(is_set_executed()).compareTo(other.is_set_executed());
if (lastComparison != 0) {
return lastComparison;
}
@@ -746,7 +713,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_execute_ms_avg()).compareTo(other.is_set_execute_ms_avg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_execute_ms_avg()).compareTo(other.is_set_execute_ms_avg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -764,16 +731,16 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("BoltStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("BoltStats(");
boolean first = true;
sb.append("acked:");
@@ -852,7 +819,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -860,13 +827,13 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
}
- private static class BoltStatsStandardSchemeFactory implements SchemeFactory {
+ private static class BoltStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BoltStatsStandardScheme getScheme() {
return new BoltStatsStandardScheme();
}
}
- private static class BoltStatsStandardScheme extends StandardScheme<BoltStats> {
+ private static class BoltStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<BoltStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, BoltStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -882,15 +849,15 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map160 = iprot.readMapBegin();
- struct.acked = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map160.size);
- String _key161;
- Map<GlobalStreamId,Long> _val162;
+ struct.acked = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>(2*_map160.size);
+ java.lang.String _key161;
+ java.util.Map<GlobalStreamId,java.lang.Long> _val162;
for (int _i163 = 0; _i163 < _map160.size; ++_i163)
{
_key161 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map164 = iprot.readMapBegin();
- _val162 = new HashMap<GlobalStreamId,Long>(2*_map164.size);
+ _val162 = new java.util.HashMap<GlobalStreamId,java.lang.Long>(2*_map164.size);
GlobalStreamId _key165;
long _val166;
for (int _i167 = 0; _i167 < _map164.size; ++_i167)
@@ -915,15 +882,15 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map168 = iprot.readMapBegin();
- struct.failed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map168.size);
- String _key169;
- Map<GlobalStreamId,Long> _val170;
+ struct.failed = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>(2*_map168.size);
+ java.lang.String _key169;
+ java.util.Map<GlobalStreamId,java.lang.Long> _val170;
for (int _i171 = 0; _i171 < _map168.size; ++_i171)
{
_key169 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map172 = iprot.readMapBegin();
- _val170 = new HashMap<GlobalStreamId,Long>(2*_map172.size);
+ _val170 = new java.util.HashMap<GlobalStreamId,java.lang.Long>(2*_map172.size);
GlobalStreamId _key173;
long _val174;
for (int _i175 = 0; _i175 < _map172.size; ++_i175)
@@ -948,15 +915,15 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map176 = iprot.readMapBegin();
- struct.process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map176.size);
- String _key177;
- Map<GlobalStreamId,Double> _val178;
+ struct.process_ms_avg = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>>(2*_map176.size);
+ java.lang.String _key177;
+ java.util.Map<GlobalStreamId,java.lang.Double> _val178;
for (int _i179 = 0; _i179 < _map176.size; ++_i179)
{
_key177 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map180 = iprot.readMapBegin();
- _val178 = new HashMap<GlobalStreamId,Double>(2*_map180.size);
+ _val178 = new java.util.HashMap<GlobalStreamId,java.lang.Double>(2*_map180.size);
GlobalStreamId _key181;
double _val182;
for (int _i183 = 0; _i183 < _map180.size; ++_i183)
@@ -981,15 +948,15 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map184 = iprot.readMapBegin();
- struct.executed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map184.size);
- String _key185;
- Map<GlobalStreamId,Long> _val186;
+ struct.executed = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>(2*_map184.size);
+ java.lang.String _key185;
+ java.util.Map<GlobalStreamId,java.lang.Long> _val186;
for (int _i187 = 0; _i187 < _map184.size; ++_i187)
{
_key185 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map188 = iprot.readMapBegin();
- _val186 = new HashMap<GlobalStreamId,Long>(2*_map188.size);
+ _val186 = new java.util.HashMap<GlobalStreamId,java.lang.Long>(2*_map188.size);
GlobalStreamId _key189;
long _val190;
for (int _i191 = 0; _i191 < _map188.size; ++_i191)
@@ -1014,15 +981,15 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map192 = iprot.readMapBegin();
- struct.execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map192.size);
- String _key193;
- Map<GlobalStreamId,Double> _val194;
+ struct.execute_ms_avg = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>>(2*_map192.size);
+ java.lang.String _key193;
+ java.util.Map<GlobalStreamId,java.lang.Double> _val194;
for (int _i195 = 0; _i195 < _map192.size; ++_i195)
{
_key193 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map196 = iprot.readMapBegin();
- _val194 = new HashMap<GlobalStreamId,Double>(2*_map196.size);
+ _val194 = new java.util.HashMap<GlobalStreamId,java.lang.Double>(2*_map196.size);
GlobalStreamId _key197;
double _val198;
for (int _i199 = 0; _i199 < _map196.size; ++_i199)
@@ -1060,12 +1027,12 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
oprot.writeFieldBegin(ACKED_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.acked.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter200 : struct.acked.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Long>> _iter200 : struct.acked.entrySet())
{
oprot.writeString(_iter200.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter200.getValue().size()));
- for (Map.Entry<GlobalStreamId, Long> _iter201 : _iter200.getValue().entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Long> _iter201 : _iter200.getValue().entrySet())
{
_iter201.getKey().write(oprot);
oprot.writeI64(_iter201.getValue());
@@ -1081,12 +1048,12 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
oprot.writeFieldBegin(FAILED_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.failed.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter202 : struct.failed.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Long>> _iter202 : struct.failed.entrySet())
{
oprot.writeString(_iter202.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter202.getValue().size()));
- for (Map.Entry<GlobalStreamId, Long> _iter203 : _iter202.getValue().entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Long> _iter203 : _iter202.getValue().entrySet())
{
_iter203.getKey().write(oprot);
oprot.writeI64(_iter203.getValue());
@@ -1102,12 +1069,12 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
oprot.writeFieldBegin(PROCESS_MS_AVG_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.process_ms_avg.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter204 : struct.process_ms_avg.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Double>> _iter204 : struct.process_ms_avg.entrySet())
{
oprot.writeString(_iter204.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, _iter204.getValue().size()));
- for (Map.Entry<GlobalStreamId, Double> _iter205 : _iter204.getValue().entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Double> _iter205 : _iter204.getValue().entrySet())
{
_iter205.getKey().write(oprot);
oprot.writeDouble(_iter205.getValue());
@@ -1123,12 +1090,12 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
oprot.writeFieldBegin(EXECUTED_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.executed.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter206 : struct.executed.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Long>> _iter206 : struct.executed.entrySet())
{
oprot.writeString(_iter206.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter206.getValue().size()));
- for (Map.Entry<GlobalStreamId, Long> _iter207 : _iter206.getValue().entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Long> _iter207 : _iter206.getValue().entrySet())
{
_iter207.getKey().write(oprot);
oprot.writeI64(_iter207.getValue());
@@ -1144,12 +1111,12 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
oprot.writeFieldBegin(EXECUTE_MS_AVG_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.execute_ms_avg.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter208 : struct.execute_ms_avg.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Double>> _iter208 : struct.execute_ms_avg.entrySet())
{
oprot.writeString(_iter208.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, _iter208.getValue().size()));
- for (Map.Entry<GlobalStreamId, Double> _iter209 : _iter208.getValue().entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Double> _iter209 : _iter208.getValue().entrySet())
{
_iter209.getKey().write(oprot);
oprot.writeDouble(_iter209.getValue());
@@ -1167,25 +1134,25 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
- private static class BoltStatsTupleSchemeFactory implements SchemeFactory {
+ private static class BoltStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BoltStatsTupleScheme getScheme() {
return new BoltStatsTupleScheme();
}
}
- private static class BoltStatsTupleScheme extends TupleScheme<BoltStats> {
+ private static class BoltStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<BoltStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, BoltStats struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.acked.size());
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter210 : struct.acked.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Long>> _iter210 : struct.acked.entrySet())
{
oprot.writeString(_iter210.getKey());
{
oprot.writeI32(_iter210.getValue().size());
- for (Map.Entry<GlobalStreamId, Long> _iter211 : _iter210.getValue().entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Long> _iter211 : _iter210.getValue().entrySet())
{
_iter211.getKey().write(oprot);
oprot.writeI64(_iter211.getValue());
@@ -1195,12 +1162,12 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
{
oprot.writeI32(struct.failed.size());
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter212 : struct.failed.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Long>> _iter212 : struct.failed.entrySet())
{
oprot.writeString(_iter212.getKey());
{
oprot.writeI32(_iter212.getValue().size());
- for (Map.Entry<GlobalStreamId, Long> _iter213 : _iter212.getValue().entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Long> _iter213 : _iter212.getValue().entrySet())
{
_iter213.getKey().write(oprot);
oprot.writeI64(_iter213.getValue());
@@ -1210,12 +1177,12 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
{
oprot.writeI32(struct.process_ms_avg.size());
- for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter214 : struct.process_ms_avg.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Double>> _iter214 : struct.process_ms_avg.entrySet())
{
oprot.writeString(_iter214.getKey());
{
oprot.writeI32(_iter214.getValue().size());
- for (Map.Entry<GlobalStreamId, Double> _iter215 : _iter214.getValue().entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Double> _iter215 : _iter214.getValue().entrySet())
{
_iter215.getKey().write(oprot);
oprot.writeDouble(_iter215.getValue());
@@ -1225,12 +1192,12 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
{
oprot.writeI32(struct.executed.size());
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter216 : struct.executed.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Long>> _iter216 : struct.executed.entrySet())
{
oprot.writeString(_iter216.getKey());
{
oprot.writeI32(_iter216.getValue().size());
- for (Map.Entry<GlobalStreamId, Long> _iter217 : _iter216.getValue().entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Long> _iter217 : _iter216.getValue().entrySet())
{
_iter217.getKey().write(oprot);
oprot.writeI64(_iter217.getValue());
@@ -1240,12 +1207,12 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
{
oprot.writeI32(struct.execute_ms_avg.size());
- for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter218 : struct.execute_ms_avg.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<GlobalStreamId,java.lang.Double>> _iter218 : struct.execute_ms_avg.entrySet())
{
oprot.writeString(_iter218.getKey());
{
oprot.writeI32(_iter218.getValue().size());
- for (Map.Entry<GlobalStreamId, Double> _iter219 : _iter218.getValue().entrySet())
+ for (java.util.Map.Entry<GlobalStreamId, java.lang.Double> _iter219 : _iter218.getValue().entrySet())
{
_iter219.getKey().write(oprot);
oprot.writeDouble(_iter219.getValue());
@@ -1257,18 +1224,18 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, BoltStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TMap _map220 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.acked = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map220.size);
- String _key221;
- Map<GlobalStreamId,Long> _val222;
+ struct.acked = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>(2*_map220.size);
+ java.lang.String _key221;
+ java.util.Map<GlobalStreamId,java.lang.Long> _val222;
for (int _i223 = 0; _i223 < _map220.size; ++_i223)
{
_key221 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map224 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- _val222 = new HashMap<GlobalStreamId,Long>(2*_map224.size);
+ _val222 = new java.util.HashMap<GlobalStreamId,java.lang.Long>(2*_map224.size);
GlobalStreamId _key225;
long _val226;
for (int _i227 = 0; _i227 < _map224.size; ++_i227)
@@ -1285,15 +1252,15 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
struct.set_acked_isSet(true);
{
org.apache.thrift.protocol.TMap _map228 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.failed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map228.size);
- String _key229;
- Map<GlobalStreamId,Long> _val230;
+ struct.failed = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>(2*_map228.size);
+ java.lang.String _key229;
+ java.util.Map<GlobalStreamId,java.lang.Long> _val230;
for (int _i231 = 0; _i231 < _map228.size; ++_i231)
{
_key229 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map232 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- _val230 = new HashMap<GlobalStreamId,Long>(2*_map232.size);
+ _val230 = new java.util.HashMap<GlobalStreamId,java.lang.Long>(2*_map232.size);
GlobalStreamId _key233;
long _val234;
for (int _i235 = 0; _i235 < _map232.size; ++_i235)
@@ -1310,15 +1277,15 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
struct.set_failed_isSet(true);
{
org.apache.thrift.protocol.TMap _map236 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map236.size);
- String _key237;
- Map<GlobalStreamId,Double> _val238;
+ struct.process_ms_avg = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>>(2*_map236.size);
+ java.lang.String _key237;
+ java.util.Map<GlobalStreamId,java.lang.Double> _val238;
for (int _i239 = 0; _i239 < _map236.size; ++_i239)
{
_key237 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map240 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- _val238 = new HashMap<GlobalStreamId,Double>(2*_map240.size);
+ _val238 = new java.util.HashMap<GlobalStreamId,java.lang.Double>(2*_map240.size);
GlobalStreamId _key241;
double _val242;
for (int _i243 = 0; _i243 < _map240.size; ++_i243)
@@ -1335,15 +1302,15 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
struct.set_process_ms_avg_isSet(true);
{
org.apache.thrift.protocol.TMap _map244 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.executed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map244.size);
- String _key245;
- Map<GlobalStreamId,Long> _val246;
+ struct.executed = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Long>>(2*_map244.size);
+ java.lang.String _key245;
+ java.util.Map<GlobalStreamId,java.lang.Long> _val246;
for (int _i247 = 0; _i247 < _map244.size; ++_i247)
{
_key245 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map248 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- _val246 = new HashMap<GlobalStreamId,Long>(2*_map248.size);
+ _val246 = new java.util.HashMap<GlobalStreamId,java.lang.Long>(2*_map248.size);
GlobalStreamId _key249;
long _val250;
for (int _i251 = 0; _i251 < _map248.size; ++_i251)
@@ -1360,15 +1327,15 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
struct.set_executed_isSet(true);
{
org.apache.thrift.protocol.TMap _map252 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map252.size);
- String _key253;
- Map<GlobalStreamId,Double> _val254;
+ struct.execute_ms_avg = new java.util.HashMap<java.lang.String,java.util.Map<GlobalStreamId,java.lang.Double>>(2*_map252.size);
+ java.lang.String _key253;
+ java.util.Map<GlobalStreamId,java.lang.Double> _val254;
for (int _i255 = 0; _i255 < _map252.size; ++_i255)
{
_key253 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map256 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- _val254 = new HashMap<GlobalStreamId,Double>(2*_map256.size);
+ _val254 = new java.util.HashMap<GlobalStreamId,java.lang.Double>(2*_map256.size);
GlobalStreamId _key257;
double _val258;
for (int _i259 = 0; _i259 < _map256.size; ++_i259)
@@ -1386,5 +1353,8 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/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 4ca5862..1f8c08f 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, ClusterSummary._Fields>, java.io.Serializable, Cloneable, Comparable<ClusterSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClusterSummary");
@@ -60,16 +33,13 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
private static final org.apache.thrift.protocol.TField TOPOLOGIES_FIELD_DESC = new org.apache.thrift.protocol.TField("topologies", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField NIMBUSES_FIELD_DESC = new org.apache.thrift.protocol.TField("nimbuses", org.apache.thrift.protocol.TType.LIST, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ClusterSummaryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ClusterSummaryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ClusterSummaryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ClusterSummaryTupleSchemeFactory();
- private List<SupervisorSummary> supervisors; // required
+ private java.util.List<SupervisorSummary> supervisors; // required
private int nimbus_uptime_secs; // optional
- private List<TopologySummary> topologies; // required
- private List<NimbusSummary> nimbuses; // required
+ 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.thrift.TFieldIdEnum {
@@ -78,10 +48,10 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
TOPOLOGIES((short)3, "topologies"),
NIMBUSES((short)4, "nimbuses");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -110,21 +80,21 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -133,7 +103,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -142,9 +112,9 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
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 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUPERVISORS, new org.apache.thrift.meta_data.FieldMetaData("supervisors", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SupervisorSummary.class))));
@@ -156,7 +126,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
tmpMap.put(_Fields.NIMBUSES, new org.apache.thrift.meta_data.FieldMetaData("nimbuses", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NimbusSummary.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClusterSummary.class, metaDataMap);
}
@@ -166,9 +136,9 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
public ClusterSummary(
- List<SupervisorSummary> supervisors,
- List<TopologySummary> topologies,
- List<NimbusSummary> nimbuses)
+ java.util.List<SupervisorSummary> supervisors,
+ java.util.List<TopologySummary> topologies,
+ java.util.List<NimbusSummary> nimbuses)
{
this();
this.supervisors = supervisors;
@@ -182,7 +152,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
public ClusterSummary(ClusterSummary other) {
__isset_bitfield = other.__isset_bitfield;
if (other.is_set_supervisors()) {
- List<SupervisorSummary> __this__supervisors = new ArrayList<SupervisorSummary>(other.supervisors.size());
+ java.util.List<SupervisorSummary> __this__supervisors = new java.util.ArrayList<SupervisorSummary>(other.supervisors.size());
for (SupervisorSummary other_element : other.supervisors) {
__this__supervisors.add(new SupervisorSummary(other_element));
}
@@ -190,14 +160,14 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
this.nimbus_uptime_secs = other.nimbus_uptime_secs;
if (other.is_set_topologies()) {
- List<TopologySummary> __this__topologies = new ArrayList<TopologySummary>(other.topologies.size());
+ java.util.List<TopologySummary> __this__topologies = new java.util.ArrayList<TopologySummary>(other.topologies.size());
for (TopologySummary other_element : other.topologies) {
__this__topologies.add(new TopologySummary(other_element));
}
this.topologies = __this__topologies;
}
if (other.is_set_nimbuses()) {
- List<NimbusSummary> __this__nimbuses = new ArrayList<NimbusSummary>(other.nimbuses.size());
+ java.util.List<NimbusSummary> __this__nimbuses = new java.util.ArrayList<NimbusSummary>(other.nimbuses.size());
for (NimbusSummary other_element : other.nimbuses) {
__this__nimbuses.add(new NimbusSummary(other_element));
}
@@ -228,16 +198,16 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
public void add_to_supervisors(SupervisorSummary elem) {
if (this.supervisors == null) {
- this.supervisors = new ArrayList<SupervisorSummary>();
+ this.supervisors = new java.util.ArrayList<SupervisorSummary>();
}
this.supervisors.add(elem);
}
- public List<SupervisorSummary> get_supervisors() {
+ public java.util.List<SupervisorSummary> get_supervisors() {
return this.supervisors;
}
- public void set_supervisors(List<SupervisorSummary> supervisors) {
+ public void set_supervisors(java.util.List<SupervisorSummary> supervisors) {
this.supervisors = supervisors;
}
@@ -266,16 +236,16 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
public void unset_nimbus_uptime_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.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 EncodingUtils.testBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID);
}
public void set_nimbus_uptime_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID, value);
}
public int get_topologies_size() {
@@ -288,16 +258,16 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
public void add_to_topologies(TopologySummary elem) {
if (this.topologies == null) {
- this.topologies = new ArrayList<TopologySummary>();
+ this.topologies = new java.util.ArrayList<TopologySummary>();
}
this.topologies.add(elem);
}
- public List<TopologySummary> get_topologies() {
+ public java.util.List<TopologySummary> get_topologies() {
return this.topologies;
}
- public void set_topologies(List<TopologySummary> topologies) {
+ public void set_topologies(java.util.List<TopologySummary> topologies) {
this.topologies = topologies;
}
@@ -326,16 +296,16 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
public void add_to_nimbuses(NimbusSummary elem) {
if (this.nimbuses == null) {
- this.nimbuses = new ArrayList<NimbusSummary>();
+ this.nimbuses = new java.util.ArrayList<NimbusSummary>();
}
this.nimbuses.add(elem);
}
- public List<NimbusSummary> get_nimbuses() {
+ public java.util.List<NimbusSummary> get_nimbuses() {
return this.nimbuses;
}
- public void set_nimbuses(List<NimbusSummary> nimbuses) {
+ public void set_nimbuses(java.util.List<NimbusSummary> nimbuses) {
this.nimbuses = nimbuses;
}
@@ -354,13 +324,13 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUPERVISORS:
if (value == null) {
unset_supervisors();
} else {
- set_supervisors((List<SupervisorSummary>)value);
+ set_supervisors((java.util.List<SupervisorSummary>)value);
}
break;
@@ -368,7 +338,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
if (value == null) {
unset_nimbus_uptime_secs();
} else {
- set_nimbus_uptime_secs((Integer)value);
+ set_nimbus_uptime_secs((java.lang.Integer)value);
}
break;
@@ -376,7 +346,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
if (value == null) {
unset_topologies();
} else {
- set_topologies((List<TopologySummary>)value);
+ set_topologies((java.util.List<TopologySummary>)value);
}
break;
@@ -384,14 +354,14 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
if (value == null) {
unset_nimbuses();
} else {
- set_nimbuses((List<NimbusSummary>)value);
+ set_nimbuses((java.util.List<NimbusSummary>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUPERVISORS:
return get_supervisors();
@@ -406,13 +376,13 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
return get_nimbuses();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -425,11 +395,11 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
case NIMBUSES:
return is_set_nimbuses();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ClusterSummary)
@@ -440,6 +410,8 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
public boolean equals(ClusterSummary that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_supervisors = true && this.is_set_supervisors();
boolean that_present_supervisors = true && that.is_set_supervisors();
@@ -482,29 +454,25 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_supervisors = true && (is_set_supervisors());
- list.add(present_supervisors);
- if (present_supervisors)
- list.add(supervisors);
+ hashCode = hashCode * 8191 + ((is_set_supervisors()) ? 131071 : 524287);
+ if (is_set_supervisors())
+ hashCode = hashCode * 8191 + supervisors.hashCode();
- boolean present_nimbus_uptime_secs = true && (is_set_nimbus_uptime_secs());
- list.add(present_nimbus_uptime_secs);
- if (present_nimbus_uptime_secs)
- list.add(nimbus_uptime_secs);
+ hashCode = hashCode * 8191 + ((is_set_nimbus_uptime_secs()) ? 131071 : 524287);
+ if (is_set_nimbus_uptime_secs())
+ hashCode = hashCode * 8191 + nimbus_uptime_secs;
- boolean present_topologies = true && (is_set_topologies());
- list.add(present_topologies);
- if (present_topologies)
- list.add(topologies);
+ hashCode = hashCode * 8191 + ((is_set_topologies()) ? 131071 : 524287);
+ if (is_set_topologies())
+ hashCode = hashCode * 8191 + topologies.hashCode();
- boolean present_nimbuses = true && (is_set_nimbuses());
- list.add(present_nimbuses);
- if (present_nimbuses)
- list.add(nimbuses);
+ hashCode = hashCode * 8191 + ((is_set_nimbuses()) ? 131071 : 524287);
+ if (is_set_nimbuses())
+ hashCode = hashCode * 8191 + nimbuses.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -515,7 +483,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_supervisors()).compareTo(other.is_set_supervisors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_supervisors()).compareTo(other.is_set_supervisors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -525,7 +493,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_nimbus_uptime_secs()).compareTo(other.is_set_nimbus_uptime_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_nimbus_uptime_secs()).compareTo(other.is_set_nimbus_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -535,7 +503,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topologies()).compareTo(other.is_set_topologies());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topologies()).compareTo(other.is_set_topologies());
if (lastComparison != 0) {
return lastComparison;
}
@@ -545,7 +513,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_nimbuses()).compareTo(other.is_set_nimbuses());
+ lastComparison = java.lang.Boolean.valueOf(is_set_nimbuses()).compareTo(other.is_set_nimbuses());
if (lastComparison != 0) {
return lastComparison;
}
@@ -563,16 +531,16 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ClusterSummary(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ClusterSummary(");
boolean first = true;
sb.append("supervisors:");
@@ -633,7 +601,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -643,13 +611,13 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
}
- private static class ClusterSummaryStandardSchemeFactory implements SchemeFactory {
+ private static class ClusterSummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ClusterSummaryStandardScheme getScheme() {
return new ClusterSummaryStandardScheme();
}
}
- private static class ClusterSummaryStandardScheme extends StandardScheme<ClusterSummary> {
+ private static class ClusterSummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<ClusterSummary> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ClusterSummary struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -665,7 +633,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list136 = iprot.readListBegin();
- struct.supervisors = new ArrayList<SupervisorSummary>(_list136.size);
+ struct.supervisors = new java.util.ArrayList<SupervisorSummary>(_list136.size);
SupervisorSummary _elem137;
for (int _i138 = 0; _i138 < _list136.size; ++_i138)
{
@@ -692,7 +660,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list139 = iprot.readListBegin();
- struct.topologies = new ArrayList<TopologySummary>(_list139.size);
+ struct.topologies = new java.util.ArrayList<TopologySummary>(_list139.size);
TopologySummary _elem140;
for (int _i141 = 0; _i141 < _list139.size; ++_i141)
{
@@ -711,7 +679,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list142 = iprot.readListBegin();
- struct.nimbuses = new ArrayList<NimbusSummary>(_list142.size);
+ struct.nimbuses = new java.util.ArrayList<NimbusSummary>(_list142.size);
NimbusSummary _elem143;
for (int _i144 = 0; _i144 < _list142.size; ++_i144)
{
@@ -786,17 +754,17 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
- private static class ClusterSummaryTupleSchemeFactory implements SchemeFactory {
+ private static class ClusterSummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ClusterSummaryTupleScheme getScheme() {
return new ClusterSummaryTupleScheme();
}
}
- private static class ClusterSummaryTupleScheme extends TupleScheme<ClusterSummary> {
+ private static class ClusterSummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<ClusterSummary> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ClusterSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.supervisors.size());
for (SupervisorSummary _iter148 : struct.supervisors)
@@ -818,7 +786,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
_iter150.write(oprot);
}
}
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_nimbus_uptime_secs()) {
optionals.set(0);
}
@@ -830,10 +798,10 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ClusterSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TList _list151 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.supervisors = new ArrayList<SupervisorSummary>(_list151.size);
+ struct.supervisors = new java.util.ArrayList<SupervisorSummary>(_list151.size);
SupervisorSummary _elem152;
for (int _i153 = 0; _i153 < _list151.size; ++_i153)
{
@@ -845,7 +813,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
struct.set_supervisors_isSet(true);
{
org.apache.thrift.protocol.TList _list154 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.topologies = new ArrayList<TopologySummary>(_list154.size);
+ struct.topologies = new java.util.ArrayList<TopologySummary>(_list154.size);
TopologySummary _elem155;
for (int _i156 = 0; _i156 < _list154.size; ++_i156)
{
@@ -857,7 +825,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
struct.set_topologies_isSet(true);
{
org.apache.thrift.protocol.TList _list157 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.nimbuses = new ArrayList<NimbusSummary>(_list157.size);
+ struct.nimbuses = new java.util.ArrayList<NimbusSummary>(_list157.size);
NimbusSummary _elem158;
for (int _i159 = 0; _i159 < _list157.size; ++_i159)
{
@@ -867,7 +835,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
}
struct.set_nimbuses_isSet(true);
- BitSet incoming = iprot.readBitSet(1);
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.nimbus_uptime_secs = iprot.readI32();
struct.set_nimbus_uptime_secs_isSet(true);
@@ -875,5 +843,8 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[05/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/py/storm/DistributedRPC-remote
----------------------------------------------------------------------
diff --git a/storm-client/src/py/storm/DistributedRPC-remote b/storm-client/src/py/storm/DistributedRPC-remote
index 90f894a..913e191 100644
--- a/storm-client/src/py/storm/DistributedRPC-remote
+++ b/storm-client/src/py/storm/DistributedRPC-remote
@@ -18,7 +18,7 @@
#!/usr/bin/env python
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
@@ -27,86 +27,109 @@
import sys
import pprint
-from urlparse import urlparse
-from thrift.transport import TTransport
-from thrift.transport import TSocket
-from thrift.transport import TSSLSocket
-from thrift.transport import THttpClient
-from thrift.protocol import TBinaryProtocol
+if sys.version_info[0] > 2:
+ from urllib.parse import urlparse
+else:
+ from urlparse import urlparse
+from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
+from thrift.protocol.TBinaryProtocol import TBinaryProtocol
from storm import DistributedRPC
from storm.ttypes import *
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
- print('')
- print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] function [arg1 [arg2...]]')
- print('')
- print('Functions:')
- print(' string execute(string functionName, string funcArgs)')
- print('')
- sys.exit(0)
-
-pp = pprint.PrettyPrinter(indent = 2)
+ print('')
+ print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
+ print('')
+ print('Functions:')
+ print(' string execute(string functionName, string funcArgs)')
+ print('')
+ sys.exit(0)
+
+pp = pprint.PrettyPrinter(indent=2)
host = 'localhost'
port = 9090
uri = ''
framed = False
ssl = False
+validate = True
+ca_certs = None
+keyfile = None
+certfile = None
http = False
argi = 1
if sys.argv[argi] == '-h':
- parts = sys.argv[argi+1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- argi += 2
+ parts = sys.argv[argi + 1].split(':')
+ host = parts[0]
+ if len(parts) > 1:
+ port = int(parts[1])
+ argi += 2
if sys.argv[argi] == '-u':
- url = urlparse(sys.argv[argi+1])
- parts = url[1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- else:
- port = 80
- uri = url[2]
- if url[4]:
- uri += '?%s' % url[4]
- http = True
- argi += 2
+ url = urlparse(sys.argv[argi + 1])
+ parts = url[1].split(':')
+ host = parts[0]
+ if len(parts) > 1:
+ port = int(parts[1])
+ else:
+ port = 80
+ uri = url[2]
+ if url[4]:
+ uri += '?%s' % url[4]
+ http = True
+ argi += 2
if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
- framed = True
- argi += 1
+ framed = True
+ argi += 1
if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl':
- ssl = True
- argi += 1
+ ssl = True
+ argi += 1
+
+if sys.argv[argi] == '-novalidate':
+ validate = False
+ argi += 1
+
+if sys.argv[argi] == '-ca_certs':
+ ca_certs = sys.argv[argi+1]
+ argi += 2
+
+if sys.argv[argi] == '-keyfile':
+ keyfile = sys.argv[argi+1]
+ argi += 2
+
+if sys.argv[argi] == '-certfile':
+ certfile = sys.argv[argi+1]
+ argi += 2
cmd = sys.argv[argi]
-args = sys.argv[argi+1:]
+args = sys.argv[argi + 1:]
if http:
- transport = THttpClient.THttpClient(host, port, uri)
+ transport = THttpClient.THttpClient(host, port, uri)
else:
- socket = TSSLSocket.TSSLSocket(host, port, validate=False) if ssl else TSocket.TSocket(host, port)
- if framed:
- transport = TTransport.TFramedTransport(socket)
- else:
- transport = TTransport.TBufferedTransport(socket)
-protocol = TBinaryProtocol.TBinaryProtocol(transport)
+ if ssl:
+ socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile)
+ else:
+ socket = TSocket.TSocket(host, port)
+ if framed:
+ transport = TTransport.TFramedTransport(socket)
+ else:
+ transport = TTransport.TBufferedTransport(socket)
+protocol = TBinaryProtocol(transport)
client = DistributedRPC.Client(protocol)
transport.open()
if cmd == 'execute':
- if len(args) != 2:
- print('execute requires 2 args')
- sys.exit(1)
- pp.pprint(client.execute(args[0],args[1],))
+ if len(args) != 2:
+ print('execute requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.execute(args[0], args[1],))
else:
- print('Unrecognized method %s' % cmd)
- sys.exit(1)
+ print('Unrecognized method %s' % cmd)
+ sys.exit(1)
transport.close()
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/py/storm/DistributedRPC.py
----------------------------------------------------------------------
diff --git a/storm-client/src/py/storm/DistributedRPC.py b/storm-client/src/py/storm/DistributedRPC.py
index 225c57e..8bda692 100644
--- a/storm-client/src/py/storm/DistributedRPC.py
+++ b/storm-client/src/py/storm/DistributedRPC.py
@@ -17,295 +17,290 @@
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:utf8strings
#
-from thrift.Thrift import TType, TMessageType, TException, TApplicationException
+from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+from thrift.protocol.TProtocol import TProtocolException
+from thrift.TRecursive import fix_spec
+
+import sys
import logging
-from ttypes import *
+from .ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol, TProtocol
-try:
- from thrift.protocol import fastbinary
-except:
- fastbinary = None
+all_structs = []
-class Iface:
- def execute(self, functionName, funcArgs):
- """
- Parameters:
- - functionName
- - funcArgs
- """
- pass
+class Iface(object):
+ def execute(self, functionName, funcArgs):
+ """
+ Parameters:
+ - functionName
+ - funcArgs
+ """
+ pass
class Client(Iface):
- def __init__(self, iprot, oprot=None):
- self._iprot = self._oprot = iprot
- if oprot is not None:
- self._oprot = oprot
- self._seqid = 0
+ def __init__(self, iprot, oprot=None):
+ self._iprot = self._oprot = iprot
+ if oprot is not None:
+ self._oprot = oprot
+ self._seqid = 0
+
+ def execute(self, functionName, funcArgs):
+ """
+ Parameters:
+ - functionName
+ - funcArgs
+ """
+ self.send_execute(functionName, funcArgs)
+ return self.recv_execute()
+
+ def send_execute(self, functionName, funcArgs):
+ self._oprot.writeMessageBegin('execute', TMessageType.CALL, self._seqid)
+ args = execute_args()
+ args.functionName = functionName
+ args.funcArgs = funcArgs
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_execute(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = execute_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "execute failed: unknown result")
+
+
+class Processor(Iface, TProcessor):
+ def __init__(self, handler):
+ self._handler = handler
+ self._processMap = {}
+ self._processMap["execute"] = Processor.process_execute
+
+ def process(self, iprot, oprot):
+ (name, type, seqid) = iprot.readMessageBegin()
+ if name not in self._processMap:
+ iprot.skip(TType.STRUCT)
+ iprot.readMessageEnd()
+ x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
+ oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
+ x.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+ return
+ else:
+ self._processMap[name](self, seqid, iprot, oprot)
+ return True
+
+ def process_execute(self, seqid, iprot, oprot):
+ args = execute_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = execute_result()
+ try:
+ result.success = self._handler.execute(args.functionName, args.funcArgs)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except DRPCExecutionException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ 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("execute", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+# HELPER FUNCTIONS AND STRUCTURES
- def execute(self, functionName, funcArgs):
+
+class execute_args(object):
"""
- Parameters:
+ Attributes:
- functionName
- funcArgs
"""
- self.send_execute(functionName, funcArgs)
- return self.recv_execute()
-
- def send_execute(self, functionName, funcArgs):
- self._oprot.writeMessageBegin('execute', TMessageType.CALL, self._seqid)
- args = execute_args()
- args.functionName = functionName
- args.funcArgs = funcArgs
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_execute(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = execute_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.e is not None:
- raise result.e
- if result.aze is not None:
- raise result.aze
- raise TApplicationException(TApplicationException.MISSING_RESULT, "execute failed: unknown result")
-class Processor(Iface, TProcessor):
- def __init__(self, handler):
- self._handler = handler
- self._processMap = {}
- self._processMap["execute"] = Processor.process_execute
-
- def process(self, iprot, oprot):
- (name, type, seqid) = iprot.readMessageBegin()
- if name not in self._processMap:
- iprot.skip(TType.STRUCT)
- iprot.readMessageEnd()
- x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
- oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
- x.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- return
- else:
- self._processMap[name](self, seqid, iprot, oprot)
- return True
-
- def process_execute(self, seqid, iprot, oprot):
- args = execute_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = execute_result()
- try:
- result.success = self._handler.execute(args.functionName, args.funcArgs)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except DRPCExecutionException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("execute", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def __init__(self, functionName=None, funcArgs=None,):
+ self.functionName = functionName
+ self.funcArgs = funcArgs
+
+ 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.functionName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRING:
+ self.funcArgs = 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('execute_args')
+ if self.functionName is not None:
+ oprot.writeFieldBegin('functionName', TType.STRING, 1)
+ oprot.writeString(self.functionName.encode('utf-8') if sys.version_info[0] == 2 else self.functionName)
+ oprot.writeFieldEnd()
+ if self.funcArgs is not None:
+ oprot.writeFieldBegin('funcArgs', TType.STRING, 2)
+ oprot.writeString(self.funcArgs.encode('utf-8') if sys.version_info[0] == 2 else self.funcArgs)
+ 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(execute_args)
+execute_args.thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'functionName', 'UTF8', None, ), # 1
+ (2, TType.STRING, 'funcArgs', 'UTF8', None, ), # 2
+)
+
+
+class execute_result(object):
+ """
+ Attributes:
+ - success
+ - e
+ - aze
+ """
-# HELPER FUNCTIONS AND STRUCTURES
+ def __init__(self, success=None, e=None, aze=None,):
+ self.success = success
+ self.e = e
+ 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.e = DRPCExecutionException()
+ self.e.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ 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('execute_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.e is not None:
+ oprot.writeFieldBegin('e', TType.STRUCT, 1)
+ self.e.write(oprot)
+ oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 2)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ 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(execute_result)
+execute_result.thrift_spec = (
+ (0, TType.STRING, 'success', 'UTF8', None, ), # 0
+ (1, TType.STRUCT, 'e', [DRPCExecutionException, None], None, ), # 1
+ (2, TType.STRUCT, 'aze', [AuthorizationException, None], None, ), # 2
+)
+fix_spec(all_structs)
+del all_structs
-class execute_args:
- """
- Attributes:
- - functionName
- - funcArgs
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'functionName', None, None, ), # 1
- (2, TType.STRING, 'funcArgs', None, None, ), # 2
- )
-
- def __init__(self, functionName=None, funcArgs=None,):
- self.functionName = functionName
- self.funcArgs = funcArgs
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.functionName = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.funcArgs = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('execute_args')
- if self.functionName is not None:
- oprot.writeFieldBegin('functionName', TType.STRING, 1)
- oprot.writeString(self.functionName.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.funcArgs is not None:
- oprot.writeFieldBegin('funcArgs', TType.STRING, 2)
- oprot.writeString(self.funcArgs.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.functionName)
- value = (value * 31) ^ hash(self.funcArgs)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class execute_result:
- """
- Attributes:
- - success
- - e
- - aze
- """
-
- thrift_spec = (
- (0, TType.STRING, 'success', None, None, ), # 0
- (1, TType.STRUCT, 'e', (DRPCExecutionException, DRPCExecutionException.thrift_spec), None, ), # 1
- (2, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 2
- )
-
- def __init__(self, success=None, e=None, aze=None,):
- self.success = success
- self.e = e
- self.aze = aze
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRING:
- self.success = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.e = DRPCExecutionException()
- self.e.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.aze = AuthorizationException()
- self.aze.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('execute_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRING, 0)
- oprot.writeString(self.success.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.e is not None:
- oprot.writeFieldBegin('e', TType.STRUCT, 1)
- self.e.write(oprot)
- oprot.writeFieldEnd()
- if self.aze is not None:
- oprot.writeFieldBegin('aze', TType.STRUCT, 2)
- self.aze.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.success)
- value = (value * 31) ^ hash(self.e)
- value = (value * 31) ^ hash(self.aze)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/py/storm/DistributedRPCInvocations-remote
----------------------------------------------------------------------
diff --git a/storm-client/src/py/storm/DistributedRPCInvocations-remote b/storm-client/src/py/storm/DistributedRPCInvocations-remote
index d1f100e..16e904d 100644
--- a/storm-client/src/py/storm/DistributedRPCInvocations-remote
+++ b/storm-client/src/py/storm/DistributedRPCInvocations-remote
@@ -18,7 +18,7 @@
#!/usr/bin/env python
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
@@ -27,107 +27,130 @@
import sys
import pprint
-from urlparse import urlparse
-from thrift.transport import TTransport
-from thrift.transport import TSocket
-from thrift.transport import TSSLSocket
-from thrift.transport import THttpClient
-from thrift.protocol import TBinaryProtocol
+if sys.version_info[0] > 2:
+ from urllib.parse import urlparse
+else:
+ from urlparse import urlparse
+from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
+from thrift.protocol.TBinaryProtocol import TBinaryProtocol
from storm import DistributedRPCInvocations
from storm.ttypes import *
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
- print('')
- print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] function [arg1 [arg2...]]')
- print('')
- print('Functions:')
- print(' void result(string id, string result)')
- print(' DRPCRequest fetchRequest(string functionName)')
- print(' void failRequest(string id)')
- print(' void failRequestV2(string id, DRPCExecutionException e)')
- print('')
- sys.exit(0)
-
-pp = pprint.PrettyPrinter(indent = 2)
+ print('')
+ print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
+ print('')
+ print('Functions:')
+ print(' void result(string id, string result)')
+ print(' DRPCRequest fetchRequest(string functionName)')
+ print(' void failRequest(string id)')
+ print(' void failRequestV2(string id, DRPCExecutionException e)')
+ print('')
+ sys.exit(0)
+
+pp = pprint.PrettyPrinter(indent=2)
host = 'localhost'
port = 9090
uri = ''
framed = False
ssl = False
+validate = True
+ca_certs = None
+keyfile = None
+certfile = None
http = False
argi = 1
if sys.argv[argi] == '-h':
- parts = sys.argv[argi+1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- argi += 2
+ parts = sys.argv[argi + 1].split(':')
+ host = parts[0]
+ if len(parts) > 1:
+ port = int(parts[1])
+ argi += 2
if sys.argv[argi] == '-u':
- url = urlparse(sys.argv[argi+1])
- parts = url[1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- else:
- port = 80
- uri = url[2]
- if url[4]:
- uri += '?%s' % url[4]
- http = True
- argi += 2
+ url = urlparse(sys.argv[argi + 1])
+ parts = url[1].split(':')
+ host = parts[0]
+ if len(parts) > 1:
+ port = int(parts[1])
+ else:
+ port = 80
+ uri = url[2]
+ if url[4]:
+ uri += '?%s' % url[4]
+ http = True
+ argi += 2
if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
- framed = True
- argi += 1
+ framed = True
+ argi += 1
if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl':
- ssl = True
- argi += 1
+ ssl = True
+ argi += 1
+
+if sys.argv[argi] == '-novalidate':
+ validate = False
+ argi += 1
+
+if sys.argv[argi] == '-ca_certs':
+ ca_certs = sys.argv[argi+1]
+ argi += 2
+
+if sys.argv[argi] == '-keyfile':
+ keyfile = sys.argv[argi+1]
+ argi += 2
+
+if sys.argv[argi] == '-certfile':
+ certfile = sys.argv[argi+1]
+ argi += 2
cmd = sys.argv[argi]
-args = sys.argv[argi+1:]
+args = sys.argv[argi + 1:]
if http:
- transport = THttpClient.THttpClient(host, port, uri)
+ transport = THttpClient.THttpClient(host, port, uri)
else:
- socket = TSSLSocket.TSSLSocket(host, port, validate=False) if ssl else TSocket.TSocket(host, port)
- if framed:
- transport = TTransport.TFramedTransport(socket)
- else:
- transport = TTransport.TBufferedTransport(socket)
-protocol = TBinaryProtocol.TBinaryProtocol(transport)
+ if ssl:
+ socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile)
+ else:
+ socket = TSocket.TSocket(host, port)
+ if framed:
+ transport = TTransport.TFramedTransport(socket)
+ else:
+ transport = TTransport.TBufferedTransport(socket)
+protocol = TBinaryProtocol(transport)
client = DistributedRPCInvocations.Client(protocol)
transport.open()
if cmd == 'result':
- if len(args) != 2:
- print('result requires 2 args')
- sys.exit(1)
- pp.pprint(client.result(args[0],args[1],))
+ if len(args) != 2:
+ print('result requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.result(args[0], args[1],))
elif cmd == 'fetchRequest':
- if len(args) != 1:
- print('fetchRequest requires 1 args')
- sys.exit(1)
- pp.pprint(client.fetchRequest(args[0],))
+ if len(args) != 1:
+ print('fetchRequest requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.fetchRequest(args[0],))
elif cmd == 'failRequest':
- if len(args) != 1:
- print('failRequest requires 1 args')
- sys.exit(1)
- pp.pprint(client.failRequest(args[0],))
+ if len(args) != 1:
+ print('failRequest requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.failRequest(args[0],))
elif cmd == 'failRequestV2':
- if len(args) != 2:
- print('failRequestV2 requires 2 args')
- sys.exit(1)
- pp.pprint(client.failRequestV2(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('failRequestV2 requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.failRequestV2(args[0], eval(args[1]),))
else:
- print('Unrecognized method %s' % cmd)
- sys.exit(1)
+ print('Unrecognized method %s' % cmd)
+ sys.exit(1)
transport.close()
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/py/storm/DistributedRPCInvocations.py
----------------------------------------------------------------------
diff --git a/storm-client/src/py/storm/DistributedRPCInvocations.py b/storm-client/src/py/storm/DistributedRPCInvocations.py
index df873fe..d231727 100644
--- a/storm-client/src/py/storm/DistributedRPCInvocations.py
+++ b/storm-client/src/py/storm/DistributedRPCInvocations.py
@@ -17,870 +17,853 @@
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:utf8strings
#
-from thrift.Thrift import TType, TMessageType, TException, TApplicationException
+from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+from thrift.protocol.TProtocol import TProtocolException
+from thrift.TRecursive import fix_spec
+
+import sys
import logging
-from ttypes import *
+from .ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol, TProtocol
-try:
- from thrift.protocol import fastbinary
-except:
- fastbinary = None
+all_structs = []
+
+
+class Iface(object):
+ def result(self, id, result):
+ """
+ Parameters:
+ - id
+ - result
+ """
+ pass
+
+ def fetchRequest(self, functionName):
+ """
+ Parameters:
+ - functionName
+ """
+ pass
+
+ def failRequest(self, id):
+ """
+ Parameters:
+ - id
+ """
+ pass
+
+ def failRequestV2(self, id, e):
+ """
+ Parameters:
+ - id
+ - e
+ """
+ pass
+
+
+class Client(Iface):
+ def __init__(self, iprot, oprot=None):
+ self._iprot = self._oprot = iprot
+ if oprot is not None:
+ self._oprot = oprot
+ self._seqid = 0
+
+ def result(self, id, result):
+ """
+ Parameters:
+ - id
+ - result
+ """
+ self.send_result(id, result)
+ self.recv_result()
+
+ def send_result(self, id, result):
+ self._oprot.writeMessageBegin('result', TMessageType.CALL, self._seqid)
+ args = result_args()
+ args.id = id
+ args.result = result
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_result(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = result_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def fetchRequest(self, functionName):
+ """
+ Parameters:
+ - functionName
+ """
+ self.send_fetchRequest(functionName)
+ return self.recv_fetchRequest()
+
+ def send_fetchRequest(self, functionName):
+ self._oprot.writeMessageBegin('fetchRequest', TMessageType.CALL, self._seqid)
+ args = fetchRequest_args()
+ args.functionName = functionName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_fetchRequest(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = fetchRequest_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, "fetchRequest failed: unknown result")
+
+ def failRequest(self, id):
+ """
+ Parameters:
+ - id
+ """
+ self.send_failRequest(id)
+ self.recv_failRequest()
+
+ def send_failRequest(self, id):
+ self._oprot.writeMessageBegin('failRequest', TMessageType.CALL, self._seqid)
+ args = failRequest_args()
+ args.id = id
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_failRequest(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = failRequest_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def failRequestV2(self, id, e):
+ """
+ Parameters:
+ - id
+ - e
+ """
+ self.send_failRequestV2(id, e)
+ self.recv_failRequestV2()
+
+ def send_failRequestV2(self, id, e):
+ self._oprot.writeMessageBegin('failRequestV2', TMessageType.CALL, self._seqid)
+ args = failRequestV2_args()
+ args.id = id
+ args.e = e
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_failRequestV2(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = failRequestV2_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ return
-class Iface:
- def result(self, id, result):
+class Processor(Iface, TProcessor):
+ def __init__(self, handler):
+ self._handler = handler
+ self._processMap = {}
+ self._processMap["result"] = Processor.process_result
+ self._processMap["fetchRequest"] = Processor.process_fetchRequest
+ self._processMap["failRequest"] = Processor.process_failRequest
+ self._processMap["failRequestV2"] = Processor.process_failRequestV2
+
+ def process(self, iprot, oprot):
+ (name, type, seqid) = iprot.readMessageBegin()
+ if name not in self._processMap:
+ iprot.skip(TType.STRUCT)
+ iprot.readMessageEnd()
+ x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
+ oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
+ x.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+ return
+ else:
+ self._processMap[name](self, seqid, iprot, oprot)
+ return True
+
+ def process_result(self, seqid, iprot, oprot):
+ args = result_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = result_result()
+ try:
+ self._handler.result(args.id, args.result)
+ 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("result", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_fetchRequest(self, seqid, iprot, oprot):
+ args = fetchRequest_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = fetchRequest_result()
+ try:
+ result.success = self._handler.fetchRequest(args.functionName)
+ 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("fetchRequest", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_failRequest(self, seqid, iprot, oprot):
+ args = failRequest_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = failRequest_result()
+ try:
+ self._handler.failRequest(args.id)
+ 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("failRequest", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_failRequestV2(self, seqid, iprot, oprot):
+ args = failRequestV2_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = failRequestV2_result()
+ try:
+ self._handler.failRequestV2(args.id, args.e)
+ 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("failRequestV2", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+# HELPER FUNCTIONS AND STRUCTURES
+
+
+class result_args(object):
"""
- Parameters:
+ Attributes:
- id
- result
"""
- pass
- def fetchRequest(self, functionName):
+
+ def __init__(self, id=None, result=None,):
+ self.id = id
+ self.result = result
+
+ 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.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRING:
+ self.result = 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('result_args')
+ if self.id is not None:
+ oprot.writeFieldBegin('id', TType.STRING, 1)
+ oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id)
+ oprot.writeFieldEnd()
+ if self.result is not None:
+ oprot.writeFieldBegin('result', TType.STRING, 2)
+ oprot.writeString(self.result.encode('utf-8') if sys.version_info[0] == 2 else self.result)
+ 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(result_args)
+result_args.thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'id', 'UTF8', None, ), # 1
+ (2, TType.STRING, 'result', 'UTF8', None, ), # 2
+)
+
+
+class result_result(object):
"""
- Parameters:
- - functionName
+ Attributes:
+ - aze
"""
- pass
- def failRequest(self, id):
+
+ def __init__(self, aze=None,):
+ 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 == 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('result_result')
+ 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(result_result)
+result_result.thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'aze', [AuthorizationException, None], None, ), # 1
+)
+
+
+class fetchRequest_args(object):
"""
- Parameters:
- - id
+ Attributes:
+ - functionName
"""
- pass
- def failRequestV2(self, id, e):
+
+ def __init__(self, functionName=None,):
+ self.functionName = functionName
+
+ 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.functionName = 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('fetchRequest_args')
+ if self.functionName is not None:
+ oprot.writeFieldBegin('functionName', TType.STRING, 1)
+ oprot.writeString(self.functionName.encode('utf-8') if sys.version_info[0] == 2 else self.functionName)
+ 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(fetchRequest_args)
+fetchRequest_args.thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'functionName', 'UTF8', None, ), # 1
+)
+
+
+class fetchRequest_result(object):
"""
- Parameters:
- - id
- - e
+ Attributes:
+ - success
+ - aze
"""
- pass
-
-class Client(Iface):
- def __init__(self, iprot, oprot=None):
- self._iprot = self._oprot = iprot
- if oprot is not None:
- self._oprot = oprot
- self._seqid = 0
- def result(self, id, result):
+ 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.STRUCT:
+ self.success = DRPCRequest()
+ self.success.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.aze = AuthorizationException()
+ self.aze.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ 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('fetchRequest_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
+ self.success.write(oprot)
+ oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 1)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ 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(fetchRequest_result)
+fetchRequest_result.thrift_spec = (
+ (0, TType.STRUCT, 'success', [DRPCRequest, None], None, ), # 0
+ (1, TType.STRUCT, 'aze', [AuthorizationException, None], None, ), # 1
+)
+
+
+class failRequest_args(object):
"""
- Parameters:
+ Attributes:
- id
- - result
- """
- self.send_result(id, result)
- self.recv_result()
-
- def send_result(self, id, result):
- self._oprot.writeMessageBegin('result', TMessageType.CALL, self._seqid)
- args = result_args()
- args.id = id
- args.result = result
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_result(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = result_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.aze is not None:
- raise result.aze
- return
-
- def fetchRequest(self, functionName):
"""
- Parameters:
- - functionName
- """
- self.send_fetchRequest(functionName)
- return self.recv_fetchRequest()
-
- def send_fetchRequest(self, functionName):
- self._oprot.writeMessageBegin('fetchRequest', TMessageType.CALL, self._seqid)
- args = fetchRequest_args()
- args.functionName = functionName
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_fetchRequest(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = fetchRequest_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, "fetchRequest failed: unknown result")
-
- def failRequest(self, id):
+
+
+ def __init__(self, id=None,):
+ self.id = id
+
+ 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.id = 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('failRequest_args')
+ if self.id is not None:
+ oprot.writeFieldBegin('id', TType.STRING, 1)
+ oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id)
+ 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(failRequest_args)
+failRequest_args.thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'id', 'UTF8', None, ), # 1
+)
+
+
+class failRequest_result(object):
"""
- Parameters:
- - id
+ Attributes:
+ - aze
"""
- self.send_failRequest(id)
- self.recv_failRequest()
-
- def send_failRequest(self, id):
- self._oprot.writeMessageBegin('failRequest', TMessageType.CALL, self._seqid)
- args = failRequest_args()
- args.id = id
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_failRequest(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = failRequest_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.aze is not None:
- raise result.aze
- return
-
- def failRequestV2(self, id, e):
+
+
+ def __init__(self, aze=None,):
+ 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 == 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('failRequest_result')
+ 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(failRequest_result)
+failRequest_result.thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'aze', [AuthorizationException, None], None, ), # 1
+)
+
+
+class failRequestV2_args(object):
"""
- Parameters:
+ Attributes:
- id
- e
"""
- self.send_failRequestV2(id, e)
- self.recv_failRequestV2()
-
- def send_failRequestV2(self, id, e):
- self._oprot.writeMessageBegin('failRequestV2', TMessageType.CALL, self._seqid)
- args = failRequestV2_args()
- args.id = id
- args.e = e
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_failRequestV2(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = failRequestV2_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.aze is not None:
- raise result.aze
- return
-class Processor(Iface, TProcessor):
- def __init__(self, handler):
- self._handler = handler
- self._processMap = {}
- self._processMap["result"] = Processor.process_result
- self._processMap["fetchRequest"] = Processor.process_fetchRequest
- self._processMap["failRequest"] = Processor.process_failRequest
- self._processMap["failRequestV2"] = Processor.process_failRequestV2
-
- def process(self, iprot, oprot):
- (name, type, seqid) = iprot.readMessageBegin()
- if name not in self._processMap:
- iprot.skip(TType.STRUCT)
- iprot.readMessageEnd()
- x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
- oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
- x.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- return
- else:
- self._processMap[name](self, seqid, iprot, oprot)
- return True
-
- def process_result(self, seqid, iprot, oprot):
- args = result_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = result_result()
- try:
- self._handler.result(args.id, args.result)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("result", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_fetchRequest(self, seqid, iprot, oprot):
- args = fetchRequest_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = fetchRequest_result()
- try:
- result.success = self._handler.fetchRequest(args.functionName)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("fetchRequest", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_failRequest(self, seqid, iprot, oprot):
- args = failRequest_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = failRequest_result()
- try:
- self._handler.failRequest(args.id)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("failRequest", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_failRequestV2(self, seqid, iprot, oprot):
- args = failRequestV2_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = failRequestV2_result()
- try:
- self._handler.failRequestV2(args.id, args.e)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("failRequestV2", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def __init__(self, id=None, e=None,):
+ self.id = id
+ self.e = e
+
+ 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.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.e = DRPCExecutionException()
+ self.e.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('failRequestV2_args')
+ if self.id is not None:
+ oprot.writeFieldBegin('id', TType.STRING, 1)
+ oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id)
+ oprot.writeFieldEnd()
+ if self.e is not None:
+ oprot.writeFieldBegin('e', TType.STRUCT, 2)
+ self.e.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(failRequestV2_args)
+failRequestV2_args.thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'id', 'UTF8', None, ), # 1
+ (2, TType.STRUCT, 'e', [DRPCExecutionException, None], None, ), # 2
+)
+
+
+class failRequestV2_result(object):
+ """
+ Attributes:
+ - aze
+ """
-# HELPER FUNCTIONS AND STRUCTURES
+ def __init__(self, aze=None,):
+ 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 == 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('failRequestV2_result')
+ 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(failRequestV2_result)
+failRequestV2_result.thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'aze', [AuthorizationException, None], None, ), # 1
+)
+fix_spec(all_structs)
+del all_structs
-class result_args:
- """
- Attributes:
- - id
- - result
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'id', None, None, ), # 1
- (2, TType.STRING, 'result', None, None, ), # 2
- )
-
- def __init__(self, id=None, result=None,):
- self.id = id
- self.result = result
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.id = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.result = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('result_args')
- if self.id is not None:
- oprot.writeFieldBegin('id', TType.STRING, 1)
- oprot.writeString(self.id.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.result is not None:
- oprot.writeFieldBegin('result', TType.STRING, 2)
- oprot.writeString(self.result.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.id)
- value = (value * 31) ^ hash(self.result)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class result_result:
- """
- Attributes:
- - aze
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
- )
-
- def __init__(self, aze=None,):
- self.aze = aze
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.aze = AuthorizationException()
- self.aze.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('result_result')
- 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 __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.aze)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class fetchRequest_args:
- """
- Attributes:
- - functionName
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'functionName', None, None, ), # 1
- )
-
- def __init__(self, functionName=None,):
- self.functionName = functionName
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.functionName = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('fetchRequest_args')
- if self.functionName is not None:
- oprot.writeFieldBegin('functionName', TType.STRING, 1)
- oprot.writeString(self.functionName.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.functionName)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class fetchRequest_result:
- """
- Attributes:
- - success
- - aze
- """
-
- thrift_spec = (
- (0, TType.STRUCT, 'success', (DRPCRequest, DRPCRequest.thrift_spec), None, ), # 0
- (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
- )
-
- def __init__(self, success=None, aze=None,):
- self.success = success
- self.aze = aze
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = DRPCRequest()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- 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.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('fetchRequest_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- 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 __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.success)
- value = (value * 31) ^ hash(self.aze)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class failRequest_args:
- """
- Attributes:
- - id
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'id', None, None, ), # 1
- )
-
- def __init__(self, id=None,):
- self.id = id
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.id = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('failRequest_args')
- if self.id is not None:
- oprot.writeFieldBegin('id', TType.STRING, 1)
- oprot.writeString(self.id.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.id)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class failRequest_result:
- """
- Attributes:
- - aze
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
- )
-
- def __init__(self, aze=None,):
- self.aze = aze
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.aze = AuthorizationException()
- self.aze.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('failRequest_result')
- 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 __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.aze)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class failRequestV2_args:
- """
- Attributes:
- - id
- - e
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'id', None, None, ), # 1
- (2, TType.STRUCT, 'e', (DRPCExecutionException, DRPCExecutionException.thrift_spec), None, ), # 2
- )
-
- def __init__(self, id=None, e=None,):
- self.id = id
- self.e = e
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.id = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.e = DRPCExecutionException()
- self.e.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('failRequestV2_args')
- if self.id is not None:
- oprot.writeFieldBegin('id', TType.STRING, 1)
- oprot.writeString(self.id.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.e is not None:
- oprot.writeFieldBegin('e', TType.STRUCT, 2)
- self.e.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.id)
- value = (value * 31) ^ hash(self.e)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class failRequestV2_result:
- """
- Attributes:
- - aze
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
- )
-
- def __init__(self, aze=None,):
- self.aze = aze
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.aze = AuthorizationException()
- self.aze.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('failRequestV2_result')
- 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 __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.aze)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
[09/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/TopologyStats.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/TopologyStats.java b/storm-client/src/jvm/org/apache/storm/generated/TopologyStats.java
index ee073bc..5dea004 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/TopologyStats.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/TopologyStats.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, TopologyStats._Fields>, java.io.Serializable, Cloneable, Comparable<TopologyStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TopologyStats");
@@ -61,17 +34,14 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
private static final org.apache.thrift.protocol.TField WINDOW_TO_ACKED_FIELD_DESC = new org.apache.thrift.protocol.TField("window_to_acked", org.apache.thrift.protocol.TType.MAP, (short)4);
private static final org.apache.thrift.protocol.TField WINDOW_TO_FAILED_FIELD_DESC = new org.apache.thrift.protocol.TField("window_to_failed", org.apache.thrift.protocol.TType.MAP, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TopologyStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TopologyStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TopologyStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TopologyStatsTupleSchemeFactory();
- private Map<String,Long> window_to_emitted; // optional
- private Map<String,Long> window_to_transferred; // optional
- private Map<String,Double> window_to_complete_latencies_ms; // optional
- private Map<String,Long> window_to_acked; // optional
- private Map<String,Long> window_to_failed; // optional
+ private java.util.Map<java.lang.String,java.lang.Long> window_to_emitted; // optional
+ private java.util.Map<java.lang.String,java.lang.Long> window_to_transferred; // optional
+ private java.util.Map<java.lang.String,java.lang.Double> window_to_complete_latencies_ms; // optional
+ private java.util.Map<java.lang.String,java.lang.Long> window_to_acked; // optional
+ private java.util.Map<java.lang.String,java.lang.Long> window_to_failed; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -81,10 +51,10 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
WINDOW_TO_ACKED((short)4, "window_to_acked"),
WINDOW_TO_FAILED((short)5, "window_to_failed");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -115,21 +85,21 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -138,16 +108,16 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.WINDOW_TO_EMITTED,_Fields.WINDOW_TO_TRANSFERRED,_Fields.WINDOW_TO_COMPLETE_LATENCIES_MS,_Fields.WINDOW_TO_ACKED,_Fields.WINDOW_TO_FAILED};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.WINDOW_TO_EMITTED, new org.apache.thrift.meta_data.FieldMetaData("window_to_emitted", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
@@ -168,7 +138,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TopologyStats.class, metaDataMap);
}
@@ -180,23 +150,23 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
*/
public TopologyStats(TopologyStats other) {
if (other.is_set_window_to_emitted()) {
- Map<String,Long> __this__window_to_emitted = new HashMap<String,Long>(other.window_to_emitted);
+ java.util.Map<java.lang.String,java.lang.Long> __this__window_to_emitted = new java.util.HashMap<java.lang.String,java.lang.Long>(other.window_to_emitted);
this.window_to_emitted = __this__window_to_emitted;
}
if (other.is_set_window_to_transferred()) {
- Map<String,Long> __this__window_to_transferred = new HashMap<String,Long>(other.window_to_transferred);
+ java.util.Map<java.lang.String,java.lang.Long> __this__window_to_transferred = new java.util.HashMap<java.lang.String,java.lang.Long>(other.window_to_transferred);
this.window_to_transferred = __this__window_to_transferred;
}
if (other.is_set_window_to_complete_latencies_ms()) {
- Map<String,Double> __this__window_to_complete_latencies_ms = new HashMap<String,Double>(other.window_to_complete_latencies_ms);
+ java.util.Map<java.lang.String,java.lang.Double> __this__window_to_complete_latencies_ms = new java.util.HashMap<java.lang.String,java.lang.Double>(other.window_to_complete_latencies_ms);
this.window_to_complete_latencies_ms = __this__window_to_complete_latencies_ms;
}
if (other.is_set_window_to_acked()) {
- Map<String,Long> __this__window_to_acked = new HashMap<String,Long>(other.window_to_acked);
+ java.util.Map<java.lang.String,java.lang.Long> __this__window_to_acked = new java.util.HashMap<java.lang.String,java.lang.Long>(other.window_to_acked);
this.window_to_acked = __this__window_to_acked;
}
if (other.is_set_window_to_failed()) {
- Map<String,Long> __this__window_to_failed = new HashMap<String,Long>(other.window_to_failed);
+ java.util.Map<java.lang.String,java.lang.Long> __this__window_to_failed = new java.util.HashMap<java.lang.String,java.lang.Long>(other.window_to_failed);
this.window_to_failed = __this__window_to_failed;
}
}
@@ -218,18 +188,18 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
return (this.window_to_emitted == null) ? 0 : this.window_to_emitted.size();
}
- public void put_to_window_to_emitted(String key, long val) {
+ public void put_to_window_to_emitted(java.lang.String key, long val) {
if (this.window_to_emitted == null) {
- this.window_to_emitted = new HashMap<String,Long>();
+ this.window_to_emitted = new java.util.HashMap<java.lang.String,java.lang.Long>();
}
this.window_to_emitted.put(key, val);
}
- public Map<String,Long> get_window_to_emitted() {
+ public java.util.Map<java.lang.String,java.lang.Long> get_window_to_emitted() {
return this.window_to_emitted;
}
- public void set_window_to_emitted(Map<String,Long> window_to_emitted) {
+ public void set_window_to_emitted(java.util.Map<java.lang.String,java.lang.Long> window_to_emitted) {
this.window_to_emitted = window_to_emitted;
}
@@ -252,18 +222,18 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
return (this.window_to_transferred == null) ? 0 : this.window_to_transferred.size();
}
- public void put_to_window_to_transferred(String key, long val) {
+ public void put_to_window_to_transferred(java.lang.String key, long val) {
if (this.window_to_transferred == null) {
- this.window_to_transferred = new HashMap<String,Long>();
+ this.window_to_transferred = new java.util.HashMap<java.lang.String,java.lang.Long>();
}
this.window_to_transferred.put(key, val);
}
- public Map<String,Long> get_window_to_transferred() {
+ public java.util.Map<java.lang.String,java.lang.Long> get_window_to_transferred() {
return this.window_to_transferred;
}
- public void set_window_to_transferred(Map<String,Long> window_to_transferred) {
+ public void set_window_to_transferred(java.util.Map<java.lang.String,java.lang.Long> window_to_transferred) {
this.window_to_transferred = window_to_transferred;
}
@@ -286,18 +256,18 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
return (this.window_to_complete_latencies_ms == null) ? 0 : this.window_to_complete_latencies_ms.size();
}
- public void put_to_window_to_complete_latencies_ms(String key, double val) {
+ public void put_to_window_to_complete_latencies_ms(java.lang.String key, double val) {
if (this.window_to_complete_latencies_ms == null) {
- this.window_to_complete_latencies_ms = new HashMap<String,Double>();
+ this.window_to_complete_latencies_ms = new java.util.HashMap<java.lang.String,java.lang.Double>();
}
this.window_to_complete_latencies_ms.put(key, val);
}
- public Map<String,Double> get_window_to_complete_latencies_ms() {
+ public java.util.Map<java.lang.String,java.lang.Double> get_window_to_complete_latencies_ms() {
return this.window_to_complete_latencies_ms;
}
- public void set_window_to_complete_latencies_ms(Map<String,Double> window_to_complete_latencies_ms) {
+ public void set_window_to_complete_latencies_ms(java.util.Map<java.lang.String,java.lang.Double> window_to_complete_latencies_ms) {
this.window_to_complete_latencies_ms = window_to_complete_latencies_ms;
}
@@ -320,18 +290,18 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
return (this.window_to_acked == null) ? 0 : this.window_to_acked.size();
}
- public void put_to_window_to_acked(String key, long val) {
+ public void put_to_window_to_acked(java.lang.String key, long val) {
if (this.window_to_acked == null) {
- this.window_to_acked = new HashMap<String,Long>();
+ this.window_to_acked = new java.util.HashMap<java.lang.String,java.lang.Long>();
}
this.window_to_acked.put(key, val);
}
- public Map<String,Long> get_window_to_acked() {
+ public java.util.Map<java.lang.String,java.lang.Long> get_window_to_acked() {
return this.window_to_acked;
}
- public void set_window_to_acked(Map<String,Long> window_to_acked) {
+ public void set_window_to_acked(java.util.Map<java.lang.String,java.lang.Long> window_to_acked) {
this.window_to_acked = window_to_acked;
}
@@ -354,18 +324,18 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
return (this.window_to_failed == null) ? 0 : this.window_to_failed.size();
}
- public void put_to_window_to_failed(String key, long val) {
+ public void put_to_window_to_failed(java.lang.String key, long val) {
if (this.window_to_failed == null) {
- this.window_to_failed = new HashMap<String,Long>();
+ this.window_to_failed = new java.util.HashMap<java.lang.String,java.lang.Long>();
}
this.window_to_failed.put(key, val);
}
- public Map<String,Long> get_window_to_failed() {
+ public java.util.Map<java.lang.String,java.lang.Long> get_window_to_failed() {
return this.window_to_failed;
}
- public void set_window_to_failed(Map<String,Long> window_to_failed) {
+ public void set_window_to_failed(java.util.Map<java.lang.String,java.lang.Long> window_to_failed) {
this.window_to_failed = window_to_failed;
}
@@ -384,13 +354,13 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case WINDOW_TO_EMITTED:
if (value == null) {
unset_window_to_emitted();
} else {
- set_window_to_emitted((Map<String,Long>)value);
+ set_window_to_emitted((java.util.Map<java.lang.String,java.lang.Long>)value);
}
break;
@@ -398,7 +368,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (value == null) {
unset_window_to_transferred();
} else {
- set_window_to_transferred((Map<String,Long>)value);
+ set_window_to_transferred((java.util.Map<java.lang.String,java.lang.Long>)value);
}
break;
@@ -406,7 +376,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (value == null) {
unset_window_to_complete_latencies_ms();
} else {
- set_window_to_complete_latencies_ms((Map<String,Double>)value);
+ set_window_to_complete_latencies_ms((java.util.Map<java.lang.String,java.lang.Double>)value);
}
break;
@@ -414,7 +384,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (value == null) {
unset_window_to_acked();
} else {
- set_window_to_acked((Map<String,Long>)value);
+ set_window_to_acked((java.util.Map<java.lang.String,java.lang.Long>)value);
}
break;
@@ -422,14 +392,14 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (value == null) {
unset_window_to_failed();
} else {
- set_window_to_failed((Map<String,Long>)value);
+ set_window_to_failed((java.util.Map<java.lang.String,java.lang.Long>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case WINDOW_TO_EMITTED:
return get_window_to_emitted();
@@ -447,13 +417,13 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
return get_window_to_failed();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -468,11 +438,11 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
case WINDOW_TO_FAILED:
return is_set_window_to_failed();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TopologyStats)
@@ -483,6 +453,8 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
public boolean equals(TopologyStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_window_to_emitted = true && this.is_set_window_to_emitted();
boolean that_present_window_to_emitted = true && that.is_set_window_to_emitted();
@@ -534,34 +506,29 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_window_to_emitted = true && (is_set_window_to_emitted());
- list.add(present_window_to_emitted);
- if (present_window_to_emitted)
- list.add(window_to_emitted);
-
- boolean present_window_to_transferred = true && (is_set_window_to_transferred());
- list.add(present_window_to_transferred);
- if (present_window_to_transferred)
- list.add(window_to_transferred);
-
- boolean present_window_to_complete_latencies_ms = true && (is_set_window_to_complete_latencies_ms());
- list.add(present_window_to_complete_latencies_ms);
- if (present_window_to_complete_latencies_ms)
- list.add(window_to_complete_latencies_ms);
-
- boolean present_window_to_acked = true && (is_set_window_to_acked());
- list.add(present_window_to_acked);
- if (present_window_to_acked)
- list.add(window_to_acked);
-
- boolean present_window_to_failed = true && (is_set_window_to_failed());
- list.add(present_window_to_failed);
- if (present_window_to_failed)
- list.add(window_to_failed);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((is_set_window_to_emitted()) ? 131071 : 524287);
+ if (is_set_window_to_emitted())
+ hashCode = hashCode * 8191 + window_to_emitted.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_window_to_transferred()) ? 131071 : 524287);
+ if (is_set_window_to_transferred())
+ hashCode = hashCode * 8191 + window_to_transferred.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_window_to_complete_latencies_ms()) ? 131071 : 524287);
+ if (is_set_window_to_complete_latencies_ms())
+ hashCode = hashCode * 8191 + window_to_complete_latencies_ms.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_window_to_acked()) ? 131071 : 524287);
+ if (is_set_window_to_acked())
+ hashCode = hashCode * 8191 + window_to_acked.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_window_to_failed()) ? 131071 : 524287);
+ if (is_set_window_to_failed())
+ hashCode = hashCode * 8191 + window_to_failed.hashCode();
+
+ return hashCode;
}
@Override
@@ -572,7 +539,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_window_to_emitted()).compareTo(other.is_set_window_to_emitted());
+ lastComparison = java.lang.Boolean.valueOf(is_set_window_to_emitted()).compareTo(other.is_set_window_to_emitted());
if (lastComparison != 0) {
return lastComparison;
}
@@ -582,7 +549,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_window_to_transferred()).compareTo(other.is_set_window_to_transferred());
+ lastComparison = java.lang.Boolean.valueOf(is_set_window_to_transferred()).compareTo(other.is_set_window_to_transferred());
if (lastComparison != 0) {
return lastComparison;
}
@@ -592,7 +559,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_window_to_complete_latencies_ms()).compareTo(other.is_set_window_to_complete_latencies_ms());
+ lastComparison = java.lang.Boolean.valueOf(is_set_window_to_complete_latencies_ms()).compareTo(other.is_set_window_to_complete_latencies_ms());
if (lastComparison != 0) {
return lastComparison;
}
@@ -602,7 +569,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_window_to_acked()).compareTo(other.is_set_window_to_acked());
+ lastComparison = java.lang.Boolean.valueOf(is_set_window_to_acked()).compareTo(other.is_set_window_to_acked());
if (lastComparison != 0) {
return lastComparison;
}
@@ -612,7 +579,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_window_to_failed()).compareTo(other.is_set_window_to_failed());
+ lastComparison = java.lang.Boolean.valueOf(is_set_window_to_failed()).compareTo(other.is_set_window_to_failed());
if (lastComparison != 0) {
return lastComparison;
}
@@ -630,16 +597,16 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TopologyStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TopologyStats(");
boolean first = true;
if (is_set_window_to_emitted()) {
@@ -708,7 +675,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -716,13 +683,13 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
}
}
- private static class TopologyStatsStandardSchemeFactory implements SchemeFactory {
+ private static class TopologyStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TopologyStatsStandardScheme getScheme() {
return new TopologyStatsStandardScheme();
}
}
- private static class TopologyStatsStandardScheme extends StandardScheme<TopologyStats> {
+ private static class TopologyStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TopologyStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TopologyStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -738,8 +705,8 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map406 = iprot.readMapBegin();
- struct.window_to_emitted = new HashMap<String,Long>(2*_map406.size);
- String _key407;
+ struct.window_to_emitted = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map406.size);
+ java.lang.String _key407;
long _val408;
for (int _i409 = 0; _i409 < _map406.size; ++_i409)
{
@@ -758,8 +725,8 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map410 = iprot.readMapBegin();
- struct.window_to_transferred = new HashMap<String,Long>(2*_map410.size);
- String _key411;
+ struct.window_to_transferred = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map410.size);
+ java.lang.String _key411;
long _val412;
for (int _i413 = 0; _i413 < _map410.size; ++_i413)
{
@@ -778,8 +745,8 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map414 = iprot.readMapBegin();
- struct.window_to_complete_latencies_ms = new HashMap<String,Double>(2*_map414.size);
- String _key415;
+ struct.window_to_complete_latencies_ms = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map414.size);
+ java.lang.String _key415;
double _val416;
for (int _i417 = 0; _i417 < _map414.size; ++_i417)
{
@@ -798,8 +765,8 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map418 = iprot.readMapBegin();
- struct.window_to_acked = new HashMap<String,Long>(2*_map418.size);
- String _key419;
+ struct.window_to_acked = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map418.size);
+ java.lang.String _key419;
long _val420;
for (int _i421 = 0; _i421 < _map418.size; ++_i421)
{
@@ -818,8 +785,8 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map422 = iprot.readMapBegin();
- struct.window_to_failed = new HashMap<String,Long>(2*_map422.size);
- String _key423;
+ struct.window_to_failed = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map422.size);
+ java.lang.String _key423;
long _val424;
for (int _i425 = 0; _i425 < _map422.size; ++_i425)
{
@@ -852,7 +819,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
oprot.writeFieldBegin(WINDOW_TO_EMITTED_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.window_to_emitted.size()));
- for (Map.Entry<String, Long> _iter426 : struct.window_to_emitted.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter426 : struct.window_to_emitted.entrySet())
{
oprot.writeString(_iter426.getKey());
oprot.writeI64(_iter426.getValue());
@@ -867,7 +834,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
oprot.writeFieldBegin(WINDOW_TO_TRANSFERRED_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.window_to_transferred.size()));
- for (Map.Entry<String, Long> _iter427 : struct.window_to_transferred.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter427 : struct.window_to_transferred.entrySet())
{
oprot.writeString(_iter427.getKey());
oprot.writeI64(_iter427.getValue());
@@ -882,7 +849,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
oprot.writeFieldBegin(WINDOW_TO_COMPLETE_LATENCIES_MS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, struct.window_to_complete_latencies_ms.size()));
- for (Map.Entry<String, Double> _iter428 : struct.window_to_complete_latencies_ms.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter428 : struct.window_to_complete_latencies_ms.entrySet())
{
oprot.writeString(_iter428.getKey());
oprot.writeDouble(_iter428.getValue());
@@ -897,7 +864,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
oprot.writeFieldBegin(WINDOW_TO_ACKED_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.window_to_acked.size()));
- for (Map.Entry<String, Long> _iter429 : struct.window_to_acked.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter429 : struct.window_to_acked.entrySet())
{
oprot.writeString(_iter429.getKey());
oprot.writeI64(_iter429.getValue());
@@ -912,7 +879,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
oprot.writeFieldBegin(WINDOW_TO_FAILED_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.window_to_failed.size()));
- for (Map.Entry<String, Long> _iter430 : struct.window_to_failed.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter430 : struct.window_to_failed.entrySet())
{
oprot.writeString(_iter430.getKey());
oprot.writeI64(_iter430.getValue());
@@ -928,18 +895,18 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
}
- private static class TopologyStatsTupleSchemeFactory implements SchemeFactory {
+ private static class TopologyStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TopologyStatsTupleScheme getScheme() {
return new TopologyStatsTupleScheme();
}
}
- private static class TopologyStatsTupleScheme extends TupleScheme<TopologyStats> {
+ private static class TopologyStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TopologyStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TopologyStats struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_window_to_emitted()) {
optionals.set(0);
}
@@ -959,7 +926,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (struct.is_set_window_to_emitted()) {
{
oprot.writeI32(struct.window_to_emitted.size());
- for (Map.Entry<String, Long> _iter431 : struct.window_to_emitted.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter431 : struct.window_to_emitted.entrySet())
{
oprot.writeString(_iter431.getKey());
oprot.writeI64(_iter431.getValue());
@@ -969,7 +936,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (struct.is_set_window_to_transferred()) {
{
oprot.writeI32(struct.window_to_transferred.size());
- for (Map.Entry<String, Long> _iter432 : struct.window_to_transferred.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter432 : struct.window_to_transferred.entrySet())
{
oprot.writeString(_iter432.getKey());
oprot.writeI64(_iter432.getValue());
@@ -979,7 +946,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (struct.is_set_window_to_complete_latencies_ms()) {
{
oprot.writeI32(struct.window_to_complete_latencies_ms.size());
- for (Map.Entry<String, Double> _iter433 : struct.window_to_complete_latencies_ms.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter433 : struct.window_to_complete_latencies_ms.entrySet())
{
oprot.writeString(_iter433.getKey());
oprot.writeDouble(_iter433.getValue());
@@ -989,7 +956,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (struct.is_set_window_to_acked()) {
{
oprot.writeI32(struct.window_to_acked.size());
- for (Map.Entry<String, Long> _iter434 : struct.window_to_acked.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter434 : struct.window_to_acked.entrySet())
{
oprot.writeString(_iter434.getKey());
oprot.writeI64(_iter434.getValue());
@@ -999,7 +966,7 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (struct.is_set_window_to_failed()) {
{
oprot.writeI32(struct.window_to_failed.size());
- for (Map.Entry<String, Long> _iter435 : struct.window_to_failed.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter435 : struct.window_to_failed.entrySet())
{
oprot.writeString(_iter435.getKey());
oprot.writeI64(_iter435.getValue());
@@ -1010,13 +977,13 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TopologyStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map436 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.window_to_emitted = new HashMap<String,Long>(2*_map436.size);
- String _key437;
+ struct.window_to_emitted = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map436.size);
+ java.lang.String _key437;
long _val438;
for (int _i439 = 0; _i439 < _map436.size; ++_i439)
{
@@ -1030,8 +997,8 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map440 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.window_to_transferred = new HashMap<String,Long>(2*_map440.size);
- String _key441;
+ struct.window_to_transferred = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map440.size);
+ java.lang.String _key441;
long _val442;
for (int _i443 = 0; _i443 < _map440.size; ++_i443)
{
@@ -1045,8 +1012,8 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TMap _map444 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- struct.window_to_complete_latencies_ms = new HashMap<String,Double>(2*_map444.size);
- String _key445;
+ struct.window_to_complete_latencies_ms = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map444.size);
+ java.lang.String _key445;
double _val446;
for (int _i447 = 0; _i447 < _map444.size; ++_i447)
{
@@ -1060,8 +1027,8 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TMap _map448 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.window_to_acked = new HashMap<String,Long>(2*_map448.size);
- String _key449;
+ struct.window_to_acked = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map448.size);
+ java.lang.String _key449;
long _val450;
for (int _i451 = 0; _i451 < _map448.size; ++_i451)
{
@@ -1075,8 +1042,8 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
if (incoming.get(4)) {
{
org.apache.thrift.protocol.TMap _map452 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.window_to_failed = new HashMap<String,Long>(2*_map452.size);
- String _key453;
+ struct.window_to_failed = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map452.size);
+ java.lang.String _key453;
long _val454;
for (int _i455 = 0; _i455 < _map452.size; ++_i455)
{
@@ -1090,5 +1057,8 @@ public class TopologyStats implements org.apache.thrift.TBase<TopologyStats, Top
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/TopologyStatus.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/TopologyStatus.java b/storm-client/src/jvm/org/apache/storm/generated/TopologyStatus.java
index dd33d12..19a5cec 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/TopologyStatus.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/TopologyStatus.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -24,10 +24,6 @@
package org.apache.storm.generated;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
public enum TopologyStatus implements org.apache.thrift.TEnum {
ACTIVE(1),
INACTIVE(2),
[28/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/JavaObject.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/JavaObject.java b/storm-client/src/jvm/org/apache/storm/generated/JavaObject.java
index 4d7af9d..911a590 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/JavaObject.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/JavaObject.java
@@ -16,66 +16,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObject._Fields>, java.io.Serializable, Cloneable, Comparable<JavaObject> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JavaObject");
private static final org.apache.thrift.protocol.TField FULL_CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("full_class_name", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ARGS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("args_list", org.apache.thrift.protocol.TType.LIST, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new JavaObjectStandardSchemeFactory());
- schemes.put(TupleScheme.class, new JavaObjectTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new JavaObjectStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new JavaObjectTupleSchemeFactory();
- private String full_class_name; // required
- private List<JavaObjectArg> args_list; // required
+ private java.lang.String full_class_name; // required
+ private java.util.List<JavaObjectArg> args_list; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
FULL_CLASS_NAME((short)1, "full_class_name"),
ARGS_LIST((short)2, "args_list");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,21 +93,21 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.FULL_CLASS_NAME, new org.apache.thrift.meta_data.FieldMetaData("full_class_name", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ARGS_LIST, new org.apache.thrift.meta_data.FieldMetaData("args_list", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JavaObjectArg.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JavaObject.class, metaDataMap);
}
@@ -145,8 +115,8 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
}
public JavaObject(
- String full_class_name,
- List<JavaObjectArg> args_list)
+ java.lang.String full_class_name,
+ java.util.List<JavaObjectArg> args_list)
{
this();
this.full_class_name = full_class_name;
@@ -161,7 +131,7 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
this.full_class_name = other.full_class_name;
}
if (other.is_set_args_list()) {
- List<JavaObjectArg> __this__args_list = new ArrayList<JavaObjectArg>(other.args_list.size());
+ java.util.List<JavaObjectArg> __this__args_list = new java.util.ArrayList<JavaObjectArg>(other.args_list.size());
for (JavaObjectArg other_element : other.args_list) {
__this__args_list.add(new JavaObjectArg(other_element));
}
@@ -179,11 +149,11 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
this.args_list = null;
}
- public String get_full_class_name() {
+ public java.lang.String get_full_class_name() {
return this.full_class_name;
}
- public void set_full_class_name(String full_class_name) {
+ public void set_full_class_name(java.lang.String full_class_name) {
this.full_class_name = full_class_name;
}
@@ -212,16 +182,16 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
public void add_to_args_list(JavaObjectArg elem) {
if (this.args_list == null) {
- this.args_list = new ArrayList<JavaObjectArg>();
+ this.args_list = new java.util.ArrayList<JavaObjectArg>();
}
this.args_list.add(elem);
}
- public List<JavaObjectArg> get_args_list() {
+ public java.util.List<JavaObjectArg> get_args_list() {
return this.args_list;
}
- public void set_args_list(List<JavaObjectArg> args_list) {
+ public void set_args_list(java.util.List<JavaObjectArg> args_list) {
this.args_list = args_list;
}
@@ -240,13 +210,13 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case FULL_CLASS_NAME:
if (value == null) {
unset_full_class_name();
} else {
- set_full_class_name((String)value);
+ set_full_class_name((java.lang.String)value);
}
break;
@@ -254,14 +224,14 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
if (value == null) {
unset_args_list();
} else {
- set_args_list((List<JavaObjectArg>)value);
+ set_args_list((java.util.List<JavaObjectArg>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case FULL_CLASS_NAME:
return get_full_class_name();
@@ -270,13 +240,13 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
return get_args_list();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -285,11 +255,11 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
case ARGS_LIST:
return is_set_args_list();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof JavaObject)
@@ -300,6 +270,8 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
public boolean equals(JavaObject that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_full_class_name = true && this.is_set_full_class_name();
boolean that_present_full_class_name = true && that.is_set_full_class_name();
@@ -324,19 +296,17 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_full_class_name = true && (is_set_full_class_name());
- list.add(present_full_class_name);
- if (present_full_class_name)
- list.add(full_class_name);
+ hashCode = hashCode * 8191 + ((is_set_full_class_name()) ? 131071 : 524287);
+ if (is_set_full_class_name())
+ hashCode = hashCode * 8191 + full_class_name.hashCode();
- boolean present_args_list = true && (is_set_args_list());
- list.add(present_args_list);
- if (present_args_list)
- list.add(args_list);
+ hashCode = hashCode * 8191 + ((is_set_args_list()) ? 131071 : 524287);
+ if (is_set_args_list())
+ hashCode = hashCode * 8191 + args_list.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -347,7 +317,7 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_full_class_name()).compareTo(other.is_set_full_class_name());
+ lastComparison = java.lang.Boolean.valueOf(is_set_full_class_name()).compareTo(other.is_set_full_class_name());
if (lastComparison != 0) {
return lastComparison;
}
@@ -357,7 +327,7 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_args_list()).compareTo(other.is_set_args_list());
+ lastComparison = java.lang.Boolean.valueOf(is_set_args_list()).compareTo(other.is_set_args_list());
if (lastComparison != 0) {
return lastComparison;
}
@@ -375,16 +345,16 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("JavaObject(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("JavaObject(");
boolean first = true;
sb.append("full_class_name:");
@@ -427,7 +397,7 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -435,13 +405,13 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
}
}
- private static class JavaObjectStandardSchemeFactory implements SchemeFactory {
+ private static class JavaObjectStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public JavaObjectStandardScheme getScheme() {
return new JavaObjectStandardScheme();
}
}
- private static class JavaObjectStandardScheme extends StandardScheme<JavaObject> {
+ private static class JavaObjectStandardScheme extends org.apache.thrift.scheme.StandardScheme<JavaObject> {
public void read(org.apache.thrift.protocol.TProtocol iprot, JavaObject struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -465,7 +435,7 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.args_list = new ArrayList<JavaObjectArg>(_list0.size);
+ struct.args_list = new java.util.ArrayList<JavaObjectArg>(_list0.size);
JavaObjectArg _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
@@ -516,17 +486,17 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
}
- private static class JavaObjectTupleSchemeFactory implements SchemeFactory {
+ private static class JavaObjectTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public JavaObjectTupleScheme getScheme() {
return new JavaObjectTupleScheme();
}
}
- private static class JavaObjectTupleScheme extends TupleScheme<JavaObject> {
+ private static class JavaObjectTupleScheme extends org.apache.thrift.scheme.TupleScheme<JavaObject> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, JavaObject struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.full_class_name);
{
oprot.writeI32(struct.args_list.size());
@@ -539,12 +509,12 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, JavaObject struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.full_class_name = iprot.readString();
struct.set_full_class_name_isSet(true);
{
org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.args_list = new ArrayList<JavaObjectArg>(_list5.size);
+ struct.args_list = new java.util.ArrayList<JavaObjectArg>(_list5.size);
JavaObjectArg _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
@@ -557,5 +527,8 @@ public class JavaObject implements org.apache.thrift.TBase<JavaObject, JavaObjec
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/JavaObjectArg.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/JavaObjectArg.java b/storm-client/src/jvm/org/apache/storm/generated/JavaObjectArg.java
index bcb2596..17c38f6 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/JavaObjectArg.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/JavaObjectArg.java
@@ -16,41 +16,14 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaObjectArg._Fields> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JavaObjectArg");
private static final org.apache.thrift.protocol.TField INT_ARG_FIELD_DESC = new org.apache.thrift.protocol.TField("int_arg", org.apache.thrift.protocol.TType.I32, (short)1);
@@ -69,10 +42,10 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
BINARY_ARG((short)5, "binary_arg"),
DOUBLE_ARG((short)6, "double_arg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -105,21 +78,21 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -128,27 +101,27 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.INT_ARG, new org.apache.thrift.meta_data.FieldMetaData("int_arg", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.INT_ARG, new org.apache.thrift.meta_data.FieldMetaData("int_arg", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.LONG_ARG, new org.apache.thrift.meta_data.FieldMetaData("long_arg", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.LONG_ARG, new org.apache.thrift.meta_data.FieldMetaData("long_arg", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.STRING_ARG, new org.apache.thrift.meta_data.FieldMetaData("string_arg", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.STRING_ARG, new org.apache.thrift.meta_data.FieldMetaData("string_arg", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.BOOL_ARG, new org.apache.thrift.meta_data.FieldMetaData("bool_arg", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.BOOL_ARG, new org.apache.thrift.meta_data.FieldMetaData("bool_arg", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.BINARY_ARG, new org.apache.thrift.meta_data.FieldMetaData("binary_arg", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.BINARY_ARG, new org.apache.thrift.meta_data.FieldMetaData("binary_arg", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- tmpMap.put(_Fields.DOUBLE_ARG, new org.apache.thrift.meta_data.FieldMetaData("double_arg", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.DOUBLE_ARG, new org.apache.thrift.meta_data.FieldMetaData("double_arg", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JavaObjectArg.class, metaDataMap);
}
@@ -156,7 +129,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
super();
}
- public JavaObjectArg(_Fields setField, Object value) {
+ public JavaObjectArg(_Fields setField, java.lang.Object value) {
super(setField, value);
}
@@ -179,7 +152,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
return x;
}
- public static JavaObjectArg string_arg(String value) {
+ public static JavaObjectArg string_arg(java.lang.String value) {
JavaObjectArg x = new JavaObjectArg();
x.set_string_arg(value);
return x;
@@ -191,7 +164,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
return x;
}
- public static JavaObjectArg binary_arg(ByteBuffer value) {
+ public static JavaObjectArg binary_arg(java.nio.ByteBuffer value) {
JavaObjectArg x = new JavaObjectArg();
x.set_binary_arg(value);
return x;
@@ -199,7 +172,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
public static JavaObjectArg binary_arg(byte[] value) {
JavaObjectArg x = new JavaObjectArg();
- x.set_binary_arg(ByteBuffer.wrap(Arrays.copyOf(value, value.length)));
+ x.set_binary_arg(java.nio.ByteBuffer.wrap(value.clone()));
return x;
}
@@ -211,51 +184,51 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
@Override
- protected void checkType(_Fields setField, Object value) throws ClassCastException {
+ protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException {
switch (setField) {
case INT_ARG:
- if (value instanceof Integer) {
+ if (value instanceof java.lang.Integer) {
break;
}
- throw new ClassCastException("Was expecting value of type Integer for field 'int_arg', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type java.lang.Integer for field 'int_arg', but got " + value.getClass().getSimpleName());
case LONG_ARG:
- if (value instanceof Long) {
+ if (value instanceof java.lang.Long) {
break;
}
- throw new ClassCastException("Was expecting value of type Long for field 'long_arg', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type java.lang.Long for field 'long_arg', but got " + value.getClass().getSimpleName());
case STRING_ARG:
- if (value instanceof String) {
+ if (value instanceof java.lang.String) {
break;
}
- throw new ClassCastException("Was expecting value of type String for field 'string_arg', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type java.lang.String for field 'string_arg', but got " + value.getClass().getSimpleName());
case BOOL_ARG:
- if (value instanceof Boolean) {
+ if (value instanceof java.lang.Boolean) {
break;
}
- throw new ClassCastException("Was expecting value of type Boolean for field 'bool_arg', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type java.lang.Boolean for field 'bool_arg', but got " + value.getClass().getSimpleName());
case BINARY_ARG:
- if (value instanceof ByteBuffer) {
+ if (value instanceof java.nio.ByteBuffer) {
break;
}
- throw new ClassCastException("Was expecting value of type ByteBuffer for field 'binary_arg', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type java.nio.ByteBuffer for field 'binary_arg', but got " + value.getClass().getSimpleName());
case DOUBLE_ARG:
- if (value instanceof Double) {
+ if (value instanceof java.lang.Double) {
break;
}
- throw new ClassCastException("Was expecting value of type Double for field 'double_arg', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type java.lang.Double for field 'double_arg', but got " + value.getClass().getSimpleName());
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@Override
- protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
+ protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(field.id);
if (setField != null) {
switch (setField) {
case INT_ARG:
if (field.type == INT_ARG_FIELD_DESC.type) {
- Integer int_arg;
+ java.lang.Integer int_arg;
int_arg = iprot.readI32();
return int_arg;
} else {
@@ -264,7 +237,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
}
case LONG_ARG:
if (field.type == LONG_ARG_FIELD_DESC.type) {
- Long long_arg;
+ java.lang.Long long_arg;
long_arg = iprot.readI64();
return long_arg;
} else {
@@ -273,7 +246,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
}
case STRING_ARG:
if (field.type == STRING_ARG_FIELD_DESC.type) {
- String string_arg;
+ java.lang.String string_arg;
string_arg = iprot.readString();
return string_arg;
} else {
@@ -282,7 +255,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
}
case BOOL_ARG:
if (field.type == BOOL_ARG_FIELD_DESC.type) {
- Boolean bool_arg;
+ java.lang.Boolean bool_arg;
bool_arg = iprot.readBool();
return bool_arg;
} else {
@@ -291,7 +264,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
}
case BINARY_ARG:
if (field.type == BINARY_ARG_FIELD_DESC.type) {
- ByteBuffer binary_arg;
+ java.nio.ByteBuffer binary_arg;
binary_arg = iprot.readBinary();
return binary_arg;
} else {
@@ -300,7 +273,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
}
case DOUBLE_ARG:
if (field.type == DOUBLE_ARG_FIELD_DESC.type) {
- Double double_arg;
+ java.lang.Double double_arg;
double_arg = iprot.readDouble();
return double_arg;
} else {
@@ -308,7 +281,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
return null;
}
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
@@ -320,68 +293,68 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
switch (setField_) {
case INT_ARG:
- Integer int_arg = (Integer)value_;
+ java.lang.Integer int_arg = (java.lang.Integer)value_;
oprot.writeI32(int_arg);
return;
case LONG_ARG:
- Long long_arg = (Long)value_;
+ java.lang.Long long_arg = (java.lang.Long)value_;
oprot.writeI64(long_arg);
return;
case STRING_ARG:
- String string_arg = (String)value_;
+ java.lang.String string_arg = (java.lang.String)value_;
oprot.writeString(string_arg);
return;
case BOOL_ARG:
- Boolean bool_arg = (Boolean)value_;
+ java.lang.Boolean bool_arg = (java.lang.Boolean)value_;
oprot.writeBool(bool_arg);
return;
case BINARY_ARG:
- ByteBuffer binary_arg = (ByteBuffer)value_;
+ java.nio.ByteBuffer binary_arg = (java.nio.ByteBuffer)value_;
oprot.writeBinary(binary_arg);
return;
case DOUBLE_ARG:
- Double double_arg = (Double)value_;
+ java.lang.Double double_arg = (java.lang.Double)value_;
oprot.writeDouble(double_arg);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@Override
- protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
+ protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(fieldID);
if (setField != null) {
switch (setField) {
case INT_ARG:
- Integer int_arg;
+ java.lang.Integer int_arg;
int_arg = iprot.readI32();
return int_arg;
case LONG_ARG:
- Long long_arg;
+ java.lang.Long long_arg;
long_arg = iprot.readI64();
return long_arg;
case STRING_ARG:
- String string_arg;
+ java.lang.String string_arg;
string_arg = iprot.readString();
return string_arg;
case BOOL_ARG:
- Boolean bool_arg;
+ java.lang.Boolean bool_arg;
bool_arg = iprot.readBool();
return bool_arg;
case BINARY_ARG:
- ByteBuffer binary_arg;
+ java.nio.ByteBuffer binary_arg;
binary_arg = iprot.readBinary();
return binary_arg;
case DOUBLE_ARG:
- Double double_arg;
+ java.lang.Double double_arg;
double_arg = iprot.readDouble();
return double_arg;
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
- throw new TProtocolException("Couldn't find a field with field id " + fieldID);
+ throw new org.apache.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID);
}
}
@@ -389,31 +362,31 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
switch (setField_) {
case INT_ARG:
- Integer int_arg = (Integer)value_;
+ java.lang.Integer int_arg = (java.lang.Integer)value_;
oprot.writeI32(int_arg);
return;
case LONG_ARG:
- Long long_arg = (Long)value_;
+ java.lang.Long long_arg = (java.lang.Long)value_;
oprot.writeI64(long_arg);
return;
case STRING_ARG:
- String string_arg = (String)value_;
+ java.lang.String string_arg = (java.lang.String)value_;
oprot.writeString(string_arg);
return;
case BOOL_ARG:
- Boolean bool_arg = (Boolean)value_;
+ java.lang.Boolean bool_arg = (java.lang.Boolean)value_;
oprot.writeBool(bool_arg);
return;
case BINARY_ARG:
- ByteBuffer binary_arg = (ByteBuffer)value_;
+ java.nio.ByteBuffer binary_arg = (java.nio.ByteBuffer)value_;
oprot.writeBinary(binary_arg);
return;
case DOUBLE_ARG:
- Double double_arg = (Double)value_;
+ java.lang.Double double_arg = (java.lang.Double)value_;
oprot.writeDouble(double_arg);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@@ -433,7 +406,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
case DOUBLE_ARG:
return DOUBLE_ARG_FIELD_DESC;
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@@ -454,9 +427,9 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
public int get_int_arg() {
if (getSetField() == _Fields.INT_ARG) {
- return (Integer)getFieldValue();
+ return (java.lang.Integer)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'int_arg' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'int_arg' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
@@ -467,9 +440,9 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
public long get_long_arg() {
if (getSetField() == _Fields.LONG_ARG) {
- return (Long)getFieldValue();
+ return (java.lang.Long)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'long_arg' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'long_arg' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
@@ -478,25 +451,25 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
value_ = value;
}
- public String get_string_arg() {
+ public java.lang.String get_string_arg() {
if (getSetField() == _Fields.STRING_ARG) {
- return (String)getFieldValue();
+ return (java.lang.String)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'string_arg' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'string_arg' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
- public void set_string_arg(String value) {
- if (value == null) throw new NullPointerException();
+ public void set_string_arg(java.lang.String value) {
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.STRING_ARG;
value_ = value;
}
public boolean get_bool_arg() {
if (getSetField() == _Fields.BOOL_ARG) {
- return (Boolean)getFieldValue();
+ return (java.lang.Boolean)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'bool_arg' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'bool_arg' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
@@ -507,33 +480,33 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
public byte[] get_binary_arg() {
set_binary_arg(org.apache.thrift.TBaseHelper.rightSize(buffer_for_binary_arg()));
- ByteBuffer b = buffer_for_binary_arg();
+ java.nio.ByteBuffer b = buffer_for_binary_arg();
return b == null ? null : b.array();
}
- public ByteBuffer buffer_for_binary_arg() {
+ public java.nio.ByteBuffer buffer_for_binary_arg() {
if (getSetField() == _Fields.BINARY_ARG) {
- return org.apache.thrift.TBaseHelper.copyBinary((ByteBuffer)getFieldValue());
+ return org.apache.thrift.TBaseHelper.copyBinary((java.nio.ByteBuffer)getFieldValue());
} else {
- throw new RuntimeException("Cannot get field 'binary_arg' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'binary_arg' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_binary_arg(byte[] value) {
- set_binary_arg(ByteBuffer.wrap(Arrays.copyOf(value, value.length)));
+ set_binary_arg(java.nio.ByteBuffer.wrap(value.clone()));
}
- public void set_binary_arg(ByteBuffer value) {
- if (value == null) throw new NullPointerException();
+ public void set_binary_arg(java.nio.ByteBuffer value) {
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.BINARY_ARG;
value_ = value;
}
public double get_double_arg() {
if (getSetField() == _Fields.DOUBLE_ARG) {
- return (Double)getFieldValue();
+ return (java.lang.Double)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'double_arg' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'double_arg' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
@@ -572,7 +545,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
}
- public boolean equals(Object other) {
+ public boolean equals(java.lang.Object other) {
if (other instanceof JavaObjectArg) {
return equals((JavaObjectArg)other);
} else {
@@ -596,12 +569,12 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>();
list.add(this.getClass().getName());
org.apache.thrift.TFieldIdEnum setField = getSetField();
if (setField != null) {
list.add(setField.getThriftFieldId());
- Object value = getFieldValue();
+ java.lang.Object value = getFieldValue();
if (value instanceof org.apache.thrift.TEnum) {
list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue());
} else {
@@ -619,7 +592,7 @@ public class JavaObjectArg extends org.apache.thrift.TUnion<JavaObjectArg, JavaO
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/KeyAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/KeyAlreadyExistsException.java b/storm-client/src/jvm/org/apache/storm/generated/KeyAlreadyExistsException.java
index 32b0a74..0a7decd 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/KeyAlreadyExistsException.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/KeyAlreadyExistsException.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class KeyAlreadyExistsException extends TException implements org.apache.thrift.TBase<KeyAlreadyExistsException, KeyAlreadyExistsException._Fields>, java.io.Serializable, Cloneable, Comparable<KeyAlreadyExistsException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
+public class KeyAlreadyExistsException extends org.apache.thrift.TException implements org.apache.thrift.TBase<KeyAlreadyExistsException, KeyAlreadyExistsException._Fields>, java.io.Serializable, Cloneable, Comparable<KeyAlreadyExistsException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("KeyAlreadyExistsException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new KeyAlreadyExistsExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new KeyAlreadyExistsExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new KeyAlreadyExistsExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new KeyAlreadyExistsExceptionTupleSchemeFactory();
- private String msg; // required
+ private java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class KeyAlreadyExistsException extends TException implements org.apache.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,18 +88,18 @@ public class KeyAlreadyExistsException extends TException implements org.apache.
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(KeyAlreadyExistsException.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class KeyAlreadyExistsException extends TException implements org.apache.
}
public KeyAlreadyExistsException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -161,11 +131,11 @@ public class KeyAlreadyExistsException extends TException implements org.apache.
this.msg = null;
}
- public String get_msg() {
+ public java.lang.String get_msg() {
return this.msg;
}
- public void set_msg(String msg) {
+ public void set_msg(java.lang.String msg) {
this.msg = msg;
}
@@ -184,43 +154,43 @@ public class KeyAlreadyExistsException extends TException implements org.apache.
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unset_msg();
} else {
- set_msg((String)value);
+ set_msg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return get_msg();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return is_set_msg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof KeyAlreadyExistsException)
@@ -231,6 +201,8 @@ public class KeyAlreadyExistsException extends TException implements org.apache.
public boolean equals(KeyAlreadyExistsException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.is_set_msg();
boolean that_present_msg = true && that.is_set_msg();
@@ -246,14 +218,13 @@ public class KeyAlreadyExistsException extends TException implements org.apache.
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (is_set_msg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((is_set_msg()) ? 131071 : 524287);
+ if (is_set_msg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class KeyAlreadyExistsException extends TException implements org.apache.
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class KeyAlreadyExistsException extends TException implements org.apache.
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("KeyAlreadyExistsException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("KeyAlreadyExistsException(");
boolean first = true;
sb.append("msg:");
@@ -322,7 +293,7 @@ public class KeyAlreadyExistsException extends TException implements org.apache.
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -330,13 +301,13 @@ public class KeyAlreadyExistsException extends TException implements org.apache.
}
}
- private static class KeyAlreadyExistsExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class KeyAlreadyExistsExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyAlreadyExistsExceptionStandardScheme getScheme() {
return new KeyAlreadyExistsExceptionStandardScheme();
}
}
- private static class KeyAlreadyExistsExceptionStandardScheme extends StandardScheme<KeyAlreadyExistsException> {
+ private static class KeyAlreadyExistsExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<KeyAlreadyExistsException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, KeyAlreadyExistsException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -380,27 +351,30 @@ public class KeyAlreadyExistsException extends TException implements org.apache.
}
- private static class KeyAlreadyExistsExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class KeyAlreadyExistsExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyAlreadyExistsExceptionTupleScheme getScheme() {
return new KeyAlreadyExistsExceptionTupleScheme();
}
}
- private static class KeyAlreadyExistsExceptionTupleScheme extends TupleScheme<KeyAlreadyExistsException> {
+ private static class KeyAlreadyExistsExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<KeyAlreadyExistsException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, KeyAlreadyExistsException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.msg);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, KeyAlreadyExistsException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.msg = iprot.readString();
struct.set_msg_isSet(true);
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/KeyNotFoundException.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/KeyNotFoundException.java b/storm-client/src/jvm/org/apache/storm/generated/KeyNotFoundException.java
index d55564c..8ec60d3 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/KeyNotFoundException.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/KeyNotFoundException.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class KeyNotFoundException extends TException implements org.apache.thrift.TBase<KeyNotFoundException, KeyNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<KeyNotFoundException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
+public class KeyNotFoundException extends org.apache.thrift.TException implements org.apache.thrift.TBase<KeyNotFoundException, KeyNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<KeyNotFoundException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("KeyNotFoundException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new KeyNotFoundExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new KeyNotFoundExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new KeyNotFoundExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new KeyNotFoundExceptionTupleSchemeFactory();
- private String msg; // required
+ private java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class KeyNotFoundException extends TException implements org.apache.thrif
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,18 +88,18 @@ public class KeyNotFoundException extends TException implements org.apache.thrif
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(KeyNotFoundException.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class KeyNotFoundException extends TException implements org.apache.thrif
}
public KeyNotFoundException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -161,11 +131,11 @@ public class KeyNotFoundException extends TException implements org.apache.thrif
this.msg = null;
}
- public String get_msg() {
+ public java.lang.String get_msg() {
return this.msg;
}
- public void set_msg(String msg) {
+ public void set_msg(java.lang.String msg) {
this.msg = msg;
}
@@ -184,43 +154,43 @@ public class KeyNotFoundException extends TException implements org.apache.thrif
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unset_msg();
} else {
- set_msg((String)value);
+ set_msg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return get_msg();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return is_set_msg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof KeyNotFoundException)
@@ -231,6 +201,8 @@ public class KeyNotFoundException extends TException implements org.apache.thrif
public boolean equals(KeyNotFoundException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.is_set_msg();
boolean that_present_msg = true && that.is_set_msg();
@@ -246,14 +218,13 @@ public class KeyNotFoundException extends TException implements org.apache.thrif
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (is_set_msg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((is_set_msg()) ? 131071 : 524287);
+ if (is_set_msg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class KeyNotFoundException extends TException implements org.apache.thrif
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class KeyNotFoundException extends TException implements org.apache.thrif
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("KeyNotFoundException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("KeyNotFoundException(");
boolean first = true;
sb.append("msg:");
@@ -322,7 +293,7 @@ public class KeyNotFoundException extends TException implements org.apache.thrif
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -330,13 +301,13 @@ public class KeyNotFoundException extends TException implements org.apache.thrif
}
}
- private static class KeyNotFoundExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class KeyNotFoundExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyNotFoundExceptionStandardScheme getScheme() {
return new KeyNotFoundExceptionStandardScheme();
}
}
- private static class KeyNotFoundExceptionStandardScheme extends StandardScheme<KeyNotFoundException> {
+ private static class KeyNotFoundExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<KeyNotFoundException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, KeyNotFoundException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -380,27 +351,30 @@ public class KeyNotFoundException extends TException implements org.apache.thrif
}
- private static class KeyNotFoundExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class KeyNotFoundExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyNotFoundExceptionTupleScheme getScheme() {
return new KeyNotFoundExceptionTupleScheme();
}
}
- private static class KeyNotFoundExceptionTupleScheme extends TupleScheme<KeyNotFoundException> {
+ private static class KeyNotFoundExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<KeyNotFoundException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, KeyNotFoundException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.msg);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, KeyNotFoundException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.msg = iprot.readString();
struct.set_msg_isSet(true);
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/KillOptions.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/KillOptions.java b/storm-client/src/jvm/org/apache/storm/generated/KillOptions.java
index f2ad8e2..4f31bcc 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/KillOptions.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/KillOptions.java
@@ -16,52 +16,22 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOptions._Fields>, java.io.Serializable, Cloneable, Comparable<KillOptions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("KillOptions");
private static final org.apache.thrift.protocol.TField WAIT_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("wait_secs", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new KillOptionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new KillOptionsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new KillOptionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new KillOptionsTupleSchemeFactory();
private int wait_secs; // optional
@@ -69,10 +39,10 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
WAIT_SECS((short)1, "wait_secs");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,7 +88,7 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -127,12 +97,12 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
private static final int __WAIT_SECS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.WAIT_SECS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.WAIT_SECS, new org.apache.thrift.meta_data.FieldMetaData("wait_secs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(KillOptions.class, metaDataMap);
}
@@ -167,55 +137,55 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
}
public void unset_wait_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WAIT_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WAIT_SECS_ISSET_ID);
}
/** Returns true if field wait_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_wait_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __WAIT_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WAIT_SECS_ISSET_ID);
}
public void set_wait_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WAIT_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WAIT_SECS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case WAIT_SECS:
if (value == null) {
unset_wait_secs();
} else {
- set_wait_secs((Integer)value);
+ set_wait_secs((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case WAIT_SECS:
return get_wait_secs();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case WAIT_SECS:
return is_set_wait_secs();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof KillOptions)
@@ -226,6 +196,8 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
public boolean equals(KillOptions that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_wait_secs = true && this.is_set_wait_secs();
boolean that_present_wait_secs = true && that.is_set_wait_secs();
@@ -241,14 +213,13 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_wait_secs = true && (is_set_wait_secs());
- list.add(present_wait_secs);
- if (present_wait_secs)
- list.add(wait_secs);
+ hashCode = hashCode * 8191 + ((is_set_wait_secs()) ? 131071 : 524287);
+ if (is_set_wait_secs())
+ hashCode = hashCode * 8191 + wait_secs;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -259,7 +230,7 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_wait_secs()).compareTo(other.is_set_wait_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_wait_secs()).compareTo(other.is_set_wait_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -277,16 +248,16 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("KillOptions(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("KillOptions(");
boolean first = true;
if (is_set_wait_secs()) {
@@ -311,7 +282,7 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -321,13 +292,13 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
}
}
- private static class KillOptionsStandardSchemeFactory implements SchemeFactory {
+ private static class KillOptionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KillOptionsStandardScheme getScheme() {
return new KillOptionsStandardScheme();
}
}
- private static class KillOptionsStandardScheme extends StandardScheme<KillOptions> {
+ private static class KillOptionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<KillOptions> {
public void read(org.apache.thrift.protocol.TProtocol iprot, KillOptions struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -371,18 +342,18 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
}
- private static class KillOptionsTupleSchemeFactory implements SchemeFactory {
+ private static class KillOptionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KillOptionsTupleScheme getScheme() {
return new KillOptionsTupleScheme();
}
}
- private static class KillOptionsTupleScheme extends TupleScheme<KillOptions> {
+ private static class KillOptionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<KillOptions> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, KillOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_wait_secs()) {
optionals.set(0);
}
@@ -394,8 +365,8 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, KillOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.wait_secs = iprot.readI32();
struct.set_wait_secs_isSet(true);
@@ -403,5 +374,8 @@ public class KillOptions implements org.apache.thrift.TBase<KillOptions, KillOpt
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[26/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistoryList.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistoryList.java b/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistoryList.java
index 461bd08..aca3029 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistoryList.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistoryList.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryList, LSTopoHistoryList._Fields>, java.io.Serializable, Cloneable, Comparable<LSTopoHistoryList> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LSTopoHistoryList");
private static final org.apache.thrift.protocol.TField TOPO_HISTORY_FIELD_DESC = new org.apache.thrift.protocol.TField("topo_history", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LSTopoHistoryListStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LSTopoHistoryListTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LSTopoHistoryListStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LSTopoHistoryListTupleSchemeFactory();
- private List<LSTopoHistory> topo_history; // required
+ private java.util.List<LSTopoHistory> topo_history; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TOPO_HISTORY((short)1, "topo_history");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,19 +88,19 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TOPO_HISTORY, new org.apache.thrift.meta_data.FieldMetaData("topo_history", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LSTopoHistory.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LSTopoHistoryList.class, metaDataMap);
}
@@ -138,7 +108,7 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
}
public LSTopoHistoryList(
- List<LSTopoHistory> topo_history)
+ java.util.List<LSTopoHistory> topo_history)
{
this();
this.topo_history = topo_history;
@@ -149,7 +119,7 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
*/
public LSTopoHistoryList(LSTopoHistoryList other) {
if (other.is_set_topo_history()) {
- List<LSTopoHistory> __this__topo_history = new ArrayList<LSTopoHistory>(other.topo_history.size());
+ java.util.List<LSTopoHistory> __this__topo_history = new java.util.ArrayList<LSTopoHistory>(other.topo_history.size());
for (LSTopoHistory other_element : other.topo_history) {
__this__topo_history.add(new LSTopoHistory(other_element));
}
@@ -176,16 +146,16 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
public void add_to_topo_history(LSTopoHistory elem) {
if (this.topo_history == null) {
- this.topo_history = new ArrayList<LSTopoHistory>();
+ this.topo_history = new java.util.ArrayList<LSTopoHistory>();
}
this.topo_history.add(elem);
}
- public List<LSTopoHistory> get_topo_history() {
+ public java.util.List<LSTopoHistory> get_topo_history() {
return this.topo_history;
}
- public void set_topo_history(List<LSTopoHistory> topo_history) {
+ public void set_topo_history(java.util.List<LSTopoHistory> topo_history) {
this.topo_history = topo_history;
}
@@ -204,43 +174,43 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TOPO_HISTORY:
if (value == null) {
unset_topo_history();
} else {
- set_topo_history((List<LSTopoHistory>)value);
+ set_topo_history((java.util.List<LSTopoHistory>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOPO_HISTORY:
return get_topo_history();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TOPO_HISTORY:
return is_set_topo_history();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof LSTopoHistoryList)
@@ -251,6 +221,8 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
public boolean equals(LSTopoHistoryList that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_topo_history = true && this.is_set_topo_history();
boolean that_present_topo_history = true && that.is_set_topo_history();
@@ -266,14 +238,13 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_topo_history = true && (is_set_topo_history());
- list.add(present_topo_history);
- if (present_topo_history)
- list.add(topo_history);
+ hashCode = hashCode * 8191 + ((is_set_topo_history()) ? 131071 : 524287);
+ if (is_set_topo_history())
+ hashCode = hashCode * 8191 + topo_history.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -284,7 +255,7 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_topo_history()).compareTo(other.is_set_topo_history());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topo_history()).compareTo(other.is_set_topo_history());
if (lastComparison != 0) {
return lastComparison;
}
@@ -302,16 +273,16 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LSTopoHistoryList(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LSTopoHistoryList(");
boolean first = true;
sb.append("topo_history:");
@@ -342,7 +313,7 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -350,13 +321,13 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
}
}
- private static class LSTopoHistoryListStandardSchemeFactory implements SchemeFactory {
+ private static class LSTopoHistoryListStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LSTopoHistoryListStandardScheme getScheme() {
return new LSTopoHistoryListStandardScheme();
}
}
- private static class LSTopoHistoryListStandardScheme extends StandardScheme<LSTopoHistoryList> {
+ private static class LSTopoHistoryListStandardScheme extends org.apache.thrift.scheme.StandardScheme<LSTopoHistoryList> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LSTopoHistoryList struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -372,7 +343,7 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list844 = iprot.readListBegin();
- struct.topo_history = new ArrayList<LSTopoHistory>(_list844.size);
+ struct.topo_history = new java.util.ArrayList<LSTopoHistory>(_list844.size);
LSTopoHistory _elem845;
for (int _i846 = 0; _i846 < _list844.size; ++_i846)
{
@@ -418,17 +389,17 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
}
- private static class LSTopoHistoryListTupleSchemeFactory implements SchemeFactory {
+ private static class LSTopoHistoryListTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LSTopoHistoryListTupleScheme getScheme() {
return new LSTopoHistoryListTupleScheme();
}
}
- private static class LSTopoHistoryListTupleScheme extends TupleScheme<LSTopoHistoryList> {
+ private static class LSTopoHistoryListTupleScheme extends org.apache.thrift.scheme.TupleScheme<LSTopoHistoryList> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LSTopoHistoryList struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.topo_history.size());
for (LSTopoHistory _iter848 : struct.topo_history)
@@ -440,10 +411,10 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LSTopoHistoryList struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TList _list849 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.topo_history = new ArrayList<LSTopoHistory>(_list849.size);
+ struct.topo_history = new java.util.ArrayList<LSTopoHistory>(_list849.size);
LSTopoHistory _elem850;
for (int _i851 = 0; _i851 < _list849.size; ++_i851)
{
@@ -456,5 +427,8 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LSWorkerHeartbeat.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/LSWorkerHeartbeat.java b/storm-client/src/jvm/org/apache/storm/generated/LSWorkerHeartbeat.java
index 73b9c12..7f108ee 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/LSWorkerHeartbeat.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/LSWorkerHeartbeat.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartbeat, LSWorkerHeartbeat._Fields>, java.io.Serializable, Cloneable, Comparable<LSWorkerHeartbeat> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LSWorkerHeartbeat");
@@ -60,15 +33,12 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
private static final org.apache.thrift.protocol.TField EXECUTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("executors", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LSWorkerHeartbeatStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LSWorkerHeartbeatTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LSWorkerHeartbeatStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LSWorkerHeartbeatTupleSchemeFactory();
private int time_secs; // required
- private String topology_id; // required
- private List<ExecutorInfo> executors; // required
+ private java.lang.String topology_id; // required
+ private java.util.List<ExecutorInfo> executors; // required
private int port; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -78,10 +48,10 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
EXECUTORS((short)3, "executors"),
PORT((short)4, "port");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -110,21 +80,21 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -133,7 +103,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -142,9 +112,9 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
private static final int __TIME_SECS_ISSET_ID = 0;
private static final int __PORT_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("time_secs", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.TOPOLOGY_ID, new org.apache.thrift.meta_data.FieldMetaData("topology_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -154,7 +124,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutorInfo.class))));
tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LSWorkerHeartbeat.class, metaDataMap);
}
@@ -163,8 +133,8 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
public LSWorkerHeartbeat(
int time_secs,
- String topology_id,
- List<ExecutorInfo> executors,
+ java.lang.String topology_id,
+ java.util.List<ExecutorInfo> executors,
int port)
{
this();
@@ -186,7 +156,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
this.topology_id = other.topology_id;
}
if (other.is_set_executors()) {
- List<ExecutorInfo> __this__executors = new ArrayList<ExecutorInfo>(other.executors.size());
+ java.util.List<ExecutorInfo> __this__executors = new java.util.ArrayList<ExecutorInfo>(other.executors.size());
for (ExecutorInfo other_element : other.executors) {
__this__executors.add(new ExecutorInfo(other_element));
}
@@ -219,23 +189,23 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
}
public void unset_time_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
}
/** Returns true if field time_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_time_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
}
public void set_time_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_SECS_ISSET_ID, value);
}
- public String get_topology_id() {
+ public java.lang.String get_topology_id() {
return this.topology_id;
}
- public void set_topology_id(String topology_id) {
+ public void set_topology_id(java.lang.String topology_id) {
this.topology_id = topology_id;
}
@@ -264,16 +234,16 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
public void add_to_executors(ExecutorInfo elem) {
if (this.executors == null) {
- this.executors = new ArrayList<ExecutorInfo>();
+ this.executors = new java.util.ArrayList<ExecutorInfo>();
}
this.executors.add(elem);
}
- public List<ExecutorInfo> get_executors() {
+ public java.util.List<ExecutorInfo> get_executors() {
return this.executors;
}
- public void set_executors(List<ExecutorInfo> executors) {
+ public void set_executors(java.util.List<ExecutorInfo> executors) {
this.executors = executors;
}
@@ -302,25 +272,25 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
}
public void unset_port() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean is_set_port() {
- return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
}
public void set_port_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TIME_SECS:
if (value == null) {
unset_time_secs();
} else {
- set_time_secs((Integer)value);
+ set_time_secs((java.lang.Integer)value);
}
break;
@@ -328,7 +298,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
if (value == null) {
unset_topology_id();
} else {
- set_topology_id((String)value);
+ set_topology_id((java.lang.String)value);
}
break;
@@ -336,7 +306,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
if (value == null) {
unset_executors();
} else {
- set_executors((List<ExecutorInfo>)value);
+ set_executors((java.util.List<ExecutorInfo>)value);
}
break;
@@ -344,14 +314,14 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
if (value == null) {
unset_port();
} else {
- set_port((Integer)value);
+ set_port((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TIME_SECS:
return get_time_secs();
@@ -366,13 +336,13 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
return get_port();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -385,11 +355,11 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
case PORT:
return is_set_port();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof LSWorkerHeartbeat)
@@ -400,6 +370,8 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
public boolean equals(LSWorkerHeartbeat that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_time_secs = true;
boolean that_present_time_secs = true;
@@ -442,29 +414,21 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_time_secs = true;
- list.add(present_time_secs);
- if (present_time_secs)
- list.add(time_secs);
+ hashCode = hashCode * 8191 + time_secs;
- boolean present_topology_id = true && (is_set_topology_id());
- list.add(present_topology_id);
- if (present_topology_id)
- list.add(topology_id);
+ hashCode = hashCode * 8191 + ((is_set_topology_id()) ? 131071 : 524287);
+ if (is_set_topology_id())
+ hashCode = hashCode * 8191 + topology_id.hashCode();
- boolean present_executors = true && (is_set_executors());
- list.add(present_executors);
- if (present_executors)
- list.add(executors);
+ hashCode = hashCode * 8191 + ((is_set_executors()) ? 131071 : 524287);
+ if (is_set_executors())
+ hashCode = hashCode * 8191 + executors.hashCode();
- boolean present_port = true;
- list.add(present_port);
- if (present_port)
- list.add(port);
+ hashCode = hashCode * 8191 + port;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -475,7 +439,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -485,7 +449,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -495,7 +459,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -505,7 +469,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
+ lastComparison = java.lang.Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
if (lastComparison != 0) {
return lastComparison;
}
@@ -523,16 +487,16 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LSWorkerHeartbeat(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LSWorkerHeartbeat(");
boolean first = true;
sb.append("time_secs:");
@@ -591,7 +555,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -601,13 +565,13 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
}
}
- private static class LSWorkerHeartbeatStandardSchemeFactory implements SchemeFactory {
+ private static class LSWorkerHeartbeatStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LSWorkerHeartbeatStandardScheme getScheme() {
return new LSWorkerHeartbeatStandardScheme();
}
}
- private static class LSWorkerHeartbeatStandardScheme extends StandardScheme<LSWorkerHeartbeat> {
+ private static class LSWorkerHeartbeatStandardScheme extends org.apache.thrift.scheme.StandardScheme<LSWorkerHeartbeat> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LSWorkerHeartbeat struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -639,7 +603,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list820 = iprot.readListBegin();
- struct.executors = new ArrayList<ExecutorInfo>(_list820.size);
+ struct.executors = new java.util.ArrayList<ExecutorInfo>(_list820.size);
ExecutorInfo _elem821;
for (int _i822 = 0; _i822 < _list820.size; ++_i822)
{
@@ -704,17 +668,17 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
}
- private static class LSWorkerHeartbeatTupleSchemeFactory implements SchemeFactory {
+ private static class LSWorkerHeartbeatTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LSWorkerHeartbeatTupleScheme getScheme() {
return new LSWorkerHeartbeatTupleScheme();
}
}
- private static class LSWorkerHeartbeatTupleScheme extends TupleScheme<LSWorkerHeartbeat> {
+ private static class LSWorkerHeartbeatTupleScheme extends org.apache.thrift.scheme.TupleScheme<LSWorkerHeartbeat> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LSWorkerHeartbeat struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.time_secs);
oprot.writeString(struct.topology_id);
{
@@ -729,14 +693,14 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LSWorkerHeartbeat struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.time_secs = iprot.readI32();
struct.set_time_secs_isSet(true);
struct.topology_id = iprot.readString();
struct.set_topology_id_isSet(true);
{
org.apache.thrift.protocol.TList _list825 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.executors = new ArrayList<ExecutorInfo>(_list825.size);
+ struct.executors = new java.util.ArrayList<ExecutorInfo>(_list825.size);
ExecutorInfo _elem826;
for (int _i827 = 0; _i827 < _list825.size; ++_i827)
{
@@ -751,5 +715,8 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ListBlobsResult.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ListBlobsResult.java b/storm-client/src/jvm/org/apache/storm/generated/ListBlobsResult.java
index 21b3e5b..d27f0f1 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ListBlobsResult.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ListBlobsResult.java
@@ -16,66 +16,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, ListBlobsResult._Fields>, java.io.Serializable, Cloneable, Comparable<ListBlobsResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ListBlobsResult");
private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ListBlobsResultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ListBlobsResultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ListBlobsResultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ListBlobsResultTupleSchemeFactory();
- private List<String> keys; // required
- private String session; // required
+ private java.util.List<java.lang.String> keys; // required
+ private java.lang.String session; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
KEYS((short)1, "keys"),
SESSION((short)2, "session");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,21 +93,21 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ListBlobsResult.class, metaDataMap);
}
@@ -145,8 +115,8 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
}
public ListBlobsResult(
- List<String> keys,
- String session)
+ java.util.List<java.lang.String> keys,
+ java.lang.String session)
{
this();
this.keys = keys;
@@ -158,7 +128,7 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
*/
public ListBlobsResult(ListBlobsResult other) {
if (other.is_set_keys()) {
- List<String> __this__keys = new ArrayList<String>(other.keys);
+ java.util.List<java.lang.String> __this__keys = new java.util.ArrayList<java.lang.String>(other.keys);
this.keys = __this__keys;
}
if (other.is_set_session()) {
@@ -180,22 +150,22 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
return (this.keys == null) ? 0 : this.keys.size();
}
- public java.util.Iterator<String> get_keys_iterator() {
+ public java.util.Iterator<java.lang.String> get_keys_iterator() {
return (this.keys == null) ? null : this.keys.iterator();
}
- public void add_to_keys(String elem) {
+ public void add_to_keys(java.lang.String elem) {
if (this.keys == null) {
- this.keys = new ArrayList<String>();
+ this.keys = new java.util.ArrayList<java.lang.String>();
}
this.keys.add(elem);
}
- public List<String> get_keys() {
+ public java.util.List<java.lang.String> get_keys() {
return this.keys;
}
- public void set_keys(List<String> keys) {
+ public void set_keys(java.util.List<java.lang.String> keys) {
this.keys = keys;
}
@@ -214,11 +184,11 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
}
}
- public String get_session() {
+ public java.lang.String get_session() {
return this.session;
}
- public void set_session(String session) {
+ public void set_session(java.lang.String session) {
this.session = session;
}
@@ -237,13 +207,13 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case KEYS:
if (value == null) {
unset_keys();
} else {
- set_keys((List<String>)value);
+ set_keys((java.util.List<java.lang.String>)value);
}
break;
@@ -251,14 +221,14 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
if (value == null) {
unset_session();
} else {
- set_session((String)value);
+ set_session((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case KEYS:
return get_keys();
@@ -267,13 +237,13 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
return get_session();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -282,11 +252,11 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
case SESSION:
return is_set_session();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ListBlobsResult)
@@ -297,6 +267,8 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
public boolean equals(ListBlobsResult that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_keys = true && this.is_set_keys();
boolean that_present_keys = true && that.is_set_keys();
@@ -321,19 +293,17 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_keys = true && (is_set_keys());
- list.add(present_keys);
- if (present_keys)
- list.add(keys);
+ hashCode = hashCode * 8191 + ((is_set_keys()) ? 131071 : 524287);
+ if (is_set_keys())
+ hashCode = hashCode * 8191 + keys.hashCode();
- boolean present_session = true && (is_set_session());
- list.add(present_session);
- if (present_session)
- list.add(session);
+ hashCode = hashCode * 8191 + ((is_set_session()) ? 131071 : 524287);
+ if (is_set_session())
+ hashCode = hashCode * 8191 + session.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -344,7 +314,7 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_keys()).compareTo(other.is_set_keys());
+ lastComparison = java.lang.Boolean.valueOf(is_set_keys()).compareTo(other.is_set_keys());
if (lastComparison != 0) {
return lastComparison;
}
@@ -354,7 +324,7 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_session()).compareTo(other.is_set_session());
+ lastComparison = java.lang.Boolean.valueOf(is_set_session()).compareTo(other.is_set_session());
if (lastComparison != 0) {
return lastComparison;
}
@@ -372,16 +342,16 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ListBlobsResult(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ListBlobsResult(");
boolean first = true;
sb.append("keys:");
@@ -424,7 +394,7 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -432,13 +402,13 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
}
}
- private static class ListBlobsResultStandardSchemeFactory implements SchemeFactory {
+ private static class ListBlobsResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ListBlobsResultStandardScheme getScheme() {
return new ListBlobsResultStandardScheme();
}
}
- private static class ListBlobsResultStandardScheme extends StandardScheme<ListBlobsResult> {
+ private static class ListBlobsResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<ListBlobsResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ListBlobsResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -454,8 +424,8 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list614 = iprot.readListBegin();
- struct.keys = new ArrayList<String>(_list614.size);
- String _elem615;
+ struct.keys = new java.util.ArrayList<java.lang.String>(_list614.size);
+ java.lang.String _elem615;
for (int _i616 = 0; _i616 < _list614.size; ++_i616)
{
_elem615 = iprot.readString();
@@ -493,7 +463,7 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
oprot.writeFieldBegin(KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
- for (String _iter617 : struct.keys)
+ for (java.lang.String _iter617 : struct.keys)
{
oprot.writeString(_iter617);
}
@@ -512,20 +482,20 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
}
- private static class ListBlobsResultTupleSchemeFactory implements SchemeFactory {
+ private static class ListBlobsResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ListBlobsResultTupleScheme getScheme() {
return new ListBlobsResultTupleScheme();
}
}
- private static class ListBlobsResultTupleScheme extends TupleScheme<ListBlobsResult> {
+ private static class ListBlobsResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<ListBlobsResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ListBlobsResult struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.keys.size());
- for (String _iter618 : struct.keys)
+ for (java.lang.String _iter618 : struct.keys)
{
oprot.writeString(_iter618);
}
@@ -535,11 +505,11 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ListBlobsResult struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TList _list619 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.keys = new ArrayList<String>(_list619.size);
- String _elem620;
+ struct.keys = new java.util.ArrayList<java.lang.String>(_list619.size);
+ java.lang.String _elem620;
for (int _i621 = 0; _i621 < _list619.size; ++_i621)
{
_elem620 = iprot.readString();
@@ -552,5 +522,8 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LocalAssignment.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/LocalAssignment.java b/storm-client/src/jvm/org/apache/storm/generated/LocalAssignment.java
index 3814124..2fdb3ef 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/LocalAssignment.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/LocalAssignment.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, LocalAssignment._Fields>, java.io.Serializable, Cloneable, Comparable<LocalAssignment> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LocalAssignment");
@@ -61,17 +34,14 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
private static final org.apache.thrift.protocol.TField TOTAL_NODE_SHARED_FIELD_DESC = new org.apache.thrift.protocol.TField("total_node_shared", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LocalAssignmentStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LocalAssignmentTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LocalAssignmentStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LocalAssignmentTupleSchemeFactory();
- private String topology_id; // required
- private List<ExecutorInfo> executors; // required
+ private java.lang.String topology_id; // required
+ private java.util.List<ExecutorInfo> executors; // required
private WorkerResources resources; // optional
private double total_node_shared; // optional
- private String owner; // optional
+ private java.lang.String owner; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -81,10 +51,10 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
TOTAL_NODE_SHARED((short)4, "total_node_shared"),
OWNER((short)5, "owner");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -115,21 +85,21 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -138,7 +108,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -147,9 +117,9 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
private static final int __TOTAL_NODE_SHARED_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.RESOURCES,_Fields.TOTAL_NODE_SHARED,_Fields.OWNER};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TOPOLOGY_ID, new org.apache.thrift.meta_data.FieldMetaData("topology_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXECUTORS, new org.apache.thrift.meta_data.FieldMetaData("executors", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -161,7 +131,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LocalAssignment.class, metaDataMap);
}
@@ -169,8 +139,8 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
}
public LocalAssignment(
- String topology_id,
- List<ExecutorInfo> executors)
+ java.lang.String topology_id,
+ java.util.List<ExecutorInfo> executors)
{
this();
this.topology_id = topology_id;
@@ -186,7 +156,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
this.topology_id = other.topology_id;
}
if (other.is_set_executors()) {
- List<ExecutorInfo> __this__executors = new ArrayList<ExecutorInfo>(other.executors.size());
+ java.util.List<ExecutorInfo> __this__executors = new java.util.ArrayList<ExecutorInfo>(other.executors.size());
for (ExecutorInfo other_element : other.executors) {
__this__executors.add(new ExecutorInfo(other_element));
}
@@ -215,11 +185,11 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
this.owner = null;
}
- public String get_topology_id() {
+ public java.lang.String get_topology_id() {
return this.topology_id;
}
- public void set_topology_id(String topology_id) {
+ public void set_topology_id(java.lang.String topology_id) {
this.topology_id = topology_id;
}
@@ -248,16 +218,16 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
public void add_to_executors(ExecutorInfo elem) {
if (this.executors == null) {
- this.executors = new ArrayList<ExecutorInfo>();
+ this.executors = new java.util.ArrayList<ExecutorInfo>();
}
this.executors.add(elem);
}
- public List<ExecutorInfo> get_executors() {
+ public java.util.List<ExecutorInfo> get_executors() {
return this.executors;
}
- public void set_executors(List<ExecutorInfo> executors) {
+ public void set_executors(java.util.List<ExecutorInfo> executors) {
this.executors = executors;
}
@@ -309,23 +279,23 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
}
public void unset_total_node_shared() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTAL_NODE_SHARED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TOTAL_NODE_SHARED_ISSET_ID);
}
/** Returns true if field total_node_shared is set (has been assigned a value) and false otherwise */
public boolean is_set_total_node_shared() {
- return EncodingUtils.testBit(__isset_bitfield, __TOTAL_NODE_SHARED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOTAL_NODE_SHARED_ISSET_ID);
}
public void set_total_node_shared_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTAL_NODE_SHARED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOTAL_NODE_SHARED_ISSET_ID, value);
}
- public String get_owner() {
+ public java.lang.String get_owner() {
return this.owner;
}
- public void set_owner(String owner) {
+ public void set_owner(java.lang.String owner) {
this.owner = owner;
}
@@ -344,13 +314,13 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TOPOLOGY_ID:
if (value == null) {
unset_topology_id();
} else {
- set_topology_id((String)value);
+ set_topology_id((java.lang.String)value);
}
break;
@@ -358,7 +328,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
if (value == null) {
unset_executors();
} else {
- set_executors((List<ExecutorInfo>)value);
+ set_executors((java.util.List<ExecutorInfo>)value);
}
break;
@@ -374,7 +344,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
if (value == null) {
unset_total_node_shared();
} else {
- set_total_node_shared((Double)value);
+ set_total_node_shared((java.lang.Double)value);
}
break;
@@ -382,14 +352,14 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
if (value == null) {
unset_owner();
} else {
- set_owner((String)value);
+ set_owner((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOPOLOGY_ID:
return get_topology_id();
@@ -407,13 +377,13 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
return get_owner();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -428,11 +398,11 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
case OWNER:
return is_set_owner();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof LocalAssignment)
@@ -443,6 +413,8 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
public boolean equals(LocalAssignment that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_topology_id = true && this.is_set_topology_id();
boolean that_present_topology_id = true && that.is_set_topology_id();
@@ -494,34 +466,29 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_topology_id = true && (is_set_topology_id());
- list.add(present_topology_id);
- if (present_topology_id)
- list.add(topology_id);
+ hashCode = hashCode * 8191 + ((is_set_topology_id()) ? 131071 : 524287);
+ if (is_set_topology_id())
+ hashCode = hashCode * 8191 + topology_id.hashCode();
- boolean present_executors = true && (is_set_executors());
- list.add(present_executors);
- if (present_executors)
- list.add(executors);
+ hashCode = hashCode * 8191 + ((is_set_executors()) ? 131071 : 524287);
+ if (is_set_executors())
+ hashCode = hashCode * 8191 + executors.hashCode();
- boolean present_resources = true && (is_set_resources());
- list.add(present_resources);
- if (present_resources)
- list.add(resources);
+ hashCode = hashCode * 8191 + ((is_set_resources()) ? 131071 : 524287);
+ if (is_set_resources())
+ hashCode = hashCode * 8191 + resources.hashCode();
- boolean present_total_node_shared = true && (is_set_total_node_shared());
- list.add(present_total_node_shared);
- if (present_total_node_shared)
- list.add(total_node_shared);
+ hashCode = hashCode * 8191 + ((is_set_total_node_shared()) ? 131071 : 524287);
+ if (is_set_total_node_shared())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(total_node_shared);
- boolean present_owner = true && (is_set_owner());
- list.add(present_owner);
- if (present_owner)
- list.add(owner);
+ hashCode = hashCode * 8191 + ((is_set_owner()) ? 131071 : 524287);
+ if (is_set_owner())
+ hashCode = hashCode * 8191 + owner.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -532,7 +499,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -542,7 +509,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -552,7 +519,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_resources()).compareTo(other.is_set_resources());
+ lastComparison = java.lang.Boolean.valueOf(is_set_resources()).compareTo(other.is_set_resources());
if (lastComparison != 0) {
return lastComparison;
}
@@ -562,7 +529,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_total_node_shared()).compareTo(other.is_set_total_node_shared());
+ lastComparison = java.lang.Boolean.valueOf(is_set_total_node_shared()).compareTo(other.is_set_total_node_shared());
if (lastComparison != 0) {
return lastComparison;
}
@@ -572,7 +539,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
+ lastComparison = java.lang.Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
if (lastComparison != 0) {
return lastComparison;
}
@@ -590,16 +557,16 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LocalAssignment(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LocalAssignment(");
boolean first = true;
sb.append("topology_id:");
@@ -671,7 +638,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -681,13 +648,13 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
}
}
- private static class LocalAssignmentStandardSchemeFactory implements SchemeFactory {
+ private static class LocalAssignmentStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LocalAssignmentStandardScheme getScheme() {
return new LocalAssignmentStandardScheme();
}
}
- private static class LocalAssignmentStandardScheme extends StandardScheme<LocalAssignment> {
+ private static class LocalAssignmentStandardScheme extends org.apache.thrift.scheme.StandardScheme<LocalAssignment> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LocalAssignment struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -711,7 +678,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list792 = iprot.readListBegin();
- struct.executors = new ArrayList<ExecutorInfo>(_list792.size);
+ struct.executors = new java.util.ArrayList<ExecutorInfo>(_list792.size);
ExecutorInfo _elem793;
for (int _i794 = 0; _i794 < _list792.size; ++_i794)
{
@@ -806,17 +773,17 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
}
- private static class LocalAssignmentTupleSchemeFactory implements SchemeFactory {
+ private static class LocalAssignmentTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LocalAssignmentTupleScheme getScheme() {
return new LocalAssignmentTupleScheme();
}
}
- private static class LocalAssignmentTupleScheme extends TupleScheme<LocalAssignment> {
+ private static class LocalAssignmentTupleScheme extends org.apache.thrift.scheme.TupleScheme<LocalAssignment> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LocalAssignment struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.topology_id);
{
oprot.writeI32(struct.executors.size());
@@ -825,7 +792,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
_iter796.write(oprot);
}
}
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_resources()) {
optionals.set(0);
}
@@ -849,12 +816,12 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LocalAssignment struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.topology_id = iprot.readString();
struct.set_topology_id_isSet(true);
{
org.apache.thrift.protocol.TList _list797 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.executors = new ArrayList<ExecutorInfo>(_list797.size);
+ struct.executors = new java.util.ArrayList<ExecutorInfo>(_list797.size);
ExecutorInfo _elem798;
for (int _i799 = 0; _i799 < _list797.size; ++_i799)
{
@@ -864,7 +831,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
}
}
struct.set_executors_isSet(true);
- BitSet incoming = iprot.readBitSet(3);
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.resources = new WorkerResources();
struct.resources.read(iprot);
@@ -881,5 +848,8 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[33/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/DistributedRPCInvocations.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/DistributedRPCInvocations.java b/storm-client/src/jvm/org/apache/storm/generated/DistributedRPCInvocations.java
index 7d1c1ab..ed1bf68 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/DistributedRPCInvocations.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/DistributedRPCInvocations.java
@@ -16,65 +16,38 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class DistributedRPCInvocations {
public interface Iface {
- public void result(String id, String result) throws AuthorizationException, org.apache.thrift.TException;
+ public void result(java.lang.String id, java.lang.String result) throws AuthorizationException, org.apache.thrift.TException;
- public DRPCRequest fetchRequest(String functionName) throws AuthorizationException, org.apache.thrift.TException;
+ public DRPCRequest fetchRequest(java.lang.String functionName) throws AuthorizationException, org.apache.thrift.TException;
- public void failRequest(String id) throws AuthorizationException, org.apache.thrift.TException;
+ public void failRequest(java.lang.String id) throws AuthorizationException, org.apache.thrift.TException;
- public void failRequestV2(String id, DRPCExecutionException e) throws AuthorizationException, org.apache.thrift.TException;
+ public void failRequestV2(java.lang.String id, DRPCExecutionException e) throws AuthorizationException, org.apache.thrift.TException;
}
public interface AsyncIface {
- public void result(String id, String result, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void result(java.lang.String id, java.lang.String result, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void fetchRequest(String functionName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void fetchRequest(java.lang.String functionName, org.apache.thrift.async.AsyncMethodCallback<DRPCRequest> resultHandler) throws org.apache.thrift.TException;
- public void failRequest(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void failRequest(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void failRequestV2(String id, DRPCExecutionException e, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void failRequestV2(java.lang.String id, DRPCExecutionException e, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
}
@@ -98,13 +71,13 @@ public class DistributedRPCInvocations {
super(iprot, oprot);
}
- public void result(String id, String result) throws AuthorizationException, org.apache.thrift.TException
+ public void result(java.lang.String id, java.lang.String result) throws AuthorizationException, org.apache.thrift.TException
{
send_result(id, result);
recv_result();
}
- public void send_result(String id, String result) throws org.apache.thrift.TException
+ public void send_result(java.lang.String id, java.lang.String result) throws org.apache.thrift.TException
{
result_args args = new result_args();
args.set_id(id);
@@ -122,13 +95,13 @@ public class DistributedRPCInvocations {
return;
}
- public DRPCRequest fetchRequest(String functionName) throws AuthorizationException, org.apache.thrift.TException
+ public DRPCRequest fetchRequest(java.lang.String functionName) throws AuthorizationException, org.apache.thrift.TException
{
send_fetchRequest(functionName);
return recv_fetchRequest();
}
- public void send_fetchRequest(String functionName) throws org.apache.thrift.TException
+ public void send_fetchRequest(java.lang.String functionName) throws org.apache.thrift.TException
{
fetchRequest_args args = new fetchRequest_args();
args.set_functionName(functionName);
@@ -148,13 +121,13 @@ public class DistributedRPCInvocations {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchRequest failed: unknown result");
}
- public void failRequest(String id) throws AuthorizationException, org.apache.thrift.TException
+ public void failRequest(java.lang.String id) throws AuthorizationException, org.apache.thrift.TException
{
send_failRequest(id);
recv_failRequest();
}
- public void send_failRequest(String id) throws org.apache.thrift.TException
+ public void send_failRequest(java.lang.String id) throws org.apache.thrift.TException
{
failRequest_args args = new failRequest_args();
args.set_id(id);
@@ -171,13 +144,13 @@ public class DistributedRPCInvocations {
return;
}
- public void failRequestV2(String id, DRPCExecutionException e) throws AuthorizationException, org.apache.thrift.TException
+ public void failRequestV2(java.lang.String id, DRPCExecutionException e) throws AuthorizationException, org.apache.thrift.TException
{
send_failRequestV2(id, e);
recv_failRequestV2();
}
- public void send_failRequestV2(String id, DRPCExecutionException e) throws org.apache.thrift.TException
+ public void send_failRequestV2(java.lang.String id, DRPCExecutionException e) throws org.apache.thrift.TException
{
failRequestV2_args args = new failRequestV2_args();
args.set_id(id);
@@ -213,17 +186,17 @@ public class DistributedRPCInvocations {
super(protocolFactory, clientManager, transport);
}
- public void result(String id, String result, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void result(java.lang.String id, java.lang.String result, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
result_call method_call = new result_call(id, result, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class result_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String id;
- private String result;
- public result_call(String id, String result, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class result_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String id;
+ private java.lang.String result;
+ public result_call(java.lang.String id, java.lang.String result, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.id = id;
this.result = result;
@@ -238,26 +211,26 @@ public class DistributedRPCInvocations {
prot.writeMessageEnd();
}
- public void getResult() throws AuthorizationException, org.apache.thrift.TException {
+ public Void getResult() throws AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_result();
+ return null;
}
}
- public void fetchRequest(String functionName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void fetchRequest(java.lang.String functionName, org.apache.thrift.async.AsyncMethodCallback<DRPCRequest> resultHandler) throws org.apache.thrift.TException {
checkReady();
fetchRequest_call method_call = new fetchRequest_call(functionName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class fetchRequest_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String functionName;
- public fetchRequest_call(String functionName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class fetchRequest_call extends org.apache.thrift.async.TAsyncMethodCall<DRPCRequest> {
+ private java.lang.String functionName;
+ public fetchRequest_call(java.lang.String functionName, org.apache.thrift.async.AsyncMethodCallback<DRPCRequest> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.functionName = functionName;
}
@@ -272,7 +245,7 @@ public class DistributedRPCInvocations {
public DRPCRequest getResult() throws AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -280,16 +253,16 @@ public class DistributedRPCInvocations {
}
}
- public void failRequest(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void failRequest(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
failRequest_call method_call = new failRequest_call(id, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class failRequest_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String id;
- public failRequest_call(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class failRequest_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String id;
+ public failRequest_call(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.id = id;
}
@@ -302,27 +275,27 @@ public class DistributedRPCInvocations {
prot.writeMessageEnd();
}
- public void getResult() throws AuthorizationException, org.apache.thrift.TException {
+ public Void getResult() throws AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_failRequest();
+ return null;
}
}
- public void failRequestV2(String id, DRPCExecutionException e, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void failRequestV2(java.lang.String id, DRPCExecutionException e, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
failRequestV2_call method_call = new failRequestV2_call(id, e, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class failRequestV2_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String id;
+ public static class failRequestV2_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String id;
private DRPCExecutionException e;
- public failRequestV2_call(String id, DRPCExecutionException e, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public failRequestV2_call(java.lang.String id, DRPCExecutionException e, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.id = id;
this.e = e;
@@ -337,29 +310,29 @@ public class DistributedRPCInvocations {
prot.writeMessageEnd();
}
- public void getResult() throws AuthorizationException, org.apache.thrift.TException {
+ public Void getResult() throws AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_failRequestV2();
+ return null;
}
}
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("result", new result());
processMap.put("fetchRequest", new fetchRequest());
processMap.put("failRequest", new failRequest());
@@ -380,6 +353,11 @@ public class DistributedRPCInvocations {
return false;
}
+ @Override
+ protected boolean handleRuntimeExceptions() {
+ return false;
+ }
+
public result_result getResult(I iface, result_args args) throws org.apache.thrift.TException {
result_result result = new result_result();
try {
@@ -404,6 +382,11 @@ public class DistributedRPCInvocations {
return false;
}
+ @Override
+ protected boolean handleRuntimeExceptions() {
+ return false;
+ }
+
public fetchRequest_result getResult(I iface, fetchRequest_args args) throws org.apache.thrift.TException {
fetchRequest_result result = new fetchRequest_result();
try {
@@ -428,6 +411,11 @@ public class DistributedRPCInvocations {
return false;
}
+ @Override
+ protected boolean handleRuntimeExceptions() {
+ return false;
+ }
+
public failRequest_result getResult(I iface, failRequest_args args) throws org.apache.thrift.TException {
failRequest_result result = new failRequest_result();
try {
@@ -452,6 +440,11 @@ public class DistributedRPCInvocations {
return false;
}
+ @Override
+ protected boolean handleRuntimeExceptions() {
+ return false;
+ }
+
public failRequestV2_result getResult(I iface, failRequestV2_args args) throws org.apache.thrift.TException {
failRequestV2_result result = new failRequestV2_result();
try {
@@ -466,16 +459,16 @@ public class DistributedRPCInvocations {
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("result", new result());
processMap.put("fetchRequest", new fetchRequest());
processMap.put("failRequest", new failRequest());
@@ -492,40 +485,48 @@ public class DistributedRPCInvocations {
return new result_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
result_result result = new result_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.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);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
result_result result = new result_result();
if (e instanceof AuthorizationException) {
- result.aze = (AuthorizationException) e;
- result.set_aze_isSet(true);
- msg = result;
- }
- else
- {
+ result.aze = (AuthorizationException) e;
+ result.set_aze_isSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
@@ -534,7 +535,7 @@ public class DistributedRPCInvocations {
return false;
}
- public void start(I iface, result_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ public void start(I iface, result_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.result(args.id, args.result,resultHandler);
}
}
@@ -548,41 +549,49 @@ public class DistributedRPCInvocations {
return new fetchRequest_args();
}
- public AsyncMethodCallback<DRPCRequest> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<DRPCRequest> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<DRPCRequest>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<DRPCRequest>() {
public void onComplete(DRPCRequest o) {
fetchRequest_result result = new fetchRequest_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.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);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
fetchRequest_result result = new fetchRequest_result();
if (e instanceof AuthorizationException) {
- result.aze = (AuthorizationException) e;
- result.set_aze_isSet(true);
- msg = result;
- }
- else
- {
+ result.aze = (AuthorizationException) e;
+ result.set_aze_isSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
@@ -591,7 +600,7 @@ public class DistributedRPCInvocations {
return false;
}
- public void start(I iface, fetchRequest_args args, org.apache.thrift.async.AsyncMethodCallback<DRPCRequest> resultHandler) throws TException {
+ public void start(I iface, fetchRequest_args args, org.apache.thrift.async.AsyncMethodCallback<DRPCRequest> resultHandler) throws org.apache.thrift.TException {
iface.fetchRequest(args.functionName,resultHandler);
}
}
@@ -605,40 +614,48 @@ public class DistributedRPCInvocations {
return new failRequest_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
failRequest_result result = new failRequest_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.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);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
failRequest_result result = new failRequest_result();
if (e instanceof AuthorizationException) {
- result.aze = (AuthorizationException) e;
- result.set_aze_isSet(true);
- msg = result;
- }
- else
- {
+ result.aze = (AuthorizationException) e;
+ result.set_aze_isSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
@@ -647,7 +664,7 @@ public class DistributedRPCInvocations {
return false;
}
- public void start(I iface, failRequest_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ public void start(I iface, failRequest_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.failRequest(args.id,resultHandler);
}
}
@@ -661,40 +678,48 @@ public class DistributedRPCInvocations {
return new failRequestV2_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
failRequestV2_result result = new failRequestV2_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.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);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
failRequestV2_result result = new failRequestV2_result();
if (e instanceof AuthorizationException) {
- result.aze = (AuthorizationException) e;
- result.set_aze_isSet(true);
- msg = result;
- }
- else
- {
+ result.aze = (AuthorizationException) e;
+ result.set_aze_isSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
@@ -703,7 +728,7 @@ public class DistributedRPCInvocations {
return false;
}
- public void start(I iface, failRequestV2_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ public void start(I iface, failRequestV2_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.failRequestV2(args.id, args.e,resultHandler);
}
}
@@ -716,24 +741,21 @@ public class DistributedRPCInvocations {
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new result_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new result_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new result_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new result_argsTupleSchemeFactory();
- private String id; // required
- private String result; // required
+ private java.lang.String id; // required
+ private java.lang.String result; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ID((short)1, "id"),
RESULT((short)2, "result");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -758,21 +780,21 @@ public class DistributedRPCInvocations {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -781,20 +803,20 @@ public class DistributedRPCInvocations {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(result_args.class, metaDataMap);
}
@@ -802,8 +824,8 @@ public class DistributedRPCInvocations {
}
public result_args(
- String id,
- String result)
+ java.lang.String id,
+ java.lang.String result)
{
this();
this.id = id;
@@ -832,11 +854,11 @@ public class DistributedRPCInvocations {
this.result = null;
}
- public String get_id() {
+ public java.lang.String get_id() {
return this.id;
}
- public void set_id(String id) {
+ public void set_id(java.lang.String id) {
this.id = id;
}
@@ -855,11 +877,11 @@ public class DistributedRPCInvocations {
}
}
- public String get_result() {
+ public java.lang.String get_result() {
return this.result;
}
- public void set_result(String result) {
+ public void set_result(java.lang.String result) {
this.result = result;
}
@@ -878,13 +900,13 @@ public class DistributedRPCInvocations {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ID:
if (value == null) {
unset_id();
} else {
- set_id((String)value);
+ set_id((java.lang.String)value);
}
break;
@@ -892,14 +914,14 @@ public class DistributedRPCInvocations {
if (value == null) {
unset_result();
} else {
- set_result((String)value);
+ set_result((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return get_id();
@@ -908,13 +930,13 @@ public class DistributedRPCInvocations {
return get_result();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -923,11 +945,11 @@ public class DistributedRPCInvocations {
case RESULT:
return is_set_result();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof result_args)
@@ -938,6 +960,8 @@ public class DistributedRPCInvocations {
public boolean equals(result_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_id = true && this.is_set_id();
boolean that_present_id = true && that.is_set_id();
@@ -962,19 +986,17 @@ public class DistributedRPCInvocations {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_id = true && (is_set_id());
- list.add(present_id);
- if (present_id)
- list.add(id);
+ hashCode = hashCode * 8191 + ((is_set_id()) ? 131071 : 524287);
+ if (is_set_id())
+ hashCode = hashCode * 8191 + id.hashCode();
- boolean present_result = true && (is_set_result());
- list.add(present_result);
- if (present_result)
- list.add(result);
+ hashCode = hashCode * 8191 + ((is_set_result()) ? 131071 : 524287);
+ if (is_set_result())
+ hashCode = hashCode * 8191 + result.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -985,7 +1007,7 @@ public class DistributedRPCInvocations {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -995,7 +1017,7 @@ public class DistributedRPCInvocations {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_result()).compareTo(other.is_set_result());
+ lastComparison = java.lang.Boolean.valueOf(is_set_result()).compareTo(other.is_set_result());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1013,16 +1035,16 @@ public class DistributedRPCInvocations {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("result_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("result_args(");
boolean first = true;
sb.append("id:");
@@ -1057,7 +1079,7 @@ public class DistributedRPCInvocations {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -1065,13 +1087,13 @@ public class DistributedRPCInvocations {
}
}
- private static class result_argsStandardSchemeFactory implements SchemeFactory {
+ private static class result_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public result_argsStandardScheme getScheme() {
return new result_argsStandardScheme();
}
}
- private static class result_argsStandardScheme extends StandardScheme<result_args> {
+ private static class result_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<result_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, result_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1128,18 +1150,18 @@ public class DistributedRPCInvocations {
}
- private static class result_argsTupleSchemeFactory implements SchemeFactory {
+ private static class result_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public result_argsTupleScheme getScheme() {
return new result_argsTupleScheme();
}
}
- private static class result_argsTupleScheme extends TupleScheme<result_args> {
+ private static class result_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<result_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, result_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_id()) {
optionals.set(0);
}
@@ -1157,8 +1179,8 @@ public class DistributedRPCInvocations {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, result_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.id = iprot.readString();
struct.set_id_isSet(true);
@@ -1170,6 +1192,9 @@ public class DistributedRPCInvocations {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
public static class result_result implements org.apache.thrift.TBase<result_result, result_result._Fields>, java.io.Serializable, Cloneable, Comparable<result_result> {
@@ -1177,11 +1202,8 @@ public class DistributedRPCInvocations {
private static final org.apache.thrift.protocol.TField AZE_FIELD_DESC = new org.apache.thrift.protocol.TField("aze", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new result_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new result_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new result_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new result_resultTupleSchemeFactory();
private AuthorizationException aze; // required
@@ -1189,10 +1211,10 @@ public class DistributedRPCInvocations {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AZE((short)1, "aze");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -1215,21 +1237,21 @@ public class DistributedRPCInvocations {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -1238,18 +1260,18 @@ public class DistributedRPCInvocations {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AZE, new org.apache.thrift.meta_data.FieldMetaData("aze", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AuthorizationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(result_result.class, metaDataMap);
}
@@ -1304,7 +1326,7 @@ public class DistributedRPCInvocations {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AZE:
if (value == null) {
@@ -1317,30 +1339,30 @@ public class DistributedRPCInvocations {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AZE:
return get_aze();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AZE:
return is_set_aze();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof result_result)
@@ -1351,6 +1373,8 @@ public class DistributedRPCInvocations {
public boolean equals(result_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_aze = true && this.is_set_aze();
boolean that_present_aze = true && that.is_set_aze();
@@ -1366,14 +1390,13 @@ public class DistributedRPCInvocations {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_aze = true && (is_set_aze());
- list.add(present_aze);
- if (present_aze)
- list.add(aze);
+ hashCode = hashCode * 8191 + ((is_set_aze()) ? 131071 : 524287);
+ if (is_set_aze())
+ hashCode = hashCode * 8191 + aze.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1384,7 +1407,7 @@ public class DistributedRPCInvocations {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze());
+ lastComparison = java.lang.Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1402,16 +1425,16 @@ public class DistributedRPCInvocations {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("result_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("result_result(");
boolean first = true;
sb.append("aze:");
@@ -1438,7 +1461,7 @@ public class DistributedRPCInvocations {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -1446,13 +1469,13 @@ public class DistributedRPCInvocations {
}
}
- private static class result_resultStandardSchemeFactory implements SchemeFactory {
+ private static class result_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public result_resultStandardScheme getScheme() {
return new result_resultStandardScheme();
}
}
- private static class result_resultStandardScheme extends StandardScheme<result_result> {
+ private static class result_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<result_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, result_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1497,18 +1520,18 @@ public class DistributedRPCInvocations {
}
- private static class result_resultTupleSchemeFactory implements SchemeFactory {
+ private static class result_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public result_resultTupleScheme getScheme() {
return new result_resultTupleScheme();
}
}
- private static class result_resultTupleScheme extends TupleScheme<result_result> {
+ private static class result_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<result_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, result_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_aze()) {
optionals.set(0);
}
@@ -1520,8 +1543,8 @@ public class DistributedRPCInvocations {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, result_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.aze = new AuthorizationException();
struct.aze.read(iprot);
@@ -1530,6 +1553,9 @@ public class DistributedRPCInvocations {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
public static class fetchRequest_args implements org.apache.thrift.TBase<fetchRequest_args, fetchRequest_args._Fields>, java.io.Serializable, Cloneable, Comparable<fetchRequest_args> {
@@ -1537,22 +1563,19 @@ public class DistributedRPCInvocations {
private static final org.apache.thrift.protocol.TField FUNCTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("functionName", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new fetchRequest_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new fetchRequest_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchRequest_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchRequest_argsTupleSchemeFactory();
- private String functionName; // required
+ private java.lang.String functionName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
FUNCTION_NAME((short)1, "functionName");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -1575,21 +1598,21 @@ public class DistributedRPCInvocations {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -1598,18 +1621,18 @@ public class DistributedRPCInvocations {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.FUNCTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("functionName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchRequest_args.class, metaDataMap);
}
@@ -1617,7 +1640,7 @@ public class DistributedRPCInvocations {
}
public fetchRequest_args(
- String functionName)
+ java.lang.String functionName)
{
this();
this.functionName = functionName;
@@ -1641,11 +1664,11 @@ public class DistributedRPCInvocations {
this.functionName = null;
}
- public String get_functionName() {
+ public java.lang.String get_functionName() {
return this.functionName;
}
- public void set_functionName(String functionName) {
+ public void set_functionName(java.lang.String functionName) {
this.functionName = functionName;
}
@@ -1664,43 +1687,43 @@ public class DistributedRPCInvocations {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case FUNCTION_NAME:
if (value == null) {
unset_functionName();
} else {
- set_functionName((String)value);
+ set_functionName((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case FUNCTION_NAME:
return get_functionName();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case FUNCTION_NAME:
return is_set_functionName();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof fetchRequest_args)
@@ -1711,6 +1734,8 @@ public class DistributedRPCInvocations {
public boolean equals(fetchRequest_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_functionName = true && this.is_set_functionName();
boolean that_present_functionName = true && that.is_set_functionName();
@@ -1726,14 +1751,13 @@ public class DistributedRPCInvocations {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_functionName = true && (is_set_functionName());
- list.add(present_functionName);
- if (present_functionName)
- list.add(functionName);
+ hashCode = hashCode * 8191 + ((is_set_functionName()) ? 131071 : 524287);
+ if (is_set_functionName())
+ hashCode = hashCode * 8191 + functionName.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1744,7 +1768,7 @@ public class DistributedRPCInvocations {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_functionName()).compareTo(other.is_set_functionName());
+ lastComparison = java.lang.Boolean.valueOf(is_set_functionName()).compareTo(other.is_set_functionName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1762,16 +1786,16 @@ public class DistributedRPCInvocations {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("fetchRequest_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchRequest_args(");
boolean first = true;
sb.append("functionName:");
@@ -1798,7 +1822,7 @@ public class DistributedRPCInvocations {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -1806,13 +1830,13 @@ public class DistributedRPCInvocations {
}
}
- private static class fetchRequest_argsStandardSchemeFactory implements SchemeFactory {
+ private static class fetchRequest_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public fetchRequest_argsStandardScheme getScheme() {
return new fetchRequest_argsStandardScheme();
}
}
- private static class fetchRequest_argsStandardScheme extends StandardScheme<fetchRequest_args> {
+ private static class fetchRequest_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<fetchRequest_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, fetchRequest_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1856,18 +1880,18 @@ public class DistributedRPCInvocations {
}
- private static class fetchRequest_argsTupleSchemeFactory implements SchemeFactory {
+ private static class fetchRequest_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public fetchRequest_argsTupleScheme getScheme() {
return new fetchRequest_argsTupleScheme();
}
}
- private static class fetchRequest_argsTupleScheme extends TupleScheme<fetchRequest_args> {
+ private static class fetchRequest_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<fetchRequest_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, fetchRequest_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_functionName()) {
optionals.set(0);
}
@@ -1879,8 +1903,8 @@ public class DistributedRPCInvocations {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, fetchRequest_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.functionName = iprot.readString();
struct.set_functionName_isSet(true);
@@ -1888,6 +1912,9 @@ public class DistributedRPCInvocations {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
public static class fetchRequest_result implements org.apache.thrift.TBase<fetchRequest_result, fetchRequest_result._Fields>, java.io.Serializable, Cloneable, Comparable<fetchRequest_result> {
@@ -1896,11 +1923,8 @@ public class DistributedRPCInvocations {
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField AZE_FIELD_DESC = new org.apache.thrift.protocol.TField("aze", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new fetchRequest_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new fetchRequest_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchRequest_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchRequest_resultTupleSchemeFactory();
private DRPCRequest success; // required
private AuthorizationException aze; // required
@@ -1910,10 +1934,10 @@ public class DistributedRPCInvocations {
SUCCESS((short)0, "success"),
AZE((short)1, "aze");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -1938,21 +1962,21 @@ public class DistributedRPCInvocations {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -1961,20 +1985,20 @@ public class DistributedRPCInvocations {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DRPCRequest.class)));
tmpMap.put(_Fields.AZE, new org.apache.thrift.meta_data.FieldMetaData("aze", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AuthorizationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchRequest_result.class, metaDataMap);
}
@@ -2058,7 +2082,7 @@ public class DistributedRPCInvocations {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -2079,7 +2103,7 @@ public class DistributedRPCInvocations {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
@@ -2088,13 +2112,13 @@ public class DistributedRPCInvocations {
return get_aze();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -2103,11 +2127,11 @@ public class DistributedRPCInvocations {
case AZE:
return is_set_aze();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof fetchRequest_result)
@@ -2118,6 +2142,8 @@ public class DistributedRPCInvocations {
public boolean equals(fetchRequest_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();
@@ -2142,19 +2168,17 @@ public class DistributedRPCInvocations {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (is_set_success());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((is_set_success()) ? 131071 : 524287);
+ if (is_set_success())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_aze = true && (is_set_aze());
- list.add(present_aze);
- if (present_aze)
- list.add(aze);
+ hashCode = hashCode * 8191 + ((is_set_aze()) ? 131071 : 524287);
+ if (is_set_aze())
+ hashCode = hashCode * 8191 + aze.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -2165,7 +2189,7 @@ public class DistributedRPCInvocations {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());
+ lastComparison = java.lang.Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2175,7 +2199,7 @@ public class DistributedRPCInvocations {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze());
+ lastComparison = java.lang.Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2193,16 +2217,16 @@ public class DistributedRPCInvocations {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("fetchRequest_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchRequest_result(");
boolean first = true;
sb.append("success:");
@@ -2240,7 +2264,7 @@ public class DistributedRPCInvocations {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -2248,13 +2272,13 @@ public class DistributedRPCInvocations {
}
}
- private static class fetchRequest_resultStandardSchemeFactory implements SchemeFactory {
+ private static class fetchRequest_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public fetchRequest_resultStandardScheme getScheme() {
return new fetchRequest_resultStandardScheme();
}
}
- private static class fetchRequest_resultStandardScheme extends StandardScheme<fetchRequest_result> {
+ private static class fetchRequest_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<fetchRequest_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, fetchRequest_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -2313,18 +2337,18 @@ public class DistributedRPCInvocations {
}
- private static class fetchRequest_resultTupleSchemeFactory implements SchemeFactory {
+ private static class fetchRequest_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public fetchRequest_resultTupleScheme getScheme() {
return new fetchRequest_resultTupleScheme();
}
}
- private static class fetchRequest_resultTupleScheme extends TupleScheme<fetchRequest_result> {
+ private static class fetchRequest_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<fetchRequest_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, fetchRequest_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_success()) {
optionals.set(0);
}
@@ -2342,8 +2366,8 @@ public class DistributedRPCInvocations {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, fetchRequest_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new DRPCRequest();
struct.success.read(iprot);
@@ -2357,6 +2381,9 @@ public class DistributedRPCInvocations {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
public static class failRequest_args implements org.apache.thrift.TBase<failRequest_args, failRequest_args._Fields>, java.io.Serializable, Cloneable, Comparable<failRequest_args> {
@@ -2364,22 +2391,19 @@ public class DistributedRPCInvocations {
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new failRequest_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new failRequest_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new failRequest_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new failRequest_argsTupleSchemeFactory();
- private String id; // required
+ private java.lang.String id; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ID((short)1, "id");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -2402,21 +2426,21 @@ public class DistributedRPCInvocations {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
<TRUNCATED>
[21/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ProfileRequest.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ProfileRequest.java b/storm-client/src/jvm/org/apache/storm/generated/ProfileRequest.java
index 1189175..a335083 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ProfileRequest.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ProfileRequest.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, ProfileRequest._Fields>, java.io.Serializable, Cloneable, Comparable<ProfileRequest> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProfileRequest");
@@ -59,11 +32,8 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
private static final org.apache.thrift.protocol.TField ACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("action", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField TIME_STAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("time_stamp", org.apache.thrift.protocol.TType.I64, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ProfileRequestStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ProfileRequestTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ProfileRequestStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ProfileRequestTupleSchemeFactory();
private NodeInfo nodeInfo; // required
private ProfileAction action; // required
@@ -79,10 +49,10 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
ACTION((short)2, "action"),
TIME_STAMP((short)3, "time_stamp");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -109,21 +79,21 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -132,7 +102,7 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -141,16 +111,16 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
private static final int __TIME_STAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.TIME_STAMP};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NODE_INFO, new org.apache.thrift.meta_data.FieldMetaData("nodeInfo", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NodeInfo.class)));
tmpMap.put(_Fields.ACTION, new org.apache.thrift.meta_data.FieldMetaData("action", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ProfileAction.class)));
tmpMap.put(_Fields.TIME_STAMP, new org.apache.thrift.meta_data.FieldMetaData("time_stamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ProfileRequest.class, metaDataMap);
}
@@ -256,19 +226,19 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
}
public void unset_time_stamp() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIME_STAMP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_STAMP_ISSET_ID);
}
/** Returns true if field time_stamp is set (has been assigned a value) and false otherwise */
public boolean is_set_time_stamp() {
- return EncodingUtils.testBit(__isset_bitfield, __TIME_STAMP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_STAMP_ISSET_ID);
}
public void set_time_stamp_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIME_STAMP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_STAMP_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case NODE_INFO:
if (value == null) {
@@ -290,14 +260,14 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
if (value == null) {
unset_time_stamp();
} else {
- set_time_stamp((Long)value);
+ set_time_stamp((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NODE_INFO:
return get_nodeInfo();
@@ -309,13 +279,13 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
return get_time_stamp();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -326,11 +296,11 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
case TIME_STAMP:
return is_set_time_stamp();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ProfileRequest)
@@ -341,6 +311,8 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
public boolean equals(ProfileRequest that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_nodeInfo = true && this.is_set_nodeInfo();
boolean that_present_nodeInfo = true && that.is_set_nodeInfo();
@@ -374,24 +346,21 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_nodeInfo = true && (is_set_nodeInfo());
- list.add(present_nodeInfo);
- if (present_nodeInfo)
- list.add(nodeInfo);
+ hashCode = hashCode * 8191 + ((is_set_nodeInfo()) ? 131071 : 524287);
+ if (is_set_nodeInfo())
+ hashCode = hashCode * 8191 + nodeInfo.hashCode();
- boolean present_action = true && (is_set_action());
- list.add(present_action);
- if (present_action)
- list.add(action.getValue());
+ hashCode = hashCode * 8191 + ((is_set_action()) ? 131071 : 524287);
+ if (is_set_action())
+ hashCode = hashCode * 8191 + action.getValue();
- boolean present_time_stamp = true && (is_set_time_stamp());
- list.add(present_time_stamp);
- if (present_time_stamp)
- list.add(time_stamp);
+ hashCode = hashCode * 8191 + ((is_set_time_stamp()) ? 131071 : 524287);
+ if (is_set_time_stamp())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(time_stamp);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -402,7 +371,7 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_nodeInfo()).compareTo(other.is_set_nodeInfo());
+ lastComparison = java.lang.Boolean.valueOf(is_set_nodeInfo()).compareTo(other.is_set_nodeInfo());
if (lastComparison != 0) {
return lastComparison;
}
@@ -412,7 +381,7 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_action()).compareTo(other.is_set_action());
+ lastComparison = java.lang.Boolean.valueOf(is_set_action()).compareTo(other.is_set_action());
if (lastComparison != 0) {
return lastComparison;
}
@@ -422,7 +391,7 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_time_stamp()).compareTo(other.is_set_time_stamp());
+ lastComparison = java.lang.Boolean.valueOf(is_set_time_stamp()).compareTo(other.is_set_time_stamp());
if (lastComparison != 0) {
return lastComparison;
}
@@ -440,16 +409,16 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ProfileRequest(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ProfileRequest(");
boolean first = true;
sb.append("nodeInfo:");
@@ -501,7 +470,7 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -511,13 +480,13 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
}
}
- private static class ProfileRequestStandardSchemeFactory implements SchemeFactory {
+ private static class ProfileRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ProfileRequestStandardScheme getScheme() {
return new ProfileRequestStandardScheme();
}
}
- private static class ProfileRequestStandardScheme extends StandardScheme<ProfileRequest> {
+ private static class ProfileRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<ProfileRequest> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ProfileRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -588,20 +557,20 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
}
- private static class ProfileRequestTupleSchemeFactory implements SchemeFactory {
+ private static class ProfileRequestTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ProfileRequestTupleScheme getScheme() {
return new ProfileRequestTupleScheme();
}
}
- private static class ProfileRequestTupleScheme extends TupleScheme<ProfileRequest> {
+ private static class ProfileRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<ProfileRequest> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ProfileRequest struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.nodeInfo.write(oprot);
oprot.writeI32(struct.action.getValue());
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_time_stamp()) {
optionals.set(0);
}
@@ -613,13 +582,13 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ProfileRequest struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.nodeInfo = new NodeInfo();
struct.nodeInfo.read(iprot);
struct.set_nodeInfo_isSet(true);
struct.action = org.apache.storm.generated.ProfileAction.findByValue(iprot.readI32());
struct.set_action_isSet(true);
- BitSet incoming = iprot.readBitSet(1);
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.time_stamp = iprot.readI64();
struct.set_time_stamp_isSet(true);
@@ -627,5 +596,8 @@ public class ProfileRequest implements org.apache.thrift.TBase<ProfileRequest, P
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ReadableBlobMeta.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ReadableBlobMeta.java b/storm-client/src/jvm/org/apache/storm/generated/ReadableBlobMeta.java
index 0cbd3b8..6488d62 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ReadableBlobMeta.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ReadableBlobMeta.java
@@ -16,53 +16,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMeta, ReadableBlobMeta._Fields>, java.io.Serializable, Cloneable, Comparable<ReadableBlobMeta> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ReadableBlobMeta");
private static final org.apache.thrift.protocol.TField SETTABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("settable", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.I64, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ReadableBlobMetaStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ReadableBlobMetaTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ReadableBlobMetaStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ReadableBlobMetaTupleSchemeFactory();
private SettableBlobMeta settable; // required
private long version; // required
@@ -72,10 +42,10 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
SETTABLE((short)1, "settable"),
VERSION((short)2, "version");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,7 +93,7 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -131,14 +101,14 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
// isset id assignments
private static final int __VERSION_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SETTABLE, new org.apache.thrift.meta_data.FieldMetaData("settable", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SettableBlobMeta.class)));
tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ReadableBlobMeta.class, metaDataMap);
}
@@ -210,19 +180,19 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
}
public void unset_version() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
}
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean is_set_version() {
- return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
}
public void set_version_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SETTABLE:
if (value == null) {
@@ -236,14 +206,14 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
if (value == null) {
unset_version();
} else {
- set_version((Long)value);
+ set_version((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SETTABLE:
return get_settable();
@@ -252,13 +222,13 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
return get_version();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -267,11 +237,11 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
case VERSION:
return is_set_version();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ReadableBlobMeta)
@@ -282,6 +252,8 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
public boolean equals(ReadableBlobMeta that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_settable = true && this.is_set_settable();
boolean that_present_settable = true && that.is_set_settable();
@@ -306,19 +278,15 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_settable = true && (is_set_settable());
- list.add(present_settable);
- if (present_settable)
- list.add(settable);
+ hashCode = hashCode * 8191 + ((is_set_settable()) ? 131071 : 524287);
+ if (is_set_settable())
+ hashCode = hashCode * 8191 + settable.hashCode();
- boolean present_version = true;
- list.add(present_version);
- if (present_version)
- list.add(version);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(version);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -329,7 +297,7 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_settable()).compareTo(other.is_set_settable());
+ lastComparison = java.lang.Boolean.valueOf(is_set_settable()).compareTo(other.is_set_settable());
if (lastComparison != 0) {
return lastComparison;
}
@@ -339,7 +307,7 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -357,16 +325,16 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ReadableBlobMeta(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ReadableBlobMeta(");
boolean first = true;
sb.append("settable:");
@@ -408,7 +376,7 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -418,13 +386,13 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
}
}
- private static class ReadableBlobMetaStandardSchemeFactory implements SchemeFactory {
+ private static class ReadableBlobMetaStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ReadableBlobMetaStandardScheme getScheme() {
return new ReadableBlobMetaStandardScheme();
}
}
- private static class ReadableBlobMetaStandardScheme extends StandardScheme<ReadableBlobMeta> {
+ private static class ReadableBlobMetaStandardScheme extends org.apache.thrift.scheme.StandardScheme<ReadableBlobMeta> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ReadableBlobMeta struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -480,24 +448,24 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
}
- private static class ReadableBlobMetaTupleSchemeFactory implements SchemeFactory {
+ private static class ReadableBlobMetaTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ReadableBlobMetaTupleScheme getScheme() {
return new ReadableBlobMetaTupleScheme();
}
}
- private static class ReadableBlobMetaTupleScheme extends TupleScheme<ReadableBlobMeta> {
+ private static class ReadableBlobMetaTupleScheme extends org.apache.thrift.scheme.TupleScheme<ReadableBlobMeta> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ReadableBlobMeta struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.settable.write(oprot);
oprot.writeI64(struct.version);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ReadableBlobMeta struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.settable = new SettableBlobMeta();
struct.settable.read(iprot);
struct.set_settable_isSet(true);
@@ -506,5 +474,8 @@ public class ReadableBlobMeta implements org.apache.thrift.TBase<ReadableBlobMet
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/RebalanceOptions.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/RebalanceOptions.java b/storm-client/src/jvm/org/apache/storm/generated/RebalanceOptions.java
index 9cd8a2e..3060c90 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/RebalanceOptions.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/RebalanceOptions.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOptions, RebalanceOptions._Fields>, java.io.Serializable, Cloneable, Comparable<RebalanceOptions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RebalanceOptions");
@@ -62,18 +35,15 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
private static final org.apache.thrift.protocol.TField TOPOLOGY_CONF_OVERRIDES_FIELD_DESC = new org.apache.thrift.protocol.TField("topology_conf_overrides", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField PRINCIPAL_FIELD_DESC = new org.apache.thrift.protocol.TField("principal", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new RebalanceOptionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new RebalanceOptionsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new RebalanceOptionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new RebalanceOptionsTupleSchemeFactory();
private int wait_secs; // optional
private int num_workers; // optional
- private Map<String,Integer> num_executors; // optional
- private Map<String,Map<String,Double>> topology_resources_overrides; // optional
- private String topology_conf_overrides; // optional
- private String principal; // optional
+ private java.util.Map<java.lang.String,java.lang.Integer> num_executors; // optional
+ private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> topology_resources_overrides; // optional
+ private java.lang.String topology_conf_overrides; // optional
+ private java.lang.String principal; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -84,10 +54,10 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
TOPOLOGY_CONF_OVERRIDES((short)5, "topology_conf_overrides"),
PRINCIPAL((short)6, "principal");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -120,21 +90,21 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -143,7 +113,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -153,9 +123,9 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
private static final int __NUM_WORKERS_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.WAIT_SECS,_Fields.NUM_WORKERS,_Fields.NUM_EXECUTORS,_Fields.TOPOLOGY_RESOURCES_OVERRIDES,_Fields.TOPOLOGY_CONF_OVERRIDES,_Fields.PRINCIPAL};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.WAIT_SECS, new org.apache.thrift.meta_data.FieldMetaData("wait_secs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.NUM_WORKERS, new org.apache.thrift.meta_data.FieldMetaData("num_workers", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -174,7 +144,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PRINCIPAL, new org.apache.thrift.meta_data.FieldMetaData("principal", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RebalanceOptions.class, metaDataMap);
}
@@ -189,19 +159,19 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
this.wait_secs = other.wait_secs;
this.num_workers = other.num_workers;
if (other.is_set_num_executors()) {
- Map<String,Integer> __this__num_executors = new HashMap<String,Integer>(other.num_executors);
+ java.util.Map<java.lang.String,java.lang.Integer> __this__num_executors = new java.util.HashMap<java.lang.String,java.lang.Integer>(other.num_executors);
this.num_executors = __this__num_executors;
}
if (other.is_set_topology_resources_overrides()) {
- Map<String,Map<String,Double>> __this__topology_resources_overrides = new HashMap<String,Map<String,Double>>(other.topology_resources_overrides.size());
- for (Map.Entry<String, Map<String,Double>> other_element : other.topology_resources_overrides.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> __this__topology_resources_overrides = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>>(other.topology_resources_overrides.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Double>> other_element : other.topology_resources_overrides.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<String,Double> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<java.lang.String,java.lang.Double> other_element_value = other_element.getValue();
- String __this__topology_resources_overrides_copy_key = other_element_key;
+ java.lang.String __this__topology_resources_overrides_copy_key = other_element_key;
- Map<String,Double> __this__topology_resources_overrides_copy_value = new HashMap<String,Double>(other_element_value);
+ java.util.Map<java.lang.String,java.lang.Double> __this__topology_resources_overrides_copy_value = new java.util.HashMap<java.lang.String,java.lang.Double>(other_element_value);
__this__topology_resources_overrides.put(__this__topology_resources_overrides_copy_key, __this__topology_resources_overrides_copy_value);
}
@@ -241,16 +211,16 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
}
public void unset_wait_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WAIT_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WAIT_SECS_ISSET_ID);
}
/** Returns true if field wait_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_wait_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __WAIT_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WAIT_SECS_ISSET_ID);
}
public void set_wait_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WAIT_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WAIT_SECS_ISSET_ID, value);
}
public int get_num_workers() {
@@ -263,34 +233,34 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
}
public void unset_num_workers() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
}
/** Returns true if field num_workers is set (has been assigned a value) and false otherwise */
public boolean is_set_num_workers() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
}
public void set_num_workers_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID, value);
}
public int get_num_executors_size() {
return (this.num_executors == null) ? 0 : this.num_executors.size();
}
- public void put_to_num_executors(String key, int val) {
+ public void put_to_num_executors(java.lang.String key, int val) {
if (this.num_executors == null) {
- this.num_executors = new HashMap<String,Integer>();
+ this.num_executors = new java.util.HashMap<java.lang.String,java.lang.Integer>();
}
this.num_executors.put(key, val);
}
- public Map<String,Integer> get_num_executors() {
+ public java.util.Map<java.lang.String,java.lang.Integer> get_num_executors() {
return this.num_executors;
}
- public void set_num_executors(Map<String,Integer> num_executors) {
+ public void set_num_executors(java.util.Map<java.lang.String,java.lang.Integer> num_executors) {
this.num_executors = num_executors;
}
@@ -313,18 +283,18 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
return (this.topology_resources_overrides == null) ? 0 : this.topology_resources_overrides.size();
}
- public void put_to_topology_resources_overrides(String key, Map<String,Double> val) {
+ public void put_to_topology_resources_overrides(java.lang.String key, java.util.Map<java.lang.String,java.lang.Double> val) {
if (this.topology_resources_overrides == null) {
- this.topology_resources_overrides = new HashMap<String,Map<String,Double>>();
+ this.topology_resources_overrides = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>>();
}
this.topology_resources_overrides.put(key, val);
}
- public Map<String,Map<String,Double>> get_topology_resources_overrides() {
+ public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> get_topology_resources_overrides() {
return this.topology_resources_overrides;
}
- public void set_topology_resources_overrides(Map<String,Map<String,Double>> topology_resources_overrides) {
+ public void set_topology_resources_overrides(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> topology_resources_overrides) {
this.topology_resources_overrides = topology_resources_overrides;
}
@@ -343,11 +313,11 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
}
}
- public String get_topology_conf_overrides() {
+ public java.lang.String get_topology_conf_overrides() {
return this.topology_conf_overrides;
}
- public void set_topology_conf_overrides(String topology_conf_overrides) {
+ public void set_topology_conf_overrides(java.lang.String topology_conf_overrides) {
this.topology_conf_overrides = topology_conf_overrides;
}
@@ -366,11 +336,11 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
}
}
- public String get_principal() {
+ public java.lang.String get_principal() {
return this.principal;
}
- public void set_principal(String principal) {
+ public void set_principal(java.lang.String principal) {
this.principal = principal;
}
@@ -389,13 +359,13 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case WAIT_SECS:
if (value == null) {
unset_wait_secs();
} else {
- set_wait_secs((Integer)value);
+ set_wait_secs((java.lang.Integer)value);
}
break;
@@ -403,7 +373,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
if (value == null) {
unset_num_workers();
} else {
- set_num_workers((Integer)value);
+ set_num_workers((java.lang.Integer)value);
}
break;
@@ -411,7 +381,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
if (value == null) {
unset_num_executors();
} else {
- set_num_executors((Map<String,Integer>)value);
+ set_num_executors((java.util.Map<java.lang.String,java.lang.Integer>)value);
}
break;
@@ -419,7 +389,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
if (value == null) {
unset_topology_resources_overrides();
} else {
- set_topology_resources_overrides((Map<String,Map<String,Double>>)value);
+ set_topology_resources_overrides((java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>>)value);
}
break;
@@ -427,7 +397,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
if (value == null) {
unset_topology_conf_overrides();
} else {
- set_topology_conf_overrides((String)value);
+ set_topology_conf_overrides((java.lang.String)value);
}
break;
@@ -435,14 +405,14 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
if (value == null) {
unset_principal();
} else {
- set_principal((String)value);
+ set_principal((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case WAIT_SECS:
return get_wait_secs();
@@ -463,13 +433,13 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
return get_principal();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -486,11 +456,11 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
case PRINCIPAL:
return is_set_principal();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof RebalanceOptions)
@@ -501,6 +471,8 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
public boolean equals(RebalanceOptions that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_wait_secs = true && this.is_set_wait_secs();
boolean that_present_wait_secs = true && that.is_set_wait_secs();
@@ -561,39 +533,33 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_wait_secs = true && (is_set_wait_secs());
- list.add(present_wait_secs);
- if (present_wait_secs)
- list.add(wait_secs);
-
- boolean present_num_workers = true && (is_set_num_workers());
- list.add(present_num_workers);
- if (present_num_workers)
- list.add(num_workers);
-
- boolean present_num_executors = true && (is_set_num_executors());
- list.add(present_num_executors);
- if (present_num_executors)
- list.add(num_executors);
-
- boolean present_topology_resources_overrides = true && (is_set_topology_resources_overrides());
- list.add(present_topology_resources_overrides);
- if (present_topology_resources_overrides)
- list.add(topology_resources_overrides);
-
- boolean present_topology_conf_overrides = true && (is_set_topology_conf_overrides());
- list.add(present_topology_conf_overrides);
- if (present_topology_conf_overrides)
- list.add(topology_conf_overrides);
-
- boolean present_principal = true && (is_set_principal());
- list.add(present_principal);
- if (present_principal)
- list.add(principal);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((is_set_wait_secs()) ? 131071 : 524287);
+ if (is_set_wait_secs())
+ hashCode = hashCode * 8191 + wait_secs;
+
+ hashCode = hashCode * 8191 + ((is_set_num_workers()) ? 131071 : 524287);
+ if (is_set_num_workers())
+ hashCode = hashCode * 8191 + num_workers;
+
+ hashCode = hashCode * 8191 + ((is_set_num_executors()) ? 131071 : 524287);
+ if (is_set_num_executors())
+ hashCode = hashCode * 8191 + num_executors.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_topology_resources_overrides()) ? 131071 : 524287);
+ if (is_set_topology_resources_overrides())
+ hashCode = hashCode * 8191 + topology_resources_overrides.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_topology_conf_overrides()) ? 131071 : 524287);
+ if (is_set_topology_conf_overrides())
+ hashCode = hashCode * 8191 + topology_conf_overrides.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_principal()) ? 131071 : 524287);
+ if (is_set_principal())
+ hashCode = hashCode * 8191 + principal.hashCode();
+
+ return hashCode;
}
@Override
@@ -604,7 +570,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_wait_secs()).compareTo(other.is_set_wait_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_wait_secs()).compareTo(other.is_set_wait_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -614,7 +580,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_workers()).compareTo(other.is_set_num_workers());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_workers()).compareTo(other.is_set_num_workers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -624,7 +590,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_executors()).compareTo(other.is_set_num_executors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_executors()).compareTo(other.is_set_num_executors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -634,7 +600,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_resources_overrides()).compareTo(other.is_set_topology_resources_overrides());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_resources_overrides()).compareTo(other.is_set_topology_resources_overrides());
if (lastComparison != 0) {
return lastComparison;
}
@@ -644,7 +610,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_conf_overrides()).compareTo(other.is_set_topology_conf_overrides());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_conf_overrides()).compareTo(other.is_set_topology_conf_overrides());
if (lastComparison != 0) {
return lastComparison;
}
@@ -654,7 +620,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_principal()).compareTo(other.is_set_principal());
+ lastComparison = java.lang.Boolean.valueOf(is_set_principal()).compareTo(other.is_set_principal());
if (lastComparison != 0) {
return lastComparison;
}
@@ -672,16 +638,16 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("RebalanceOptions(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("RebalanceOptions(");
boolean first = true;
if (is_set_wait_secs()) {
@@ -752,7 +718,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -762,13 +728,13 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
}
}
- private static class RebalanceOptionsStandardSchemeFactory implements SchemeFactory {
+ private static class RebalanceOptionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RebalanceOptionsStandardScheme getScheme() {
return new RebalanceOptionsStandardScheme();
}
}
- private static class RebalanceOptionsStandardScheme extends StandardScheme<RebalanceOptions> {
+ private static class RebalanceOptionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<RebalanceOptions> {
public void read(org.apache.thrift.protocol.TProtocol iprot, RebalanceOptions struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -800,8 +766,8 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map566 = iprot.readMapBegin();
- struct.num_executors = new HashMap<String,Integer>(2*_map566.size);
- String _key567;
+ struct.num_executors = new java.util.HashMap<java.lang.String,java.lang.Integer>(2*_map566.size);
+ java.lang.String _key567;
int _val568;
for (int _i569 = 0; _i569 < _map566.size; ++_i569)
{
@@ -820,16 +786,16 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map570 = iprot.readMapBegin();
- struct.topology_resources_overrides = new HashMap<String,Map<String,Double>>(2*_map570.size);
- String _key571;
- Map<String,Double> _val572;
+ struct.topology_resources_overrides = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>>(2*_map570.size);
+ java.lang.String _key571;
+ java.util.Map<java.lang.String,java.lang.Double> _val572;
for (int _i573 = 0; _i573 < _map570.size; ++_i573)
{
_key571 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map574 = iprot.readMapBegin();
- _val572 = new HashMap<String,Double>(2*_map574.size);
- String _key575;
+ _val572 = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map574.size);
+ java.lang.String _key575;
double _val576;
for (int _i577 = 0; _i577 < _map574.size; ++_i577)
{
@@ -892,7 +858,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
oprot.writeFieldBegin(NUM_EXECUTORS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.num_executors.size()));
- for (Map.Entry<String, Integer> _iter578 : struct.num_executors.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Integer> _iter578 : struct.num_executors.entrySet())
{
oprot.writeString(_iter578.getKey());
oprot.writeI32(_iter578.getValue());
@@ -907,12 +873,12 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
oprot.writeFieldBegin(TOPOLOGY_RESOURCES_OVERRIDES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.topology_resources_overrides.size()));
- for (Map.Entry<String, Map<String,Double>> _iter579 : struct.topology_resources_overrides.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Double>> _iter579 : struct.topology_resources_overrides.entrySet())
{
oprot.writeString(_iter579.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, _iter579.getValue().size()));
- for (Map.Entry<String, Double> _iter580 : _iter579.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter580 : _iter579.getValue().entrySet())
{
oprot.writeString(_iter580.getKey());
oprot.writeDouble(_iter580.getValue());
@@ -945,18 +911,18 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
}
- private static class RebalanceOptionsTupleSchemeFactory implements SchemeFactory {
+ private static class RebalanceOptionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RebalanceOptionsTupleScheme getScheme() {
return new RebalanceOptionsTupleScheme();
}
}
- private static class RebalanceOptionsTupleScheme extends TupleScheme<RebalanceOptions> {
+ private static class RebalanceOptionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<RebalanceOptions> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RebalanceOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_wait_secs()) {
optionals.set(0);
}
@@ -985,7 +951,7 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
if (struct.is_set_num_executors()) {
{
oprot.writeI32(struct.num_executors.size());
- for (Map.Entry<String, Integer> _iter581 : struct.num_executors.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Integer> _iter581 : struct.num_executors.entrySet())
{
oprot.writeString(_iter581.getKey());
oprot.writeI32(_iter581.getValue());
@@ -995,12 +961,12 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
if (struct.is_set_topology_resources_overrides()) {
{
oprot.writeI32(struct.topology_resources_overrides.size());
- for (Map.Entry<String, Map<String,Double>> _iter582 : struct.topology_resources_overrides.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Double>> _iter582 : struct.topology_resources_overrides.entrySet())
{
oprot.writeString(_iter582.getKey());
{
oprot.writeI32(_iter582.getValue().size());
- for (Map.Entry<String, Double> _iter583 : _iter582.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter583 : _iter582.getValue().entrySet())
{
oprot.writeString(_iter583.getKey());
oprot.writeDouble(_iter583.getValue());
@@ -1019,8 +985,8 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, RebalanceOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(6);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.wait_secs = iprot.readI32();
struct.set_wait_secs_isSet(true);
@@ -1032,8 +998,8 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TMap _map584 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.num_executors = new HashMap<String,Integer>(2*_map584.size);
- String _key585;
+ struct.num_executors = new java.util.HashMap<java.lang.String,java.lang.Integer>(2*_map584.size);
+ java.lang.String _key585;
int _val586;
for (int _i587 = 0; _i587 < _map584.size; ++_i587)
{
@@ -1047,16 +1013,16 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TMap _map588 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.topology_resources_overrides = new HashMap<String,Map<String,Double>>(2*_map588.size);
- String _key589;
- Map<String,Double> _val590;
+ struct.topology_resources_overrides = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>>(2*_map588.size);
+ java.lang.String _key589;
+ java.util.Map<java.lang.String,java.lang.Double> _val590;
for (int _i591 = 0; _i591 < _map588.size; ++_i591)
{
_key589 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map592 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- _val590 = new HashMap<String,Double>(2*_map592.size);
- String _key593;
+ _val590 = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map592.size);
+ java.lang.String _key593;
double _val594;
for (int _i595 = 0; _i595 < _map592.size; ++_i595)
{
@@ -1081,5 +1047,8 @@ public class RebalanceOptions implements org.apache.thrift.TBase<RebalanceOption
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SettableBlobMeta.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SettableBlobMeta.java b/storm-client/src/jvm/org/apache/storm/generated/SettableBlobMeta.java
index 604e446..f41d069 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SettableBlobMeta.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SettableBlobMeta.java
@@ -16,55 +16,25 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMeta, SettableBlobMeta._Fields>, java.io.Serializable, Cloneable, Comparable<SettableBlobMeta> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SettableBlobMeta");
private static final org.apache.thrift.protocol.TField ACL_FIELD_DESC = new org.apache.thrift.protocol.TField("acl", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField REPLICATION_FACTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("replication_factor", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SettableBlobMetaStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SettableBlobMetaTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SettableBlobMetaStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SettableBlobMetaTupleSchemeFactory();
- private List<AccessControl> acl; // required
+ private java.util.List<AccessControl> acl; // required
private int replication_factor; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -72,10 +42,10 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
ACL((short)1, "acl"),
REPLICATION_FACTOR((short)2, "replication_factor");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,7 +93,7 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -132,15 +102,15 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
private static final int __REPLICATION_FACTOR_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.REPLICATION_FACTOR};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ACL, new org.apache.thrift.meta_data.FieldMetaData("acl", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AccessControl.class))));
tmpMap.put(_Fields.REPLICATION_FACTOR, new org.apache.thrift.meta_data.FieldMetaData("replication_factor", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SettableBlobMeta.class, metaDataMap);
}
@@ -148,7 +118,7 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
}
public SettableBlobMeta(
- List<AccessControl> acl)
+ java.util.List<AccessControl> acl)
{
this();
this.acl = acl;
@@ -160,7 +130,7 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
public SettableBlobMeta(SettableBlobMeta other) {
__isset_bitfield = other.__isset_bitfield;
if (other.is_set_acl()) {
- List<AccessControl> __this__acl = new ArrayList<AccessControl>(other.acl.size());
+ java.util.List<AccessControl> __this__acl = new java.util.ArrayList<AccessControl>(other.acl.size());
for (AccessControl other_element : other.acl) {
__this__acl.add(new AccessControl(other_element));
}
@@ -190,16 +160,16 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
public void add_to_acl(AccessControl elem) {
if (this.acl == null) {
- this.acl = new ArrayList<AccessControl>();
+ this.acl = new java.util.ArrayList<AccessControl>();
}
this.acl.add(elem);
}
- public List<AccessControl> get_acl() {
+ public java.util.List<AccessControl> get_acl() {
return this.acl;
}
- public void set_acl(List<AccessControl> acl) {
+ public void set_acl(java.util.List<AccessControl> acl) {
this.acl = acl;
}
@@ -228,25 +198,25 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
}
public void unset_replication_factor() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REPLICATION_FACTOR_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REPLICATION_FACTOR_ISSET_ID);
}
/** Returns true if field replication_factor is set (has been assigned a value) and false otherwise */
public boolean is_set_replication_factor() {
- return EncodingUtils.testBit(__isset_bitfield, __REPLICATION_FACTOR_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REPLICATION_FACTOR_ISSET_ID);
}
public void set_replication_factor_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REPLICATION_FACTOR_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REPLICATION_FACTOR_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ACL:
if (value == null) {
unset_acl();
} else {
- set_acl((List<AccessControl>)value);
+ set_acl((java.util.List<AccessControl>)value);
}
break;
@@ -254,14 +224,14 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
if (value == null) {
unset_replication_factor();
} else {
- set_replication_factor((Integer)value);
+ set_replication_factor((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ACL:
return get_acl();
@@ -270,13 +240,13 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
return get_replication_factor();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -285,11 +255,11 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
case REPLICATION_FACTOR:
return is_set_replication_factor();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof SettableBlobMeta)
@@ -300,6 +270,8 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
public boolean equals(SettableBlobMeta that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_acl = true && this.is_set_acl();
boolean that_present_acl = true && that.is_set_acl();
@@ -324,19 +296,17 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_acl = true && (is_set_acl());
- list.add(present_acl);
- if (present_acl)
- list.add(acl);
+ hashCode = hashCode * 8191 + ((is_set_acl()) ? 131071 : 524287);
+ if (is_set_acl())
+ hashCode = hashCode * 8191 + acl.hashCode();
- boolean present_replication_factor = true && (is_set_replication_factor());
- list.add(present_replication_factor);
- if (present_replication_factor)
- list.add(replication_factor);
+ hashCode = hashCode * 8191 + ((is_set_replication_factor()) ? 131071 : 524287);
+ if (is_set_replication_factor())
+ hashCode = hashCode * 8191 + replication_factor;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -347,7 +317,7 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_acl()).compareTo(other.is_set_acl());
+ lastComparison = java.lang.Boolean.valueOf(is_set_acl()).compareTo(other.is_set_acl());
if (lastComparison != 0) {
return lastComparison;
}
@@ -357,7 +327,7 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_replication_factor()).compareTo(other.is_set_replication_factor());
+ lastComparison = java.lang.Boolean.valueOf(is_set_replication_factor()).compareTo(other.is_set_replication_factor());
if (lastComparison != 0) {
return lastComparison;
}
@@ -375,16 +345,16 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SettableBlobMeta(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SettableBlobMeta(");
boolean first = true;
sb.append("acl:");
@@ -421,7 +391,7 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -431,13 +401,13 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
}
}
- private static class SettableBlobMetaStandardSchemeFactory implements SchemeFactory {
+ private static class SettableBlobMetaStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SettableBlobMetaStandardScheme getScheme() {
return new SettableBlobMetaStandardScheme();
}
}
- private static class SettableBlobMetaStandardScheme extends StandardScheme<SettableBlobMeta> {
+ private static class SettableBlobMetaStandardScheme extends org.apache.thrift.scheme.StandardScheme<SettableBlobMeta> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SettableBlobMeta struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -453,7 +423,7 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list606 = iprot.readListBegin();
- struct.acl = new ArrayList<AccessControl>(_list606.size);
+ struct.acl = new java.util.ArrayList<AccessControl>(_list606.size);
AccessControl _elem607;
for (int _i608 = 0; _i608 < _list606.size; ++_i608)
{
@@ -512,17 +482,17 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
}
- private static class SettableBlobMetaTupleSchemeFactory implements SchemeFactory {
+ private static class SettableBlobMetaTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SettableBlobMetaTupleScheme getScheme() {
return new SettableBlobMetaTupleScheme();
}
}
- private static class SettableBlobMetaTupleScheme extends TupleScheme<SettableBlobMeta> {
+ private static class SettableBlobMetaTupleScheme extends org.apache.thrift.scheme.TupleScheme<SettableBlobMeta> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SettableBlobMeta struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.acl.size());
for (AccessControl _iter610 : struct.acl)
@@ -530,7 +500,7 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
_iter610.write(oprot);
}
}
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_replication_factor()) {
optionals.set(0);
}
@@ -542,10 +512,10 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SettableBlobMeta struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TList _list611 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.acl = new ArrayList<AccessControl>(_list611.size);
+ struct.acl = new java.util.ArrayList<AccessControl>(_list611.size);
AccessControl _elem612;
for (int _i613 = 0; _i613 < _list611.size; ++_i613)
{
@@ -555,7 +525,7 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
}
}
struct.set_acl_isSet(true);
- BitSet incoming = iprot.readBitSet(1);
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.replication_factor = iprot.readI32();
struct.set_replication_factor_isSet(true);
@@ -563,5 +533,8 @@ public class SettableBlobMeta implements org.apache.thrift.TBase<SettableBlobMet
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[34/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/DistributedRPC.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/DistributedRPC.java b/storm-client/src/jvm/org/apache/storm/generated/DistributedRPC.java
index 6ef2559..d46741b 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/DistributedRPC.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/DistributedRPC.java
@@ -16,53 +16,26 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class DistributedRPC {
public interface Iface {
- public String execute(String functionName, String funcArgs) throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException;
+ public java.lang.String execute(java.lang.String functionName, java.lang.String funcArgs) throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException;
}
public interface AsyncIface {
- public void execute(String functionName, String funcArgs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void execute(java.lang.String functionName, java.lang.String funcArgs, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
}
@@ -86,13 +59,13 @@ public class DistributedRPC {
super(iprot, oprot);
}
- public String execute(String functionName, String funcArgs) throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException
+ public java.lang.String execute(java.lang.String functionName, java.lang.String funcArgs) throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException
{
send_execute(functionName, funcArgs);
return recv_execute();
}
- public void send_execute(String functionName, String funcArgs) throws org.apache.thrift.TException
+ public void send_execute(java.lang.String functionName, java.lang.String funcArgs) throws org.apache.thrift.TException
{
execute_args args = new execute_args();
args.set_functionName(functionName);
@@ -100,7 +73,7 @@ public class DistributedRPC {
sendBase("execute", args);
}
- public String recv_execute() throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException
+ public java.lang.String recv_execute() throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException
{
execute_result result = new execute_result();
receiveBase(result, "execute");
@@ -134,17 +107,17 @@ public class DistributedRPC {
super(protocolFactory, clientManager, transport);
}
- public void execute(String functionName, String funcArgs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void execute(java.lang.String functionName, java.lang.String funcArgs, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
execute_call method_call = new execute_call(functionName, funcArgs, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class execute_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String functionName;
- private String funcArgs;
- public execute_call(String functionName, String funcArgs, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class execute_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ private java.lang.String functionName;
+ private java.lang.String funcArgs;
+ public execute_call(java.lang.String functionName, java.lang.String funcArgs, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.functionName = functionName;
this.funcArgs = funcArgs;
@@ -159,9 +132,9 @@ public class DistributedRPC {
prot.writeMessageEnd();
}
- public String getResult() throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException {
+ public java.lang.String getResult() throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -172,16 +145,16 @@ public class DistributedRPC {
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("execute", new execute());
return processMap;
}
@@ -199,6 +172,11 @@ public class DistributedRPC {
return false;
}
+ @Override
+ protected boolean handleRuntimeExceptions() {
+ return false;
+ }
+
public execute_result getResult(I iface, execute_args args) throws org.apache.thrift.TException {
execute_result result = new execute_result();
try {
@@ -215,21 +193,21 @@ public class DistributedRPC {
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("execute", new execute());
return processMap;
}
- public static class execute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, execute_args, String> {
+ public static class execute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, execute_args, java.lang.String> {
public execute() {
super("execute");
}
@@ -238,46 +216,53 @@ public class DistributedRPC {
return new execute_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
+ public void onComplete(java.lang.String o) {
execute_result result = new execute_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.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);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
execute_result result = new execute_result();
if (e instanceof DRPCExecutionException) {
- result.e = (DRPCExecutionException) 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
- {
+ result.e = (DRPCExecutionException) 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.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
@@ -286,7 +271,7 @@ public class DistributedRPC {
return false;
}
- public void start(I iface, execute_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ public void start(I iface, execute_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.execute(args.functionName, args.funcArgs,resultHandler);
}
}
@@ -299,24 +284,21 @@ public class DistributedRPC {
private static final org.apache.thrift.protocol.TField FUNCTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("functionName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField FUNC_ARGS_FIELD_DESC = new org.apache.thrift.protocol.TField("funcArgs", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new execute_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new execute_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new execute_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new execute_argsTupleSchemeFactory();
- private String functionName; // required
- private String funcArgs; // required
+ private java.lang.String functionName; // required
+ private java.lang.String funcArgs; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
FUNCTION_NAME((short)1, "functionName"),
FUNC_ARGS((short)2, "funcArgs");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -341,21 +323,21 @@ public class DistributedRPC {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -364,20 +346,20 @@ public class DistributedRPC {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.FUNCTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("functionName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.FUNC_ARGS, new org.apache.thrift.meta_data.FieldMetaData("funcArgs", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(execute_args.class, metaDataMap);
}
@@ -385,8 +367,8 @@ public class DistributedRPC {
}
public execute_args(
- String functionName,
- String funcArgs)
+ java.lang.String functionName,
+ java.lang.String funcArgs)
{
this();
this.functionName = functionName;
@@ -415,11 +397,11 @@ public class DistributedRPC {
this.funcArgs = null;
}
- public String get_functionName() {
+ public java.lang.String get_functionName() {
return this.functionName;
}
- public void set_functionName(String functionName) {
+ public void set_functionName(java.lang.String functionName) {
this.functionName = functionName;
}
@@ -438,11 +420,11 @@ public class DistributedRPC {
}
}
- public String get_funcArgs() {
+ public java.lang.String get_funcArgs() {
return this.funcArgs;
}
- public void set_funcArgs(String funcArgs) {
+ public void set_funcArgs(java.lang.String funcArgs) {
this.funcArgs = funcArgs;
}
@@ -461,13 +443,13 @@ public class DistributedRPC {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case FUNCTION_NAME:
if (value == null) {
unset_functionName();
} else {
- set_functionName((String)value);
+ set_functionName((java.lang.String)value);
}
break;
@@ -475,14 +457,14 @@ public class DistributedRPC {
if (value == null) {
unset_funcArgs();
} else {
- set_funcArgs((String)value);
+ set_funcArgs((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case FUNCTION_NAME:
return get_functionName();
@@ -491,13 +473,13 @@ public class DistributedRPC {
return get_funcArgs();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -506,11 +488,11 @@ public class DistributedRPC {
case FUNC_ARGS:
return is_set_funcArgs();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof execute_args)
@@ -521,6 +503,8 @@ public class DistributedRPC {
public boolean equals(execute_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_functionName = true && this.is_set_functionName();
boolean that_present_functionName = true && that.is_set_functionName();
@@ -545,19 +529,17 @@ public class DistributedRPC {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_functionName = true && (is_set_functionName());
- list.add(present_functionName);
- if (present_functionName)
- list.add(functionName);
+ hashCode = hashCode * 8191 + ((is_set_functionName()) ? 131071 : 524287);
+ if (is_set_functionName())
+ hashCode = hashCode * 8191 + functionName.hashCode();
- boolean present_funcArgs = true && (is_set_funcArgs());
- list.add(present_funcArgs);
- if (present_funcArgs)
- list.add(funcArgs);
+ hashCode = hashCode * 8191 + ((is_set_funcArgs()) ? 131071 : 524287);
+ if (is_set_funcArgs())
+ hashCode = hashCode * 8191 + funcArgs.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -568,7 +550,7 @@ public class DistributedRPC {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_functionName()).compareTo(other.is_set_functionName());
+ lastComparison = java.lang.Boolean.valueOf(is_set_functionName()).compareTo(other.is_set_functionName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -578,7 +560,7 @@ public class DistributedRPC {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_funcArgs()).compareTo(other.is_set_funcArgs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_funcArgs()).compareTo(other.is_set_funcArgs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -596,16 +578,16 @@ public class DistributedRPC {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("execute_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("execute_args(");
boolean first = true;
sb.append("functionName:");
@@ -640,7 +622,7 @@ public class DistributedRPC {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -648,13 +630,13 @@ public class DistributedRPC {
}
}
- private static class execute_argsStandardSchemeFactory implements SchemeFactory {
+ private static class execute_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public execute_argsStandardScheme getScheme() {
return new execute_argsStandardScheme();
}
}
- private static class execute_argsStandardScheme extends StandardScheme<execute_args> {
+ private static class execute_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<execute_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, execute_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -711,18 +693,18 @@ public class DistributedRPC {
}
- private static class execute_argsTupleSchemeFactory implements SchemeFactory {
+ private static class execute_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public execute_argsTupleScheme getScheme() {
return new execute_argsTupleScheme();
}
}
- private static class execute_argsTupleScheme extends TupleScheme<execute_args> {
+ private static class execute_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<execute_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, execute_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_functionName()) {
optionals.set(0);
}
@@ -740,8 +722,8 @@ public class DistributedRPC {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, execute_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.functionName = iprot.readString();
struct.set_functionName_isSet(true);
@@ -753,6 +735,9 @@ public class DistributedRPC {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
public static class execute_result implements org.apache.thrift.TBase<execute_result, execute_result._Fields>, java.io.Serializable, Cloneable, Comparable<execute_result> {
@@ -762,13 +747,10 @@ public class DistributedRPC {
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AZE_FIELD_DESC = new org.apache.thrift.protocol.TField("aze", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new execute_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new execute_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new execute_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new execute_resultTupleSchemeFactory();
- private String success; // required
+ private java.lang.String success; // required
private DRPCExecutionException e; // required
private AuthorizationException aze; // required
@@ -778,10 +760,10 @@ public class DistributedRPC {
E((short)1, "e"),
AZE((short)2, "aze");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -808,21 +790,21 @@ public class DistributedRPC {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -831,22 +813,22 @@ public class DistributedRPC {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DRPCExecutionException.class)));
tmpMap.put(_Fields.AZE, new org.apache.thrift.meta_data.FieldMetaData("aze", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AuthorizationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(execute_result.class, metaDataMap);
}
@@ -854,7 +836,7 @@ public class DistributedRPC {
}
public execute_result(
- String success,
+ java.lang.String success,
DRPCExecutionException e,
AuthorizationException aze)
{
@@ -890,11 +872,11 @@ public class DistributedRPC {
this.aze = null;
}
- public String get_success() {
+ public java.lang.String get_success() {
return this.success;
}
- public void set_success(String success) {
+ public void set_success(java.lang.String success) {
this.success = success;
}
@@ -959,13 +941,13 @@ public class DistributedRPC {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
- set_success((String)value);
+ set_success((java.lang.String)value);
}
break;
@@ -988,7 +970,7 @@ public class DistributedRPC {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
@@ -1000,13 +982,13 @@ public class DistributedRPC {
return get_aze();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -1017,11 +999,11 @@ public class DistributedRPC {
case AZE:
return is_set_aze();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof execute_result)
@@ -1032,6 +1014,8 @@ public class DistributedRPC {
public boolean equals(execute_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();
@@ -1065,24 +1049,21 @@ public class DistributedRPC {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (is_set_success());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((is_set_success()) ? 131071 : 524287);
+ if (is_set_success())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_e = true && (is_set_e());
- list.add(present_e);
- if (present_e)
- list.add(e);
+ hashCode = hashCode * 8191 + ((is_set_e()) ? 131071 : 524287);
+ if (is_set_e())
+ hashCode = hashCode * 8191 + e.hashCode();
- boolean present_aze = true && (is_set_aze());
- list.add(present_aze);
- if (present_aze)
- list.add(aze);
+ hashCode = hashCode * 8191 + ((is_set_aze()) ? 131071 : 524287);
+ if (is_set_aze())
+ hashCode = hashCode * 8191 + aze.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1093,7 +1074,7 @@ public class DistributedRPC {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());
+ lastComparison = java.lang.Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1103,7 +1084,7 @@ public class DistributedRPC {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_e()).compareTo(other.is_set_e());
+ lastComparison = java.lang.Boolean.valueOf(is_set_e()).compareTo(other.is_set_e());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1113,7 +1094,7 @@ public class DistributedRPC {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze());
+ lastComparison = java.lang.Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1131,16 +1112,16 @@ public class DistributedRPC {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("execute_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("execute_result(");
boolean first = true;
sb.append("success:");
@@ -1183,7 +1164,7 @@ public class DistributedRPC {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -1191,13 +1172,13 @@ public class DistributedRPC {
}
}
- private static class execute_resultStandardSchemeFactory implements SchemeFactory {
+ private static class execute_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public execute_resultStandardScheme getScheme() {
return new execute_resultStandardScheme();
}
}
- private static class execute_resultStandardScheme extends StandardScheme<execute_result> {
+ private static class execute_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<execute_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, execute_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1269,18 +1250,18 @@ public class DistributedRPC {
}
- private static class execute_resultTupleSchemeFactory implements SchemeFactory {
+ private static class execute_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public execute_resultTupleScheme getScheme() {
return new execute_resultTupleScheme();
}
}
- private static class execute_resultTupleScheme extends TupleScheme<execute_result> {
+ private static class execute_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<execute_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, execute_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_success()) {
optionals.set(0);
}
@@ -1304,8 +1285,8 @@ public class DistributedRPC {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, execute_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.set_success_isSet(true);
@@ -1323,6 +1304,9 @@ public class DistributedRPC {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
}
[42/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
STORM-3061: thrift 0.11
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/1fd1e17f
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/1fd1e17f
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/1fd1e17f
Branch: refs/heads/master
Commit: 1fd1e17fb2ede7bbb872bfca9ac6dd50fa58efd5
Parents: 93ed601
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Tue May 22 16:26:21 2018 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Tue May 22 16:26:21 2018 -0500
----------------------------------------------------------------------
pom.xml | 2 +-
storm-client/src/genthrift.sh | 2 +-
.../apache/storm/generated/AccessControl.java | 148 +-
.../storm/generated/AccessControlType.java | 6 +-
.../storm/generated/AlreadyAliveException.java | 124 +-
.../org/apache/storm/generated/Assignment.java | 362 +-
.../storm/generated/AuthorizationException.java | 124 +-
.../storm/generated/BeginDownloadResult.java | 158 +-
.../jvm/org/apache/storm/generated/Bolt.java | 121 +-
.../storm/generated/BoltAggregateStats.java | 175 +-
.../org/apache/storm/generated/BoltStats.java | 440 +-
.../apache/storm/generated/ClusterSummary.java | 205 +-
.../storm/generated/ClusterWorkerHeartbeat.java | 185 +-
.../storm/generated/CommonAggregateStats.java | 260 +-
.../generated/ComponentAggregateStats.java | 143 +-
.../apache/storm/generated/ComponentCommon.java | 217 +-
.../apache/storm/generated/ComponentObject.java | 129 +-
.../storm/generated/ComponentPageInfo.java | 495 +-
.../apache/storm/generated/ComponentType.java | 6 +-
.../org/apache/storm/generated/Credentials.java | 144 +-
.../storm/generated/DRPCExceptionType.java | 6 +-
.../storm/generated/DRPCExecutionException.java | 137 +-
.../org/apache/storm/generated/DRPCRequest.java | 141 +-
.../apache/storm/generated/DebugOptions.java | 141 +-
.../apache/storm/generated/DistributedRPC.java | 368 +-
.../generated/DistributedRPCInvocations.java | 1106 +-
.../org/apache/storm/generated/ErrorInfo.java | 175 +-
.../storm/generated/ExecutorAggregateStats.java | 125 +-
.../apache/storm/generated/ExecutorInfo.java | 133 +-
.../storm/generated/ExecutorSpecificStats.java | 97 +-
.../apache/storm/generated/ExecutorStats.java | 253 +-
.../apache/storm/generated/ExecutorSummary.java | 193 +-
.../apache/storm/generated/GetInfoOptions.java | 116 +-
.../apache/storm/generated/GlobalStreamId.java | 141 +-
.../org/apache/storm/generated/Grouping.java | 199 +-
.../generated/HBAuthorizationException.java | 124 +-
.../storm/generated/HBExecutionException.java | 124 +-
.../org/apache/storm/generated/HBMessage.java | 142 +-
.../apache/storm/generated/HBMessageData.java | 179 +-
.../jvm/org/apache/storm/generated/HBNodes.java | 146 +-
.../jvm/org/apache/storm/generated/HBPulse.java | 151 +-
.../org/apache/storm/generated/HBRecords.java | 134 +-
.../storm/generated/HBServerMessageType.java | 6 +-
.../generated/InvalidTopologyException.java | 124 +-
.../org/apache/storm/generated/JavaObject.java | 149 +-
.../apache/storm/generated/JavaObjectArg.java | 211 +-
.../generated/KeyAlreadyExistsException.java | 124 +-
.../storm/generated/KeyNotFoundException.java | 124 +-
.../org/apache/storm/generated/KillOptions.java | 124 +-
.../storm/generated/LSApprovedWorkers.java | 140 +-
.../generated/LSSupervisorAssignments.java | 140 +-
.../apache/storm/generated/LSSupervisorId.java | 122 +-
.../apache/storm/generated/LSTopoHistory.java | 215 +-
.../storm/generated/LSTopoHistoryList.java | 130 +-
.../storm/generated/LSWorkerHeartbeat.java | 179 +-
.../apache/storm/generated/ListBlobsResult.java | 161 +-
.../apache/storm/generated/LocalAssignment.java | 196 +-
.../apache/storm/generated/LocalStateData.java | 146 +-
.../org/apache/storm/generated/LogConfig.java | 148 +-
.../org/apache/storm/generated/LogLevel.java | 184 +-
.../apache/storm/generated/LogLevelAction.java | 6 +-
.../jvm/org/apache/storm/generated/Nimbus.java | 14032 ++++-----
.../apache/storm/generated/NimbusSummary.java | 186 +-
.../org/apache/storm/generated/NodeInfo.java | 151 +-
.../storm/generated/NotAliveException.java | 124 +-
.../org/apache/storm/generated/NullStruct.java | 103 +-
.../apache/storm/generated/NumErrorsChoice.java | 6 +-
.../storm/generated/OwnerResourceSummary.java | 453 +-
.../storm/generated/PrivateWorkerKey.java | 162 +-
.../apache/storm/generated/ProfileAction.java | 6 +-
.../apache/storm/generated/ProfileRequest.java | 142 +-
.../storm/generated/ReadableBlobMeta.java | 127 +-
.../storm/generated/RebalanceOptions.java | 285 +-
.../storm/generated/SettableBlobMeta.java | 151 +-
.../apache/storm/generated/SharedMemory.java | 177 +-
.../apache/storm/generated/ShellComponent.java | 145 +-
.../storm/generated/SpecificAggregateStats.java | 97 +-
.../storm/generated/SpoutAggregateStats.java | 124 +-
.../org/apache/storm/generated/SpoutSpec.java | 121 +-
.../org/apache/storm/generated/SpoutStats.java | 292 +-
.../apache/storm/generated/StateSpoutSpec.java | 121 +-
.../org/apache/storm/generated/StormBase.java | 336 +-
.../apache/storm/generated/StormTopology.java | 483 +-
.../org/apache/storm/generated/StreamInfo.java | 157 +-
.../apache/storm/generated/SubmitOptions.java | 125 +-
.../org/apache/storm/generated/Supervisor.java | 803 +-
.../storm/generated/SupervisorAssignments.java | 152 +-
.../apache/storm/generated/SupervisorInfo.java | 587 +-
.../storm/generated/SupervisorPageInfo.java | 157 +-
.../storm/generated/SupervisorSummary.java | 334 +-
.../generated/SupervisorWorkerHeartbeat.java | 164 +-
.../generated/SupervisorWorkerHeartbeats.java | 149 +-
.../storm/generated/ThriftSerializedObject.java | 147 +-
.../storm/generated/TopologyActionOptions.java | 93 +-
.../storm/generated/TopologyHistoryInfo.java | 146 +-
.../apache/storm/generated/TopologyInfo.java | 508 +-
.../storm/generated/TopologyInitialStatus.java | 6 +-
.../storm/generated/TopologyPageInfo.java | 759 +-
.../apache/storm/generated/TopologyStats.java | 294 +-
.../apache/storm/generated/TopologyStatus.java | 6 +-
.../apache/storm/generated/TopologySummary.java | 449 +-
.../storm/generated/WorkerMetricList.java | 134 +-
.../storm/generated/WorkerMetricPoint.java | 209 +-
.../apache/storm/generated/WorkerMetrics.java | 165 +-
.../apache/storm/generated/WorkerResources.java | 262 +-
.../apache/storm/generated/WorkerSummary.java | 412 +-
.../org/apache/storm/generated/WorkerToken.java | 162 +-
.../apache/storm/generated/WorkerTokenInfo.java | 171 +-
.../storm/generated/WorkerTokenServiceType.java | 6 +-
storm-client/src/py/storm/DistributedRPC-remote | 125 +-
storm-client/src/py/storm/DistributedRPC.py | 531 +-
.../py/storm/DistributedRPCInvocations-remote | 155 +-
.../src/py/storm/DistributedRPCInvocations.py | 1637 +-
storm-client/src/py/storm/Nimbus-remote | 615 +-
storm-client/src/py/storm/Nimbus.py | 21130 +++++++------
storm-client/src/py/storm/Supervisor-remote | 145 +-
storm-client/src/py/storm/Supervisor.py | 1266 +-
storm-client/src/py/storm/constants.py | 9 +-
storm-client/src/py/storm/ttypes.py | 26309 ++++++++---------
119 files changed, 41924 insertions(+), 44785 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index af94ead..0b18947 100644
--- a/pom.xml
+++ b/pom.xml
@@ -298,7 +298,7 @@
<kryo.version>3.0.3</kryo.version>
<servlet.version>3.1.0</servlet.version>
<joda-time.version>2.3</joda-time.version>
- <thrift.version>0.9.3</thrift.version>
+ <thrift.version>0.11.0</thrift.version>
<junit.version>4.11</junit.version>
<metrics-clojure.version>2.5.1</metrics-clojure.version>
<hdrhistogram.version>2.1.7</hdrhistogram.version>
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/genthrift.sh
----------------------------------------------------------------------
diff --git a/storm-client/src/genthrift.sh b/storm-client/src/genthrift.sh
index a2373c2..c63bf44 100644
--- a/storm-client/src/genthrift.sh
+++ b/storm-client/src/genthrift.sh
@@ -17,7 +17,7 @@
rm -rf gen-javabean gen-py py
rm -rf jvm/org/apache/storm/generated
-thrift --gen java:beans,hashcode,nocamel,generated_annotations=undated --gen py:utf8strings storm.thrift
+thrift --gen java:beans,nocamel,generated_annotations=undated --gen py:utf8strings storm.thrift
for file in gen-javabean/org/apache/storm/generated/* ; do
cat java_license_header.txt ${file} > ${file}.tmp
mv -f ${file}.tmp ${file}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/AccessControl.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/AccessControl.java b/storm-client/src/jvm/org/apache/storm/generated/AccessControl.java
index c1c072a..58e8e27 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/AccessControl.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/AccessControl.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class AccessControl implements org.apache.thrift.TBase<AccessControl, AccessControl._Fields>, java.io.Serializable, Cloneable, Comparable<AccessControl> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AccessControl");
@@ -59,14 +32,11 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("access", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AccessControlStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AccessControlTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AccessControlStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AccessControlTupleSchemeFactory();
private AccessControlType type; // required
- private String name; // optional
+ private java.lang.String name; // optional
private int access; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -79,10 +49,10 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
NAME((short)2, "name"),
ACCESS((short)3, "access");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -109,21 +79,21 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -132,7 +102,7 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -141,16 +111,16 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
private static final int __ACCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.NAME};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AccessControlType.class)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ACCESS, new org.apache.thrift.meta_data.FieldMetaData("access", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AccessControl.class, metaDataMap);
}
@@ -224,11 +194,11 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
}
}
- public String get_name() {
+ public java.lang.String get_name() {
return this.name;
}
- public void set_name(String name) {
+ public void set_name(java.lang.String name) {
this.name = name;
}
@@ -257,19 +227,19 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
}
public void unset_access() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ACCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ACCESS_ISSET_ID);
}
/** Returns true if field access is set (has been assigned a value) and false otherwise */
public boolean is_set_access() {
- return EncodingUtils.testBit(__isset_bitfield, __ACCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ACCESS_ISSET_ID);
}
public void set_access_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ACCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ACCESS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TYPE:
if (value == null) {
@@ -283,7 +253,7 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
if (value == null) {
unset_name();
} else {
- set_name((String)value);
+ set_name((java.lang.String)value);
}
break;
@@ -291,14 +261,14 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
if (value == null) {
unset_access();
} else {
- set_access((Integer)value);
+ set_access((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TYPE:
return get_type();
@@ -310,13 +280,13 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
return get_access();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -327,11 +297,11 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
case ACCESS:
return is_set_access();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof AccessControl)
@@ -342,6 +312,8 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
public boolean equals(AccessControl that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_type = true && this.is_set_type();
boolean that_present_type = true && that.is_set_type();
@@ -375,24 +347,19 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_type = true && (is_set_type());
- list.add(present_type);
- if (present_type)
- list.add(type.getValue());
+ hashCode = hashCode * 8191 + ((is_set_type()) ? 131071 : 524287);
+ if (is_set_type())
+ hashCode = hashCode * 8191 + type.getValue();
- boolean present_name = true && (is_set_name());
- list.add(present_name);
- if (present_name)
- list.add(name);
+ hashCode = hashCode * 8191 + ((is_set_name()) ? 131071 : 524287);
+ if (is_set_name())
+ hashCode = hashCode * 8191 + name.hashCode();
- boolean present_access = true;
- list.add(present_access);
- if (present_access)
- list.add(access);
+ hashCode = hashCode * 8191 + access;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -403,7 +370,7 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_type()).compareTo(other.is_set_type());
+ lastComparison = java.lang.Boolean.valueOf(is_set_type()).compareTo(other.is_set_type());
if (lastComparison != 0) {
return lastComparison;
}
@@ -413,7 +380,7 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
+ lastComparison = java.lang.Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
if (lastComparison != 0) {
return lastComparison;
}
@@ -423,7 +390,7 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_access()).compareTo(other.is_set_access());
+ lastComparison = java.lang.Boolean.valueOf(is_set_access()).compareTo(other.is_set_access());
if (lastComparison != 0) {
return lastComparison;
}
@@ -441,16 +408,16 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("AccessControl(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("AccessControl(");
boolean first = true;
sb.append("type:");
@@ -499,7 +466,7 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -509,13 +476,13 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
}
}
- private static class AccessControlStandardSchemeFactory implements SchemeFactory {
+ private static class AccessControlStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AccessControlStandardScheme getScheme() {
return new AccessControlStandardScheme();
}
}
- private static class AccessControlStandardScheme extends StandardScheme<AccessControl> {
+ private static class AccessControlStandardScheme extends org.apache.thrift.scheme.StandardScheme<AccessControl> {
public void read(org.apache.thrift.protocol.TProtocol iprot, AccessControl struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -585,20 +552,20 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
}
- private static class AccessControlTupleSchemeFactory implements SchemeFactory {
+ private static class AccessControlTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AccessControlTupleScheme getScheme() {
return new AccessControlTupleScheme();
}
}
- private static class AccessControlTupleScheme extends TupleScheme<AccessControl> {
+ private static class AccessControlTupleScheme extends org.apache.thrift.scheme.TupleScheme<AccessControl> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, AccessControl struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.type.getValue());
oprot.writeI32(struct.access);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_name()) {
optionals.set(0);
}
@@ -610,12 +577,12 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, AccessControl struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.type = org.apache.storm.generated.AccessControlType.findByValue(iprot.readI32());
struct.set_type_isSet(true);
struct.access = iprot.readI32();
struct.set_access_isSet(true);
- BitSet incoming = iprot.readBitSet(1);
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.name = iprot.readString();
struct.set_name_isSet(true);
@@ -623,5 +590,8 @@ public class AccessControl implements org.apache.thrift.TBase<AccessControl, Acc
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/AccessControlType.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/AccessControlType.java b/storm-client/src/jvm/org/apache/storm/generated/AccessControlType.java
index cb75b9b..159dffa 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/AccessControlType.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/AccessControlType.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -24,10 +24,6 @@
package org.apache.storm.generated;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
public enum AccessControlType implements org.apache.thrift.TEnum {
OTHER(1),
USER(2);
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/AlreadyAliveException.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/AlreadyAliveException.java b/storm-client/src/jvm/org/apache/storm/generated/AlreadyAliveException.java
index 4e635fb..6a43897 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/AlreadyAliveException.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/AlreadyAliveException.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class AlreadyAliveException extends TException implements org.apache.thrift.TBase<AlreadyAliveException, AlreadyAliveException._Fields>, java.io.Serializable, Cloneable, Comparable<AlreadyAliveException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
+public class AlreadyAliveException extends org.apache.thrift.TException implements org.apache.thrift.TBase<AlreadyAliveException, AlreadyAliveException._Fields>, java.io.Serializable, Cloneable, Comparable<AlreadyAliveException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlreadyAliveException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AlreadyAliveExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AlreadyAliveExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AlreadyAliveExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AlreadyAliveExceptionTupleSchemeFactory();
- private String msg; // required
+ private java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class AlreadyAliveException extends TException implements org.apache.thri
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,18 +88,18 @@ public class AlreadyAliveException extends TException implements org.apache.thri
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AlreadyAliveException.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class AlreadyAliveException extends TException implements org.apache.thri
}
public AlreadyAliveException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -161,11 +131,11 @@ public class AlreadyAliveException extends TException implements org.apache.thri
this.msg = null;
}
- public String get_msg() {
+ public java.lang.String get_msg() {
return this.msg;
}
- public void set_msg(String msg) {
+ public void set_msg(java.lang.String msg) {
this.msg = msg;
}
@@ -184,43 +154,43 @@ public class AlreadyAliveException extends TException implements org.apache.thri
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unset_msg();
} else {
- set_msg((String)value);
+ set_msg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return get_msg();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return is_set_msg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof AlreadyAliveException)
@@ -231,6 +201,8 @@ public class AlreadyAliveException extends TException implements org.apache.thri
public boolean equals(AlreadyAliveException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.is_set_msg();
boolean that_present_msg = true && that.is_set_msg();
@@ -246,14 +218,13 @@ public class AlreadyAliveException extends TException implements org.apache.thri
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (is_set_msg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((is_set_msg()) ? 131071 : 524287);
+ if (is_set_msg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class AlreadyAliveException extends TException implements org.apache.thri
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class AlreadyAliveException extends TException implements org.apache.thri
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("AlreadyAliveException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("AlreadyAliveException(");
boolean first = true;
sb.append("msg:");
@@ -322,7 +293,7 @@ public class AlreadyAliveException extends TException implements org.apache.thri
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -330,13 +301,13 @@ public class AlreadyAliveException extends TException implements org.apache.thri
}
}
- private static class AlreadyAliveExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class AlreadyAliveExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AlreadyAliveExceptionStandardScheme getScheme() {
return new AlreadyAliveExceptionStandardScheme();
}
}
- private static class AlreadyAliveExceptionStandardScheme extends StandardScheme<AlreadyAliveException> {
+ private static class AlreadyAliveExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<AlreadyAliveException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, AlreadyAliveException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -380,27 +351,30 @@ public class AlreadyAliveException extends TException implements org.apache.thri
}
- private static class AlreadyAliveExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class AlreadyAliveExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AlreadyAliveExceptionTupleScheme getScheme() {
return new AlreadyAliveExceptionTupleScheme();
}
}
- private static class AlreadyAliveExceptionTupleScheme extends TupleScheme<AlreadyAliveException> {
+ private static class AlreadyAliveExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<AlreadyAliveException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, AlreadyAliveException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.msg);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, AlreadyAliveException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.msg = iprot.readString();
struct.set_msg_isSet(true);
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[03/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/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 1e9460d..ad16141 100644
--- a/storm-client/src/py/storm/Nimbus.py
+++ b/storm-client/src/py/storm/Nimbus.py
@@ -17,10887 +17,10631 @@
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:utf8strings
#
-from thrift.Thrift import TType, TMessageType, TException, TApplicationException
+from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+from thrift.protocol.TProtocol import TProtocolException
+from thrift.TRecursive import fix_spec
+
+import sys
import logging
-from ttypes import *
+from .ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol, TProtocol
-try:
- from thrift.protocol import fastbinary
-except:
- fastbinary = None
+all_structs = []
+
+
+class Iface(object):
+ def submitTopology(self, name, uploadedJarLocation, jsonConf, topology):
+ """
+ Parameters:
+ - name
+ - uploadedJarLocation
+ - jsonConf
+ - topology
+ """
+ pass
+
+ def submitTopologyWithOpts(self, name, uploadedJarLocation, jsonConf, topology, options):
+ """
+ Parameters:
+ - name
+ - uploadedJarLocation
+ - jsonConf
+ - topology
+ - options
+ """
+ pass
+
+ def killTopology(self, name):
+ """
+ Parameters:
+ - name
+ """
+ pass
+
+ def killTopologyWithOpts(self, name, options):
+ """
+ Parameters:
+ - name
+ - options
+ """
+ pass
+
+ def activate(self, name):
+ """
+ Parameters:
+ - name
+ """
+ pass
+
+ def deactivate(self, name):
+ """
+ Parameters:
+ - name
+ """
+ pass
+
+ def rebalance(self, name, options):
+ """
+ Parameters:
+ - name
+ - options
+ """
+ pass
+
+ def setLogConfig(self, name, config):
+ """
+ Parameters:
+ - name
+ - config
+ """
+ pass
+
+ def getLogConfig(self, name):
+ """
+ Parameters:
+ - name
+ """
+ pass
+
+ def debug(self, name, component, enable, samplingPercentage):
+ """
+ Enable/disable logging the tuples generated in topology via an internal EventLogger bolt. The component name is optional
+ and if null or empty, the debug flag will apply to the entire topology.
+
+ The 'samplingPercentage' will limit loggging to a percentage of generated tuples.
+
+
+ Parameters:
+ - name
+ - component
+ - enable
+ - samplingPercentage
+ """
+ pass
+
+ def setWorkerProfiler(self, id, profileRequest):
+ """
+ Parameters:
+ - id
+ - profileRequest
+ """
+ pass
+
+ def getComponentPendingProfileActions(self, id, component_id, action):
+ """
+ Parameters:
+ - id
+ - component_id
+ - action
+ """
+ pass
+
+ def uploadNewCredentials(self, name, creds):
+ """
+ Parameters:
+ - name
+ - creds
+ """
+ pass
+
+ def beginCreateBlob(self, key, meta):
+ """
+ Parameters:
+ - key
+ - meta
+ """
+ pass
+
+ def beginUpdateBlob(self, key):
+ """
+ Parameters:
+ - key
+ """
+ pass
+
+ def uploadBlobChunk(self, session, chunk):
+ """
+ Parameters:
+ - session
+ - chunk
+ """
+ pass
+
+ def finishBlobUpload(self, session):
+ """
+ Parameters:
+ - session
+ """
+ pass
+
+ def cancelBlobUpload(self, session):
+ """
+ Parameters:
+ - session
+ """
+ pass
+
+ def getBlobMeta(self, key):
+ """
+ Parameters:
+ - key
+ """
+ pass
+
+ def setBlobMeta(self, key, meta):
+ """
+ Parameters:
+ - key
+ - meta
+ """
+ pass
+
+ def beginBlobDownload(self, key):
+ """
+ Parameters:
+ - key
+ """
+ pass
+
+ def downloadBlobChunk(self, session):
+ """
+ Parameters:
+ - session
+ """
+ pass
+
+ def deleteBlob(self, key):
+ """
+ Parameters:
+ - key
+ """
+ pass
+
+ def listBlobs(self, session):
+ """
+ Parameters:
+ - session
+ """
+ pass
+
+ def getBlobReplication(self, key):
+ """
+ Parameters:
+ - key
+ """
+ pass
+
+ def updateBlobReplication(self, key, replication):
+ """
+ Parameters:
+ - key
+ - replication
+ """
+ pass
+
+ def createStateInZookeeper(self, key):
+ """
+ Parameters:
+ - key
+ """
+ pass
+
+ def beginFileUpload(self):
+ pass
+
+ def uploadChunk(self, location, chunk):
+ """
+ Parameters:
+ - location
+ - chunk
+ """
+ pass
+
+ def finishFileUpload(self, location):
+ """
+ Parameters:
+ - location
+ """
+ pass
+
+ def beginFileDownload(self, file):
+ """
+ Parameters:
+ - file
+ """
+ pass
+
+ def downloadChunk(self, id):
+ """
+ Parameters:
+ - id
+ """
+ pass
+
+ def getNimbusConf(self):
+ pass
+
+ def getClusterInfo(self):
+ pass
+
+ def getLeader(self):
+ pass
+
+ def isTopologyNameAllowed(self, name):
+ """
+ Parameters:
+ - name
+ """
+ pass
+
+ def getTopologyInfo(self, id):
+ """
+ Parameters:
+ - id
+ """
+ pass
+
+ def getTopologyInfoWithOpts(self, id, options):
+ """
+ Parameters:
+ - id
+ - options
+ """
+ pass
+
+ def getTopologyPageInfo(self, id, window, is_include_sys):
+ """
+ Parameters:
+ - id
+ - window
+ - is_include_sys
+ """
+ pass
+
+ def getSupervisorPageInfo(self, id, host, is_include_sys):
+ """
+ Parameters:
+ - id
+ - host
+ - is_include_sys
+ """
+ pass
+
+ def getComponentPageInfo(self, topology_id, component_id, window, is_include_sys):
+ """
+ Parameters:
+ - topology_id
+ - component_id
+ - window
+ - is_include_sys
+ """
+ pass
+
+ def getTopologyConf(self, id):
+ """
+ Parameters:
+ - id
+ """
+ pass
+
+ def getTopology(self, id):
+ """
+ Returns the compiled topology that contains ackers and metrics consumsers. Compare {@link #getUserTopology(String id)}.
+
+ Parameters:
+ - id
+ """
+ pass
+
+ def getUserTopology(self, id):
+ """
+ Returns the user specified topology as submitted originally. Compare {@link #getTopology(String id)}.
+
+ Parameters:
+ - id
+ """
+ pass
+
+ def getTopologyHistory(self, user):
+ """
+ Parameters:
+ - user
+ """
+ pass
+
+ def getOwnerResourceSummaries(self, owner):
+ """
+ Parameters:
+ - owner
+ """
+ pass
+
+ def getSupervisorAssignments(self, node):
+ """
+ Get assigned assignments for a specific supervisor
+
+ Parameters:
+ - node
+ """
+ pass
+
+ def sendSupervisorWorkerHeartbeats(self, heartbeats):
+ """
+ Send supervisor worker heartbeats for a specific supervisor
+
+ Parameters:
+ - heartbeats
+ """
+ pass
+
+ def sendSupervisorWorkerHeartbeat(self, heatbeat):
+ """
+ Send supervisor local worker heartbeat when a supervisor is unreachable
+
+ Parameters:
+ - heatbeat
+ """
+ pass
+
+ def processWorkerMetrics(self, metrics):
+ """
+ Parameters:
+ - metrics
+ """
+ pass
+
+
+class Client(Iface):
+ def __init__(self, iprot, oprot=None):
+ self._iprot = self._oprot = iprot
+ if oprot is not None:
+ self._oprot = oprot
+ self._seqid = 0
+
+ def submitTopology(self, name, uploadedJarLocation, jsonConf, topology):
+ """
+ Parameters:
+ - name
+ - uploadedJarLocation
+ - jsonConf
+ - topology
+ """
+ self.send_submitTopology(name, uploadedJarLocation, jsonConf, topology)
+ self.recv_submitTopology()
+
+ def send_submitTopology(self, name, uploadedJarLocation, jsonConf, topology):
+ self._oprot.writeMessageBegin('submitTopology', TMessageType.CALL, self._seqid)
+ args = submitTopology_args()
+ args.name = name
+ args.uploadedJarLocation = uploadedJarLocation
+ args.jsonConf = jsonConf
+ args.topology = topology
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_submitTopology(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = submitTopology_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.e is not None:
+ raise result.e
+ if result.ite is not None:
+ raise result.ite
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def submitTopologyWithOpts(self, name, uploadedJarLocation, jsonConf, topology, options):
+ """
+ Parameters:
+ - name
+ - uploadedJarLocation
+ - jsonConf
+ - topology
+ - options
+ """
+ self.send_submitTopologyWithOpts(name, uploadedJarLocation, jsonConf, topology, options)
+ self.recv_submitTopologyWithOpts()
+
+ def send_submitTopologyWithOpts(self, name, uploadedJarLocation, jsonConf, topology, options):
+ self._oprot.writeMessageBegin('submitTopologyWithOpts', TMessageType.CALL, self._seqid)
+ args = submitTopologyWithOpts_args()
+ args.name = name
+ args.uploadedJarLocation = uploadedJarLocation
+ args.jsonConf = jsonConf
+ args.topology = topology
+ args.options = options
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_submitTopologyWithOpts(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = submitTopologyWithOpts_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.e is not None:
+ raise result.e
+ if result.ite is not None:
+ raise result.ite
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def killTopology(self, name):
+ """
+ Parameters:
+ - name
+ """
+ self.send_killTopology(name)
+ self.recv_killTopology()
+
+ def send_killTopology(self, name):
+ self._oprot.writeMessageBegin('killTopology', TMessageType.CALL, self._seqid)
+ args = killTopology_args()
+ args.name = name
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_killTopology(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = killTopology_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def killTopologyWithOpts(self, name, options):
+ """
+ Parameters:
+ - name
+ - options
+ """
+ self.send_killTopologyWithOpts(name, options)
+ self.recv_killTopologyWithOpts()
+
+ def send_killTopologyWithOpts(self, name, options):
+ self._oprot.writeMessageBegin('killTopologyWithOpts', TMessageType.CALL, self._seqid)
+ args = killTopologyWithOpts_args()
+ args.name = name
+ args.options = options
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_killTopologyWithOpts(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = killTopologyWithOpts_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def activate(self, name):
+ """
+ Parameters:
+ - name
+ """
+ self.send_activate(name)
+ self.recv_activate()
+
+ def send_activate(self, name):
+ self._oprot.writeMessageBegin('activate', TMessageType.CALL, self._seqid)
+ args = activate_args()
+ args.name = name
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_activate(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = activate_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def deactivate(self, name):
+ """
+ Parameters:
+ - name
+ """
+ self.send_deactivate(name)
+ self.recv_deactivate()
+
+ def send_deactivate(self, name):
+ self._oprot.writeMessageBegin('deactivate', TMessageType.CALL, self._seqid)
+ args = deactivate_args()
+ args.name = name
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_deactivate(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = deactivate_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def rebalance(self, name, options):
+ """
+ Parameters:
+ - name
+ - options
+ """
+ self.send_rebalance(name, options)
+ self.recv_rebalance()
+
+ def send_rebalance(self, name, options):
+ self._oprot.writeMessageBegin('rebalance', TMessageType.CALL, self._seqid)
+ args = rebalance_args()
+ args.name = name
+ args.options = options
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_rebalance(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = rebalance_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.e is not None:
+ raise result.e
+ if result.ite is not None:
+ raise result.ite
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def setLogConfig(self, name, config):
+ """
+ Parameters:
+ - name
+ - config
+ """
+ self.send_setLogConfig(name, config)
+ self.recv_setLogConfig()
+
+ def send_setLogConfig(self, name, config):
+ self._oprot.writeMessageBegin('setLogConfig', TMessageType.CALL, self._seqid)
+ args = setLogConfig_args()
+ args.name = name
+ args.config = config
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_setLogConfig(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = setLogConfig_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ return
+
+ def getLogConfig(self, name):
+ """
+ Parameters:
+ - name
+ """
+ self.send_getLogConfig(name)
+ return self.recv_getLogConfig()
+
+ def send_getLogConfig(self, name):
+ self._oprot.writeMessageBegin('getLogConfig', TMessageType.CALL, self._seqid)
+ args = getLogConfig_args()
+ args.name = name
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getLogConfig(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getLogConfig_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogConfig failed: unknown result")
+
+ def debug(self, name, component, enable, samplingPercentage):
+ """
+ Enable/disable logging the tuples generated in topology via an internal EventLogger bolt. The component name is optional
+ and if null or empty, the debug flag will apply to the entire topology.
+
+ The 'samplingPercentage' will limit loggging to a percentage of generated tuples.
+
+
+ Parameters:
+ - name
+ - component
+ - enable
+ - samplingPercentage
+ """
+ self.send_debug(name, component, enable, samplingPercentage)
+ self.recv_debug()
+
+ def send_debug(self, name, component, enable, samplingPercentage):
+ self._oprot.writeMessageBegin('debug', TMessageType.CALL, self._seqid)
+ args = debug_args()
+ args.name = name
+ args.component = component
+ args.enable = enable
+ args.samplingPercentage = samplingPercentage
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_debug(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = debug_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def setWorkerProfiler(self, id, profileRequest):
+ """
+ Parameters:
+ - id
+ - profileRequest
+ """
+ self.send_setWorkerProfiler(id, profileRequest)
+ self.recv_setWorkerProfiler()
+
+ def send_setWorkerProfiler(self, id, profileRequest):
+ self._oprot.writeMessageBegin('setWorkerProfiler', TMessageType.CALL, self._seqid)
+ args = setWorkerProfiler_args()
+ args.id = id
+ args.profileRequest = profileRequest
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_setWorkerProfiler(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = setWorkerProfiler_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ return
+
+ def getComponentPendingProfileActions(self, id, component_id, action):
+ """
+ Parameters:
+ - id
+ - component_id
+ - action
+ """
+ self.send_getComponentPendingProfileActions(id, component_id, action)
+ return self.recv_getComponentPendingProfileActions()
+
+ def send_getComponentPendingProfileActions(self, id, component_id, action):
+ self._oprot.writeMessageBegin('getComponentPendingProfileActions', TMessageType.CALL, self._seqid)
+ args = getComponentPendingProfileActions_args()
+ args.id = id
+ args.component_id = component_id
+ args.action = action
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getComponentPendingProfileActions(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getComponentPendingProfileActions_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getComponentPendingProfileActions failed: unknown result")
+
+ def uploadNewCredentials(self, name, creds):
+ """
+ Parameters:
+ - name
+ - creds
+ """
+ self.send_uploadNewCredentials(name, creds)
+ self.recv_uploadNewCredentials()
+
+ def send_uploadNewCredentials(self, name, creds):
+ self._oprot.writeMessageBegin('uploadNewCredentials', TMessageType.CALL, self._seqid)
+ args = uploadNewCredentials_args()
+ args.name = name
+ args.creds = creds
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_uploadNewCredentials(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = uploadNewCredentials_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.e is not None:
+ raise result.e
+ if result.ite is not None:
+ raise result.ite
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def beginCreateBlob(self, key, meta):
+ """
+ Parameters:
+ - key
+ - meta
+ """
+ self.send_beginCreateBlob(key, meta)
+ return self.recv_beginCreateBlob()
+
+ def send_beginCreateBlob(self, key, meta):
+ self._oprot.writeMessageBegin('beginCreateBlob', TMessageType.CALL, self._seqid)
+ args = beginCreateBlob_args()
+ args.key = key
+ args.meta = meta
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_beginCreateBlob(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = beginCreateBlob_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.aze is not None:
+ raise result.aze
+ if result.kae is not None:
+ raise result.kae
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "beginCreateBlob failed: unknown result")
+
+ def beginUpdateBlob(self, key):
+ """
+ Parameters:
+ - key
+ """
+ self.send_beginUpdateBlob(key)
+ return self.recv_beginUpdateBlob()
+
+ def send_beginUpdateBlob(self, key):
+ self._oprot.writeMessageBegin('beginUpdateBlob', TMessageType.CALL, self._seqid)
+ args = beginUpdateBlob_args()
+ args.key = key
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_beginUpdateBlob(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = beginUpdateBlob_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.aze is not None:
+ raise result.aze
+ if result.knf is not None:
+ raise result.knf
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "beginUpdateBlob failed: unknown result")
+
+ def uploadBlobChunk(self, session, chunk):
+ """
+ Parameters:
+ - session
+ - chunk
+ """
+ self.send_uploadBlobChunk(session, chunk)
+ self.recv_uploadBlobChunk()
+
+ def send_uploadBlobChunk(self, session, chunk):
+ self._oprot.writeMessageBegin('uploadBlobChunk', TMessageType.CALL, self._seqid)
+ args = uploadBlobChunk_args()
+ args.session = session
+ args.chunk = chunk
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_uploadBlobChunk(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = uploadBlobChunk_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def finishBlobUpload(self, session):
+ """
+ Parameters:
+ - session
+ """
+ self.send_finishBlobUpload(session)
+ self.recv_finishBlobUpload()
+
+ def send_finishBlobUpload(self, session):
+ self._oprot.writeMessageBegin('finishBlobUpload', TMessageType.CALL, self._seqid)
+ args = finishBlobUpload_args()
+ args.session = session
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_finishBlobUpload(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = finishBlobUpload_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def cancelBlobUpload(self, session):
+ """
+ Parameters:
+ - session
+ """
+ self.send_cancelBlobUpload(session)
+ self.recv_cancelBlobUpload()
+
+ def send_cancelBlobUpload(self, session):
+ self._oprot.writeMessageBegin('cancelBlobUpload', TMessageType.CALL, self._seqid)
+ args = cancelBlobUpload_args()
+ args.session = session
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_cancelBlobUpload(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = cancelBlobUpload_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def getBlobMeta(self, key):
+ """
+ Parameters:
+ - key
+ """
+ self.send_getBlobMeta(key)
+ return self.recv_getBlobMeta()
+
+ def send_getBlobMeta(self, key):
+ self._oprot.writeMessageBegin('getBlobMeta', TMessageType.CALL, self._seqid)
+ args = getBlobMeta_args()
+ args.key = key
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getBlobMeta(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getBlobMeta_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.aze is not None:
+ raise result.aze
+ if result.knf is not None:
+ raise result.knf
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getBlobMeta failed: unknown result")
+
+ def setBlobMeta(self, key, meta):
+ """
+ Parameters:
+ - key
+ - meta
+ """
+ self.send_setBlobMeta(key, meta)
+ self.recv_setBlobMeta()
+
+ def send_setBlobMeta(self, key, meta):
+ self._oprot.writeMessageBegin('setBlobMeta', TMessageType.CALL, self._seqid)
+ args = setBlobMeta_args()
+ args.key = key
+ args.meta = meta
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_setBlobMeta(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = setBlobMeta_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ if result.knf is not None:
+ raise result.knf
+ return
+
+ def beginBlobDownload(self, key):
+ """
+ Parameters:
+ - key
+ """
+ self.send_beginBlobDownload(key)
+ return self.recv_beginBlobDownload()
+
+ def send_beginBlobDownload(self, key):
+ self._oprot.writeMessageBegin('beginBlobDownload', TMessageType.CALL, self._seqid)
+ args = beginBlobDownload_args()
+ args.key = key
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_beginBlobDownload(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = beginBlobDownload_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.aze is not None:
+ raise result.aze
+ if result.knf is not None:
+ raise result.knf
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "beginBlobDownload failed: unknown result")
+
+ def downloadBlobChunk(self, session):
+ """
+ Parameters:
+ - session
+ """
+ self.send_downloadBlobChunk(session)
+ return self.recv_downloadBlobChunk()
+
+ def send_downloadBlobChunk(self, session):
+ self._oprot.writeMessageBegin('downloadBlobChunk', TMessageType.CALL, self._seqid)
+ args = downloadBlobChunk_args()
+ args.session = session
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_downloadBlobChunk(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = downloadBlobChunk_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, "downloadBlobChunk failed: unknown result")
+
+ def deleteBlob(self, key):
+ """
+ Parameters:
+ - key
+ """
+ self.send_deleteBlob(key)
+ self.recv_deleteBlob()
+
+ def send_deleteBlob(self, key):
+ self._oprot.writeMessageBegin('deleteBlob', TMessageType.CALL, self._seqid)
+ args = deleteBlob_args()
+ args.key = key
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_deleteBlob(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = deleteBlob_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ if result.knf is not None:
+ raise result.knf
+ return
+
+ def listBlobs(self, session):
+ """
+ Parameters:
+ - session
+ """
+ self.send_listBlobs(session)
+ return self.recv_listBlobs()
+
+ def send_listBlobs(self, session):
+ self._oprot.writeMessageBegin('listBlobs', TMessageType.CALL, self._seqid)
+ args = listBlobs_args()
+ args.session = session
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_listBlobs(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = listBlobs_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "listBlobs failed: unknown result")
+
+ def getBlobReplication(self, key):
+ """
+ Parameters:
+ - key
+ """
+ self.send_getBlobReplication(key)
+ return self.recv_getBlobReplication()
+
+ def send_getBlobReplication(self, key):
+ self._oprot.writeMessageBegin('getBlobReplication', TMessageType.CALL, self._seqid)
+ args = getBlobReplication_args()
+ args.key = key
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getBlobReplication(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getBlobReplication_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.aze is not None:
+ raise result.aze
+ if result.knf is not None:
+ raise result.knf
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getBlobReplication failed: unknown result")
+
+ def updateBlobReplication(self, key, replication):
+ """
+ Parameters:
+ - key
+ - replication
+ """
+ self.send_updateBlobReplication(key, replication)
+ return self.recv_updateBlobReplication()
+
+ def send_updateBlobReplication(self, key, replication):
+ self._oprot.writeMessageBegin('updateBlobReplication', TMessageType.CALL, self._seqid)
+ args = updateBlobReplication_args()
+ args.key = key
+ args.replication = replication
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_updateBlobReplication(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = updateBlobReplication_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.aze is not None:
+ raise result.aze
+ if result.knf is not None:
+ raise result.knf
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "updateBlobReplication failed: unknown result")
+
+ def createStateInZookeeper(self, key):
+ """
+ Parameters:
+ - key
+ """
+ self.send_createStateInZookeeper(key)
+ self.recv_createStateInZookeeper()
+
+ def send_createStateInZookeeper(self, key):
+ self._oprot.writeMessageBegin('createStateInZookeeper', TMessageType.CALL, self._seqid)
+ args = createStateInZookeeper_args()
+ args.key = key
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_createStateInZookeeper(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = createStateInZookeeper_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ return
+
+ def beginFileUpload(self):
+ self.send_beginFileUpload()
+ return self.recv_beginFileUpload()
+
+ def send_beginFileUpload(self):
+ self._oprot.writeMessageBegin('beginFileUpload', TMessageType.CALL, self._seqid)
+ args = beginFileUpload_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_beginFileUpload(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = beginFileUpload_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "beginFileUpload failed: unknown result")
+
+ def uploadChunk(self, location, chunk):
+ """
+ Parameters:
+ - location
+ - chunk
+ """
+ self.send_uploadChunk(location, chunk)
+ self.recv_uploadChunk()
+
+ def send_uploadChunk(self, location, chunk):
+ self._oprot.writeMessageBegin('uploadChunk', TMessageType.CALL, self._seqid)
+ args = uploadChunk_args()
+ args.location = location
+ args.chunk = chunk
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_uploadChunk(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = uploadChunk_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def finishFileUpload(self, location):
+ """
+ Parameters:
+ - location
+ """
+ self.send_finishFileUpload(location)
+ self.recv_finishFileUpload()
+
+ def send_finishFileUpload(self, location):
+ self._oprot.writeMessageBegin('finishFileUpload', TMessageType.CALL, self._seqid)
+ args = finishFileUpload_args()
+ args.location = location
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_finishFileUpload(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = finishFileUpload_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ 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:
+ - id
+ """
+ self.send_downloadChunk(id)
+ return self.recv_downloadChunk()
+
+ def send_downloadChunk(self, id):
+ self._oprot.writeMessageBegin('downloadChunk', TMessageType.CALL, self._seqid)
+ args = downloadChunk_args()
+ args.id = id
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_downloadChunk(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = downloadChunk_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "downloadChunk failed: unknown result")
+
+ def getNimbusConf(self):
+ self.send_getNimbusConf()
+ return self.recv_getNimbusConf()
+
+ def send_getNimbusConf(self):
+ self._oprot.writeMessageBegin('getNimbusConf', TMessageType.CALL, self._seqid)
+ args = getNimbusConf_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getNimbusConf(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getNimbusConf_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getNimbusConf failed: unknown result")
+
+ def getClusterInfo(self):
+ self.send_getClusterInfo()
+ return self.recv_getClusterInfo()
+
+ def send_getClusterInfo(self):
+ self._oprot.writeMessageBegin('getClusterInfo', TMessageType.CALL, self._seqid)
+ args = getClusterInfo_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getClusterInfo(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getClusterInfo_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getClusterInfo failed: unknown result")
+
+ def getLeader(self):
+ self.send_getLeader()
+ return self.recv_getLeader()
+
+ def send_getLeader(self):
+ self._oprot.writeMessageBegin('getLeader', TMessageType.CALL, self._seqid)
+ args = getLeader_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getLeader(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getLeader_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, "getLeader failed: unknown result")
+
+ def isTopologyNameAllowed(self, name):
+ """
+ Parameters:
+ - name
+ """
+ self.send_isTopologyNameAllowed(name)
+ return self.recv_isTopologyNameAllowed()
+
+ def send_isTopologyNameAllowed(self, name):
+ self._oprot.writeMessageBegin('isTopologyNameAllowed', TMessageType.CALL, self._seqid)
+ args = isTopologyNameAllowed_args()
+ args.name = name
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_isTopologyNameAllowed(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = isTopologyNameAllowed_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, "isTopologyNameAllowed failed: unknown result")
+
+ def getTopologyInfo(self, id):
+ """
+ Parameters:
+ - id
+ """
+ self.send_getTopologyInfo(id)
+ return self.recv_getTopologyInfo()
+
+ def send_getTopologyInfo(self, id):
+ self._oprot.writeMessageBegin('getTopologyInfo', TMessageType.CALL, self._seqid)
+ args = getTopologyInfo_args()
+ args.id = id
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getTopologyInfo(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getTopologyInfo_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getTopologyInfo failed: unknown result")
+
+ def getTopologyInfoWithOpts(self, id, options):
+ """
+ Parameters:
+ - id
+ - options
+ """
+ self.send_getTopologyInfoWithOpts(id, options)
+ return self.recv_getTopologyInfoWithOpts()
+
+ def send_getTopologyInfoWithOpts(self, id, options):
+ self._oprot.writeMessageBegin('getTopologyInfoWithOpts', TMessageType.CALL, self._seqid)
+ args = getTopologyInfoWithOpts_args()
+ args.id = id
+ args.options = options
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getTopologyInfoWithOpts(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getTopologyInfoWithOpts_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getTopologyInfoWithOpts failed: unknown result")
+
+ def getTopologyPageInfo(self, id, window, is_include_sys):
+ """
+ Parameters:
+ - id
+ - window
+ - is_include_sys
+ """
+ self.send_getTopologyPageInfo(id, window, is_include_sys)
+ return self.recv_getTopologyPageInfo()
+
+ def send_getTopologyPageInfo(self, id, window, is_include_sys):
+ self._oprot.writeMessageBegin('getTopologyPageInfo', TMessageType.CALL, self._seqid)
+ args = getTopologyPageInfo_args()
+ args.id = id
+ args.window = window
+ args.is_include_sys = is_include_sys
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getTopologyPageInfo(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getTopologyPageInfo_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getTopologyPageInfo failed: unknown result")
+
+ def getSupervisorPageInfo(self, id, host, is_include_sys):
+ """
+ Parameters:
+ - id
+ - host
+ - is_include_sys
+ """
+ self.send_getSupervisorPageInfo(id, host, is_include_sys)
+ return self.recv_getSupervisorPageInfo()
+
+ def send_getSupervisorPageInfo(self, id, host, is_include_sys):
+ self._oprot.writeMessageBegin('getSupervisorPageInfo', TMessageType.CALL, self._seqid)
+ args = getSupervisorPageInfo_args()
+ args.id = id
+ args.host = host
+ args.is_include_sys = is_include_sys
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getSupervisorPageInfo(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getSupervisorPageInfo_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getSupervisorPageInfo failed: unknown result")
+
+ def getComponentPageInfo(self, topology_id, component_id, window, is_include_sys):
+ """
+ Parameters:
+ - topology_id
+ - component_id
+ - window
+ - is_include_sys
+ """
+ self.send_getComponentPageInfo(topology_id, component_id, window, is_include_sys)
+ return self.recv_getComponentPageInfo()
+
+ def send_getComponentPageInfo(self, topology_id, component_id, window, is_include_sys):
+ self._oprot.writeMessageBegin('getComponentPageInfo', TMessageType.CALL, self._seqid)
+ args = getComponentPageInfo_args()
+ args.topology_id = topology_id
+ args.component_id = component_id
+ args.window = window
+ args.is_include_sys = is_include_sys
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getComponentPageInfo(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getComponentPageInfo_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getComponentPageInfo failed: unknown result")
+
+ def getTopologyConf(self, id):
+ """
+ Parameters:
+ - id
+ """
+ self.send_getTopologyConf(id)
+ return self.recv_getTopologyConf()
+
+ def send_getTopologyConf(self, id):
+ self._oprot.writeMessageBegin('getTopologyConf', TMessageType.CALL, self._seqid)
+ args = getTopologyConf_args()
+ args.id = id
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getTopologyConf(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getTopologyConf_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getTopologyConf failed: unknown result")
+
+ def getTopology(self, id):
+ """
+ Returns the compiled topology that contains ackers and metrics consumsers. Compare {@link #getUserTopology(String id)}.
+
+ Parameters:
+ - id
+ """
+ self.send_getTopology(id)
+ return self.recv_getTopology()
+
+ def send_getTopology(self, id):
+ self._oprot.writeMessageBegin('getTopology', TMessageType.CALL, self._seqid)
+ args = getTopology_args()
+ args.id = id
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getTopology(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getTopology_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getTopology failed: unknown result")
+
+ def getUserTopology(self, id):
+ """
+ Returns the user specified topology as submitted originally. Compare {@link #getTopology(String id)}.
+
+ Parameters:
+ - id
+ """
+ self.send_getUserTopology(id)
+ return self.recv_getUserTopology()
+
+ def send_getUserTopology(self, id):
+ self._oprot.writeMessageBegin('getUserTopology', TMessageType.CALL, self._seqid)
+ args = getUserTopology_args()
+ args.id = id
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getUserTopology(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getUserTopology_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserTopology failed: unknown result")
+
+ def getTopologyHistory(self, user):
+ """
+ Parameters:
+ - user
+ """
+ self.send_getTopologyHistory(user)
+ return self.recv_getTopologyHistory()
+
+ def send_getTopologyHistory(self, user):
+ self._oprot.writeMessageBegin('getTopologyHistory', TMessageType.CALL, self._seqid)
+ args = getTopologyHistory_args()
+ args.user = user
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getTopologyHistory(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getTopologyHistory_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getTopologyHistory failed: unknown result")
+
+ def getOwnerResourceSummaries(self, owner):
+ """
+ Parameters:
+ - owner
+ """
+ self.send_getOwnerResourceSummaries(owner)
+ return self.recv_getOwnerResourceSummaries()
+
+ def send_getOwnerResourceSummaries(self, owner):
+ self._oprot.writeMessageBegin('getOwnerResourceSummaries', TMessageType.CALL, self._seqid)
+ args = getOwnerResourceSummaries_args()
+ args.owner = owner
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getOwnerResourceSummaries(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getOwnerResourceSummaries_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, "getOwnerResourceSummaries failed: unknown result")
+
+ def getSupervisorAssignments(self, node):
+ """
+ Get assigned assignments for a specific supervisor
+
+ Parameters:
+ - node
+ """
+ self.send_getSupervisorAssignments(node)
+ return self.recv_getSupervisorAssignments()
+
+ def send_getSupervisorAssignments(self, node):
+ self._oprot.writeMessageBegin('getSupervisorAssignments', TMessageType.CALL, self._seqid)
+ args = getSupervisorAssignments_args()
+ args.node = node
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getSupervisorAssignments(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getSupervisorAssignments_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, "getSupervisorAssignments failed: unknown result")
+
+ def sendSupervisorWorkerHeartbeats(self, heartbeats):
+ """
+ Send supervisor worker heartbeats for a specific supervisor
+
+ Parameters:
+ - heartbeats
+ """
+ self.send_sendSupervisorWorkerHeartbeats(heartbeats)
+ self.recv_sendSupervisorWorkerHeartbeats()
+
+ def send_sendSupervisorWorkerHeartbeats(self, heartbeats):
+ self._oprot.writeMessageBegin('sendSupervisorWorkerHeartbeats', TMessageType.CALL, self._seqid)
+ args = sendSupervisorWorkerHeartbeats_args()
+ args.heartbeats = heartbeats
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_sendSupervisorWorkerHeartbeats(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = sendSupervisorWorkerHeartbeats_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def sendSupervisorWorkerHeartbeat(self, heatbeat):
+ """
+ Send supervisor local worker heartbeat when a supervisor is unreachable
+
+ Parameters:
+ - heatbeat
+ """
+ self.send_sendSupervisorWorkerHeartbeat(heatbeat)
+ self.recv_sendSupervisorWorkerHeartbeat()
+
+ def send_sendSupervisorWorkerHeartbeat(self, heatbeat):
+ self._oprot.writeMessageBegin('sendSupervisorWorkerHeartbeat', TMessageType.CALL, self._seqid)
+ args = sendSupervisorWorkerHeartbeat_args()
+ args.heatbeat = heatbeat
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_sendSupervisorWorkerHeartbeat(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = sendSupervisorWorkerHeartbeat_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ if result.e is not None:
+ raise result.e
+ return
+
+ def processWorkerMetrics(self, metrics):
+ """
+ Parameters:
+ - metrics
+ """
+ self.send_processWorkerMetrics(metrics)
+ self.recv_processWorkerMetrics()
+
+ def send_processWorkerMetrics(self, metrics):
+ self._oprot.writeMessageBegin('processWorkerMetrics', TMessageType.CALL, self._seqid)
+ args = processWorkerMetrics_args()
+ args.metrics = metrics
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_processWorkerMetrics(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = processWorkerMetrics_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ return
-class Iface:
- def submitTopology(self, name, uploadedJarLocation, jsonConf, topology):
+class Processor(Iface, TProcessor):
+ def __init__(self, handler):
+ self._handler = handler
+ self._processMap = {}
+ self._processMap["submitTopology"] = Processor.process_submitTopology
+ self._processMap["submitTopologyWithOpts"] = Processor.process_submitTopologyWithOpts
+ self._processMap["killTopology"] = Processor.process_killTopology
+ self._processMap["killTopologyWithOpts"] = Processor.process_killTopologyWithOpts
+ self._processMap["activate"] = Processor.process_activate
+ self._processMap["deactivate"] = Processor.process_deactivate
+ self._processMap["rebalance"] = Processor.process_rebalance
+ self._processMap["setLogConfig"] = Processor.process_setLogConfig
+ self._processMap["getLogConfig"] = Processor.process_getLogConfig
+ self._processMap["debug"] = Processor.process_debug
+ self._processMap["setWorkerProfiler"] = Processor.process_setWorkerProfiler
+ self._processMap["getComponentPendingProfileActions"] = Processor.process_getComponentPendingProfileActions
+ self._processMap["uploadNewCredentials"] = Processor.process_uploadNewCredentials
+ self._processMap["beginCreateBlob"] = Processor.process_beginCreateBlob
+ self._processMap["beginUpdateBlob"] = Processor.process_beginUpdateBlob
+ self._processMap["uploadBlobChunk"] = Processor.process_uploadBlobChunk
+ self._processMap["finishBlobUpload"] = Processor.process_finishBlobUpload
+ self._processMap["cancelBlobUpload"] = Processor.process_cancelBlobUpload
+ self._processMap["getBlobMeta"] = Processor.process_getBlobMeta
+ self._processMap["setBlobMeta"] = Processor.process_setBlobMeta
+ self._processMap["beginBlobDownload"] = Processor.process_beginBlobDownload
+ self._processMap["downloadBlobChunk"] = Processor.process_downloadBlobChunk
+ self._processMap["deleteBlob"] = Processor.process_deleteBlob
+ self._processMap["listBlobs"] = Processor.process_listBlobs
+ self._processMap["getBlobReplication"] = Processor.process_getBlobReplication
+ self._processMap["updateBlobReplication"] = Processor.process_updateBlobReplication
+ self._processMap["createStateInZookeeper"] = Processor.process_createStateInZookeeper
+ self._processMap["beginFileUpload"] = Processor.process_beginFileUpload
+ self._processMap["uploadChunk"] = Processor.process_uploadChunk
+ self._processMap["finishFileUpload"] = Processor.process_finishFileUpload
+ self._processMap["beginFileDownload"] = Processor.process_beginFileDownload
+ self._processMap["downloadChunk"] = Processor.process_downloadChunk
+ self._processMap["getNimbusConf"] = Processor.process_getNimbusConf
+ self._processMap["getClusterInfo"] = Processor.process_getClusterInfo
+ self._processMap["getLeader"] = Processor.process_getLeader
+ self._processMap["isTopologyNameAllowed"] = Processor.process_isTopologyNameAllowed
+ self._processMap["getTopologyInfo"] = Processor.process_getTopologyInfo
+ self._processMap["getTopologyInfoWithOpts"] = Processor.process_getTopologyInfoWithOpts
+ self._processMap["getTopologyPageInfo"] = Processor.process_getTopologyPageInfo
+ self._processMap["getSupervisorPageInfo"] = Processor.process_getSupervisorPageInfo
+ self._processMap["getComponentPageInfo"] = Processor.process_getComponentPageInfo
+ self._processMap["getTopologyConf"] = Processor.process_getTopologyConf
+ self._processMap["getTopology"] = Processor.process_getTopology
+ self._processMap["getUserTopology"] = Processor.process_getUserTopology
+ self._processMap["getTopologyHistory"] = Processor.process_getTopologyHistory
+ self._processMap["getOwnerResourceSummaries"] = Processor.process_getOwnerResourceSummaries
+ self._processMap["getSupervisorAssignments"] = Processor.process_getSupervisorAssignments
+ self._processMap["sendSupervisorWorkerHeartbeats"] = Processor.process_sendSupervisorWorkerHeartbeats
+ self._processMap["sendSupervisorWorkerHeartbeat"] = Processor.process_sendSupervisorWorkerHeartbeat
+ self._processMap["processWorkerMetrics"] = Processor.process_processWorkerMetrics
+
+ def process(self, iprot, oprot):
+ (name, type, seqid) = iprot.readMessageBegin()
+ if name not in self._processMap:
+ iprot.skip(TType.STRUCT)
+ iprot.readMessageEnd()
+ x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
+ oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
+ x.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+ return
+ else:
+ self._processMap[name](self, seqid, iprot, oprot)
+ return True
+
+ def process_submitTopology(self, seqid, iprot, oprot):
+ args = submitTopology_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = submitTopology_result()
+ try:
+ self._handler.submitTopology(args.name, args.uploadedJarLocation, args.jsonConf, args.topology)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except AlreadyAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except InvalidTopologyException as ite:
+ msg_type = TMessageType.REPLY
+ result.ite = ite
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except 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("submitTopology", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_submitTopologyWithOpts(self, seqid, iprot, oprot):
+ args = submitTopologyWithOpts_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = submitTopologyWithOpts_result()
+ try:
+ self._handler.submitTopologyWithOpts(args.name, args.uploadedJarLocation, args.jsonConf, args.topology, args.options)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except AlreadyAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except InvalidTopologyException as ite:
+ msg_type = TMessageType.REPLY
+ result.ite = ite
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except 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("submitTopologyWithOpts", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_killTopology(self, seqid, iprot, oprot):
+ args = killTopology_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = killTopology_result()
+ try:
+ self._handler.killTopology(args.name)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ 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("killTopology", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_killTopologyWithOpts(self, seqid, iprot, oprot):
+ args = killTopologyWithOpts_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = killTopologyWithOpts_result()
+ try:
+ self._handler.killTopologyWithOpts(args.name, args.options)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ 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("killTopologyWithOpts", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_activate(self, seqid, iprot, oprot):
+ args = activate_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = activate_result()
+ try:
+ self._handler.activate(args.name)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ 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("activate", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_deactivate(self, seqid, iprot, oprot):
+ args = deactivate_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = deactivate_result()
+ try:
+ self._handler.deactivate(args.name)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ 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("deactivate", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_rebalance(self, seqid, iprot, oprot):
+ args = rebalance_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = rebalance_result()
+ try:
+ self._handler.rebalance(args.name, args.options)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except InvalidTopologyException as ite:
+ msg_type = TMessageType.REPLY
+ result.ite = ite
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except 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("rebalance", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_setLogConfig(self, seqid, iprot, oprot):
+ args = setLogConfig_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = setLogConfig_result()
+ try:
+ self._handler.setLogConfig(args.name, args.config)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ 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("setLogConfig", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getLogConfig(self, seqid, iprot, oprot):
+ args = getLogConfig_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getLogConfig_result()
+ try:
+ result.success = self._handler.getLogConfig(args.name)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ 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("getLogConfig", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_debug(self, seqid, iprot, oprot):
+ args = debug_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = debug_result()
+ try:
+ self._handler.debug(args.name, args.component, args.enable, args.samplingPercentage)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ 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("debug", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_setWorkerProfiler(self, seqid, iprot, oprot):
+ args = setWorkerProfiler_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = setWorkerProfiler_result()
+ try:
+ self._handler.setWorkerProfiler(args.id, args.profileRequest)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ 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("setWorkerProfiler", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getComponentPendingProfileActions(self, seqid, iprot, oprot):
+ args = getComponentPendingProfileActions_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getComponentPendingProfileActions_result()
+ try:
+ result.success = self._handler.getComponentPendingProfileActions(args.id, args.component_id, args.action)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ 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("getComponentPendingProfileActions", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_uploadNewCredentials(self, seqid, iprot, oprot):
+ args = uploadNewCredentials_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = uploadNewCredentials_result()
+ try:
+ self._handler.uploadNewCredentials(args.name, args.creds)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ except InvalidTopologyException as ite:
+ msg_type = TMessageType.REPLY
+ result.ite = ite
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except 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("uploadNewCredentials", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_beginCreateBlob(self, seqid, iprot, oprot):
+ args = beginCreateBlob_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = beginCreateBlob_result()
+ try:
+ result.success = self._handler.beginCreateBlob(args.key, args.meta)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except AuthorizationException as aze:
+ msg_type = TMessageType.REPLY
+ result.aze = aze
+ except KeyAlreadyExistsException as kae:
+ msg_type = TMessageType.REPLY
+ result.kae = kae
+ 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("beginCreateBlob", msg_type, seqid)
+ result.write(oprot)
+
<TRUNCATED>
[29/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBMessageData.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBMessageData.java b/storm-client/src/jvm/org/apache/storm/generated/HBMessageData.java
index b100da1..e23a145 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/HBMessageData.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/HBMessageData.java
@@ -16,41 +16,14 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMessageData._Fields> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBMessageData");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -69,10 +42,10 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
NODES((short)5, "nodes"),
MESSAGE_BLOB((short)7, "message_blob");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -105,21 +78,21 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -128,27 +101,27 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PULSE, new org.apache.thrift.meta_data.FieldMetaData("pulse", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.PULSE, new org.apache.thrift.meta_data.FieldMetaData("pulse", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HBPulse.class)));
- tmpMap.put(_Fields.BOOLVAL, new org.apache.thrift.meta_data.FieldMetaData("boolval", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.BOOLVAL, new org.apache.thrift.meta_data.FieldMetaData("boolval", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.RECORDS, new org.apache.thrift.meta_data.FieldMetaData("records", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.RECORDS, new org.apache.thrift.meta_data.FieldMetaData("records", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HBRecords.class)));
- tmpMap.put(_Fields.NODES, new org.apache.thrift.meta_data.FieldMetaData("nodes", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.NODES, new org.apache.thrift.meta_data.FieldMetaData("nodes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HBNodes.class)));
tmpMap.put(_Fields.MESSAGE_BLOB, new org.apache.thrift.meta_data.FieldMetaData("message_blob", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBMessageData.class, metaDataMap);
}
@@ -156,7 +129,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
super();
}
- public HBMessageData(_Fields setField, Object value) {
+ public HBMessageData(_Fields setField, java.lang.Object value) {
super(setField, value);
}
@@ -167,7 +140,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
return new HBMessageData(this);
}
- public static HBMessageData path(String value) {
+ public static HBMessageData path(java.lang.String value) {
HBMessageData x = new HBMessageData();
x.set_path(value);
return x;
@@ -197,7 +170,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
return x;
}
- public static HBMessageData message_blob(ByteBuffer value) {
+ public static HBMessageData message_blob(java.nio.ByteBuffer value) {
HBMessageData x = new HBMessageData();
x.set_message_blob(value);
return x;
@@ -205,57 +178,57 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
public static HBMessageData message_blob(byte[] value) {
HBMessageData x = new HBMessageData();
- x.set_message_blob(ByteBuffer.wrap(Arrays.copyOf(value, value.length)));
+ x.set_message_blob(java.nio.ByteBuffer.wrap(value.clone()));
return x;
}
@Override
- protected void checkType(_Fields setField, Object value) throws ClassCastException {
+ protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException {
switch (setField) {
case PATH:
- if (value instanceof String) {
+ if (value instanceof java.lang.String) {
break;
}
- throw new ClassCastException("Was expecting value of type String for field 'path', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type java.lang.String for field 'path', but got " + value.getClass().getSimpleName());
case PULSE:
if (value instanceof HBPulse) {
break;
}
- throw new ClassCastException("Was expecting value of type HBPulse for field 'pulse', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type HBPulse for field 'pulse', but got " + value.getClass().getSimpleName());
case BOOLVAL:
- if (value instanceof Boolean) {
+ if (value instanceof java.lang.Boolean) {
break;
}
- throw new ClassCastException("Was expecting value of type Boolean for field 'boolval', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type java.lang.Boolean for field 'boolval', but got " + value.getClass().getSimpleName());
case RECORDS:
if (value instanceof HBRecords) {
break;
}
- throw new ClassCastException("Was expecting value of type HBRecords for field 'records', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type HBRecords for field 'records', but got " + value.getClass().getSimpleName());
case NODES:
if (value instanceof HBNodes) {
break;
}
- throw new ClassCastException("Was expecting value of type HBNodes for field 'nodes', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type HBNodes for field 'nodes', but got " + value.getClass().getSimpleName());
case MESSAGE_BLOB:
- if (value instanceof ByteBuffer) {
+ if (value instanceof java.nio.ByteBuffer) {
break;
}
- throw new ClassCastException("Was expecting value of type ByteBuffer for field 'message_blob', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type java.nio.ByteBuffer for field 'message_blob', but got " + value.getClass().getSimpleName());
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@Override
- protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
+ protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(field.id);
if (setField != null) {
switch (setField) {
case PATH:
if (field.type == PATH_FIELD_DESC.type) {
- String path;
+ java.lang.String path;
path = iprot.readString();
return path;
} else {
@@ -274,7 +247,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
}
case BOOLVAL:
if (field.type == BOOLVAL_FIELD_DESC.type) {
- Boolean boolval;
+ java.lang.Boolean boolval;
boolval = iprot.readBool();
return boolval;
} else {
@@ -303,7 +276,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
}
case MESSAGE_BLOB:
if (field.type == MESSAGE_BLOB_FIELD_DESC.type) {
- ByteBuffer message_blob;
+ java.nio.ByteBuffer message_blob;
message_blob = iprot.readBinary();
return message_blob;
} else {
@@ -311,7 +284,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
return null;
}
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
@@ -323,7 +296,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
switch (setField_) {
case PATH:
- String path = (String)value_;
+ java.lang.String path = (java.lang.String)value_;
oprot.writeString(path);
return;
case PULSE:
@@ -331,7 +304,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
pulse.write(oprot);
return;
case BOOLVAL:
- Boolean boolval = (Boolean)value_;
+ java.lang.Boolean boolval = (java.lang.Boolean)value_;
oprot.writeBool(boolval);
return;
case RECORDS:
@@ -343,21 +316,21 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
nodes.write(oprot);
return;
case MESSAGE_BLOB:
- ByteBuffer message_blob = (ByteBuffer)value_;
+ java.nio.ByteBuffer message_blob = (java.nio.ByteBuffer)value_;
oprot.writeBinary(message_blob);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@Override
- protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
+ protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(fieldID);
if (setField != null) {
switch (setField) {
case PATH:
- String path;
+ java.lang.String path;
path = iprot.readString();
return path;
case PULSE:
@@ -366,7 +339,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
pulse.read(iprot);
return pulse;
case BOOLVAL:
- Boolean boolval;
+ java.lang.Boolean boolval;
boolval = iprot.readBool();
return boolval;
case RECORDS:
@@ -380,14 +353,14 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
nodes.read(iprot);
return nodes;
case MESSAGE_BLOB:
- ByteBuffer message_blob;
+ java.nio.ByteBuffer message_blob;
message_blob = iprot.readBinary();
return message_blob;
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
- throw new TProtocolException("Couldn't find a field with field id " + fieldID);
+ throw new org.apache.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID);
}
}
@@ -395,7 +368,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
switch (setField_) {
case PATH:
- String path = (String)value_;
+ java.lang.String path = (java.lang.String)value_;
oprot.writeString(path);
return;
case PULSE:
@@ -403,7 +376,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
pulse.write(oprot);
return;
case BOOLVAL:
- Boolean boolval = (Boolean)value_;
+ java.lang.Boolean boolval = (java.lang.Boolean)value_;
oprot.writeBool(boolval);
return;
case RECORDS:
@@ -415,11 +388,11 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
nodes.write(oprot);
return;
case MESSAGE_BLOB:
- ByteBuffer message_blob = (ByteBuffer)value_;
+ java.nio.ByteBuffer message_blob = (java.nio.ByteBuffer)value_;
oprot.writeBinary(message_blob);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@@ -439,7 +412,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
case MESSAGE_BLOB:
return MESSAGE_BLOB_FIELD_DESC;
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@@ -458,16 +431,16 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
}
- public String get_path() {
+ public java.lang.String get_path() {
if (getSetField() == _Fields.PATH) {
- return (String)getFieldValue();
+ return (java.lang.String)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'path' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'path' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
- public void set_path(String value) {
- if (value == null) throw new NullPointerException();
+ public void set_path(java.lang.String value) {
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.PATH;
value_ = value;
}
@@ -476,21 +449,21 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
if (getSetField() == _Fields.PULSE) {
return (HBPulse)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'pulse' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'pulse' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_pulse(HBPulse value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.PULSE;
value_ = value;
}
public boolean get_boolval() {
if (getSetField() == _Fields.BOOLVAL) {
- return (Boolean)getFieldValue();
+ return (java.lang.Boolean)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'boolval' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'boolval' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
@@ -503,12 +476,12 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
if (getSetField() == _Fields.RECORDS) {
return (HBRecords)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'records' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'records' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_records(HBRecords value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.RECORDS;
value_ = value;
}
@@ -517,36 +490,36 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
if (getSetField() == _Fields.NODES) {
return (HBNodes)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'nodes' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'nodes' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_nodes(HBNodes value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.NODES;
value_ = value;
}
public byte[] get_message_blob() {
set_message_blob(org.apache.thrift.TBaseHelper.rightSize(buffer_for_message_blob()));
- ByteBuffer b = buffer_for_message_blob();
+ java.nio.ByteBuffer b = buffer_for_message_blob();
return b == null ? null : b.array();
}
- public ByteBuffer buffer_for_message_blob() {
+ public java.nio.ByteBuffer buffer_for_message_blob() {
if (getSetField() == _Fields.MESSAGE_BLOB) {
- return org.apache.thrift.TBaseHelper.copyBinary((ByteBuffer)getFieldValue());
+ return org.apache.thrift.TBaseHelper.copyBinary((java.nio.ByteBuffer)getFieldValue());
} else {
- throw new RuntimeException("Cannot get field 'message_blob' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'message_blob' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_message_blob(byte[] value) {
- set_message_blob(ByteBuffer.wrap(Arrays.copyOf(value, value.length)));
+ set_message_blob(java.nio.ByteBuffer.wrap(value.clone()));
}
- public void set_message_blob(ByteBuffer value) {
- if (value == null) throw new NullPointerException();
+ public void set_message_blob(java.nio.ByteBuffer value) {
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.MESSAGE_BLOB;
value_ = value;
}
@@ -581,7 +554,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
}
- public boolean equals(Object other) {
+ public boolean equals(java.lang.Object other) {
if (other instanceof HBMessageData) {
return equals((HBMessageData)other);
} else {
@@ -605,12 +578,12 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>();
list.add(this.getClass().getName());
org.apache.thrift.TFieldIdEnum setField = getSetField();
if (setField != null) {
list.add(setField.getThriftFieldId());
- Object value = getFieldValue();
+ java.lang.Object value = getFieldValue();
if (value instanceof org.apache.thrift.TEnum) {
list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue());
} else {
@@ -628,7 +601,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBNodes.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBNodes.java b/storm-client/src/jvm/org/apache/storm/generated/HBNodes.java
index 4bbd4f4..7f1c005 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/HBNodes.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/HBNodes.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields>, java.io.Serializable, Cloneable, Comparable<HBNodes> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBNodes");
private static final org.apache.thrift.protocol.TField PULSE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("pulseIds", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new HBNodesStandardSchemeFactory());
- schemes.put(TupleScheme.class, new HBNodesTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new HBNodesStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new HBNodesTupleSchemeFactory();
- private List<String> pulseIds; // required
+ private java.util.List<java.lang.String> pulseIds; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
PULSE_IDS((short)1, "pulseIds");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,19 +88,19 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PULSE_IDS, new org.apache.thrift.meta_data.FieldMetaData("pulseIds", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBNodes.class, metaDataMap);
}
@@ -138,7 +108,7 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
}
public HBNodes(
- List<String> pulseIds)
+ java.util.List<java.lang.String> pulseIds)
{
this();
this.pulseIds = pulseIds;
@@ -149,7 +119,7 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
*/
public HBNodes(HBNodes other) {
if (other.is_set_pulseIds()) {
- List<String> __this__pulseIds = new ArrayList<String>(other.pulseIds);
+ java.util.List<java.lang.String> __this__pulseIds = new java.util.ArrayList<java.lang.String>(other.pulseIds);
this.pulseIds = __this__pulseIds;
}
}
@@ -167,22 +137,22 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
return (this.pulseIds == null) ? 0 : this.pulseIds.size();
}
- public java.util.Iterator<String> get_pulseIds_iterator() {
+ public java.util.Iterator<java.lang.String> get_pulseIds_iterator() {
return (this.pulseIds == null) ? null : this.pulseIds.iterator();
}
- public void add_to_pulseIds(String elem) {
+ public void add_to_pulseIds(java.lang.String elem) {
if (this.pulseIds == null) {
- this.pulseIds = new ArrayList<String>();
+ this.pulseIds = new java.util.ArrayList<java.lang.String>();
}
this.pulseIds.add(elem);
}
- public List<String> get_pulseIds() {
+ public java.util.List<java.lang.String> get_pulseIds() {
return this.pulseIds;
}
- public void set_pulseIds(List<String> pulseIds) {
+ public void set_pulseIds(java.util.List<java.lang.String> pulseIds) {
this.pulseIds = pulseIds;
}
@@ -201,43 +171,43 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case PULSE_IDS:
if (value == null) {
unset_pulseIds();
} else {
- set_pulseIds((List<String>)value);
+ set_pulseIds((java.util.List<java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PULSE_IDS:
return get_pulseIds();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case PULSE_IDS:
return is_set_pulseIds();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof HBNodes)
@@ -248,6 +218,8 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
public boolean equals(HBNodes that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_pulseIds = true && this.is_set_pulseIds();
boolean that_present_pulseIds = true && that.is_set_pulseIds();
@@ -263,14 +235,13 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_pulseIds = true && (is_set_pulseIds());
- list.add(present_pulseIds);
- if (present_pulseIds)
- list.add(pulseIds);
+ hashCode = hashCode * 8191 + ((is_set_pulseIds()) ? 131071 : 524287);
+ if (is_set_pulseIds())
+ hashCode = hashCode * 8191 + pulseIds.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -281,7 +252,7 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_pulseIds()).compareTo(other.is_set_pulseIds());
+ lastComparison = java.lang.Boolean.valueOf(is_set_pulseIds()).compareTo(other.is_set_pulseIds());
if (lastComparison != 0) {
return lastComparison;
}
@@ -299,16 +270,16 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("HBNodes(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("HBNodes(");
boolean first = true;
sb.append("pulseIds:");
@@ -335,7 +306,7 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -343,13 +314,13 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
}
}
- private static class HBNodesStandardSchemeFactory implements SchemeFactory {
+ private static class HBNodesStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HBNodesStandardScheme getScheme() {
return new HBNodesStandardScheme();
}
}
- private static class HBNodesStandardScheme extends StandardScheme<HBNodes> {
+ private static class HBNodesStandardScheme extends org.apache.thrift.scheme.StandardScheme<HBNodes> {
public void read(org.apache.thrift.protocol.TProtocol iprot, HBNodes struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -365,8 +336,8 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list912 = iprot.readListBegin();
- struct.pulseIds = new ArrayList<String>(_list912.size);
- String _elem913;
+ struct.pulseIds = new java.util.ArrayList<java.lang.String>(_list912.size);
+ java.lang.String _elem913;
for (int _i914 = 0; _i914 < _list912.size; ++_i914)
{
_elem913 = iprot.readString();
@@ -396,7 +367,7 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
oprot.writeFieldBegin(PULSE_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.pulseIds.size()));
- for (String _iter915 : struct.pulseIds)
+ for (java.lang.String _iter915 : struct.pulseIds)
{
oprot.writeString(_iter915);
}
@@ -410,18 +381,18 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
}
- private static class HBNodesTupleSchemeFactory implements SchemeFactory {
+ private static class HBNodesTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HBNodesTupleScheme getScheme() {
return new HBNodesTupleScheme();
}
}
- private static class HBNodesTupleScheme extends TupleScheme<HBNodes> {
+ private static class HBNodesTupleScheme extends org.apache.thrift.scheme.TupleScheme<HBNodes> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, HBNodes struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_pulseIds()) {
optionals.set(0);
}
@@ -429,7 +400,7 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
if (struct.is_set_pulseIds()) {
{
oprot.writeI32(struct.pulseIds.size());
- for (String _iter916 : struct.pulseIds)
+ for (java.lang.String _iter916 : struct.pulseIds)
{
oprot.writeString(_iter916);
}
@@ -439,13 +410,13 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, HBNodes struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list917 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.pulseIds = new ArrayList<String>(_list917.size);
- String _elem918;
+ struct.pulseIds = new java.util.ArrayList<java.lang.String>(_list917.size);
+ java.lang.String _elem918;
for (int _i919 = 0; _i919 < _list917.size; ++_i919)
{
_elem918 = iprot.readString();
@@ -457,5 +428,8 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBPulse.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBPulse.java b/storm-client/src/jvm/org/apache/storm/generated/HBPulse.java
index 574857d..82e2bbb 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/HBPulse.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/HBPulse.java
@@ -16,66 +16,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields>, java.io.Serializable, Cloneable, Comparable<HBPulse> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBPulse");
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField DETAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("details", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new HBPulseStandardSchemeFactory());
- schemes.put(TupleScheme.class, new HBPulseTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new HBPulseStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new HBPulseTupleSchemeFactory();
- private String id; // required
- private ByteBuffer details; // required
+ private java.lang.String id; // required
+ private java.nio.ByteBuffer details; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ID((short)1, "id"),
DETAILS((short)2, "details");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,20 +93,20 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DETAILS, new org.apache.thrift.meta_data.FieldMetaData("details", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBPulse.class, metaDataMap);
}
@@ -144,8 +114,8 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
}
public HBPulse(
- String id,
- ByteBuffer details)
+ java.lang.String id,
+ java.nio.ByteBuffer details)
{
this();
this.id = id;
@@ -174,11 +144,11 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
this.details = null;
}
- public String get_id() {
+ public java.lang.String get_id() {
return this.id;
}
- public void set_id(String id) {
+ public void set_id(java.lang.String id) {
this.id = id;
}
@@ -202,15 +172,15 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
return details == null ? null : details.array();
}
- public ByteBuffer buffer_for_details() {
+ public java.nio.ByteBuffer buffer_for_details() {
return org.apache.thrift.TBaseHelper.copyBinary(details);
}
public void set_details(byte[] details) {
- this.details = details == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(details, details.length));
+ this.details = details == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(details.clone());
}
- public void set_details(ByteBuffer details) {
+ public void set_details(java.nio.ByteBuffer details) {
this.details = org.apache.thrift.TBaseHelper.copyBinary(details);
}
@@ -229,13 +199,13 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ID:
if (value == null) {
unset_id();
} else {
- set_id((String)value);
+ set_id((java.lang.String)value);
}
break;
@@ -243,14 +213,18 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
if (value == null) {
unset_details();
} else {
- set_details((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ set_details((byte[])value);
+ } else {
+ set_details((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return get_id();
@@ -259,13 +233,13 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
return get_details();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -274,11 +248,11 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
case DETAILS:
return is_set_details();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof HBPulse)
@@ -289,6 +263,8 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
public boolean equals(HBPulse that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_id = true && this.is_set_id();
boolean that_present_id = true && that.is_set_id();
@@ -313,19 +289,17 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_id = true && (is_set_id());
- list.add(present_id);
- if (present_id)
- list.add(id);
+ hashCode = hashCode * 8191 + ((is_set_id()) ? 131071 : 524287);
+ if (is_set_id())
+ hashCode = hashCode * 8191 + id.hashCode();
- boolean present_details = true && (is_set_details());
- list.add(present_details);
- if (present_details)
- list.add(details);
+ hashCode = hashCode * 8191 + ((is_set_details()) ? 131071 : 524287);
+ if (is_set_details())
+ hashCode = hashCode * 8191 + details.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -336,7 +310,7 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -346,7 +320,7 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_details()).compareTo(other.is_set_details());
+ lastComparison = java.lang.Boolean.valueOf(is_set_details()).compareTo(other.is_set_details());
if (lastComparison != 0) {
return lastComparison;
}
@@ -364,16 +338,16 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("HBPulse(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("HBPulse(");
boolean first = true;
sb.append("id:");
@@ -412,7 +386,7 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -420,13 +394,13 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
}
}
- private static class HBPulseStandardSchemeFactory implements SchemeFactory {
+ private static class HBPulseStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HBPulseStandardScheme getScheme() {
return new HBPulseStandardScheme();
}
}
- private static class HBPulseStandardScheme extends StandardScheme<HBPulse> {
+ private static class HBPulseStandardScheme extends org.apache.thrift.scheme.StandardScheme<HBPulse> {
public void read(org.apache.thrift.protocol.TProtocol iprot, HBPulse struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -483,19 +457,19 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
}
- private static class HBPulseTupleSchemeFactory implements SchemeFactory {
+ private static class HBPulseTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HBPulseTupleScheme getScheme() {
return new HBPulseTupleScheme();
}
}
- private static class HBPulseTupleScheme extends TupleScheme<HBPulse> {
+ private static class HBPulseTupleScheme extends org.apache.thrift.scheme.TupleScheme<HBPulse> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, HBPulse struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.id);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_details()) {
optionals.set(0);
}
@@ -507,10 +481,10 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, HBPulse struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.id = iprot.readString();
struct.set_id_isSet(true);
- BitSet incoming = iprot.readBitSet(1);
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.details = iprot.readBinary();
struct.set_details_isSet(true);
@@ -518,5 +492,8 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBRecords.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBRecords.java b/storm-client/src/jvm/org/apache/storm/generated/HBRecords.java
index fae00cf..08043fa 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/HBRecords.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/HBRecords.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._Fields>, java.io.Serializable, Cloneable, Comparable<HBRecords> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBRecords");
private static final org.apache.thrift.protocol.TField PULSES_FIELD_DESC = new org.apache.thrift.protocol.TField("pulses", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new HBRecordsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new HBRecordsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new HBRecordsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new HBRecordsTupleSchemeFactory();
- private List<HBPulse> pulses; // required
+ private java.util.List<HBPulse> pulses; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
PULSES((short)1, "pulses");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,19 +88,19 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PULSES, new org.apache.thrift.meta_data.FieldMetaData("pulses", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HBPulse.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBRecords.class, metaDataMap);
}
@@ -138,7 +108,7 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
}
public HBRecords(
- List<HBPulse> pulses)
+ java.util.List<HBPulse> pulses)
{
this();
this.pulses = pulses;
@@ -149,7 +119,7 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
*/
public HBRecords(HBRecords other) {
if (other.is_set_pulses()) {
- List<HBPulse> __this__pulses = new ArrayList<HBPulse>(other.pulses.size());
+ java.util.List<HBPulse> __this__pulses = new java.util.ArrayList<HBPulse>(other.pulses.size());
for (HBPulse other_element : other.pulses) {
__this__pulses.add(new HBPulse(other_element));
}
@@ -176,16 +146,16 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
public void add_to_pulses(HBPulse elem) {
if (this.pulses == null) {
- this.pulses = new ArrayList<HBPulse>();
+ this.pulses = new java.util.ArrayList<HBPulse>();
}
this.pulses.add(elem);
}
- public List<HBPulse> get_pulses() {
+ public java.util.List<HBPulse> get_pulses() {
return this.pulses;
}
- public void set_pulses(List<HBPulse> pulses) {
+ public void set_pulses(java.util.List<HBPulse> pulses) {
this.pulses = pulses;
}
@@ -204,43 +174,43 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case PULSES:
if (value == null) {
unset_pulses();
} else {
- set_pulses((List<HBPulse>)value);
+ set_pulses((java.util.List<HBPulse>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PULSES:
return get_pulses();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case PULSES:
return is_set_pulses();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof HBRecords)
@@ -251,6 +221,8 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
public boolean equals(HBRecords that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_pulses = true && this.is_set_pulses();
boolean that_present_pulses = true && that.is_set_pulses();
@@ -266,14 +238,13 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_pulses = true && (is_set_pulses());
- list.add(present_pulses);
- if (present_pulses)
- list.add(pulses);
+ hashCode = hashCode * 8191 + ((is_set_pulses()) ? 131071 : 524287);
+ if (is_set_pulses())
+ hashCode = hashCode * 8191 + pulses.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -284,7 +255,7 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_pulses()).compareTo(other.is_set_pulses());
+ lastComparison = java.lang.Boolean.valueOf(is_set_pulses()).compareTo(other.is_set_pulses());
if (lastComparison != 0) {
return lastComparison;
}
@@ -302,16 +273,16 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("HBRecords(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("HBRecords(");
boolean first = true;
sb.append("pulses:");
@@ -338,7 +309,7 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -346,13 +317,13 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
}
}
- private static class HBRecordsStandardSchemeFactory implements SchemeFactory {
+ private static class HBRecordsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HBRecordsStandardScheme getScheme() {
return new HBRecordsStandardScheme();
}
}
- private static class HBRecordsStandardScheme extends StandardScheme<HBRecords> {
+ private static class HBRecordsStandardScheme extends org.apache.thrift.scheme.StandardScheme<HBRecords> {
public void read(org.apache.thrift.protocol.TProtocol iprot, HBRecords struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -368,7 +339,7 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list904 = iprot.readListBegin();
- struct.pulses = new ArrayList<HBPulse>(_list904.size);
+ struct.pulses = new java.util.ArrayList<HBPulse>(_list904.size);
HBPulse _elem905;
for (int _i906 = 0; _i906 < _list904.size; ++_i906)
{
@@ -414,18 +385,18 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
}
- private static class HBRecordsTupleSchemeFactory implements SchemeFactory {
+ private static class HBRecordsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HBRecordsTupleScheme getScheme() {
return new HBRecordsTupleScheme();
}
}
- private static class HBRecordsTupleScheme extends TupleScheme<HBRecords> {
+ private static class HBRecordsTupleScheme extends org.apache.thrift.scheme.TupleScheme<HBRecords> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, HBRecords struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_pulses()) {
optionals.set(0);
}
@@ -443,12 +414,12 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, HBRecords struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list909 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.pulses = new ArrayList<HBPulse>(_list909.size);
+ struct.pulses = new java.util.ArrayList<HBPulse>(_list909.size);
HBPulse _elem910;
for (int _i911 = 0; _i911 < _list909.size; ++_i911)
{
@@ -462,5 +433,8 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBServerMessageType.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBServerMessageType.java b/storm-client/src/jvm/org/apache/storm/generated/HBServerMessageType.java
index 81e0826..8656a23 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/HBServerMessageType.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/HBServerMessageType.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -24,10 +24,6 @@
package org.apache.storm.generated;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
public enum HBServerMessageType implements org.apache.thrift.TEnum {
CREATE_PATH(0),
CREATE_PATH_RESPONSE(1),
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/InvalidTopologyException.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/InvalidTopologyException.java b/storm-client/src/jvm/org/apache/storm/generated/InvalidTopologyException.java
index 9591412..d4b9442 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/InvalidTopologyException.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/InvalidTopologyException.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class InvalidTopologyException extends TException implements org.apache.thrift.TBase<InvalidTopologyException, InvalidTopologyException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidTopologyException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
+public class InvalidTopologyException extends org.apache.thrift.TException implements org.apache.thrift.TBase<InvalidTopologyException, InvalidTopologyException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidTopologyException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidTopologyException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new InvalidTopologyExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new InvalidTopologyExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new InvalidTopologyExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new InvalidTopologyExceptionTupleSchemeFactory();
- private String msg; // required
+ private java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class InvalidTopologyException extends TException implements org.apache.t
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,18 +88,18 @@ public class InvalidTopologyException extends TException implements org.apache.t
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidTopologyException.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class InvalidTopologyException extends TException implements org.apache.t
}
public InvalidTopologyException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -161,11 +131,11 @@ public class InvalidTopologyException extends TException implements org.apache.t
this.msg = null;
}
- public String get_msg() {
+ public java.lang.String get_msg() {
return this.msg;
}
- public void set_msg(String msg) {
+ public void set_msg(java.lang.String msg) {
this.msg = msg;
}
@@ -184,43 +154,43 @@ public class InvalidTopologyException extends TException implements org.apache.t
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unset_msg();
} else {
- set_msg((String)value);
+ set_msg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return get_msg();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return is_set_msg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof InvalidTopologyException)
@@ -231,6 +201,8 @@ public class InvalidTopologyException extends TException implements org.apache.t
public boolean equals(InvalidTopologyException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.is_set_msg();
boolean that_present_msg = true && that.is_set_msg();
@@ -246,14 +218,13 @@ public class InvalidTopologyException extends TException implements org.apache.t
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (is_set_msg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((is_set_msg()) ? 131071 : 524287);
+ if (is_set_msg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class InvalidTopologyException extends TException implements org.apache.t
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class InvalidTopologyException extends TException implements org.apache.t
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("InvalidTopologyException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("InvalidTopologyException(");
boolean first = true;
sb.append("msg:");
@@ -322,7 +293,7 @@ public class InvalidTopologyException extends TException implements org.apache.t
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -330,13 +301,13 @@ public class InvalidTopologyException extends TException implements org.apache.t
}
}
- private static class InvalidTopologyExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class InvalidTopologyExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public InvalidTopologyExceptionStandardScheme getScheme() {
return new InvalidTopologyExceptionStandardScheme();
}
}
- private static class InvalidTopologyExceptionStandardScheme extends StandardScheme<InvalidTopologyException> {
+ private static class InvalidTopologyExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<InvalidTopologyException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidTopologyException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -380,27 +351,30 @@ public class InvalidTopologyException extends TException implements org.apache.t
}
- private static class InvalidTopologyExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class InvalidTopologyExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public InvalidTopologyExceptionTupleScheme getScheme() {
return new InvalidTopologyExceptionTupleScheme();
}
}
- private static class InvalidTopologyExceptionTupleScheme extends TupleScheme<InvalidTopologyException> {
+ private static class InvalidTopologyExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<InvalidTopologyException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, InvalidTopologyException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.msg);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, InvalidTopologyException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.msg = iprot.readString();
struct.set_msg_isSet(true);
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[02/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/py/storm/Supervisor-remote
----------------------------------------------------------------------
diff --git a/storm-client/src/py/storm/Supervisor-remote b/storm-client/src/py/storm/Supervisor-remote
index f0b6f98..1c83cab 100644
--- a/storm-client/src/py/storm/Supervisor-remote
+++ b/storm-client/src/py/storm/Supervisor-remote
@@ -18,7 +18,7 @@
#!/usr/bin/env python
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
@@ -27,100 +27,123 @@
import sys
import pprint
-from urlparse import urlparse
-from thrift.transport import TTransport
-from thrift.transport import TSocket
-from thrift.transport import TSSLSocket
-from thrift.transport import THttpClient
-from thrift.protocol import TBinaryProtocol
+if sys.version_info[0] > 2:
+ from urllib.parse import urlparse
+else:
+ from urlparse import urlparse
+from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
+from thrift.protocol.TBinaryProtocol import TBinaryProtocol
from storm import Supervisor
from storm.ttypes import *
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
- print('')
- print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] function [arg1 [arg2...]]')
- print('')
- print('Functions:')
- print(' void sendSupervisorAssignments(SupervisorAssignments assignments)')
- print(' Assignment getLocalAssignmentForStorm(string id)')
- print(' void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heartbeat)')
- print('')
- sys.exit(0)
-
-pp = pprint.PrettyPrinter(indent = 2)
+ print('')
+ print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
+ print('')
+ print('Functions:')
+ print(' void sendSupervisorAssignments(SupervisorAssignments assignments)')
+ print(' Assignment getLocalAssignmentForStorm(string id)')
+ print(' void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heartbeat)')
+ print('')
+ sys.exit(0)
+
+pp = pprint.PrettyPrinter(indent=2)
host = 'localhost'
port = 9090
uri = ''
framed = False
ssl = False
+validate = True
+ca_certs = None
+keyfile = None
+certfile = None
http = False
argi = 1
if sys.argv[argi] == '-h':
- parts = sys.argv[argi+1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- argi += 2
+ parts = sys.argv[argi + 1].split(':')
+ host = parts[0]
+ if len(parts) > 1:
+ port = int(parts[1])
+ argi += 2
if sys.argv[argi] == '-u':
- url = urlparse(sys.argv[argi+1])
- parts = url[1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- else:
- port = 80
- uri = url[2]
- if url[4]:
- uri += '?%s' % url[4]
- http = True
- argi += 2
+ url = urlparse(sys.argv[argi + 1])
+ parts = url[1].split(':')
+ host = parts[0]
+ if len(parts) > 1:
+ port = int(parts[1])
+ else:
+ port = 80
+ uri = url[2]
+ if url[4]:
+ uri += '?%s' % url[4]
+ http = True
+ argi += 2
if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
- framed = True
- argi += 1
+ framed = True
+ argi += 1
if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl':
- ssl = True
- argi += 1
+ ssl = True
+ argi += 1
+
+if sys.argv[argi] == '-novalidate':
+ validate = False
+ argi += 1
+
+if sys.argv[argi] == '-ca_certs':
+ ca_certs = sys.argv[argi+1]
+ argi += 2
+
+if sys.argv[argi] == '-keyfile':
+ keyfile = sys.argv[argi+1]
+ argi += 2
+
+if sys.argv[argi] == '-certfile':
+ certfile = sys.argv[argi+1]
+ argi += 2
cmd = sys.argv[argi]
-args = sys.argv[argi+1:]
+args = sys.argv[argi + 1:]
if http:
- transport = THttpClient.THttpClient(host, port, uri)
+ transport = THttpClient.THttpClient(host, port, uri)
else:
- socket = TSSLSocket.TSSLSocket(host, port, validate=False) if ssl else TSocket.TSocket(host, port)
- if framed:
- transport = TTransport.TFramedTransport(socket)
- else:
- transport = TTransport.TBufferedTransport(socket)
-protocol = TBinaryProtocol.TBinaryProtocol(transport)
+ if ssl:
+ socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile)
+ else:
+ socket = TSocket.TSocket(host, port)
+ if framed:
+ transport = TTransport.TFramedTransport(socket)
+ else:
+ transport = TTransport.TBufferedTransport(socket)
+protocol = TBinaryProtocol(transport)
client = Supervisor.Client(protocol)
transport.open()
if cmd == 'sendSupervisorAssignments':
- if len(args) != 1:
- print('sendSupervisorAssignments requires 1 args')
- sys.exit(1)
- pp.pprint(client.sendSupervisorAssignments(eval(args[0]),))
+ if len(args) != 1:
+ print('sendSupervisorAssignments requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.sendSupervisorAssignments(eval(args[0]),))
elif cmd == 'getLocalAssignmentForStorm':
- if len(args) != 1:
- print('getLocalAssignmentForStorm requires 1 args')
- sys.exit(1)
- pp.pprint(client.getLocalAssignmentForStorm(args[0],))
+ if len(args) != 1:
+ print('getLocalAssignmentForStorm requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getLocalAssignmentForStorm(args[0],))
elif cmd == 'sendSupervisorWorkerHeartbeat':
- if len(args) != 1:
- print('sendSupervisorWorkerHeartbeat requires 1 args')
- sys.exit(1)
- pp.pprint(client.sendSupervisorWorkerHeartbeat(eval(args[0]),))
+ if len(args) != 1:
+ print('sendSupervisorWorkerHeartbeat requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.sendSupervisorWorkerHeartbeat(eval(args[0]),))
else:
- print('Unrecognized method %s' % cmd)
- sys.exit(1)
+ print('Unrecognized method %s' % cmd)
+ sys.exit(1)
transport.close()
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/py/storm/Supervisor.py
----------------------------------------------------------------------
diff --git a/storm-client/src/py/storm/Supervisor.py b/storm-client/src/py/storm/Supervisor.py
index fbc573f..8fd25ad 100644
--- a/storm-client/src/py/storm/Supervisor.py
+++ b/storm-client/src/py/storm/Supervisor.py
@@ -17,678 +17,666 @@
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:utf8strings
#
-from thrift.Thrift import TType, TMessageType, TException, TApplicationException
+from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+from thrift.protocol.TProtocol import TProtocolException
+from thrift.TRecursive import fix_spec
+
+import sys
import logging
-from ttypes import *
+from .ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol, TProtocol
-try:
- from thrift.protocol import fastbinary
-except:
- fastbinary = None
+all_structs = []
-class Iface:
- def sendSupervisorAssignments(self, assignments):
- """
- Send node specific assignments to supervisor
+class Iface(object):
+ def sendSupervisorAssignments(self, assignments):
+ """
+ Send node specific assignments to supervisor
- Parameters:
- - assignments
- """
- pass
+ Parameters:
+ - assignments
+ """
+ pass
- def getLocalAssignmentForStorm(self, id):
- """
- Get local assignment for a storm
+ def getLocalAssignmentForStorm(self, id):
+ """
+ Get local assignment for a storm
- Parameters:
- - id
- """
- pass
+ Parameters:
+ - id
+ """
+ pass
- def sendSupervisorWorkerHeartbeat(self, heartbeat):
- """
- Send worker heartbeat to local supervisor
+ def sendSupervisorWorkerHeartbeat(self, heartbeat):
+ """
+ Send worker heartbeat to local supervisor
- Parameters:
- - heartbeat
- """
- pass
+ Parameters:
+ - heartbeat
+ """
+ pass
class Client(Iface):
- def __init__(self, iprot, oprot=None):
- self._iprot = self._oprot = iprot
- if oprot is not None:
- self._oprot = oprot
- self._seqid = 0
+ def __init__(self, iprot, oprot=None):
+ self._iprot = self._oprot = iprot
+ if oprot is not None:
+ self._oprot = oprot
+ self._seqid = 0
+
+ def sendSupervisorAssignments(self, assignments):
+ """
+ Send node specific assignments to supervisor
+
+ Parameters:
+ - assignments
+ """
+ self.send_sendSupervisorAssignments(assignments)
+ self.recv_sendSupervisorAssignments()
+
+ def send_sendSupervisorAssignments(self, assignments):
+ self._oprot.writeMessageBegin('sendSupervisorAssignments', TMessageType.CALL, self._seqid)
+ args = sendSupervisorAssignments_args()
+ args.assignments = assignments
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_sendSupervisorAssignments(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = sendSupervisorAssignments_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ return
+
+ def getLocalAssignmentForStorm(self, id):
+ """
+ Get local assignment for a storm
+
+ Parameters:
+ - id
+ """
+ self.send_getLocalAssignmentForStorm(id)
+ return self.recv_getLocalAssignmentForStorm()
+
+ def send_getLocalAssignmentForStorm(self, id):
+ self._oprot.writeMessageBegin('getLocalAssignmentForStorm', TMessageType.CALL, self._seqid)
+ args = getLocalAssignmentForStorm_args()
+ args.id = id
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getLocalAssignmentForStorm(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getLocalAssignmentForStorm_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.e is not None:
+ raise result.e
+ if result.aze is not None:
+ raise result.aze
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getLocalAssignmentForStorm failed: unknown result")
+
+ def sendSupervisorWorkerHeartbeat(self, heartbeat):
+ """
+ Send worker heartbeat to local supervisor
+
+ Parameters:
+ - heartbeat
+ """
+ self.send_sendSupervisorWorkerHeartbeat(heartbeat)
+ self.recv_sendSupervisorWorkerHeartbeat()
+
+ def send_sendSupervisorWorkerHeartbeat(self, heartbeat):
+ self._oprot.writeMessageBegin('sendSupervisorWorkerHeartbeat', TMessageType.CALL, self._seqid)
+ args = sendSupervisorWorkerHeartbeat_args()
+ args.heartbeat = heartbeat
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_sendSupervisorWorkerHeartbeat(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = sendSupervisorWorkerHeartbeat_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.aze is not None:
+ raise result.aze
+ return
+
+
+class Processor(Iface, TProcessor):
+ def __init__(self, handler):
+ self._handler = handler
+ self._processMap = {}
+ self._processMap["sendSupervisorAssignments"] = Processor.process_sendSupervisorAssignments
+ self._processMap["getLocalAssignmentForStorm"] = Processor.process_getLocalAssignmentForStorm
+ self._processMap["sendSupervisorWorkerHeartbeat"] = Processor.process_sendSupervisorWorkerHeartbeat
+
+ def process(self, iprot, oprot):
+ (name, type, seqid) = iprot.readMessageBegin()
+ if name not in self._processMap:
+ iprot.skip(TType.STRUCT)
+ iprot.readMessageEnd()
+ x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
+ oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
+ x.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+ return
+ else:
+ self._processMap[name](self, seqid, iprot, oprot)
+ return True
+
+ def process_sendSupervisorAssignments(self, seqid, iprot, oprot):
+ args = sendSupervisorAssignments_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = sendSupervisorAssignments_result()
+ try:
+ self._handler.sendSupervisorAssignments(args.assignments)
+ 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("sendSupervisorAssignments", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getLocalAssignmentForStorm(self, seqid, iprot, oprot):
+ args = getLocalAssignmentForStorm_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getLocalAssignmentForStorm_result()
+ try:
+ result.success = self._handler.getLocalAssignmentForStorm(args.id)
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except NotAliveException as e:
+ msg_type = TMessageType.REPLY
+ result.e = e
+ 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("getLocalAssignmentForStorm", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_sendSupervisorWorkerHeartbeat(self, seqid, iprot, oprot):
+ args = sendSupervisorWorkerHeartbeat_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = sendSupervisorWorkerHeartbeat_result()
+ try:
+ self._handler.sendSupervisorWorkerHeartbeat(args.heartbeat)
+ 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("sendSupervisorWorkerHeartbeat", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+# HELPER FUNCTIONS AND STRUCTURES
- def sendSupervisorAssignments(self, assignments):
- """
- Send node specific assignments to supervisor
- Parameters:
+class sendSupervisorAssignments_args(object):
+ """
+ Attributes:
- assignments
"""
- self.send_sendSupervisorAssignments(assignments)
- self.recv_sendSupervisorAssignments()
-
- def send_sendSupervisorAssignments(self, assignments):
- self._oprot.writeMessageBegin('sendSupervisorAssignments', TMessageType.CALL, self._seqid)
- args = sendSupervisorAssignments_args()
- args.assignments = assignments
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_sendSupervisorAssignments(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = sendSupervisorAssignments_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.aze is not None:
- raise result.aze
- return
-
- def getLocalAssignmentForStorm(self, id):
+
+
+ def __init__(self, assignments=None,):
+ self.assignments = assignments
+
+ 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.STRUCT:
+ self.assignments = SupervisorAssignments()
+ self.assignments.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('sendSupervisorAssignments_args')
+ if self.assignments is not None:
+ oprot.writeFieldBegin('assignments', TType.STRUCT, 1)
+ self.assignments.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(sendSupervisorAssignments_args)
+sendSupervisorAssignments_args.thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'assignments', [SupervisorAssignments, None], None, ), # 1
+)
+
+
+class sendSupervisorAssignments_result(object):
+ """
+ Attributes:
+ - aze
"""
- Get local assignment for a storm
- Parameters:
+
+ def __init__(self, aze=None,):
+ 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 == 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('sendSupervisorAssignments_result')
+ 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(sendSupervisorAssignments_result)
+sendSupervisorAssignments_result.thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'aze', [AuthorizationException, None], None, ), # 1
+)
+
+
+class getLocalAssignmentForStorm_args(object):
+ """
+ Attributes:
- id
"""
- self.send_getLocalAssignmentForStorm(id)
- return self.recv_getLocalAssignmentForStorm()
-
- def send_getLocalAssignmentForStorm(self, id):
- self._oprot.writeMessageBegin('getLocalAssignmentForStorm', TMessageType.CALL, self._seqid)
- args = getLocalAssignmentForStorm_args()
- args.id = id
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_getLocalAssignmentForStorm(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = getLocalAssignmentForStorm_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.e is not None:
- raise result.e
- if result.aze is not None:
- raise result.aze
- raise TApplicationException(TApplicationException.MISSING_RESULT, "getLocalAssignmentForStorm failed: unknown result")
-
- def sendSupervisorWorkerHeartbeat(self, heartbeat):
+
+
+ def __init__(self, id=None,):
+ self.id = id
+
+ 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.id = 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('getLocalAssignmentForStorm_args')
+ if self.id is not None:
+ oprot.writeFieldBegin('id', TType.STRING, 1)
+ oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id)
+ 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(getLocalAssignmentForStorm_args)
+getLocalAssignmentForStorm_args.thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'id', 'UTF8', None, ), # 1
+)
+
+
+class getLocalAssignmentForStorm_result(object):
+ """
+ Attributes:
+ - success
+ - e
+ - aze
"""
- Send worker heartbeat to local supervisor
- Parameters:
+
+ def __init__(self, success=None, e=None, aze=None,):
+ self.success = success
+ self.e = e
+ 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.STRUCT:
+ self.success = Assignment()
+ self.success.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.e = NotAliveException()
+ self.e.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.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('getLocalAssignmentForStorm_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
+ self.success.write(oprot)
+ oprot.writeFieldEnd()
+ if self.e is not None:
+ oprot.writeFieldBegin('e', TType.STRUCT, 1)
+ self.e.write(oprot)
+ oprot.writeFieldEnd()
+ if self.aze is not None:
+ oprot.writeFieldBegin('aze', TType.STRUCT, 2)
+ self.aze.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ 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(getLocalAssignmentForStorm_result)
+getLocalAssignmentForStorm_result.thrift_spec = (
+ (0, TType.STRUCT, 'success', [Assignment, None], None, ), # 0
+ (1, TType.STRUCT, 'e', [NotAliveException, None], None, ), # 1
+ (2, TType.STRUCT, 'aze', [AuthorizationException, None], None, ), # 2
+)
+
+
+class sendSupervisorWorkerHeartbeat_args(object):
+ """
+ Attributes:
- heartbeat
"""
- self.send_sendSupervisorWorkerHeartbeat(heartbeat)
- self.recv_sendSupervisorWorkerHeartbeat()
-
- def send_sendSupervisorWorkerHeartbeat(self, heartbeat):
- self._oprot.writeMessageBegin('sendSupervisorWorkerHeartbeat', TMessageType.CALL, self._seqid)
- args = sendSupervisorWorkerHeartbeat_args()
- args.heartbeat = heartbeat
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_sendSupervisorWorkerHeartbeat(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = sendSupervisorWorkerHeartbeat_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.aze is not None:
- raise result.aze
- return
-class Processor(Iface, TProcessor):
- def __init__(self, handler):
- self._handler = handler
- self._processMap = {}
- self._processMap["sendSupervisorAssignments"] = Processor.process_sendSupervisorAssignments
- self._processMap["getLocalAssignmentForStorm"] = Processor.process_getLocalAssignmentForStorm
- self._processMap["sendSupervisorWorkerHeartbeat"] = Processor.process_sendSupervisorWorkerHeartbeat
-
- def process(self, iprot, oprot):
- (name, type, seqid) = iprot.readMessageBegin()
- if name not in self._processMap:
- iprot.skip(TType.STRUCT)
- iprot.readMessageEnd()
- x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
- oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
- x.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- return
- else:
- self._processMap[name](self, seqid, iprot, oprot)
- return True
-
- def process_sendSupervisorAssignments(self, seqid, iprot, oprot):
- args = sendSupervisorAssignments_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = sendSupervisorAssignments_result()
- try:
- self._handler.sendSupervisorAssignments(args.assignments)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("sendSupervisorAssignments", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_getLocalAssignmentForStorm(self, seqid, iprot, oprot):
- args = getLocalAssignmentForStorm_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = getLocalAssignmentForStorm_result()
- try:
- result.success = self._handler.getLocalAssignmentForStorm(args.id)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except NotAliveException as e:
- msg_type = TMessageType.REPLY
- result.e = e
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getLocalAssignmentForStorm", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_sendSupervisorWorkerHeartbeat(self, seqid, iprot, oprot):
- args = sendSupervisorWorkerHeartbeat_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = sendSupervisorWorkerHeartbeat_result()
- try:
- self._handler.sendSupervisorWorkerHeartbeat(args.heartbeat)
- msg_type = TMessageType.REPLY
- except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
- raise
- except AuthorizationException as aze:
- msg_type = TMessageType.REPLY
- result.aze = aze
- except Exception as ex:
- msg_type = TMessageType.EXCEPTION
- logging.exception(ex)
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("sendSupervisorWorkerHeartbeat", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
+ def __init__(self, heartbeat=None,):
+ self.heartbeat = heartbeat
+
+ 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.STRUCT:
+ self.heartbeat = SupervisorWorkerHeartbeat()
+ self.heartbeat.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('sendSupervisorWorkerHeartbeat_args')
+ if self.heartbeat is not None:
+ oprot.writeFieldBegin('heartbeat', TType.STRUCT, 1)
+ self.heartbeat.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(sendSupervisorWorkerHeartbeat_args)
+sendSupervisorWorkerHeartbeat_args.thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'heartbeat', [SupervisorWorkerHeartbeat, None], None, ), # 1
+)
+
+
+class sendSupervisorWorkerHeartbeat_result(object):
+ """
+ Attributes:
+ - aze
+ """
-# HELPER FUNCTIONS AND STRUCTURES
+ def __init__(self, aze=None,):
+ 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 == 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('sendSupervisorWorkerHeartbeat_result')
+ 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(sendSupervisorWorkerHeartbeat_result)
+sendSupervisorWorkerHeartbeat_result.thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'aze', [AuthorizationException, None], None, ), # 1
+)
+fix_spec(all_structs)
+del all_structs
-class sendSupervisorAssignments_args:
- """
- Attributes:
- - assignments
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'assignments', (SupervisorAssignments, SupervisorAssignments.thrift_spec), None, ), # 1
- )
-
- def __init__(self, assignments=None,):
- self.assignments = assignments
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.assignments = SupervisorAssignments()
- self.assignments.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('sendSupervisorAssignments_args')
- if self.assignments is not None:
- oprot.writeFieldBegin('assignments', TType.STRUCT, 1)
- self.assignments.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.assignments)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class sendSupervisorAssignments_result:
- """
- Attributes:
- - aze
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
- )
-
- def __init__(self, aze=None,):
- self.aze = aze
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.aze = AuthorizationException()
- self.aze.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('sendSupervisorAssignments_result')
- 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 __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.aze)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class getLocalAssignmentForStorm_args:
- """
- Attributes:
- - id
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'id', None, None, ), # 1
- )
-
- def __init__(self, id=None,):
- self.id = id
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.id = iprot.readString().decode('utf-8')
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('getLocalAssignmentForStorm_args')
- if self.id is not None:
- oprot.writeFieldBegin('id', TType.STRING, 1)
- oprot.writeString(self.id.encode('utf-8'))
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.id)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class getLocalAssignmentForStorm_result:
- """
- Attributes:
- - success
- - e
- - aze
- """
-
- thrift_spec = (
- (0, TType.STRUCT, 'success', (Assignment, Assignment.thrift_spec), None, ), # 0
- (1, TType.STRUCT, 'e', (NotAliveException, NotAliveException.thrift_spec), None, ), # 1
- (2, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 2
- )
-
- def __init__(self, success=None, e=None, aze=None,):
- self.success = success
- self.e = e
- self.aze = aze
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = Assignment()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.e = NotAliveException()
- self.e.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.aze = AuthorizationException()
- self.aze.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('getLocalAssignmentForStorm_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- if self.e is not None:
- oprot.writeFieldBegin('e', TType.STRUCT, 1)
- self.e.write(oprot)
- oprot.writeFieldEnd()
- if self.aze is not None:
- oprot.writeFieldBegin('aze', TType.STRUCT, 2)
- self.aze.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.success)
- value = (value * 31) ^ hash(self.e)
- value = (value * 31) ^ hash(self.aze)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class sendSupervisorWorkerHeartbeat_args:
- """
- Attributes:
- - heartbeat
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'heartbeat', (SupervisorWorkerHeartbeat, SupervisorWorkerHeartbeat.thrift_spec), None, ), # 1
- )
-
- def __init__(self, heartbeat=None,):
- self.heartbeat = heartbeat
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.heartbeat = SupervisorWorkerHeartbeat()
- self.heartbeat.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('sendSupervisorWorkerHeartbeat_args')
- if self.heartbeat is not None:
- oprot.writeFieldBegin('heartbeat', TType.STRUCT, 1)
- self.heartbeat.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.heartbeat)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class sendSupervisorWorkerHeartbeat_result:
- """
- Attributes:
- - aze
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), # 1
- )
-
- def __init__(self, aze=None,):
- self.aze = aze
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.aze = AuthorizationException()
- self.aze.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('sendSupervisorWorkerHeartbeat_result')
- 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 __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.aze)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/py/storm/constants.py
----------------------------------------------------------------------
diff --git a/storm-client/src/py/storm/constants.py b/storm-client/src/py/storm/constants.py
index b403f97..dc3ebd4 100644
--- a/storm-client/src/py/storm/constants.py
+++ b/storm-client/src/py/storm/constants.py
@@ -17,13 +17,16 @@
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:utf8strings
#
-from thrift.Thrift import TType, TMessageType, TException, TApplicationException
-from ttypes import *
+from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+from thrift.protocol.TProtocol import TProtocolException
+from thrift.TRecursive import fix_spec
+import sys
+from .ttypes import *
[11/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/TopologyInfo.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/TopologyInfo.java b/storm-client/src/jvm/org/apache/storm/generated/TopologyInfo.java
index 9b4baa6..e4ea4d8 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/TopologyInfo.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/TopologyInfo.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, TopologyInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TopologyInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TopologyInfo");
@@ -73,22 +46,19 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
private static final org.apache.thrift.protocol.TField ASSIGNED_MEMOFFHEAP_FIELD_DESC = new org.apache.thrift.protocol.TField("assigned_memoffheap", org.apache.thrift.protocol.TType.DOUBLE, (short)525);
private static final org.apache.thrift.protocol.TField ASSIGNED_CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("assigned_cpu", org.apache.thrift.protocol.TType.DOUBLE, (short)526);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TopologyInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TopologyInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TopologyInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TopologyInfoTupleSchemeFactory();
- private String id; // required
- private String name; // required
+ private java.lang.String id; // required
+ private java.lang.String name; // required
private int uptime_secs; // required
- private List<ExecutorSummary> executors; // required
- private String status; // required
- private Map<String,List<ErrorInfo>> errors; // required
- private Map<String,DebugOptions> component_debug; // optional
- private String storm_version; // optional
- private String sched_status; // optional
- private String owner; // optional
+ private java.util.List<ExecutorSummary> executors; // required
+ private java.lang.String status; // required
+ private java.util.Map<java.lang.String,java.util.List<ErrorInfo>> errors; // required
+ private java.util.Map<java.lang.String,DebugOptions> component_debug; // optional
+ private java.lang.String storm_version; // optional
+ private java.lang.String sched_status; // optional
+ private java.lang.String owner; // optional
private int replication_count; // optional
private double requested_memonheap; // optional
private double requested_memoffheap; // optional
@@ -117,10 +87,10 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
ASSIGNED_MEMOFFHEAP((short)525, "assigned_memoffheap"),
ASSIGNED_CPU((short)526, "assigned_cpu");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -175,21 +145,21 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -198,7 +168,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -214,9 +184,9 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
private static final int __ASSIGNED_CPU_ISSET_ID = 7;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.COMPONENT_DEBUG,_Fields.STORM_VERSION,_Fields.SCHED_STATUS,_Fields.OWNER,_Fields.REPLICATION_COUNT,_Fields.REQUESTED_MEMONHEAP,_Fields.REQUESTED_MEMOFFHEAP,_Fields.REQUESTED_CPU,_Fields.ASSIGNED_MEMONHEAP,_Fields.ASSIGNED_MEMOFFHEAP,_Fields.ASSIGNED_CPU};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -257,7 +227,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.ASSIGNED_CPU, new org.apache.thrift.meta_data.FieldMetaData("assigned_cpu", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TopologyInfo.class, metaDataMap);
}
@@ -265,12 +235,12 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
public TopologyInfo(
- String id,
- String name,
+ java.lang.String id,
+ java.lang.String name,
int uptime_secs,
- List<ExecutorSummary> executors,
- String status,
- Map<String,List<ErrorInfo>> errors)
+ java.util.List<ExecutorSummary> executors,
+ java.lang.String status,
+ java.util.Map<java.lang.String,java.util.List<ErrorInfo>> errors)
{
this();
this.id = id;
@@ -295,7 +265,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
this.uptime_secs = other.uptime_secs;
if (other.is_set_executors()) {
- List<ExecutorSummary> __this__executors = new ArrayList<ExecutorSummary>(other.executors.size());
+ java.util.List<ExecutorSummary> __this__executors = new java.util.ArrayList<ExecutorSummary>(other.executors.size());
for (ExecutorSummary other_element : other.executors) {
__this__executors.add(new ExecutorSummary(other_element));
}
@@ -305,15 +275,15 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
this.status = other.status;
}
if (other.is_set_errors()) {
- Map<String,List<ErrorInfo>> __this__errors = new HashMap<String,List<ErrorInfo>>(other.errors.size());
- for (Map.Entry<String, List<ErrorInfo>> other_element : other.errors.entrySet()) {
+ java.util.Map<java.lang.String,java.util.List<ErrorInfo>> __this__errors = new java.util.HashMap<java.lang.String,java.util.List<ErrorInfo>>(other.errors.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.List<ErrorInfo>> other_element : other.errors.entrySet()) {
- String other_element_key = other_element.getKey();
- List<ErrorInfo> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.List<ErrorInfo> other_element_value = other_element.getValue();
- String __this__errors_copy_key = other_element_key;
+ java.lang.String __this__errors_copy_key = other_element_key;
- List<ErrorInfo> __this__errors_copy_value = new ArrayList<ErrorInfo>(other_element_value.size());
+ java.util.List<ErrorInfo> __this__errors_copy_value = new java.util.ArrayList<ErrorInfo>(other_element_value.size());
for (ErrorInfo other_element_value_element : other_element_value) {
__this__errors_copy_value.add(new ErrorInfo(other_element_value_element));
}
@@ -323,13 +293,13 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
this.errors = __this__errors;
}
if (other.is_set_component_debug()) {
- Map<String,DebugOptions> __this__component_debug = new HashMap<String,DebugOptions>(other.component_debug.size());
- for (Map.Entry<String, DebugOptions> other_element : other.component_debug.entrySet()) {
+ java.util.Map<java.lang.String,DebugOptions> __this__component_debug = new java.util.HashMap<java.lang.String,DebugOptions>(other.component_debug.size());
+ for (java.util.Map.Entry<java.lang.String, DebugOptions> other_element : other.component_debug.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
DebugOptions other_element_value = other_element.getValue();
- String __this__component_debug_copy_key = other_element_key;
+ java.lang.String __this__component_debug_copy_key = other_element_key;
DebugOptions __this__component_debug_copy_value = new DebugOptions(other_element_value);
@@ -388,11 +358,11 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
this.assigned_cpu = 0.0;
}
- public String get_id() {
+ public java.lang.String get_id() {
return this.id;
}
- public void set_id(String id) {
+ public void set_id(java.lang.String id) {
this.id = id;
}
@@ -411,11 +381,11 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
}
- public String get_name() {
+ public java.lang.String get_name() {
return this.name;
}
- public void set_name(String name) {
+ public void set_name(java.lang.String name) {
this.name = name;
}
@@ -444,16 +414,16 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
public void unset_uptime_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
/** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_uptime_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
public void set_uptime_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
}
public int get_executors_size() {
@@ -466,16 +436,16 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
public void add_to_executors(ExecutorSummary elem) {
if (this.executors == null) {
- this.executors = new ArrayList<ExecutorSummary>();
+ this.executors = new java.util.ArrayList<ExecutorSummary>();
}
this.executors.add(elem);
}
- public List<ExecutorSummary> get_executors() {
+ public java.util.List<ExecutorSummary> get_executors() {
return this.executors;
}
- public void set_executors(List<ExecutorSummary> executors) {
+ public void set_executors(java.util.List<ExecutorSummary> executors) {
this.executors = executors;
}
@@ -494,11 +464,11 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
}
- public String get_status() {
+ public java.lang.String get_status() {
return this.status;
}
- public void set_status(String status) {
+ public void set_status(java.lang.String status) {
this.status = status;
}
@@ -521,18 +491,18 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return (this.errors == null) ? 0 : this.errors.size();
}
- public void put_to_errors(String key, List<ErrorInfo> val) {
+ public void put_to_errors(java.lang.String key, java.util.List<ErrorInfo> val) {
if (this.errors == null) {
- this.errors = new HashMap<String,List<ErrorInfo>>();
+ this.errors = new java.util.HashMap<java.lang.String,java.util.List<ErrorInfo>>();
}
this.errors.put(key, val);
}
- public Map<String,List<ErrorInfo>> get_errors() {
+ public java.util.Map<java.lang.String,java.util.List<ErrorInfo>> get_errors() {
return this.errors;
}
- public void set_errors(Map<String,List<ErrorInfo>> errors) {
+ public void set_errors(java.util.Map<java.lang.String,java.util.List<ErrorInfo>> errors) {
this.errors = errors;
}
@@ -555,18 +525,18 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return (this.component_debug == null) ? 0 : this.component_debug.size();
}
- public void put_to_component_debug(String key, DebugOptions val) {
+ public void put_to_component_debug(java.lang.String key, DebugOptions val) {
if (this.component_debug == null) {
- this.component_debug = new HashMap<String,DebugOptions>();
+ this.component_debug = new java.util.HashMap<java.lang.String,DebugOptions>();
}
this.component_debug.put(key, val);
}
- public Map<String,DebugOptions> get_component_debug() {
+ public java.util.Map<java.lang.String,DebugOptions> get_component_debug() {
return this.component_debug;
}
- public void set_component_debug(Map<String,DebugOptions> component_debug) {
+ public void set_component_debug(java.util.Map<java.lang.String,DebugOptions> component_debug) {
this.component_debug = component_debug;
}
@@ -585,11 +555,11 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
}
- public String get_storm_version() {
+ public java.lang.String get_storm_version() {
return this.storm_version;
}
- public void set_storm_version(String storm_version) {
+ public void set_storm_version(java.lang.String storm_version) {
this.storm_version = storm_version;
}
@@ -608,11 +578,11 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
}
- public String get_sched_status() {
+ public java.lang.String get_sched_status() {
return this.sched_status;
}
- public void set_sched_status(String sched_status) {
+ public void set_sched_status(java.lang.String sched_status) {
this.sched_status = sched_status;
}
@@ -631,11 +601,11 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
}
- public String get_owner() {
+ public java.lang.String get_owner() {
return this.owner;
}
- public void set_owner(String owner) {
+ public void set_owner(java.lang.String owner) {
this.owner = owner;
}
@@ -664,16 +634,16 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
public void unset_replication_count() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID);
}
/** Returns true if field replication_count is set (has been assigned a value) and false otherwise */
public boolean is_set_replication_count() {
- return EncodingUtils.testBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID);
}
public void set_replication_count_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID, value);
}
public double get_requested_memonheap() {
@@ -686,16 +656,16 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
public void unset_requested_memonheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
}
/** Returns true if field requested_memonheap is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_memonheap() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID);
}
public void set_requested_memonheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMONHEAP_ISSET_ID, value);
}
public double get_requested_memoffheap() {
@@ -708,16 +678,16 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
public void unset_requested_memoffheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
}
/** Returns true if field requested_memoffheap is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_memoffheap() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID);
}
public void set_requested_memoffheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_MEMOFFHEAP_ISSET_ID, value);
}
public double get_requested_cpu() {
@@ -730,16 +700,16 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
public void unset_requested_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
}
/** Returns true if field requested_cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
}
public void set_requested_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID, value);
}
public double get_assigned_memonheap() {
@@ -752,16 +722,16 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
public void unset_assigned_memonheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
}
/** Returns true if field assigned_memonheap is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_memonheap() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID);
}
public void set_assigned_memonheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMONHEAP_ISSET_ID, value);
}
public double get_assigned_memoffheap() {
@@ -774,16 +744,16 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
public void unset_assigned_memoffheap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
}
/** Returns true if field assigned_memoffheap is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_memoffheap() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID);
}
public void set_assigned_memoffheap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_MEMOFFHEAP_ISSET_ID, value);
}
public double get_assigned_cpu() {
@@ -796,25 +766,25 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
public void unset_assigned_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
}
/** Returns true if field assigned_cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID);
}
public void set_assigned_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_CPU_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ID:
if (value == null) {
unset_id();
} else {
- set_id((String)value);
+ set_id((java.lang.String)value);
}
break;
@@ -822,7 +792,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_name();
} else {
- set_name((String)value);
+ set_name((java.lang.String)value);
}
break;
@@ -830,7 +800,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_uptime_secs();
} else {
- set_uptime_secs((Integer)value);
+ set_uptime_secs((java.lang.Integer)value);
}
break;
@@ -838,7 +808,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_executors();
} else {
- set_executors((List<ExecutorSummary>)value);
+ set_executors((java.util.List<ExecutorSummary>)value);
}
break;
@@ -846,7 +816,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_status();
} else {
- set_status((String)value);
+ set_status((java.lang.String)value);
}
break;
@@ -854,7 +824,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_errors();
} else {
- set_errors((Map<String,List<ErrorInfo>>)value);
+ set_errors((java.util.Map<java.lang.String,java.util.List<ErrorInfo>>)value);
}
break;
@@ -862,7 +832,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_component_debug();
} else {
- set_component_debug((Map<String,DebugOptions>)value);
+ set_component_debug((java.util.Map<java.lang.String,DebugOptions>)value);
}
break;
@@ -870,7 +840,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_storm_version();
} else {
- set_storm_version((String)value);
+ set_storm_version((java.lang.String)value);
}
break;
@@ -878,7 +848,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_sched_status();
} else {
- set_sched_status((String)value);
+ set_sched_status((java.lang.String)value);
}
break;
@@ -886,7 +856,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_owner();
} else {
- set_owner((String)value);
+ set_owner((java.lang.String)value);
}
break;
@@ -894,7 +864,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_replication_count();
} else {
- set_replication_count((Integer)value);
+ set_replication_count((java.lang.Integer)value);
}
break;
@@ -902,7 +872,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_requested_memonheap();
} else {
- set_requested_memonheap((Double)value);
+ set_requested_memonheap((java.lang.Double)value);
}
break;
@@ -910,7 +880,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_requested_memoffheap();
} else {
- set_requested_memoffheap((Double)value);
+ set_requested_memoffheap((java.lang.Double)value);
}
break;
@@ -918,7 +888,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_requested_cpu();
} else {
- set_requested_cpu((Double)value);
+ set_requested_cpu((java.lang.Double)value);
}
break;
@@ -926,7 +896,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_assigned_memonheap();
} else {
- set_assigned_memonheap((Double)value);
+ set_assigned_memonheap((java.lang.Double)value);
}
break;
@@ -934,7 +904,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_assigned_memoffheap();
} else {
- set_assigned_memoffheap((Double)value);
+ set_assigned_memoffheap((java.lang.Double)value);
}
break;
@@ -942,14 +912,14 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (value == null) {
unset_assigned_cpu();
} else {
- set_assigned_cpu((Double)value);
+ set_assigned_cpu((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return get_id();
@@ -1003,13 +973,13 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return get_assigned_cpu();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -1048,11 +1018,11 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
case ASSIGNED_CPU:
return is_set_assigned_cpu();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TopologyInfo)
@@ -1063,6 +1033,8 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
public boolean equals(TopologyInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_id = true && this.is_set_id();
boolean that_present_id = true && that.is_set_id();
@@ -1222,94 +1194,75 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_id = true && (is_set_id());
- list.add(present_id);
- if (present_id)
- list.add(id);
-
- boolean present_name = true && (is_set_name());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_uptime_secs = true;
- list.add(present_uptime_secs);
- if (present_uptime_secs)
- list.add(uptime_secs);
-
- boolean present_executors = true && (is_set_executors());
- list.add(present_executors);
- if (present_executors)
- list.add(executors);
-
- boolean present_status = true && (is_set_status());
- list.add(present_status);
- if (present_status)
- list.add(status);
-
- boolean present_errors = true && (is_set_errors());
- list.add(present_errors);
- if (present_errors)
- list.add(errors);
-
- boolean present_component_debug = true && (is_set_component_debug());
- list.add(present_component_debug);
- if (present_component_debug)
- list.add(component_debug);
-
- boolean present_storm_version = true && (is_set_storm_version());
- list.add(present_storm_version);
- if (present_storm_version)
- list.add(storm_version);
-
- boolean present_sched_status = true && (is_set_sched_status());
- list.add(present_sched_status);
- if (present_sched_status)
- list.add(sched_status);
-
- boolean present_owner = true && (is_set_owner());
- list.add(present_owner);
- if (present_owner)
- list.add(owner);
-
- boolean present_replication_count = true && (is_set_replication_count());
- list.add(present_replication_count);
- if (present_replication_count)
- list.add(replication_count);
-
- boolean present_requested_memonheap = true && (is_set_requested_memonheap());
- list.add(present_requested_memonheap);
- if (present_requested_memonheap)
- list.add(requested_memonheap);
-
- boolean present_requested_memoffheap = true && (is_set_requested_memoffheap());
- list.add(present_requested_memoffheap);
- if (present_requested_memoffheap)
- list.add(requested_memoffheap);
-
- boolean present_requested_cpu = true && (is_set_requested_cpu());
- list.add(present_requested_cpu);
- if (present_requested_cpu)
- list.add(requested_cpu);
-
- boolean present_assigned_memonheap = true && (is_set_assigned_memonheap());
- list.add(present_assigned_memonheap);
- if (present_assigned_memonheap)
- list.add(assigned_memonheap);
-
- boolean present_assigned_memoffheap = true && (is_set_assigned_memoffheap());
- list.add(present_assigned_memoffheap);
- if (present_assigned_memoffheap)
- list.add(assigned_memoffheap);
-
- boolean present_assigned_cpu = true && (is_set_assigned_cpu());
- list.add(present_assigned_cpu);
- if (present_assigned_cpu)
- list.add(assigned_cpu);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((is_set_id()) ? 131071 : 524287);
+ if (is_set_id())
+ hashCode = hashCode * 8191 + id.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_name()) ? 131071 : 524287);
+ if (is_set_name())
+ hashCode = hashCode * 8191 + name.hashCode();
+
+ hashCode = hashCode * 8191 + uptime_secs;
+
+ hashCode = hashCode * 8191 + ((is_set_executors()) ? 131071 : 524287);
+ if (is_set_executors())
+ hashCode = hashCode * 8191 + executors.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_status()) ? 131071 : 524287);
+ if (is_set_status())
+ hashCode = hashCode * 8191 + status.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_errors()) ? 131071 : 524287);
+ if (is_set_errors())
+ hashCode = hashCode * 8191 + errors.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_component_debug()) ? 131071 : 524287);
+ if (is_set_component_debug())
+ hashCode = hashCode * 8191 + component_debug.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_storm_version()) ? 131071 : 524287);
+ if (is_set_storm_version())
+ hashCode = hashCode * 8191 + storm_version.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_sched_status()) ? 131071 : 524287);
+ if (is_set_sched_status())
+ hashCode = hashCode * 8191 + sched_status.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_owner()) ? 131071 : 524287);
+ if (is_set_owner())
+ hashCode = hashCode * 8191 + owner.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_replication_count()) ? 131071 : 524287);
+ if (is_set_replication_count())
+ hashCode = hashCode * 8191 + replication_count;
+
+ hashCode = hashCode * 8191 + ((is_set_requested_memonheap()) ? 131071 : 524287);
+ if (is_set_requested_memonheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_memonheap);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_memoffheap()) ? 131071 : 524287);
+ if (is_set_requested_memoffheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_memoffheap);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_cpu()) ? 131071 : 524287);
+ if (is_set_requested_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_cpu);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_memonheap()) ? 131071 : 524287);
+ if (is_set_assigned_memonheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_memonheap);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_memoffheap()) ? 131071 : 524287);
+ if (is_set_assigned_memoffheap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_memoffheap);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_cpu()) ? 131071 : 524287);
+ if (is_set_assigned_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_cpu);
+
+ return hashCode;
}
@Override
@@ -1320,7 +1273,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1330,7 +1283,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
+ lastComparison = java.lang.Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1340,7 +1293,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1350,7 +1303,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1360,7 +1313,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_status()).compareTo(other.is_set_status());
+ lastComparison = java.lang.Boolean.valueOf(is_set_status()).compareTo(other.is_set_status());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1370,7 +1323,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_errors()).compareTo(other.is_set_errors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_errors()).compareTo(other.is_set_errors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1380,7 +1333,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_component_debug()).compareTo(other.is_set_component_debug());
+ lastComparison = java.lang.Boolean.valueOf(is_set_component_debug()).compareTo(other.is_set_component_debug());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1390,7 +1343,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_storm_version()).compareTo(other.is_set_storm_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_storm_version()).compareTo(other.is_set_storm_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1400,7 +1353,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_sched_status()).compareTo(other.is_set_sched_status());
+ lastComparison = java.lang.Boolean.valueOf(is_set_sched_status()).compareTo(other.is_set_sched_status());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1410,7 +1363,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
+ lastComparison = java.lang.Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1420,7 +1373,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_replication_count()).compareTo(other.is_set_replication_count());
+ lastComparison = java.lang.Boolean.valueOf(is_set_replication_count()).compareTo(other.is_set_replication_count());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1430,7 +1383,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_memonheap()).compareTo(other.is_set_requested_memonheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_memonheap()).compareTo(other.is_set_requested_memonheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1440,7 +1393,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_memoffheap()).compareTo(other.is_set_requested_memoffheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_memoffheap()).compareTo(other.is_set_requested_memoffheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1450,7 +1403,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_cpu()).compareTo(other.is_set_requested_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_cpu()).compareTo(other.is_set_requested_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1460,7 +1413,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_memonheap()).compareTo(other.is_set_assigned_memonheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_memonheap()).compareTo(other.is_set_assigned_memonheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1470,7 +1423,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_memoffheap()).compareTo(other.is_set_assigned_memoffheap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_memoffheap()).compareTo(other.is_set_assigned_memoffheap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1480,7 +1433,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_cpu()).compareTo(other.is_set_assigned_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_cpu()).compareTo(other.is_set_assigned_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1498,16 +1451,16 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TopologyInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TopologyInfo(");
boolean first = true;
sb.append("id:");
@@ -1676,7 +1629,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1686,13 +1639,13 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
}
- private static class TopologyInfoStandardSchemeFactory implements SchemeFactory {
+ private static class TopologyInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TopologyInfoStandardScheme getScheme() {
return new TopologyInfoStandardScheme();
}
}
- private static class TopologyInfoStandardScheme extends StandardScheme<TopologyInfo> {
+ private static class TopologyInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TopologyInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TopologyInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1732,7 +1685,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list360 = iprot.readListBegin();
- struct.executors = new ArrayList<ExecutorSummary>(_list360.size);
+ struct.executors = new java.util.ArrayList<ExecutorSummary>(_list360.size);
ExecutorSummary _elem361;
for (int _i362 = 0; _i362 < _list360.size; ++_i362)
{
@@ -1759,15 +1712,15 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map363 = iprot.readMapBegin();
- struct.errors = new HashMap<String,List<ErrorInfo>>(2*_map363.size);
- String _key364;
- List<ErrorInfo> _val365;
+ struct.errors = new java.util.HashMap<java.lang.String,java.util.List<ErrorInfo>>(2*_map363.size);
+ java.lang.String _key364;
+ java.util.List<ErrorInfo> _val365;
for (int _i366 = 0; _i366 < _map363.size; ++_i366)
{
_key364 = iprot.readString();
{
org.apache.thrift.protocol.TList _list367 = iprot.readListBegin();
- _val365 = new ArrayList<ErrorInfo>(_list367.size);
+ _val365 = new java.util.ArrayList<ErrorInfo>(_list367.size);
ErrorInfo _elem368;
for (int _i369 = 0; _i369 < _list367.size; ++_i369)
{
@@ -1790,8 +1743,8 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map370 = iprot.readMapBegin();
- struct.component_debug = new HashMap<String,DebugOptions>(2*_map370.size);
- String _key371;
+ struct.component_debug = new java.util.HashMap<java.lang.String,DebugOptions>(2*_map370.size);
+ java.lang.String _key371;
DebugOptions _val372;
for (int _i373 = 0; _i373 < _map370.size; ++_i373)
{
@@ -1934,7 +1887,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
oprot.writeFieldBegin(ERRORS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.errors.size()));
- for (Map.Entry<String, List<ErrorInfo>> _iter375 : struct.errors.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.List<ErrorInfo>> _iter375 : struct.errors.entrySet())
{
oprot.writeString(_iter375.getKey());
{
@@ -1955,7 +1908,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
oprot.writeFieldBegin(COMPONENT_DEBUG_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.component_debug.size()));
- for (Map.Entry<String, DebugOptions> _iter377 : struct.component_debug.entrySet())
+ for (java.util.Map.Entry<java.lang.String, DebugOptions> _iter377 : struct.component_debug.entrySet())
{
oprot.writeString(_iter377.getKey());
_iter377.getValue().write(oprot);
@@ -2027,17 +1980,17 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
- private static class TopologyInfoTupleSchemeFactory implements SchemeFactory {
+ private static class TopologyInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TopologyInfoTupleScheme getScheme() {
return new TopologyInfoTupleScheme();
}
}
- private static class TopologyInfoTupleScheme extends TupleScheme<TopologyInfo> {
+ private static class TopologyInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TopologyInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TopologyInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.id);
oprot.writeString(struct.name);
oprot.writeI32(struct.uptime_secs);
@@ -2051,7 +2004,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
oprot.writeString(struct.status);
{
oprot.writeI32(struct.errors.size());
- for (Map.Entry<String, List<ErrorInfo>> _iter379 : struct.errors.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.List<ErrorInfo>> _iter379 : struct.errors.entrySet())
{
oprot.writeString(_iter379.getKey());
{
@@ -2063,7 +2016,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
}
}
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_component_debug()) {
optionals.set(0);
}
@@ -2101,7 +2054,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
if (struct.is_set_component_debug()) {
{
oprot.writeI32(struct.component_debug.size());
- for (Map.Entry<String, DebugOptions> _iter381 : struct.component_debug.entrySet())
+ for (java.util.Map.Entry<java.lang.String, DebugOptions> _iter381 : struct.component_debug.entrySet())
{
oprot.writeString(_iter381.getKey());
_iter381.getValue().write(oprot);
@@ -2142,7 +2095,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TopologyInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.id = iprot.readString();
struct.set_id_isSet(true);
struct.name = iprot.readString();
@@ -2151,7 +2104,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
struct.set_uptime_secs_isSet(true);
{
org.apache.thrift.protocol.TList _list382 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.executors = new ArrayList<ExecutorSummary>(_list382.size);
+ struct.executors = new java.util.ArrayList<ExecutorSummary>(_list382.size);
ExecutorSummary _elem383;
for (int _i384 = 0; _i384 < _list382.size; ++_i384)
{
@@ -2165,15 +2118,15 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
struct.set_status_isSet(true);
{
org.apache.thrift.protocol.TMap _map385 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
- struct.errors = new HashMap<String,List<ErrorInfo>>(2*_map385.size);
- String _key386;
- List<ErrorInfo> _val387;
+ struct.errors = new java.util.HashMap<java.lang.String,java.util.List<ErrorInfo>>(2*_map385.size);
+ java.lang.String _key386;
+ java.util.List<ErrorInfo> _val387;
for (int _i388 = 0; _i388 < _map385.size; ++_i388)
{
_key386 = iprot.readString();
{
org.apache.thrift.protocol.TList _list389 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- _val387 = new ArrayList<ErrorInfo>(_list389.size);
+ _val387 = new java.util.ArrayList<ErrorInfo>(_list389.size);
ErrorInfo _elem390;
for (int _i391 = 0; _i391 < _list389.size; ++_i391)
{
@@ -2186,12 +2139,12 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
}
struct.set_errors_isSet(true);
- BitSet incoming = iprot.readBitSet(11);
+ java.util.BitSet incoming = iprot.readBitSet(11);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map392 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.component_debug = new HashMap<String,DebugOptions>(2*_map392.size);
- String _key393;
+ struct.component_debug = new java.util.HashMap<java.lang.String,DebugOptions>(2*_map392.size);
+ java.lang.String _key393;
DebugOptions _val394;
for (int _i395 = 0; _i395 < _map392.size; ++_i395)
{
@@ -2246,5 +2199,8 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/TopologyInitialStatus.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/TopologyInitialStatus.java b/storm-client/src/jvm/org/apache/storm/generated/TopologyInitialStatus.java
index 5cf2894..c393179 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/TopologyInitialStatus.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/TopologyInitialStatus.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -24,10 +24,6 @@
package org.apache.storm.generated;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
public enum TopologyInitialStatus implements org.apache.thrift.TEnum {
ACTIVE(1),
INACTIVE(2);
[27/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LSApprovedWorkers.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/LSApprovedWorkers.java b/storm-client/src/jvm/org/apache/storm/generated/LSApprovedWorkers.java
index 9b13724..7fcd248 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/LSApprovedWorkers.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/LSApprovedWorkers.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWorkers, LSApprovedWorkers._Fields>, java.io.Serializable, Cloneable, Comparable<LSApprovedWorkers> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LSApprovedWorkers");
private static final org.apache.thrift.protocol.TField APPROVED_WORKERS_FIELD_DESC = new org.apache.thrift.protocol.TField("approved_workers", org.apache.thrift.protocol.TType.MAP, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LSApprovedWorkersStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LSApprovedWorkersTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LSApprovedWorkersStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LSApprovedWorkersTupleSchemeFactory();
- private Map<String,Integer> approved_workers; // required
+ private java.util.Map<java.lang.String,java.lang.Integer> approved_workers; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
APPROVED_WORKERS((short)1, "approved_workers");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,20 +88,20 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.APPROVED_WORKERS, new org.apache.thrift.meta_data.FieldMetaData("approved_workers", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LSApprovedWorkers.class, metaDataMap);
}
@@ -139,7 +109,7 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
}
public LSApprovedWorkers(
- Map<String,Integer> approved_workers)
+ java.util.Map<java.lang.String,java.lang.Integer> approved_workers)
{
this();
this.approved_workers = approved_workers;
@@ -150,7 +120,7 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
*/
public LSApprovedWorkers(LSApprovedWorkers other) {
if (other.is_set_approved_workers()) {
- Map<String,Integer> __this__approved_workers = new HashMap<String,Integer>(other.approved_workers);
+ java.util.Map<java.lang.String,java.lang.Integer> __this__approved_workers = new java.util.HashMap<java.lang.String,java.lang.Integer>(other.approved_workers);
this.approved_workers = __this__approved_workers;
}
}
@@ -168,18 +138,18 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
return (this.approved_workers == null) ? 0 : this.approved_workers.size();
}
- public void put_to_approved_workers(String key, int val) {
+ public void put_to_approved_workers(java.lang.String key, int val) {
if (this.approved_workers == null) {
- this.approved_workers = new HashMap<String,Integer>();
+ this.approved_workers = new java.util.HashMap<java.lang.String,java.lang.Integer>();
}
this.approved_workers.put(key, val);
}
- public Map<String,Integer> get_approved_workers() {
+ public java.util.Map<java.lang.String,java.lang.Integer> get_approved_workers() {
return this.approved_workers;
}
- public void set_approved_workers(Map<String,Integer> approved_workers) {
+ public void set_approved_workers(java.util.Map<java.lang.String,java.lang.Integer> approved_workers) {
this.approved_workers = approved_workers;
}
@@ -198,43 +168,43 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case APPROVED_WORKERS:
if (value == null) {
unset_approved_workers();
} else {
- set_approved_workers((Map<String,Integer>)value);
+ set_approved_workers((java.util.Map<java.lang.String,java.lang.Integer>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case APPROVED_WORKERS:
return get_approved_workers();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case APPROVED_WORKERS:
return is_set_approved_workers();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof LSApprovedWorkers)
@@ -245,6 +215,8 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
public boolean equals(LSApprovedWorkers that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_approved_workers = true && this.is_set_approved_workers();
boolean that_present_approved_workers = true && that.is_set_approved_workers();
@@ -260,14 +232,13 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_approved_workers = true && (is_set_approved_workers());
- list.add(present_approved_workers);
- if (present_approved_workers)
- list.add(approved_workers);
+ hashCode = hashCode * 8191 + ((is_set_approved_workers()) ? 131071 : 524287);
+ if (is_set_approved_workers())
+ hashCode = hashCode * 8191 + approved_workers.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -278,7 +249,7 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_approved_workers()).compareTo(other.is_set_approved_workers());
+ lastComparison = java.lang.Boolean.valueOf(is_set_approved_workers()).compareTo(other.is_set_approved_workers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -296,16 +267,16 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LSApprovedWorkers(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LSApprovedWorkers(");
boolean first = true;
sb.append("approved_workers:");
@@ -336,7 +307,7 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -344,13 +315,13 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
}
}
- private static class LSApprovedWorkersStandardSchemeFactory implements SchemeFactory {
+ private static class LSApprovedWorkersStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LSApprovedWorkersStandardScheme getScheme() {
return new LSApprovedWorkersStandardScheme();
}
}
- private static class LSApprovedWorkersStandardScheme extends StandardScheme<LSApprovedWorkers> {
+ private static class LSApprovedWorkersStandardScheme extends org.apache.thrift.scheme.StandardScheme<LSApprovedWorkers> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LSApprovedWorkers struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -366,8 +337,8 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map800 = iprot.readMapBegin();
- struct.approved_workers = new HashMap<String,Integer>(2*_map800.size);
- String _key801;
+ struct.approved_workers = new java.util.HashMap<java.lang.String,java.lang.Integer>(2*_map800.size);
+ java.lang.String _key801;
int _val802;
for (int _i803 = 0; _i803 < _map800.size; ++_i803)
{
@@ -399,7 +370,7 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
oprot.writeFieldBegin(APPROVED_WORKERS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.approved_workers.size()));
- for (Map.Entry<String, Integer> _iter804 : struct.approved_workers.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Integer> _iter804 : struct.approved_workers.entrySet())
{
oprot.writeString(_iter804.getKey());
oprot.writeI32(_iter804.getValue());
@@ -414,20 +385,20 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
}
- private static class LSApprovedWorkersTupleSchemeFactory implements SchemeFactory {
+ private static class LSApprovedWorkersTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LSApprovedWorkersTupleScheme getScheme() {
return new LSApprovedWorkersTupleScheme();
}
}
- private static class LSApprovedWorkersTupleScheme extends TupleScheme<LSApprovedWorkers> {
+ private static class LSApprovedWorkersTupleScheme extends org.apache.thrift.scheme.TupleScheme<LSApprovedWorkers> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LSApprovedWorkers struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.approved_workers.size());
- for (Map.Entry<String, Integer> _iter805 : struct.approved_workers.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Integer> _iter805 : struct.approved_workers.entrySet())
{
oprot.writeString(_iter805.getKey());
oprot.writeI32(_iter805.getValue());
@@ -437,11 +408,11 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LSApprovedWorkers struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TMap _map806 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.approved_workers = new HashMap<String,Integer>(2*_map806.size);
- String _key807;
+ struct.approved_workers = new java.util.HashMap<java.lang.String,java.lang.Integer>(2*_map806.size);
+ java.lang.String _key807;
int _val808;
for (int _i809 = 0; _i809 < _map806.size; ++_i809)
{
@@ -454,5 +425,8 @@ public class LSApprovedWorkers implements org.apache.thrift.TBase<LSApprovedWork
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LSSupervisorAssignments.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/LSSupervisorAssignments.java b/storm-client/src/jvm/org/apache/storm/generated/LSSupervisorAssignments.java
index 95f78ca..4abe47a 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/LSSupervisorAssignments.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/LSSupervisorAssignments.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSupervisorAssignments, LSSupervisorAssignments._Fields>, java.io.Serializable, Cloneable, Comparable<LSSupervisorAssignments> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LSSupervisorAssignments");
private static final org.apache.thrift.protocol.TField ASSIGNMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("assignments", org.apache.thrift.protocol.TType.MAP, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LSSupervisorAssignmentsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LSSupervisorAssignmentsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LSSupervisorAssignmentsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LSSupervisorAssignmentsTupleSchemeFactory();
- private Map<Integer,LocalAssignment> assignments; // required
+ private java.util.Map<java.lang.Integer,LocalAssignment> assignments; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ASSIGNMENTS((short)1, "assignments");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,20 +88,20 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ASSIGNMENTS, new org.apache.thrift.meta_data.FieldMetaData("assignments", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LocalAssignment.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LSSupervisorAssignments.class, metaDataMap);
}
@@ -139,7 +109,7 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
}
public LSSupervisorAssignments(
- Map<Integer,LocalAssignment> assignments)
+ java.util.Map<java.lang.Integer,LocalAssignment> assignments)
{
this();
this.assignments = assignments;
@@ -150,13 +120,13 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
*/
public LSSupervisorAssignments(LSSupervisorAssignments other) {
if (other.is_set_assignments()) {
- Map<Integer,LocalAssignment> __this__assignments = new HashMap<Integer,LocalAssignment>(other.assignments.size());
- for (Map.Entry<Integer, LocalAssignment> other_element : other.assignments.entrySet()) {
+ java.util.Map<java.lang.Integer,LocalAssignment> __this__assignments = new java.util.HashMap<java.lang.Integer,LocalAssignment>(other.assignments.size());
+ for (java.util.Map.Entry<java.lang.Integer, LocalAssignment> other_element : other.assignments.entrySet()) {
- Integer other_element_key = other_element.getKey();
+ java.lang.Integer other_element_key = other_element.getKey();
LocalAssignment other_element_value = other_element.getValue();
- Integer __this__assignments_copy_key = other_element_key;
+ java.lang.Integer __this__assignments_copy_key = other_element_key;
LocalAssignment __this__assignments_copy_value = new LocalAssignment(other_element_value);
@@ -181,16 +151,16 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
public void put_to_assignments(int key, LocalAssignment val) {
if (this.assignments == null) {
- this.assignments = new HashMap<Integer,LocalAssignment>();
+ this.assignments = new java.util.HashMap<java.lang.Integer,LocalAssignment>();
}
this.assignments.put(key, val);
}
- public Map<Integer,LocalAssignment> get_assignments() {
+ public java.util.Map<java.lang.Integer,LocalAssignment> get_assignments() {
return this.assignments;
}
- public void set_assignments(Map<Integer,LocalAssignment> assignments) {
+ public void set_assignments(java.util.Map<java.lang.Integer,LocalAssignment> assignments) {
this.assignments = assignments;
}
@@ -209,43 +179,43 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ASSIGNMENTS:
if (value == null) {
unset_assignments();
} else {
- set_assignments((Map<Integer,LocalAssignment>)value);
+ set_assignments((java.util.Map<java.lang.Integer,LocalAssignment>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ASSIGNMENTS:
return get_assignments();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case ASSIGNMENTS:
return is_set_assignments();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof LSSupervisorAssignments)
@@ -256,6 +226,8 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
public boolean equals(LSSupervisorAssignments that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_assignments = true && this.is_set_assignments();
boolean that_present_assignments = true && that.is_set_assignments();
@@ -271,14 +243,13 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_assignments = true && (is_set_assignments());
- list.add(present_assignments);
- if (present_assignments)
- list.add(assignments);
+ hashCode = hashCode * 8191 + ((is_set_assignments()) ? 131071 : 524287);
+ if (is_set_assignments())
+ hashCode = hashCode * 8191 + assignments.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -289,7 +260,7 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_assignments()).compareTo(other.is_set_assignments());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assignments()).compareTo(other.is_set_assignments());
if (lastComparison != 0) {
return lastComparison;
}
@@ -307,16 +278,16 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LSSupervisorAssignments(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LSSupervisorAssignments(");
boolean first = true;
sb.append("assignments:");
@@ -347,7 +318,7 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -355,13 +326,13 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
}
}
- private static class LSSupervisorAssignmentsStandardSchemeFactory implements SchemeFactory {
+ private static class LSSupervisorAssignmentsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LSSupervisorAssignmentsStandardScheme getScheme() {
return new LSSupervisorAssignmentsStandardScheme();
}
}
- private static class LSSupervisorAssignmentsStandardScheme extends StandardScheme<LSSupervisorAssignments> {
+ private static class LSSupervisorAssignmentsStandardScheme extends org.apache.thrift.scheme.StandardScheme<LSSupervisorAssignments> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LSSupervisorAssignments struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -377,7 +348,7 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map810 = iprot.readMapBegin();
- struct.assignments = new HashMap<Integer,LocalAssignment>(2*_map810.size);
+ struct.assignments = new java.util.HashMap<java.lang.Integer,LocalAssignment>(2*_map810.size);
int _key811;
LocalAssignment _val812;
for (int _i813 = 0; _i813 < _map810.size; ++_i813)
@@ -411,7 +382,7 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
oprot.writeFieldBegin(ASSIGNMENTS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, struct.assignments.size()));
- for (Map.Entry<Integer, LocalAssignment> _iter814 : struct.assignments.entrySet())
+ for (java.util.Map.Entry<java.lang.Integer, LocalAssignment> _iter814 : struct.assignments.entrySet())
{
oprot.writeI32(_iter814.getKey());
_iter814.getValue().write(oprot);
@@ -426,20 +397,20 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
}
- private static class LSSupervisorAssignmentsTupleSchemeFactory implements SchemeFactory {
+ private static class LSSupervisorAssignmentsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LSSupervisorAssignmentsTupleScheme getScheme() {
return new LSSupervisorAssignmentsTupleScheme();
}
}
- private static class LSSupervisorAssignmentsTupleScheme extends TupleScheme<LSSupervisorAssignments> {
+ private static class LSSupervisorAssignmentsTupleScheme extends org.apache.thrift.scheme.TupleScheme<LSSupervisorAssignments> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LSSupervisorAssignments struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.assignments.size());
- for (Map.Entry<Integer, LocalAssignment> _iter815 : struct.assignments.entrySet())
+ for (java.util.Map.Entry<java.lang.Integer, LocalAssignment> _iter815 : struct.assignments.entrySet())
{
oprot.writeI32(_iter815.getKey());
_iter815.getValue().write(oprot);
@@ -449,10 +420,10 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LSSupervisorAssignments struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TMap _map816 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.assignments = new HashMap<Integer,LocalAssignment>(2*_map816.size);
+ struct.assignments = new java.util.HashMap<java.lang.Integer,LocalAssignment>(2*_map816.size);
int _key817;
LocalAssignment _val818;
for (int _i819 = 0; _i819 < _map816.size; ++_i819)
@@ -467,5 +438,8 @@ public class LSSupervisorAssignments implements org.apache.thrift.TBase<LSSuperv
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LSSupervisorId.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/LSSupervisorId.java b/storm-client/src/jvm/org/apache/storm/generated/LSSupervisorId.java
index 605b9b1..15b9651 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/LSSupervisorId.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/LSSupervisorId.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, LSSupervisorId._Fields>, java.io.Serializable, Cloneable, Comparable<LSSupervisorId> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LSSupervisorId");
private static final org.apache.thrift.protocol.TField SUPERVISOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("supervisor_id", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LSSupervisorIdStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LSSupervisorIdTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LSSupervisorIdStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LSSupervisorIdTupleSchemeFactory();
- private String supervisor_id; // required
+ private java.lang.String supervisor_id; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUPERVISOR_ID((short)1, "supervisor_id");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, L
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,18 +88,18 @@ public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, L
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUPERVISOR_ID, new org.apache.thrift.meta_data.FieldMetaData("supervisor_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LSSupervisorId.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, L
}
public LSSupervisorId(
- String supervisor_id)
+ java.lang.String supervisor_id)
{
this();
this.supervisor_id = supervisor_id;
@@ -161,11 +131,11 @@ public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, L
this.supervisor_id = null;
}
- public String get_supervisor_id() {
+ public java.lang.String get_supervisor_id() {
return this.supervisor_id;
}
- public void set_supervisor_id(String supervisor_id) {
+ public void set_supervisor_id(java.lang.String supervisor_id) {
this.supervisor_id = supervisor_id;
}
@@ -184,43 +154,43 @@ public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, L
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUPERVISOR_ID:
if (value == null) {
unset_supervisor_id();
} else {
- set_supervisor_id((String)value);
+ set_supervisor_id((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUPERVISOR_ID:
return get_supervisor_id();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUPERVISOR_ID:
return is_set_supervisor_id();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof LSSupervisorId)
@@ -231,6 +201,8 @@ public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, L
public boolean equals(LSSupervisorId that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_supervisor_id = true && this.is_set_supervisor_id();
boolean that_present_supervisor_id = true && that.is_set_supervisor_id();
@@ -246,14 +218,13 @@ public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, L
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_supervisor_id = true && (is_set_supervisor_id());
- list.add(present_supervisor_id);
- if (present_supervisor_id)
- list.add(supervisor_id);
+ hashCode = hashCode * 8191 + ((is_set_supervisor_id()) ? 131071 : 524287);
+ if (is_set_supervisor_id())
+ hashCode = hashCode * 8191 + supervisor_id.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, L
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_supervisor_id()).compareTo(other.is_set_supervisor_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_supervisor_id()).compareTo(other.is_set_supervisor_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, L
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LSSupervisorId(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LSSupervisorId(");
boolean first = true;
sb.append("supervisor_id:");
@@ -322,7 +293,7 @@ public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, L
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -330,13 +301,13 @@ public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, L
}
}
- private static class LSSupervisorIdStandardSchemeFactory implements SchemeFactory {
+ private static class LSSupervisorIdStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LSSupervisorIdStandardScheme getScheme() {
return new LSSupervisorIdStandardScheme();
}
}
- private static class LSSupervisorIdStandardScheme extends StandardScheme<LSSupervisorId> {
+ private static class LSSupervisorIdStandardScheme extends org.apache.thrift.scheme.StandardScheme<LSSupervisorId> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LSSupervisorId struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -380,27 +351,30 @@ public class LSSupervisorId implements org.apache.thrift.TBase<LSSupervisorId, L
}
- private static class LSSupervisorIdTupleSchemeFactory implements SchemeFactory {
+ private static class LSSupervisorIdTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LSSupervisorIdTupleScheme getScheme() {
return new LSSupervisorIdTupleScheme();
}
}
- private static class LSSupervisorIdTupleScheme extends TupleScheme<LSSupervisorId> {
+ private static class LSSupervisorIdTupleScheme extends org.apache.thrift.scheme.TupleScheme<LSSupervisorId> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LSSupervisorId struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.supervisor_id);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LSSupervisorId struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.supervisor_id = iprot.readString();
struct.set_supervisor_id_isSet(true);
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistory.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistory.java b/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistory.java
index 432b9b6..2f2dd78 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistory.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistory.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LSTopoHistory._Fields>, java.io.Serializable, Cloneable, Comparable<LSTopoHistory> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LSTopoHistory");
@@ -60,16 +33,13 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
private static final org.apache.thrift.protocol.TField USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("users", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("groups", org.apache.thrift.protocol.TType.LIST, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LSTopoHistoryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LSTopoHistoryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LSTopoHistoryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LSTopoHistoryTupleSchemeFactory();
- private String topology_id; // required
+ private java.lang.String topology_id; // required
private long time_stamp; // required
- private List<String> users; // required
- private List<String> groups; // required
+ private java.util.List<java.lang.String> users; // required
+ private java.util.List<java.lang.String> groups; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -78,10 +48,10 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
USERS((short)3, "users"),
GROUPS((short)4, "groups");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -110,21 +80,21 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -133,7 +103,7 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -141,9 +111,9 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
// isset id assignments
private static final int __TIME_STAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TOPOLOGY_ID, new org.apache.thrift.meta_data.FieldMetaData("topology_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TIME_STAMP, new org.apache.thrift.meta_data.FieldMetaData("time_stamp", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -154,7 +124,7 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
tmpMap.put(_Fields.GROUPS, new org.apache.thrift.meta_data.FieldMetaData("groups", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LSTopoHistory.class, metaDataMap);
}
@@ -162,10 +132,10 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
}
public LSTopoHistory(
- String topology_id,
+ java.lang.String topology_id,
long time_stamp,
- List<String> users,
- List<String> groups)
+ java.util.List<java.lang.String> users,
+ java.util.List<java.lang.String> groups)
{
this();
this.topology_id = topology_id;
@@ -185,11 +155,11 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
}
this.time_stamp = other.time_stamp;
if (other.is_set_users()) {
- List<String> __this__users = new ArrayList<String>(other.users);
+ java.util.List<java.lang.String> __this__users = new java.util.ArrayList<java.lang.String>(other.users);
this.users = __this__users;
}
if (other.is_set_groups()) {
- List<String> __this__groups = new ArrayList<String>(other.groups);
+ java.util.List<java.lang.String> __this__groups = new java.util.ArrayList<java.lang.String>(other.groups);
this.groups = __this__groups;
}
}
@@ -207,11 +177,11 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
this.groups = null;
}
- public String get_topology_id() {
+ public java.lang.String get_topology_id() {
return this.topology_id;
}
- public void set_topology_id(String topology_id) {
+ public void set_topology_id(java.lang.String topology_id) {
this.topology_id = topology_id;
}
@@ -240,38 +210,38 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
}
public void unset_time_stamp() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIME_STAMP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_STAMP_ISSET_ID);
}
/** Returns true if field time_stamp is set (has been assigned a value) and false otherwise */
public boolean is_set_time_stamp() {
- return EncodingUtils.testBit(__isset_bitfield, __TIME_STAMP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_STAMP_ISSET_ID);
}
public void set_time_stamp_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIME_STAMP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_STAMP_ISSET_ID, value);
}
public int get_users_size() {
return (this.users == null) ? 0 : this.users.size();
}
- public java.util.Iterator<String> get_users_iterator() {
+ public java.util.Iterator<java.lang.String> get_users_iterator() {
return (this.users == null) ? null : this.users.iterator();
}
- public void add_to_users(String elem) {
+ public void add_to_users(java.lang.String elem) {
if (this.users == null) {
- this.users = new ArrayList<String>();
+ this.users = new java.util.ArrayList<java.lang.String>();
}
this.users.add(elem);
}
- public List<String> get_users() {
+ public java.util.List<java.lang.String> get_users() {
return this.users;
}
- public void set_users(List<String> users) {
+ public void set_users(java.util.List<java.lang.String> users) {
this.users = users;
}
@@ -294,22 +264,22 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
return (this.groups == null) ? 0 : this.groups.size();
}
- public java.util.Iterator<String> get_groups_iterator() {
+ public java.util.Iterator<java.lang.String> get_groups_iterator() {
return (this.groups == null) ? null : this.groups.iterator();
}
- public void add_to_groups(String elem) {
+ public void add_to_groups(java.lang.String elem) {
if (this.groups == null) {
- this.groups = new ArrayList<String>();
+ this.groups = new java.util.ArrayList<java.lang.String>();
}
this.groups.add(elem);
}
- public List<String> get_groups() {
+ public java.util.List<java.lang.String> get_groups() {
return this.groups;
}
- public void set_groups(List<String> groups) {
+ public void set_groups(java.util.List<java.lang.String> groups) {
this.groups = groups;
}
@@ -328,13 +298,13 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TOPOLOGY_ID:
if (value == null) {
unset_topology_id();
} else {
- set_topology_id((String)value);
+ set_topology_id((java.lang.String)value);
}
break;
@@ -342,7 +312,7 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
if (value == null) {
unset_time_stamp();
} else {
- set_time_stamp((Long)value);
+ set_time_stamp((java.lang.Long)value);
}
break;
@@ -350,7 +320,7 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
if (value == null) {
unset_users();
} else {
- set_users((List<String>)value);
+ set_users((java.util.List<java.lang.String>)value);
}
break;
@@ -358,14 +328,14 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
if (value == null) {
unset_groups();
} else {
- set_groups((List<String>)value);
+ set_groups((java.util.List<java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOPOLOGY_ID:
return get_topology_id();
@@ -380,13 +350,13 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
return get_groups();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -399,11 +369,11 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
case GROUPS:
return is_set_groups();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof LSTopoHistory)
@@ -414,6 +384,8 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
public boolean equals(LSTopoHistory that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_topology_id = true && this.is_set_topology_id();
boolean that_present_topology_id = true && that.is_set_topology_id();
@@ -456,29 +428,23 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_topology_id = true && (is_set_topology_id());
- list.add(present_topology_id);
- if (present_topology_id)
- list.add(topology_id);
+ hashCode = hashCode * 8191 + ((is_set_topology_id()) ? 131071 : 524287);
+ if (is_set_topology_id())
+ hashCode = hashCode * 8191 + topology_id.hashCode();
- boolean present_time_stamp = true;
- list.add(present_time_stamp);
- if (present_time_stamp)
- list.add(time_stamp);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(time_stamp);
- boolean present_users = true && (is_set_users());
- list.add(present_users);
- if (present_users)
- list.add(users);
+ hashCode = hashCode * 8191 + ((is_set_users()) ? 131071 : 524287);
+ if (is_set_users())
+ hashCode = hashCode * 8191 + users.hashCode();
- boolean present_groups = true && (is_set_groups());
- list.add(present_groups);
- if (present_groups)
- list.add(groups);
+ hashCode = hashCode * 8191 + ((is_set_groups()) ? 131071 : 524287);
+ if (is_set_groups())
+ hashCode = hashCode * 8191 + groups.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -489,7 +455,7 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -499,7 +465,7 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_time_stamp()).compareTo(other.is_set_time_stamp());
+ lastComparison = java.lang.Boolean.valueOf(is_set_time_stamp()).compareTo(other.is_set_time_stamp());
if (lastComparison != 0) {
return lastComparison;
}
@@ -509,7 +475,7 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_users()).compareTo(other.is_set_users());
+ lastComparison = java.lang.Boolean.valueOf(is_set_users()).compareTo(other.is_set_users());
if (lastComparison != 0) {
return lastComparison;
}
@@ -519,7 +485,7 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_groups()).compareTo(other.is_set_groups());
+ lastComparison = java.lang.Boolean.valueOf(is_set_groups()).compareTo(other.is_set_groups());
if (lastComparison != 0) {
return lastComparison;
}
@@ -537,16 +503,16 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LSTopoHistory(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LSTopoHistory(");
boolean first = true;
sb.append("topology_id:");
@@ -609,7 +575,7 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -619,13 +585,13 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
}
}
- private static class LSTopoHistoryStandardSchemeFactory implements SchemeFactory {
+ private static class LSTopoHistoryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LSTopoHistoryStandardScheme getScheme() {
return new LSTopoHistoryStandardScheme();
}
}
- private static class LSTopoHistoryStandardScheme extends StandardScheme<LSTopoHistory> {
+ private static class LSTopoHistoryStandardScheme extends org.apache.thrift.scheme.StandardScheme<LSTopoHistory> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LSTopoHistory struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -657,8 +623,8 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list828 = iprot.readListBegin();
- struct.users = new ArrayList<String>(_list828.size);
- String _elem829;
+ struct.users = new java.util.ArrayList<java.lang.String>(_list828.size);
+ java.lang.String _elem829;
for (int _i830 = 0; _i830 < _list828.size; ++_i830)
{
_elem829 = iprot.readString();
@@ -675,8 +641,8 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list831 = iprot.readListBegin();
- struct.groups = new ArrayList<String>(_list831.size);
- String _elem832;
+ struct.groups = new java.util.ArrayList<java.lang.String>(_list831.size);
+ java.lang.String _elem832;
for (int _i833 = 0; _i833 < _list831.size; ++_i833)
{
_elem832 = iprot.readString();
@@ -714,7 +680,7 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
oprot.writeFieldBegin(USERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.users.size()));
- for (String _iter834 : struct.users)
+ for (java.lang.String _iter834 : struct.users)
{
oprot.writeString(_iter834);
}
@@ -726,7 +692,7 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
oprot.writeFieldBegin(GROUPS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.groups.size()));
- for (String _iter835 : struct.groups)
+ for (java.lang.String _iter835 : struct.groups)
{
oprot.writeString(_iter835);
}
@@ -740,29 +706,29 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
}
- private static class LSTopoHistoryTupleSchemeFactory implements SchemeFactory {
+ private static class LSTopoHistoryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LSTopoHistoryTupleScheme getScheme() {
return new LSTopoHistoryTupleScheme();
}
}
- private static class LSTopoHistoryTupleScheme extends TupleScheme<LSTopoHistory> {
+ private static class LSTopoHistoryTupleScheme extends org.apache.thrift.scheme.TupleScheme<LSTopoHistory> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LSTopoHistory struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.topology_id);
oprot.writeI64(struct.time_stamp);
{
oprot.writeI32(struct.users.size());
- for (String _iter836 : struct.users)
+ for (java.lang.String _iter836 : struct.users)
{
oprot.writeString(_iter836);
}
}
{
oprot.writeI32(struct.groups.size());
- for (String _iter837 : struct.groups)
+ for (java.lang.String _iter837 : struct.groups)
{
oprot.writeString(_iter837);
}
@@ -771,15 +737,15 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LSTopoHistory struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.topology_id = iprot.readString();
struct.set_topology_id_isSet(true);
struct.time_stamp = iprot.readI64();
struct.set_time_stamp_isSet(true);
{
org.apache.thrift.protocol.TList _list838 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.users = new ArrayList<String>(_list838.size);
- String _elem839;
+ struct.users = new java.util.ArrayList<java.lang.String>(_list838.size);
+ java.lang.String _elem839;
for (int _i840 = 0; _i840 < _list838.size; ++_i840)
{
_elem839 = iprot.readString();
@@ -789,8 +755,8 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
struct.set_users_isSet(true);
{
org.apache.thrift.protocol.TList _list841 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.groups = new ArrayList<String>(_list841.size);
- String _elem842;
+ struct.groups = new java.util.ArrayList<java.lang.String>(_list841.size);
+ java.lang.String _elem842;
for (int _i843 = 0; _i843 < _list841.size; ++_i843)
{
_elem842 = iprot.readString();
@@ -801,5 +767,8 @@ public class LSTopoHistory implements org.apache.thrift.TBase<LSTopoHistory, LST
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[19/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SpoutStats.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SpoutStats.java b/storm-client/src/jvm/org/apache/storm/generated/SpoutStats.java
index 8391aa9..694def3 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SpoutStats.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SpoutStats.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStats._Fields>, java.io.Serializable, Cloneable, Comparable<SpoutStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SpoutStats");
@@ -59,15 +32,12 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
private static final org.apache.thrift.protocol.TField FAILED_FIELD_DESC = new org.apache.thrift.protocol.TField("failed", org.apache.thrift.protocol.TType.MAP, (short)2);
private static final org.apache.thrift.protocol.TField COMPLETE_MS_AVG_FIELD_DESC = new org.apache.thrift.protocol.TField("complete_ms_avg", org.apache.thrift.protocol.TType.MAP, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SpoutStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SpoutStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SpoutStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SpoutStatsTupleSchemeFactory();
- private Map<String,Map<String,Long>> acked; // required
- private Map<String,Map<String,Long>> failed; // required
- private Map<String,Map<String,Double>> complete_ms_avg; // required
+ private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> acked; // required
+ private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> failed; // required
+ private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> complete_ms_avg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -75,10 +45,10 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
FAILED((short)2, "failed"),
COMPLETE_MS_AVG((short)3, "complete_ms_avg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -105,21 +75,21 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -128,15 +98,15 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ACKED, new org.apache.thrift.meta_data.FieldMetaData("acked", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
@@ -155,7 +125,7 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SpoutStats.class, metaDataMap);
}
@@ -163,9 +133,9 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
}
public SpoutStats(
- Map<String,Map<String,Long>> acked,
- Map<String,Map<String,Long>> failed,
- Map<String,Map<String,Double>> complete_ms_avg)
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> acked,
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> failed,
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> complete_ms_avg)
{
this();
this.acked = acked;
@@ -178,45 +148,45 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
*/
public SpoutStats(SpoutStats other) {
if (other.is_set_acked()) {
- Map<String,Map<String,Long>> __this__acked = new HashMap<String,Map<String,Long>>(other.acked.size());
- for (Map.Entry<String, Map<String,Long>> other_element : other.acked.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> __this__acked = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(other.acked.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> other_element : other.acked.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<String,Long> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<java.lang.String,java.lang.Long> other_element_value = other_element.getValue();
- String __this__acked_copy_key = other_element_key;
+ java.lang.String __this__acked_copy_key = other_element_key;
- Map<String,Long> __this__acked_copy_value = new HashMap<String,Long>(other_element_value);
+ java.util.Map<java.lang.String,java.lang.Long> __this__acked_copy_value = new java.util.HashMap<java.lang.String,java.lang.Long>(other_element_value);
__this__acked.put(__this__acked_copy_key, __this__acked_copy_value);
}
this.acked = __this__acked;
}
if (other.is_set_failed()) {
- Map<String,Map<String,Long>> __this__failed = new HashMap<String,Map<String,Long>>(other.failed.size());
- for (Map.Entry<String, Map<String,Long>> other_element : other.failed.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> __this__failed = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(other.failed.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> other_element : other.failed.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<String,Long> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<java.lang.String,java.lang.Long> other_element_value = other_element.getValue();
- String __this__failed_copy_key = other_element_key;
+ java.lang.String __this__failed_copy_key = other_element_key;
- Map<String,Long> __this__failed_copy_value = new HashMap<String,Long>(other_element_value);
+ java.util.Map<java.lang.String,java.lang.Long> __this__failed_copy_value = new java.util.HashMap<java.lang.String,java.lang.Long>(other_element_value);
__this__failed.put(__this__failed_copy_key, __this__failed_copy_value);
}
this.failed = __this__failed;
}
if (other.is_set_complete_ms_avg()) {
- Map<String,Map<String,Double>> __this__complete_ms_avg = new HashMap<String,Map<String,Double>>(other.complete_ms_avg.size());
- for (Map.Entry<String, Map<String,Double>> other_element : other.complete_ms_avg.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> __this__complete_ms_avg = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>>(other.complete_ms_avg.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Double>> other_element : other.complete_ms_avg.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<String,Double> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<java.lang.String,java.lang.Double> other_element_value = other_element.getValue();
- String __this__complete_ms_avg_copy_key = other_element_key;
+ java.lang.String __this__complete_ms_avg_copy_key = other_element_key;
- Map<String,Double> __this__complete_ms_avg_copy_value = new HashMap<String,Double>(other_element_value);
+ java.util.Map<java.lang.String,java.lang.Double> __this__complete_ms_avg_copy_value = new java.util.HashMap<java.lang.String,java.lang.Double>(other_element_value);
__this__complete_ms_avg.put(__this__complete_ms_avg_copy_key, __this__complete_ms_avg_copy_value);
}
@@ -239,18 +209,18 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
return (this.acked == null) ? 0 : this.acked.size();
}
- public void put_to_acked(String key, Map<String,Long> val) {
+ public void put_to_acked(java.lang.String key, java.util.Map<java.lang.String,java.lang.Long> val) {
if (this.acked == null) {
- this.acked = new HashMap<String,Map<String,Long>>();
+ this.acked = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>();
}
this.acked.put(key, val);
}
- public Map<String,Map<String,Long>> get_acked() {
+ public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> get_acked() {
return this.acked;
}
- public void set_acked(Map<String,Map<String,Long>> acked) {
+ public void set_acked(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> acked) {
this.acked = acked;
}
@@ -273,18 +243,18 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
return (this.failed == null) ? 0 : this.failed.size();
}
- public void put_to_failed(String key, Map<String,Long> val) {
+ public void put_to_failed(java.lang.String key, java.util.Map<java.lang.String,java.lang.Long> val) {
if (this.failed == null) {
- this.failed = new HashMap<String,Map<String,Long>>();
+ this.failed = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>();
}
this.failed.put(key, val);
}
- public Map<String,Map<String,Long>> get_failed() {
+ public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> get_failed() {
return this.failed;
}
- public void set_failed(Map<String,Map<String,Long>> failed) {
+ public void set_failed(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> failed) {
this.failed = failed;
}
@@ -307,18 +277,18 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
return (this.complete_ms_avg == null) ? 0 : this.complete_ms_avg.size();
}
- public void put_to_complete_ms_avg(String key, Map<String,Double> val) {
+ public void put_to_complete_ms_avg(java.lang.String key, java.util.Map<java.lang.String,java.lang.Double> val) {
if (this.complete_ms_avg == null) {
- this.complete_ms_avg = new HashMap<String,Map<String,Double>>();
+ this.complete_ms_avg = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>>();
}
this.complete_ms_avg.put(key, val);
}
- public Map<String,Map<String,Double>> get_complete_ms_avg() {
+ public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> get_complete_ms_avg() {
return this.complete_ms_avg;
}
- public void set_complete_ms_avg(Map<String,Map<String,Double>> complete_ms_avg) {
+ public void set_complete_ms_avg(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> complete_ms_avg) {
this.complete_ms_avg = complete_ms_avg;
}
@@ -337,13 +307,13 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ACKED:
if (value == null) {
unset_acked();
} else {
- set_acked((Map<String,Map<String,Long>>)value);
+ set_acked((java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>)value);
}
break;
@@ -351,7 +321,7 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
if (value == null) {
unset_failed();
} else {
- set_failed((Map<String,Map<String,Long>>)value);
+ set_failed((java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>)value);
}
break;
@@ -359,14 +329,14 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
if (value == null) {
unset_complete_ms_avg();
} else {
- set_complete_ms_avg((Map<String,Map<String,Double>>)value);
+ set_complete_ms_avg((java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ACKED:
return get_acked();
@@ -378,13 +348,13 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
return get_complete_ms_avg();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -395,11 +365,11 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
case COMPLETE_MS_AVG:
return is_set_complete_ms_avg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof SpoutStats)
@@ -410,6 +380,8 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
public boolean equals(SpoutStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_acked = true && this.is_set_acked();
boolean that_present_acked = true && that.is_set_acked();
@@ -443,24 +415,21 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_acked = true && (is_set_acked());
- list.add(present_acked);
- if (present_acked)
- list.add(acked);
+ hashCode = hashCode * 8191 + ((is_set_acked()) ? 131071 : 524287);
+ if (is_set_acked())
+ hashCode = hashCode * 8191 + acked.hashCode();
- boolean present_failed = true && (is_set_failed());
- list.add(present_failed);
- if (present_failed)
- list.add(failed);
+ hashCode = hashCode * 8191 + ((is_set_failed()) ? 131071 : 524287);
+ if (is_set_failed())
+ hashCode = hashCode * 8191 + failed.hashCode();
- boolean present_complete_ms_avg = true && (is_set_complete_ms_avg());
- list.add(present_complete_ms_avg);
- if (present_complete_ms_avg)
- list.add(complete_ms_avg);
+ hashCode = hashCode * 8191 + ((is_set_complete_ms_avg()) ? 131071 : 524287);
+ if (is_set_complete_ms_avg())
+ hashCode = hashCode * 8191 + complete_ms_avg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -471,7 +440,7 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_acked()).compareTo(other.is_set_acked());
+ lastComparison = java.lang.Boolean.valueOf(is_set_acked()).compareTo(other.is_set_acked());
if (lastComparison != 0) {
return lastComparison;
}
@@ -481,7 +450,7 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_failed()).compareTo(other.is_set_failed());
+ lastComparison = java.lang.Boolean.valueOf(is_set_failed()).compareTo(other.is_set_failed());
if (lastComparison != 0) {
return lastComparison;
}
@@ -491,7 +460,7 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_complete_ms_avg()).compareTo(other.is_set_complete_ms_avg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_complete_ms_avg()).compareTo(other.is_set_complete_ms_avg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -509,16 +478,16 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SpoutStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SpoutStats(");
boolean first = true;
sb.append("acked:");
@@ -573,7 +542,7 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -581,13 +550,13 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
}
}
- private static class SpoutStatsStandardSchemeFactory implements SchemeFactory {
+ private static class SpoutStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SpoutStatsStandardScheme getScheme() {
return new SpoutStatsStandardScheme();
}
}
- private static class SpoutStatsStandardScheme extends StandardScheme<SpoutStats> {
+ private static class SpoutStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<SpoutStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SpoutStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -603,16 +572,16 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map260 = iprot.readMapBegin();
- struct.acked = new HashMap<String,Map<String,Long>>(2*_map260.size);
- String _key261;
- Map<String,Long> _val262;
+ struct.acked = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(2*_map260.size);
+ java.lang.String _key261;
+ java.util.Map<java.lang.String,java.lang.Long> _val262;
for (int _i263 = 0; _i263 < _map260.size; ++_i263)
{
_key261 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map264 = iprot.readMapBegin();
- _val262 = new HashMap<String,Long>(2*_map264.size);
- String _key265;
+ _val262 = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map264.size);
+ java.lang.String _key265;
long _val266;
for (int _i267 = 0; _i267 < _map264.size; ++_i267)
{
@@ -635,16 +604,16 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map268 = iprot.readMapBegin();
- struct.failed = new HashMap<String,Map<String,Long>>(2*_map268.size);
- String _key269;
- Map<String,Long> _val270;
+ struct.failed = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(2*_map268.size);
+ java.lang.String _key269;
+ java.util.Map<java.lang.String,java.lang.Long> _val270;
for (int _i271 = 0; _i271 < _map268.size; ++_i271)
{
_key269 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map272 = iprot.readMapBegin();
- _val270 = new HashMap<String,Long>(2*_map272.size);
- String _key273;
+ _val270 = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map272.size);
+ java.lang.String _key273;
long _val274;
for (int _i275 = 0; _i275 < _map272.size; ++_i275)
{
@@ -667,16 +636,16 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map276 = iprot.readMapBegin();
- struct.complete_ms_avg = new HashMap<String,Map<String,Double>>(2*_map276.size);
- String _key277;
- Map<String,Double> _val278;
+ struct.complete_ms_avg = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>>(2*_map276.size);
+ java.lang.String _key277;
+ java.util.Map<java.lang.String,java.lang.Double> _val278;
for (int _i279 = 0; _i279 < _map276.size; ++_i279)
{
_key277 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map280 = iprot.readMapBegin();
- _val278 = new HashMap<String,Double>(2*_map280.size);
- String _key281;
+ _val278 = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map280.size);
+ java.lang.String _key281;
double _val282;
for (int _i283 = 0; _i283 < _map280.size; ++_i283)
{
@@ -712,12 +681,12 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
oprot.writeFieldBegin(ACKED_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.acked.size()));
- for (Map.Entry<String, Map<String,Long>> _iter284 : struct.acked.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> _iter284 : struct.acked.entrySet())
{
oprot.writeString(_iter284.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, _iter284.getValue().size()));
- for (Map.Entry<String, Long> _iter285 : _iter284.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter285 : _iter284.getValue().entrySet())
{
oprot.writeString(_iter285.getKey());
oprot.writeI64(_iter285.getValue());
@@ -733,12 +702,12 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
oprot.writeFieldBegin(FAILED_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.failed.size()));
- for (Map.Entry<String, Map<String,Long>> _iter286 : struct.failed.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> _iter286 : struct.failed.entrySet())
{
oprot.writeString(_iter286.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, _iter286.getValue().size()));
- for (Map.Entry<String, Long> _iter287 : _iter286.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter287 : _iter286.getValue().entrySet())
{
oprot.writeString(_iter287.getKey());
oprot.writeI64(_iter287.getValue());
@@ -754,12 +723,12 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
oprot.writeFieldBegin(COMPLETE_MS_AVG_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.complete_ms_avg.size()));
- for (Map.Entry<String, Map<String,Double>> _iter288 : struct.complete_ms_avg.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Double>> _iter288 : struct.complete_ms_avg.entrySet())
{
oprot.writeString(_iter288.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, _iter288.getValue().size()));
- for (Map.Entry<String, Double> _iter289 : _iter288.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter289 : _iter288.getValue().entrySet())
{
oprot.writeString(_iter289.getKey());
oprot.writeDouble(_iter289.getValue());
@@ -777,25 +746,25 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
}
- private static class SpoutStatsTupleSchemeFactory implements SchemeFactory {
+ private static class SpoutStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SpoutStatsTupleScheme getScheme() {
return new SpoutStatsTupleScheme();
}
}
- private static class SpoutStatsTupleScheme extends TupleScheme<SpoutStats> {
+ private static class SpoutStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<SpoutStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SpoutStats struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.acked.size());
- for (Map.Entry<String, Map<String,Long>> _iter290 : struct.acked.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> _iter290 : struct.acked.entrySet())
{
oprot.writeString(_iter290.getKey());
{
oprot.writeI32(_iter290.getValue().size());
- for (Map.Entry<String, Long> _iter291 : _iter290.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter291 : _iter290.getValue().entrySet())
{
oprot.writeString(_iter291.getKey());
oprot.writeI64(_iter291.getValue());
@@ -805,12 +774,12 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
}
{
oprot.writeI32(struct.failed.size());
- for (Map.Entry<String, Map<String,Long>> _iter292 : struct.failed.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> _iter292 : struct.failed.entrySet())
{
oprot.writeString(_iter292.getKey());
{
oprot.writeI32(_iter292.getValue().size());
- for (Map.Entry<String, Long> _iter293 : _iter292.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter293 : _iter292.getValue().entrySet())
{
oprot.writeString(_iter293.getKey());
oprot.writeI64(_iter293.getValue());
@@ -820,12 +789,12 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
}
{
oprot.writeI32(struct.complete_ms_avg.size());
- for (Map.Entry<String, Map<String,Double>> _iter294 : struct.complete_ms_avg.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Double>> _iter294 : struct.complete_ms_avg.entrySet())
{
oprot.writeString(_iter294.getKey());
{
oprot.writeI32(_iter294.getValue().size());
- for (Map.Entry<String, Double> _iter295 : _iter294.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter295 : _iter294.getValue().entrySet())
{
oprot.writeString(_iter295.getKey());
oprot.writeDouble(_iter295.getValue());
@@ -837,19 +806,19 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SpoutStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TMap _map296 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.acked = new HashMap<String,Map<String,Long>>(2*_map296.size);
- String _key297;
- Map<String,Long> _val298;
+ struct.acked = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(2*_map296.size);
+ java.lang.String _key297;
+ java.util.Map<java.lang.String,java.lang.Long> _val298;
for (int _i299 = 0; _i299 < _map296.size; ++_i299)
{
_key297 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map300 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- _val298 = new HashMap<String,Long>(2*_map300.size);
- String _key301;
+ _val298 = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map300.size);
+ java.lang.String _key301;
long _val302;
for (int _i303 = 0; _i303 < _map300.size; ++_i303)
{
@@ -864,16 +833,16 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
struct.set_acked_isSet(true);
{
org.apache.thrift.protocol.TMap _map304 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.failed = new HashMap<String,Map<String,Long>>(2*_map304.size);
- String _key305;
- Map<String,Long> _val306;
+ struct.failed = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(2*_map304.size);
+ java.lang.String _key305;
+ java.util.Map<java.lang.String,java.lang.Long> _val306;
for (int _i307 = 0; _i307 < _map304.size; ++_i307)
{
_key305 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map308 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- _val306 = new HashMap<String,Long>(2*_map308.size);
- String _key309;
+ _val306 = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map308.size);
+ java.lang.String _key309;
long _val310;
for (int _i311 = 0; _i311 < _map308.size; ++_i311)
{
@@ -888,16 +857,16 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
struct.set_failed_isSet(true);
{
org.apache.thrift.protocol.TMap _map312 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.complete_ms_avg = new HashMap<String,Map<String,Double>>(2*_map312.size);
- String _key313;
- Map<String,Double> _val314;
+ struct.complete_ms_avg = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>>(2*_map312.size);
+ java.lang.String _key313;
+ java.util.Map<java.lang.String,java.lang.Double> _val314;
for (int _i315 = 0; _i315 < _map312.size; ++_i315)
{
_key313 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map316 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- _val314 = new HashMap<String,Double>(2*_map316.size);
- String _key317;
+ _val314 = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map316.size);
+ java.lang.String _key317;
double _val318;
for (int _i319 = 0; _i319 < _map316.size; ++_i319)
{
@@ -913,5 +882,8 @@ public class SpoutStats implements org.apache.thrift.TBase<SpoutStats, SpoutStat
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/StateSpoutSpec.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/StateSpoutSpec.java b/storm-client/src/jvm/org/apache/storm/generated/StateSpoutSpec.java
index c6ab89d..7658b90 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/StateSpoutSpec.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/StateSpoutSpec.java
@@ -16,53 +16,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, StateSpoutSpec._Fields>, java.io.Serializable, Cloneable, Comparable<StateSpoutSpec> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StateSpoutSpec");
private static final org.apache.thrift.protocol.TField STATE_SPOUT_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("state_spout_object", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField COMMON_FIELD_DESC = new org.apache.thrift.protocol.TField("common", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new StateSpoutSpecStandardSchemeFactory());
- schemes.put(TupleScheme.class, new StateSpoutSpecTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new StateSpoutSpecStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new StateSpoutSpecTupleSchemeFactory();
private ComponentObject state_spout_object; // required
private ComponentCommon common; // required
@@ -72,10 +42,10 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
STATE_SPOUT_OBJECT((short)1, "state_spout_object"),
COMMON((short)2, "common");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,20 +93,20 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.STATE_SPOUT_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("state_spout_object", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentObject.class)));
tmpMap.put(_Fields.COMMON, new org.apache.thrift.meta_data.FieldMetaData("common", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentCommon.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StateSpoutSpec.class, metaDataMap);
}
@@ -220,7 +190,7 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case STATE_SPOUT_OBJECT:
if (value == null) {
@@ -241,7 +211,7 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case STATE_SPOUT_OBJECT:
return get_state_spout_object();
@@ -250,13 +220,13 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
return get_common();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -265,11 +235,11 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
case COMMON:
return is_set_common();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof StateSpoutSpec)
@@ -280,6 +250,8 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
public boolean equals(StateSpoutSpec that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_state_spout_object = true && this.is_set_state_spout_object();
boolean that_present_state_spout_object = true && that.is_set_state_spout_object();
@@ -304,19 +276,17 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_state_spout_object = true && (is_set_state_spout_object());
- list.add(present_state_spout_object);
- if (present_state_spout_object)
- list.add(state_spout_object);
+ hashCode = hashCode * 8191 + ((is_set_state_spout_object()) ? 131071 : 524287);
+ if (is_set_state_spout_object())
+ hashCode = hashCode * 8191 + state_spout_object.hashCode();
- boolean present_common = true && (is_set_common());
- list.add(present_common);
- if (present_common)
- list.add(common);
+ hashCode = hashCode * 8191 + ((is_set_common()) ? 131071 : 524287);
+ if (is_set_common())
+ hashCode = hashCode * 8191 + common.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -327,7 +297,7 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_state_spout_object()).compareTo(other.is_set_state_spout_object());
+ lastComparison = java.lang.Boolean.valueOf(is_set_state_spout_object()).compareTo(other.is_set_state_spout_object());
if (lastComparison != 0) {
return lastComparison;
}
@@ -337,7 +307,7 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_common()).compareTo(other.is_set_common());
+ lastComparison = java.lang.Boolean.valueOf(is_set_common()).compareTo(other.is_set_common());
if (lastComparison != 0) {
return lastComparison;
}
@@ -355,16 +325,16 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("StateSpoutSpec(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("StateSpoutSpec(");
boolean first = true;
sb.append("state_spout_object:");
@@ -410,7 +380,7 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -418,13 +388,13 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
}
}
- private static class StateSpoutSpecStandardSchemeFactory implements SchemeFactory {
+ private static class StateSpoutSpecStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public StateSpoutSpecStandardScheme getScheme() {
return new StateSpoutSpecStandardScheme();
}
}
- private static class StateSpoutSpecStandardScheme extends StandardScheme<StateSpoutSpec> {
+ private static class StateSpoutSpecStandardScheme extends org.apache.thrift.scheme.StandardScheme<StateSpoutSpec> {
public void read(org.apache.thrift.protocol.TProtocol iprot, StateSpoutSpec struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -483,24 +453,24 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
}
- private static class StateSpoutSpecTupleSchemeFactory implements SchemeFactory {
+ private static class StateSpoutSpecTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public StateSpoutSpecTupleScheme getScheme() {
return new StateSpoutSpecTupleScheme();
}
}
- private static class StateSpoutSpecTupleScheme extends TupleScheme<StateSpoutSpec> {
+ private static class StateSpoutSpecTupleScheme extends org.apache.thrift.scheme.TupleScheme<StateSpoutSpec> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, StateSpoutSpec struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.state_spout_object.write(oprot);
struct.common.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, StateSpoutSpec struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.state_spout_object = new ComponentObject();
struct.state_spout_object.read(iprot);
struct.set_state_spout_object_isSet(true);
@@ -510,5 +480,8 @@ public class StateSpoutSpec implements org.apache.thrift.TBase<StateSpoutSpec, S
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[30/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/Grouping.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/Grouping.java b/storm-client/src/jvm/org/apache/storm/generated/Grouping.java
index ccb19bc..5befe37 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/Grouping.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/Grouping.java
@@ -16,41 +16,14 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Fields> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Grouping");
private static final org.apache.thrift.protocol.TField FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fields", org.apache.thrift.protocol.TType.LIST, (short)1);
@@ -73,10 +46,10 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
CUSTOM_SERIALIZED((short)7, "custom_serialized"),
LOCAL_OR_SHUFFLE((short)8, "local_or_shuffle");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -113,21 +86,21 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -136,32 +109,32 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.FIELDS, new org.apache.thrift.meta_data.FieldMetaData("fields", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.FIELDS, new org.apache.thrift.meta_data.FieldMetaData("fields", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- tmpMap.put(_Fields.SHUFFLE, new org.apache.thrift.meta_data.FieldMetaData("shuffle", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.SHUFFLE, new org.apache.thrift.meta_data.FieldMetaData("shuffle", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class)));
- tmpMap.put(_Fields.ALL, new org.apache.thrift.meta_data.FieldMetaData("all", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.ALL, new org.apache.thrift.meta_data.FieldMetaData("all", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class)));
- tmpMap.put(_Fields.NONE, new org.apache.thrift.meta_data.FieldMetaData("none", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.NONE, new org.apache.thrift.meta_data.FieldMetaData("none", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class)));
- tmpMap.put(_Fields.DIRECT, new org.apache.thrift.meta_data.FieldMetaData("direct", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.DIRECT, new org.apache.thrift.meta_data.FieldMetaData("direct", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class)));
- tmpMap.put(_Fields.CUSTOM_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("custom_object", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.CUSTOM_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("custom_object", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JavaObject.class)));
- tmpMap.put(_Fields.CUSTOM_SERIALIZED, new org.apache.thrift.meta_data.FieldMetaData("custom_serialized", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.CUSTOM_SERIALIZED, new org.apache.thrift.meta_data.FieldMetaData("custom_serialized", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- tmpMap.put(_Fields.LOCAL_OR_SHUFFLE, new org.apache.thrift.meta_data.FieldMetaData("local_or_shuffle", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.LOCAL_OR_SHUFFLE, new org.apache.thrift.meta_data.FieldMetaData("local_or_shuffle", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Grouping.class, metaDataMap);
}
@@ -169,7 +142,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
super();
}
- public Grouping(_Fields setField, Object value) {
+ public Grouping(_Fields setField, java.lang.Object value) {
super(setField, value);
}
@@ -180,7 +153,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
return new Grouping(this);
}
- public static Grouping fields(List<String> value) {
+ public static Grouping fields(java.util.List<java.lang.String> value) {
Grouping x = new Grouping();
x.set_fields(value);
return x;
@@ -216,7 +189,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
return x;
}
- public static Grouping custom_serialized(ByteBuffer value) {
+ public static Grouping custom_serialized(java.nio.ByteBuffer value) {
Grouping x = new Grouping();
x.set_custom_serialized(value);
return x;
@@ -224,7 +197,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
public static Grouping custom_serialized(byte[] value) {
Grouping x = new Grouping();
- x.set_custom_serialized(ByteBuffer.wrap(Arrays.copyOf(value, value.length)));
+ x.set_custom_serialized(java.nio.ByteBuffer.wrap(value.clone()));
return x;
}
@@ -236,65 +209,65 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
@Override
- protected void checkType(_Fields setField, Object value) throws ClassCastException {
+ protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException {
switch (setField) {
case FIELDS:
- if (value instanceof List) {
+ if (value instanceof java.util.List) {
break;
}
- throw new ClassCastException("Was expecting value of type List<String> for field 'fields', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type java.util.List<java.lang.String> for field 'fields', but got " + value.getClass().getSimpleName());
case SHUFFLE:
if (value instanceof NullStruct) {
break;
}
- throw new ClassCastException("Was expecting value of type NullStruct for field 'shuffle', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type NullStruct for field 'shuffle', but got " + value.getClass().getSimpleName());
case ALL:
if (value instanceof NullStruct) {
break;
}
- throw new ClassCastException("Was expecting value of type NullStruct for field 'all', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type NullStruct for field 'all', but got " + value.getClass().getSimpleName());
case NONE:
if (value instanceof NullStruct) {
break;
}
- throw new ClassCastException("Was expecting value of type NullStruct for field 'none', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type NullStruct for field 'none', but got " + value.getClass().getSimpleName());
case DIRECT:
if (value instanceof NullStruct) {
break;
}
- throw new ClassCastException("Was expecting value of type NullStruct for field 'direct', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type NullStruct for field 'direct', but got " + value.getClass().getSimpleName());
case CUSTOM_OBJECT:
if (value instanceof JavaObject) {
break;
}
- throw new ClassCastException("Was expecting value of type JavaObject for field 'custom_object', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type JavaObject for field 'custom_object', but got " + value.getClass().getSimpleName());
case CUSTOM_SERIALIZED:
- if (value instanceof ByteBuffer) {
+ if (value instanceof java.nio.ByteBuffer) {
break;
}
- throw new ClassCastException("Was expecting value of type ByteBuffer for field 'custom_serialized', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type java.nio.ByteBuffer for field 'custom_serialized', but got " + value.getClass().getSimpleName());
case LOCAL_OR_SHUFFLE:
if (value instanceof NullStruct) {
break;
}
- throw new ClassCastException("Was expecting value of type NullStruct for field 'local_or_shuffle', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type NullStruct for field 'local_or_shuffle', but got " + value.getClass().getSimpleName());
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@Override
- protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
+ protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(field.id);
if (setField != null) {
switch (setField) {
case FIELDS:
if (field.type == FIELDS_FIELD_DESC.type) {
- List<String> fields;
+ java.util.List<java.lang.String> fields;
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
- fields = new ArrayList<String>(_list8.size);
- String _elem9;
+ fields = new java.util.ArrayList<java.lang.String>(_list8.size);
+ java.lang.String _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
_elem9 = iprot.readString();
@@ -359,7 +332,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
}
case CUSTOM_SERIALIZED:
if (field.type == CUSTOM_SERIALIZED_FIELD_DESC.type) {
- ByteBuffer custom_serialized;
+ java.nio.ByteBuffer custom_serialized;
custom_serialized = iprot.readBinary();
return custom_serialized;
} else {
@@ -377,7 +350,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
return null;
}
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
@@ -389,10 +362,10 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
switch (setField_) {
case FIELDS:
- List<String> fields = (List<String>)value_;
+ java.util.List<java.lang.String> fields = (java.util.List<java.lang.String>)value_;
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, fields.size()));
- for (String _iter11 : fields)
+ for (java.lang.String _iter11 : fields)
{
oprot.writeString(_iter11);
}
@@ -420,7 +393,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
custom_object.write(oprot);
return;
case CUSTOM_SERIALIZED:
- ByteBuffer custom_serialized = (ByteBuffer)value_;
+ java.nio.ByteBuffer custom_serialized = (java.nio.ByteBuffer)value_;
oprot.writeBinary(custom_serialized);
return;
case LOCAL_OR_SHUFFLE:
@@ -428,21 +401,21 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
local_or_shuffle.write(oprot);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@Override
- protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
+ protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(fieldID);
if (setField != null) {
switch (setField) {
case FIELDS:
- List<String> fields;
+ java.util.List<java.lang.String> fields;
{
org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
- fields = new ArrayList<String>(_list12.size);
- String _elem13;
+ fields = new java.util.ArrayList<java.lang.String>(_list12.size);
+ java.lang.String _elem13;
for (int _i14 = 0; _i14 < _list12.size; ++_i14)
{
_elem13 = iprot.readString();
@@ -477,7 +450,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
custom_object.read(iprot);
return custom_object;
case CUSTOM_SERIALIZED:
- ByteBuffer custom_serialized;
+ java.nio.ByteBuffer custom_serialized;
custom_serialized = iprot.readBinary();
return custom_serialized;
case LOCAL_OR_SHUFFLE:
@@ -486,10 +459,10 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
local_or_shuffle.read(iprot);
return local_or_shuffle;
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
- throw new TProtocolException("Couldn't find a field with field id " + fieldID);
+ throw new org.apache.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID);
}
}
@@ -497,10 +470,10 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
switch (setField_) {
case FIELDS:
- List<String> fields = (List<String>)value_;
+ java.util.List<java.lang.String> fields = (java.util.List<java.lang.String>)value_;
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, fields.size()));
- for (String _iter15 : fields)
+ for (java.lang.String _iter15 : fields)
{
oprot.writeString(_iter15);
}
@@ -528,7 +501,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
custom_object.write(oprot);
return;
case CUSTOM_SERIALIZED:
- ByteBuffer custom_serialized = (ByteBuffer)value_;
+ java.nio.ByteBuffer custom_serialized = (java.nio.ByteBuffer)value_;
oprot.writeBinary(custom_serialized);
return;
case LOCAL_OR_SHUFFLE:
@@ -536,7 +509,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
local_or_shuffle.write(oprot);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@@ -560,7 +533,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
case LOCAL_OR_SHUFFLE:
return LOCAL_OR_SHUFFLE_FIELD_DESC;
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@@ -579,16 +552,16 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
}
- public List<String> get_fields() {
+ public java.util.List<java.lang.String> get_fields() {
if (getSetField() == _Fields.FIELDS) {
- return (List<String>)getFieldValue();
+ return (java.util.List<java.lang.String>)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'fields' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'fields' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
- public void set_fields(List<String> value) {
- if (value == null) throw new NullPointerException();
+ public void set_fields(java.util.List<java.lang.String> value) {
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.FIELDS;
value_ = value;
}
@@ -597,12 +570,12 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
if (getSetField() == _Fields.SHUFFLE) {
return (NullStruct)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'shuffle' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'shuffle' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_shuffle(NullStruct value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.SHUFFLE;
value_ = value;
}
@@ -611,12 +584,12 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
if (getSetField() == _Fields.ALL) {
return (NullStruct)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'all' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'all' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_all(NullStruct value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.ALL;
value_ = value;
}
@@ -625,12 +598,12 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
if (getSetField() == _Fields.NONE) {
return (NullStruct)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'none' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'none' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_none(NullStruct value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.NONE;
value_ = value;
}
@@ -639,12 +612,12 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
if (getSetField() == _Fields.DIRECT) {
return (NullStruct)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'direct' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'direct' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_direct(NullStruct value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.DIRECT;
value_ = value;
}
@@ -653,36 +626,36 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
if (getSetField() == _Fields.CUSTOM_OBJECT) {
return (JavaObject)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'custom_object' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'custom_object' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_custom_object(JavaObject value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.CUSTOM_OBJECT;
value_ = value;
}
public byte[] get_custom_serialized() {
set_custom_serialized(org.apache.thrift.TBaseHelper.rightSize(buffer_for_custom_serialized()));
- ByteBuffer b = buffer_for_custom_serialized();
+ java.nio.ByteBuffer b = buffer_for_custom_serialized();
return b == null ? null : b.array();
}
- public ByteBuffer buffer_for_custom_serialized() {
+ public java.nio.ByteBuffer buffer_for_custom_serialized() {
if (getSetField() == _Fields.CUSTOM_SERIALIZED) {
- return org.apache.thrift.TBaseHelper.copyBinary((ByteBuffer)getFieldValue());
+ return org.apache.thrift.TBaseHelper.copyBinary((java.nio.ByteBuffer)getFieldValue());
} else {
- throw new RuntimeException("Cannot get field 'custom_serialized' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'custom_serialized' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_custom_serialized(byte[] value) {
- set_custom_serialized(ByteBuffer.wrap(Arrays.copyOf(value, value.length)));
+ set_custom_serialized(java.nio.ByteBuffer.wrap(value.clone()));
}
- public void set_custom_serialized(ByteBuffer value) {
- if (value == null) throw new NullPointerException();
+ public void set_custom_serialized(java.nio.ByteBuffer value) {
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.CUSTOM_SERIALIZED;
value_ = value;
}
@@ -691,12 +664,12 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
if (getSetField() == _Fields.LOCAL_OR_SHUFFLE) {
return (NullStruct)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'local_or_shuffle' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'local_or_shuffle' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_local_or_shuffle(NullStruct value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.LOCAL_OR_SHUFFLE;
value_ = value;
}
@@ -741,7 +714,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
}
- public boolean equals(Object other) {
+ public boolean equals(java.lang.Object other) {
if (other instanceof Grouping) {
return equals((Grouping)other);
} else {
@@ -765,12 +738,12 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>();
list.add(this.getClass().getName());
org.apache.thrift.TFieldIdEnum setField = getSetField();
if (setField != null) {
list.add(setField.getThriftFieldId());
- Object value = getFieldValue();
+ java.lang.Object value = getFieldValue();
if (value instanceof org.apache.thrift.TEnum) {
list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue());
} else {
@@ -788,7 +761,7 @@ public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Field
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBAuthorizationException.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBAuthorizationException.java b/storm-client/src/jvm/org/apache/storm/generated/HBAuthorizationException.java
index cb31213..12305ec 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/HBAuthorizationException.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/HBAuthorizationException.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class HBAuthorizationException extends TException implements org.apache.thrift.TBase<HBAuthorizationException, HBAuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<HBAuthorizationException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
+public class HBAuthorizationException extends org.apache.thrift.TException implements org.apache.thrift.TBase<HBAuthorizationException, HBAuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<HBAuthorizationException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBAuthorizationException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new HBAuthorizationExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new HBAuthorizationExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new HBAuthorizationExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new HBAuthorizationExceptionTupleSchemeFactory();
- private String msg; // required
+ private java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class HBAuthorizationException extends TException implements org.apache.t
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,18 +88,18 @@ public class HBAuthorizationException extends TException implements org.apache.t
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBAuthorizationException.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class HBAuthorizationException extends TException implements org.apache.t
}
public HBAuthorizationException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -161,11 +131,11 @@ public class HBAuthorizationException extends TException implements org.apache.t
this.msg = null;
}
- public String get_msg() {
+ public java.lang.String get_msg() {
return this.msg;
}
- public void set_msg(String msg) {
+ public void set_msg(java.lang.String msg) {
this.msg = msg;
}
@@ -184,43 +154,43 @@ public class HBAuthorizationException extends TException implements org.apache.t
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unset_msg();
} else {
- set_msg((String)value);
+ set_msg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return get_msg();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return is_set_msg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof HBAuthorizationException)
@@ -231,6 +201,8 @@ public class HBAuthorizationException extends TException implements org.apache.t
public boolean equals(HBAuthorizationException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.is_set_msg();
boolean that_present_msg = true && that.is_set_msg();
@@ -246,14 +218,13 @@ public class HBAuthorizationException extends TException implements org.apache.t
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (is_set_msg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((is_set_msg()) ? 131071 : 524287);
+ if (is_set_msg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class HBAuthorizationException extends TException implements org.apache.t
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class HBAuthorizationException extends TException implements org.apache.t
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("HBAuthorizationException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("HBAuthorizationException(");
boolean first = true;
sb.append("msg:");
@@ -322,7 +293,7 @@ public class HBAuthorizationException extends TException implements org.apache.t
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -330,13 +301,13 @@ public class HBAuthorizationException extends TException implements org.apache.t
}
}
- private static class HBAuthorizationExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class HBAuthorizationExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HBAuthorizationExceptionStandardScheme getScheme() {
return new HBAuthorizationExceptionStandardScheme();
}
}
- private static class HBAuthorizationExceptionStandardScheme extends StandardScheme<HBAuthorizationException> {
+ private static class HBAuthorizationExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<HBAuthorizationException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, HBAuthorizationException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -380,27 +351,30 @@ public class HBAuthorizationException extends TException implements org.apache.t
}
- private static class HBAuthorizationExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class HBAuthorizationExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HBAuthorizationExceptionTupleScheme getScheme() {
return new HBAuthorizationExceptionTupleScheme();
}
}
- private static class HBAuthorizationExceptionTupleScheme extends TupleScheme<HBAuthorizationException> {
+ private static class HBAuthorizationExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<HBAuthorizationException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, HBAuthorizationException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.msg);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, HBAuthorizationException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.msg = iprot.readString();
struct.set_msg_isSet(true);
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBExecutionException.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBExecutionException.java b/storm-client/src/jvm/org/apache/storm/generated/HBExecutionException.java
index 697dd06..a073b7e 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/HBExecutionException.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/HBExecutionException.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class HBExecutionException extends TException implements org.apache.thrift.TBase<HBExecutionException, HBExecutionException._Fields>, java.io.Serializable, Cloneable, Comparable<HBExecutionException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
+public class HBExecutionException extends org.apache.thrift.TException implements org.apache.thrift.TBase<HBExecutionException, HBExecutionException._Fields>, java.io.Serializable, Cloneable, Comparable<HBExecutionException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBExecutionException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new HBExecutionExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new HBExecutionExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new HBExecutionExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new HBExecutionExceptionTupleSchemeFactory();
- private String msg; // required
+ private java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class HBExecutionException extends TException implements org.apache.thrif
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,18 +88,18 @@ public class HBExecutionException extends TException implements org.apache.thrif
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBExecutionException.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class HBExecutionException extends TException implements org.apache.thrif
}
public HBExecutionException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -161,11 +131,11 @@ public class HBExecutionException extends TException implements org.apache.thrif
this.msg = null;
}
- public String get_msg() {
+ public java.lang.String get_msg() {
return this.msg;
}
- public void set_msg(String msg) {
+ public void set_msg(java.lang.String msg) {
this.msg = msg;
}
@@ -184,43 +154,43 @@ public class HBExecutionException extends TException implements org.apache.thrif
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unset_msg();
} else {
- set_msg((String)value);
+ set_msg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return get_msg();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return is_set_msg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof HBExecutionException)
@@ -231,6 +201,8 @@ public class HBExecutionException extends TException implements org.apache.thrif
public boolean equals(HBExecutionException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.is_set_msg();
boolean that_present_msg = true && that.is_set_msg();
@@ -246,14 +218,13 @@ public class HBExecutionException extends TException implements org.apache.thrif
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (is_set_msg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((is_set_msg()) ? 131071 : 524287);
+ if (is_set_msg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class HBExecutionException extends TException implements org.apache.thrif
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class HBExecutionException extends TException implements org.apache.thrif
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("HBExecutionException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("HBExecutionException(");
boolean first = true;
sb.append("msg:");
@@ -322,7 +293,7 @@ public class HBExecutionException extends TException implements org.apache.thrif
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -330,13 +301,13 @@ public class HBExecutionException extends TException implements org.apache.thrif
}
}
- private static class HBExecutionExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class HBExecutionExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HBExecutionExceptionStandardScheme getScheme() {
return new HBExecutionExceptionStandardScheme();
}
}
- private static class HBExecutionExceptionStandardScheme extends StandardScheme<HBExecutionException> {
+ private static class HBExecutionExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<HBExecutionException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, HBExecutionException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -380,27 +351,30 @@ public class HBExecutionException extends TException implements org.apache.thrif
}
- private static class HBExecutionExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class HBExecutionExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HBExecutionExceptionTupleScheme getScheme() {
return new HBExecutionExceptionTupleScheme();
}
}
- private static class HBExecutionExceptionTupleScheme extends TupleScheme<HBExecutionException> {
+ private static class HBExecutionExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<HBExecutionException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, HBExecutionException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.msg);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, HBExecutionException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.msg = iprot.readString();
struct.set_msg_isSet(true);
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBMessage.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBMessage.java b/storm-client/src/jvm/org/apache/storm/generated/HBMessage.java
index 29d3b21..a6453f6 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/HBMessage.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/HBMessage.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._Fields>, java.io.Serializable, Cloneable, Comparable<HBMessage> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBMessage");
@@ -59,11 +32,8 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField MESSAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("message_id", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new HBMessageStandardSchemeFactory());
- schemes.put(TupleScheme.class, new HBMessageTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new HBMessageStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new HBMessageTupleSchemeFactory();
private HBServerMessageType type; // required
private HBMessageData data; // required
@@ -79,10 +49,10 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
DATA((short)2, "data"),
MESSAGE_ID((short)3, "message_id");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -109,21 +79,21 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -132,7 +102,7 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -141,16 +111,16 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
private static final int __MESSAGE_ID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.MESSAGE_ID};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, HBServerMessageType.class)));
tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HBMessageData.class)));
tmpMap.put(_Fields.MESSAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("message_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBMessage.class, metaDataMap);
}
@@ -258,19 +228,19 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
}
public void unset_message_id() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MESSAGE_ID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MESSAGE_ID_ISSET_ID);
}
/** Returns true if field message_id is set (has been assigned a value) and false otherwise */
public boolean is_set_message_id() {
- return EncodingUtils.testBit(__isset_bitfield, __MESSAGE_ID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MESSAGE_ID_ISSET_ID);
}
public void set_message_id_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MESSAGE_ID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MESSAGE_ID_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TYPE:
if (value == null) {
@@ -292,14 +262,14 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
if (value == null) {
unset_message_id();
} else {
- set_message_id((Integer)value);
+ set_message_id((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TYPE:
return get_type();
@@ -311,13 +281,13 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
return get_message_id();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -328,11 +298,11 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
case MESSAGE_ID:
return is_set_message_id();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof HBMessage)
@@ -343,6 +313,8 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
public boolean equals(HBMessage that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_type = true && this.is_set_type();
boolean that_present_type = true && that.is_set_type();
@@ -376,24 +348,21 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_type = true && (is_set_type());
- list.add(present_type);
- if (present_type)
- list.add(type.getValue());
+ hashCode = hashCode * 8191 + ((is_set_type()) ? 131071 : 524287);
+ if (is_set_type())
+ hashCode = hashCode * 8191 + type.getValue();
- boolean present_data = true && (is_set_data());
- list.add(present_data);
- if (present_data)
- list.add(data);
+ hashCode = hashCode * 8191 + ((is_set_data()) ? 131071 : 524287);
+ if (is_set_data())
+ hashCode = hashCode * 8191 + data.hashCode();
- boolean present_message_id = true && (is_set_message_id());
- list.add(present_message_id);
- if (present_message_id)
- list.add(message_id);
+ hashCode = hashCode * 8191 + ((is_set_message_id()) ? 131071 : 524287);
+ if (is_set_message_id())
+ hashCode = hashCode * 8191 + message_id;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -404,7 +373,7 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_type()).compareTo(other.is_set_type());
+ lastComparison = java.lang.Boolean.valueOf(is_set_type()).compareTo(other.is_set_type());
if (lastComparison != 0) {
return lastComparison;
}
@@ -414,7 +383,7 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_data()).compareTo(other.is_set_data());
+ lastComparison = java.lang.Boolean.valueOf(is_set_data()).compareTo(other.is_set_data());
if (lastComparison != 0) {
return lastComparison;
}
@@ -424,7 +393,7 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_message_id()).compareTo(other.is_set_message_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_message_id()).compareTo(other.is_set_message_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -442,16 +411,16 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("HBMessage(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("HBMessage(");
boolean first = true;
sb.append("type:");
@@ -492,7 +461,7 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -502,13 +471,13 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
}
}
- private static class HBMessageStandardSchemeFactory implements SchemeFactory {
+ private static class HBMessageStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HBMessageStandardScheme getScheme() {
return new HBMessageStandardScheme();
}
}
- private static class HBMessageStandardScheme extends StandardScheme<HBMessage> {
+ private static class HBMessageStandardScheme extends org.apache.thrift.scheme.StandardScheme<HBMessage> {
public void read(org.apache.thrift.protocol.TProtocol iprot, HBMessage struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -579,18 +548,18 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
}
- private static class HBMessageTupleSchemeFactory implements SchemeFactory {
+ private static class HBMessageTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HBMessageTupleScheme getScheme() {
return new HBMessageTupleScheme();
}
}
- private static class HBMessageTupleScheme extends TupleScheme<HBMessage> {
+ private static class HBMessageTupleScheme extends org.apache.thrift.scheme.TupleScheme<HBMessage> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, HBMessage struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_type()) {
optionals.set(0);
}
@@ -614,8 +583,8 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, HBMessage struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.type = org.apache.storm.generated.HBServerMessageType.findByValue(iprot.readI32());
struct.set_type_isSet(true);
@@ -632,5 +601,8 @@ public class HBMessage implements org.apache.thrift.TBase<HBMessage, HBMessage._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[31/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ExecutorStats.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ExecutorStats.java b/storm-client/src/jvm/org/apache/storm/generated/ExecutorStats.java
index ab11c78..cca97b6 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ExecutorStats.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ExecutorStats.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, ExecutorStats._Fields>, java.io.Serializable, Cloneable, Comparable<ExecutorStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecutorStats");
@@ -60,14 +33,11 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
private static final org.apache.thrift.protocol.TField SPECIFIC_FIELD_DESC = new org.apache.thrift.protocol.TField("specific", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("rate", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ExecutorStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ExecutorStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ExecutorStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ExecutorStatsTupleSchemeFactory();
- private Map<String,Map<String,Long>> emitted; // required
- private Map<String,Map<String,Long>> transferred; // required
+ private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> emitted; // required
+ private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> transferred; // required
private ExecutorSpecificStats specific; // required
private double rate; // required
@@ -78,10 +48,10 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
SPECIFIC((short)3, "specific"),
RATE((short)4, "rate");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -110,21 +80,21 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -133,7 +103,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -141,9 +111,9 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
// isset id assignments
private static final int __RATE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EMITTED, new org.apache.thrift.meta_data.FieldMetaData("emitted", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
@@ -160,7 +130,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutorSpecificStats.class)));
tmpMap.put(_Fields.RATE, new org.apache.thrift.meta_data.FieldMetaData("rate", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecutorStats.class, metaDataMap);
}
@@ -168,8 +138,8 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
}
public ExecutorStats(
- Map<String,Map<String,Long>> emitted,
- Map<String,Map<String,Long>> transferred,
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> emitted,
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> transferred,
ExecutorSpecificStats specific,
double rate)
{
@@ -187,30 +157,30 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
public ExecutorStats(ExecutorStats other) {
__isset_bitfield = other.__isset_bitfield;
if (other.is_set_emitted()) {
- Map<String,Map<String,Long>> __this__emitted = new HashMap<String,Map<String,Long>>(other.emitted.size());
- for (Map.Entry<String, Map<String,Long>> other_element : other.emitted.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> __this__emitted = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(other.emitted.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> other_element : other.emitted.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<String,Long> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<java.lang.String,java.lang.Long> other_element_value = other_element.getValue();
- String __this__emitted_copy_key = other_element_key;
+ java.lang.String __this__emitted_copy_key = other_element_key;
- Map<String,Long> __this__emitted_copy_value = new HashMap<String,Long>(other_element_value);
+ java.util.Map<java.lang.String,java.lang.Long> __this__emitted_copy_value = new java.util.HashMap<java.lang.String,java.lang.Long>(other_element_value);
__this__emitted.put(__this__emitted_copy_key, __this__emitted_copy_value);
}
this.emitted = __this__emitted;
}
if (other.is_set_transferred()) {
- Map<String,Map<String,Long>> __this__transferred = new HashMap<String,Map<String,Long>>(other.transferred.size());
- for (Map.Entry<String, Map<String,Long>> other_element : other.transferred.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> __this__transferred = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(other.transferred.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> other_element : other.transferred.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<String,Long> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<java.lang.String,java.lang.Long> other_element_value = other_element.getValue();
- String __this__transferred_copy_key = other_element_key;
+ java.lang.String __this__transferred_copy_key = other_element_key;
- Map<String,Long> __this__transferred_copy_value = new HashMap<String,Long>(other_element_value);
+ java.util.Map<java.lang.String,java.lang.Long> __this__transferred_copy_value = new java.util.HashMap<java.lang.String,java.lang.Long>(other_element_value);
__this__transferred.put(__this__transferred_copy_key, __this__transferred_copy_value);
}
@@ -239,18 +209,18 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
return (this.emitted == null) ? 0 : this.emitted.size();
}
- public void put_to_emitted(String key, Map<String,Long> val) {
+ public void put_to_emitted(java.lang.String key, java.util.Map<java.lang.String,java.lang.Long> val) {
if (this.emitted == null) {
- this.emitted = new HashMap<String,Map<String,Long>>();
+ this.emitted = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>();
}
this.emitted.put(key, val);
}
- public Map<String,Map<String,Long>> get_emitted() {
+ public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> get_emitted() {
return this.emitted;
}
- public void set_emitted(Map<String,Map<String,Long>> emitted) {
+ public void set_emitted(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> emitted) {
this.emitted = emitted;
}
@@ -273,18 +243,18 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
return (this.transferred == null) ? 0 : this.transferred.size();
}
- public void put_to_transferred(String key, Map<String,Long> val) {
+ public void put_to_transferred(java.lang.String key, java.util.Map<java.lang.String,java.lang.Long> val) {
if (this.transferred == null) {
- this.transferred = new HashMap<String,Map<String,Long>>();
+ this.transferred = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>();
}
this.transferred.put(key, val);
}
- public Map<String,Map<String,Long>> get_transferred() {
+ public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> get_transferred() {
return this.transferred;
}
- public void set_transferred(Map<String,Map<String,Long>> transferred) {
+ public void set_transferred(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> transferred) {
this.transferred = transferred;
}
@@ -336,25 +306,25 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
}
public void unset_rate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RATE_ISSET_ID);
}
/** Returns true if field rate is set (has been assigned a value) and false otherwise */
public boolean is_set_rate() {
- return EncodingUtils.testBit(__isset_bitfield, __RATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RATE_ISSET_ID);
}
public void set_rate_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RATE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EMITTED:
if (value == null) {
unset_emitted();
} else {
- set_emitted((Map<String,Map<String,Long>>)value);
+ set_emitted((java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>)value);
}
break;
@@ -362,7 +332,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
if (value == null) {
unset_transferred();
} else {
- set_transferred((Map<String,Map<String,Long>>)value);
+ set_transferred((java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>)value);
}
break;
@@ -378,14 +348,14 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
if (value == null) {
unset_rate();
} else {
- set_rate((Double)value);
+ set_rate((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EMITTED:
return get_emitted();
@@ -400,13 +370,13 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
return get_rate();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -419,11 +389,11 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
case RATE:
return is_set_rate();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ExecutorStats)
@@ -434,6 +404,8 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
public boolean equals(ExecutorStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_emitted = true && this.is_set_emitted();
boolean that_present_emitted = true && that.is_set_emitted();
@@ -476,29 +448,23 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_emitted = true && (is_set_emitted());
- list.add(present_emitted);
- if (present_emitted)
- list.add(emitted);
+ hashCode = hashCode * 8191 + ((is_set_emitted()) ? 131071 : 524287);
+ if (is_set_emitted())
+ hashCode = hashCode * 8191 + emitted.hashCode();
- boolean present_transferred = true && (is_set_transferred());
- list.add(present_transferred);
- if (present_transferred)
- list.add(transferred);
+ hashCode = hashCode * 8191 + ((is_set_transferred()) ? 131071 : 524287);
+ if (is_set_transferred())
+ hashCode = hashCode * 8191 + transferred.hashCode();
- boolean present_specific = true && (is_set_specific());
- list.add(present_specific);
- if (present_specific)
- list.add(specific);
+ hashCode = hashCode * 8191 + ((is_set_specific()) ? 131071 : 524287);
+ if (is_set_specific())
+ hashCode = hashCode * 8191 + specific.hashCode();
- boolean present_rate = true;
- list.add(present_rate);
- if (present_rate)
- list.add(rate);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(rate);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -509,7 +475,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_emitted()).compareTo(other.is_set_emitted());
+ lastComparison = java.lang.Boolean.valueOf(is_set_emitted()).compareTo(other.is_set_emitted());
if (lastComparison != 0) {
return lastComparison;
}
@@ -519,7 +485,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_transferred()).compareTo(other.is_set_transferred());
+ lastComparison = java.lang.Boolean.valueOf(is_set_transferred()).compareTo(other.is_set_transferred());
if (lastComparison != 0) {
return lastComparison;
}
@@ -529,7 +495,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_specific()).compareTo(other.is_set_specific());
+ lastComparison = java.lang.Boolean.valueOf(is_set_specific()).compareTo(other.is_set_specific());
if (lastComparison != 0) {
return lastComparison;
}
@@ -539,7 +505,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_rate()).compareTo(other.is_set_rate());
+ lastComparison = java.lang.Boolean.valueOf(is_set_rate()).compareTo(other.is_set_rate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -557,16 +523,16 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ExecutorStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ExecutorStats(");
boolean first = true;
sb.append("emitted:");
@@ -629,7 +595,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -639,13 +605,13 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
}
}
- private static class ExecutorStatsStandardSchemeFactory implements SchemeFactory {
+ private static class ExecutorStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ExecutorStatsStandardScheme getScheme() {
return new ExecutorStatsStandardScheme();
}
}
- private static class ExecutorStatsStandardScheme extends StandardScheme<ExecutorStats> {
+ private static class ExecutorStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ExecutorStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ExecutorStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -661,16 +627,16 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map320 = iprot.readMapBegin();
- struct.emitted = new HashMap<String,Map<String,Long>>(2*_map320.size);
- String _key321;
- Map<String,Long> _val322;
+ struct.emitted = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(2*_map320.size);
+ java.lang.String _key321;
+ java.util.Map<java.lang.String,java.lang.Long> _val322;
for (int _i323 = 0; _i323 < _map320.size; ++_i323)
{
_key321 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map324 = iprot.readMapBegin();
- _val322 = new HashMap<String,Long>(2*_map324.size);
- String _key325;
+ _val322 = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map324.size);
+ java.lang.String _key325;
long _val326;
for (int _i327 = 0; _i327 < _map324.size; ++_i327)
{
@@ -693,16 +659,16 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map328 = iprot.readMapBegin();
- struct.transferred = new HashMap<String,Map<String,Long>>(2*_map328.size);
- String _key329;
- Map<String,Long> _val330;
+ struct.transferred = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(2*_map328.size);
+ java.lang.String _key329;
+ java.util.Map<java.lang.String,java.lang.Long> _val330;
for (int _i331 = 0; _i331 < _map328.size; ++_i331)
{
_key329 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map332 = iprot.readMapBegin();
- _val330 = new HashMap<String,Long>(2*_map332.size);
- String _key333;
+ _val330 = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map332.size);
+ java.lang.String _key333;
long _val334;
for (int _i335 = 0; _i335 < _map332.size; ++_i335)
{
@@ -755,12 +721,12 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
oprot.writeFieldBegin(EMITTED_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.emitted.size()));
- for (Map.Entry<String, Map<String,Long>> _iter336 : struct.emitted.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> _iter336 : struct.emitted.entrySet())
{
oprot.writeString(_iter336.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, _iter336.getValue().size()));
- for (Map.Entry<String, Long> _iter337 : _iter336.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter337 : _iter336.getValue().entrySet())
{
oprot.writeString(_iter337.getKey());
oprot.writeI64(_iter337.getValue());
@@ -776,12 +742,12 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
oprot.writeFieldBegin(TRANSFERRED_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.transferred.size()));
- for (Map.Entry<String, Map<String,Long>> _iter338 : struct.transferred.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> _iter338 : struct.transferred.entrySet())
{
oprot.writeString(_iter338.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, _iter338.getValue().size()));
- for (Map.Entry<String, Long> _iter339 : _iter338.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter339 : _iter338.getValue().entrySet())
{
oprot.writeString(_iter339.getKey());
oprot.writeI64(_iter339.getValue());
@@ -807,25 +773,25 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
}
- private static class ExecutorStatsTupleSchemeFactory implements SchemeFactory {
+ private static class ExecutorStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ExecutorStatsTupleScheme getScheme() {
return new ExecutorStatsTupleScheme();
}
}
- private static class ExecutorStatsTupleScheme extends TupleScheme<ExecutorStats> {
+ private static class ExecutorStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ExecutorStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ExecutorStats struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.emitted.size());
- for (Map.Entry<String, Map<String,Long>> _iter340 : struct.emitted.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> _iter340 : struct.emitted.entrySet())
{
oprot.writeString(_iter340.getKey());
{
oprot.writeI32(_iter340.getValue().size());
- for (Map.Entry<String, Long> _iter341 : _iter340.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter341 : _iter340.getValue().entrySet())
{
oprot.writeString(_iter341.getKey());
oprot.writeI64(_iter341.getValue());
@@ -835,12 +801,12 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
}
{
oprot.writeI32(struct.transferred.size());
- for (Map.Entry<String, Map<String,Long>> _iter342 : struct.transferred.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> _iter342 : struct.transferred.entrySet())
{
oprot.writeString(_iter342.getKey());
{
oprot.writeI32(_iter342.getValue().size());
- for (Map.Entry<String, Long> _iter343 : _iter342.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter343 : _iter342.getValue().entrySet())
{
oprot.writeString(_iter343.getKey());
oprot.writeI64(_iter343.getValue());
@@ -854,19 +820,19 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ExecutorStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TMap _map344 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.emitted = new HashMap<String,Map<String,Long>>(2*_map344.size);
- String _key345;
- Map<String,Long> _val346;
+ struct.emitted = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(2*_map344.size);
+ java.lang.String _key345;
+ java.util.Map<java.lang.String,java.lang.Long> _val346;
for (int _i347 = 0; _i347 < _map344.size; ++_i347)
{
_key345 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map348 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- _val346 = new HashMap<String,Long>(2*_map348.size);
- String _key349;
+ _val346 = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map348.size);
+ java.lang.String _key349;
long _val350;
for (int _i351 = 0; _i351 < _map348.size; ++_i351)
{
@@ -881,16 +847,16 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
struct.set_emitted_isSet(true);
{
org.apache.thrift.protocol.TMap _map352 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.transferred = new HashMap<String,Map<String,Long>>(2*_map352.size);
- String _key353;
- Map<String,Long> _val354;
+ struct.transferred = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(2*_map352.size);
+ java.lang.String _key353;
+ java.util.Map<java.lang.String,java.lang.Long> _val354;
for (int _i355 = 0; _i355 < _map352.size; ++_i355)
{
_key353 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map356 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- _val354 = new HashMap<String,Long>(2*_map356.size);
- String _key357;
+ _val354 = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map356.size);
+ java.lang.String _key357;
long _val358;
for (int _i359 = 0; _i359 < _map356.size; ++_i359)
{
@@ -911,5 +877,8 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ExecutorSummary.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ExecutorSummary.java b/storm-client/src/jvm/org/apache/storm/generated/ExecutorSummary.java
index ef8182e..e4fc2aa 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ExecutorSummary.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ExecutorSummary.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, ExecutorSummary._Fields>, java.io.Serializable, Cloneable, Comparable<ExecutorSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecutorSummary");
@@ -62,15 +35,12 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
private static final org.apache.thrift.protocol.TField UPTIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("uptime_secs", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("stats", org.apache.thrift.protocol.TType.STRUCT, (short)7);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ExecutorSummaryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ExecutorSummaryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ExecutorSummaryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ExecutorSummaryTupleSchemeFactory();
private ExecutorInfo executor_info; // required
- private String component_id; // required
- private String host; // required
+ private java.lang.String component_id; // required
+ private java.lang.String host; // required
private int port; // required
private int uptime_secs; // required
private ExecutorStats stats; // optional
@@ -84,10 +54,10 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
UPTIME_SECS((short)5, "uptime_secs"),
STATS((short)7, "stats");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -120,21 +90,21 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -143,7 +113,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -153,9 +123,9 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
private static final int __UPTIME_SECS_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.STATS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXECUTOR_INFO, new org.apache.thrift.meta_data.FieldMetaData("executor_info", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutorInfo.class)));
tmpMap.put(_Fields.COMPONENT_ID, new org.apache.thrift.meta_data.FieldMetaData("component_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -168,7 +138,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.STATS, new org.apache.thrift.meta_data.FieldMetaData("stats", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutorStats.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecutorSummary.class, metaDataMap);
}
@@ -177,8 +147,8 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
public ExecutorSummary(
ExecutorInfo executor_info,
- String component_id,
- String host,
+ java.lang.String component_id,
+ java.lang.String host,
int port,
int uptime_secs)
{
@@ -252,11 +222,11 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
}
}
- public String get_component_id() {
+ public java.lang.String get_component_id() {
return this.component_id;
}
- public void set_component_id(String component_id) {
+ public void set_component_id(java.lang.String component_id) {
this.component_id = component_id;
}
@@ -275,11 +245,11 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
}
}
- public String get_host() {
+ public java.lang.String get_host() {
return this.host;
}
- public void set_host(String host) {
+ public void set_host(java.lang.String host) {
this.host = host;
}
@@ -308,16 +278,16 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
}
public void unset_port() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean is_set_port() {
- return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
}
public void set_port_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
}
public int get_uptime_secs() {
@@ -330,16 +300,16 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
}
public void unset_uptime_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
/** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_uptime_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
public void set_uptime_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
}
public ExecutorStats get_stats() {
@@ -365,7 +335,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXECUTOR_INFO:
if (value == null) {
@@ -379,7 +349,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
if (value == null) {
unset_component_id();
} else {
- set_component_id((String)value);
+ set_component_id((java.lang.String)value);
}
break;
@@ -387,7 +357,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
if (value == null) {
unset_host();
} else {
- set_host((String)value);
+ set_host((java.lang.String)value);
}
break;
@@ -395,7 +365,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
if (value == null) {
unset_port();
} else {
- set_port((Integer)value);
+ set_port((java.lang.Integer)value);
}
break;
@@ -403,7 +373,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
if (value == null) {
unset_uptime_secs();
} else {
- set_uptime_secs((Integer)value);
+ set_uptime_secs((java.lang.Integer)value);
}
break;
@@ -418,7 +388,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXECUTOR_INFO:
return get_executor_info();
@@ -439,13 +409,13 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
return get_stats();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -462,11 +432,11 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
case STATS:
return is_set_stats();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ExecutorSummary)
@@ -477,6 +447,8 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
public boolean equals(ExecutorSummary that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_executor_info = true && this.is_set_executor_info();
boolean that_present_executor_info = true && that.is_set_executor_info();
@@ -537,39 +509,29 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_executor_info = true && (is_set_executor_info());
- list.add(present_executor_info);
- if (present_executor_info)
- list.add(executor_info);
+ hashCode = hashCode * 8191 + ((is_set_executor_info()) ? 131071 : 524287);
+ if (is_set_executor_info())
+ hashCode = hashCode * 8191 + executor_info.hashCode();
- boolean present_component_id = true && (is_set_component_id());
- list.add(present_component_id);
- if (present_component_id)
- list.add(component_id);
+ hashCode = hashCode * 8191 + ((is_set_component_id()) ? 131071 : 524287);
+ if (is_set_component_id())
+ hashCode = hashCode * 8191 + component_id.hashCode();
- boolean present_host = true && (is_set_host());
- list.add(present_host);
- if (present_host)
- list.add(host);
+ hashCode = hashCode * 8191 + ((is_set_host()) ? 131071 : 524287);
+ if (is_set_host())
+ hashCode = hashCode * 8191 + host.hashCode();
- boolean present_port = true;
- list.add(present_port);
- if (present_port)
- list.add(port);
+ hashCode = hashCode * 8191 + port;
- boolean present_uptime_secs = true;
- list.add(present_uptime_secs);
- if (present_uptime_secs)
- list.add(uptime_secs);
+ hashCode = hashCode * 8191 + uptime_secs;
- boolean present_stats = true && (is_set_stats());
- list.add(present_stats);
- if (present_stats)
- list.add(stats);
+ hashCode = hashCode * 8191 + ((is_set_stats()) ? 131071 : 524287);
+ if (is_set_stats())
+ hashCode = hashCode * 8191 + stats.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -580,7 +542,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_executor_info()).compareTo(other.is_set_executor_info());
+ lastComparison = java.lang.Boolean.valueOf(is_set_executor_info()).compareTo(other.is_set_executor_info());
if (lastComparison != 0) {
return lastComparison;
}
@@ -590,7 +552,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_component_id()).compareTo(other.is_set_component_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_component_id()).compareTo(other.is_set_component_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -600,7 +562,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_host()).compareTo(other.is_set_host());
+ lastComparison = java.lang.Boolean.valueOf(is_set_host()).compareTo(other.is_set_host());
if (lastComparison != 0) {
return lastComparison;
}
@@ -610,7 +572,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
+ lastComparison = java.lang.Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
if (lastComparison != 0) {
return lastComparison;
}
@@ -620,7 +582,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -630,7 +592,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_stats()).compareTo(other.is_set_stats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_stats()).compareTo(other.is_set_stats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -648,16 +610,16 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ExecutorSummary(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ExecutorSummary(");
boolean first = true;
sb.append("executor_info:");
@@ -744,7 +706,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -754,13 +716,13 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
}
}
- private static class ExecutorSummaryStandardSchemeFactory implements SchemeFactory {
+ private static class ExecutorSummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ExecutorSummaryStandardScheme getScheme() {
return new ExecutorSummaryStandardScheme();
}
}
- private static class ExecutorSummaryStandardScheme extends StandardScheme<ExecutorSummary> {
+ private static class ExecutorSummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<ExecutorSummary> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ExecutorSummary struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -869,23 +831,23 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
}
- private static class ExecutorSummaryTupleSchemeFactory implements SchemeFactory {
+ private static class ExecutorSummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ExecutorSummaryTupleScheme getScheme() {
return new ExecutorSummaryTupleScheme();
}
}
- private static class ExecutorSummaryTupleScheme extends TupleScheme<ExecutorSummary> {
+ private static class ExecutorSummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<ExecutorSummary> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ExecutorSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.executor_info.write(oprot);
oprot.writeString(struct.component_id);
oprot.writeString(struct.host);
oprot.writeI32(struct.port);
oprot.writeI32(struct.uptime_secs);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_stats()) {
optionals.set(0);
}
@@ -897,7 +859,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ExecutorSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.executor_info = new ExecutorInfo();
struct.executor_info.read(iprot);
struct.set_executor_info_isSet(true);
@@ -909,7 +871,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
struct.set_port_isSet(true);
struct.uptime_secs = iprot.readI32();
struct.set_uptime_secs_isSet(true);
- BitSet incoming = iprot.readBitSet(1);
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.stats = new ExecutorStats();
struct.stats.read(iprot);
@@ -918,5 +880,8 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/GetInfoOptions.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/GetInfoOptions.java b/storm-client/src/jvm/org/apache/storm/generated/GetInfoOptions.java
index de91563..7b5fa23 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/GetInfoOptions.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/GetInfoOptions.java
@@ -16,52 +16,22 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, GetInfoOptions._Fields>, java.io.Serializable, Cloneable, Comparable<GetInfoOptions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetInfoOptions");
private static final org.apache.thrift.protocol.TField NUM_ERR_CHOICE_FIELD_DESC = new org.apache.thrift.protocol.TField("num_err_choice", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new GetInfoOptionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new GetInfoOptionsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GetInfoOptionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GetInfoOptionsTupleSchemeFactory();
private NumErrorsChoice num_err_choice; // optional
@@ -73,10 +43,10 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
*/
NUM_ERR_CHOICE((short)1, "num_err_choice");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,19 +92,19 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.NUM_ERR_CHOICE};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NUM_ERR_CHOICE, new org.apache.thrift.meta_data.FieldMetaData("num_err_choice", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, NumErrorsChoice.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetInfoOptions.class, metaDataMap);
}
@@ -190,7 +160,7 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case NUM_ERR_CHOICE:
if (value == null) {
@@ -203,30 +173,30 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NUM_ERR_CHOICE:
return get_num_err_choice();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case NUM_ERR_CHOICE:
return is_set_num_err_choice();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof GetInfoOptions)
@@ -237,6 +207,8 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
public boolean equals(GetInfoOptions that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_num_err_choice = true && this.is_set_num_err_choice();
boolean that_present_num_err_choice = true && that.is_set_num_err_choice();
@@ -252,14 +224,13 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_num_err_choice = true && (is_set_num_err_choice());
- list.add(present_num_err_choice);
- if (present_num_err_choice)
- list.add(num_err_choice.getValue());
+ hashCode = hashCode * 8191 + ((is_set_num_err_choice()) ? 131071 : 524287);
+ if (is_set_num_err_choice())
+ hashCode = hashCode * 8191 + num_err_choice.getValue();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -270,7 +241,7 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_num_err_choice()).compareTo(other.is_set_num_err_choice());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_err_choice()).compareTo(other.is_set_num_err_choice());
if (lastComparison != 0) {
return lastComparison;
}
@@ -288,16 +259,16 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("GetInfoOptions(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("GetInfoOptions(");
boolean first = true;
if (is_set_num_err_choice()) {
@@ -326,7 +297,7 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -334,13 +305,13 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
}
}
- private static class GetInfoOptionsStandardSchemeFactory implements SchemeFactory {
+ private static class GetInfoOptionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GetInfoOptionsStandardScheme getScheme() {
return new GetInfoOptionsStandardScheme();
}
}
- private static class GetInfoOptionsStandardScheme extends StandardScheme<GetInfoOptions> {
+ private static class GetInfoOptionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<GetInfoOptions> {
public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfoOptions struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -386,18 +357,18 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
}
- private static class GetInfoOptionsTupleSchemeFactory implements SchemeFactory {
+ private static class GetInfoOptionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GetInfoOptionsTupleScheme getScheme() {
return new GetInfoOptionsTupleScheme();
}
}
- private static class GetInfoOptionsTupleScheme extends TupleScheme<GetInfoOptions> {
+ private static class GetInfoOptionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<GetInfoOptions> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GetInfoOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_num_err_choice()) {
optionals.set(0);
}
@@ -409,8 +380,8 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GetInfoOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.num_err_choice = org.apache.storm.generated.NumErrorsChoice.findByValue(iprot.readI32());
struct.set_num_err_choice_isSet(true);
@@ -418,5 +389,8 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/GlobalStreamId.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/GlobalStreamId.java b/storm-client/src/jvm/org/apache/storm/generated/GlobalStreamId.java
index 677dfd8..6911fec 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/GlobalStreamId.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/GlobalStreamId.java
@@ -16,66 +16,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, GlobalStreamId._Fields>, java.io.Serializable, Cloneable, Comparable<GlobalStreamId> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GlobalStreamId");
private static final org.apache.thrift.protocol.TField COMPONENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("componentId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField STREAM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("streamId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new GlobalStreamIdStandardSchemeFactory());
- schemes.put(TupleScheme.class, new GlobalStreamIdTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GlobalStreamIdStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GlobalStreamIdTupleSchemeFactory();
- private String componentId; // required
- private String streamId; // required
+ private java.lang.String componentId; // required
+ private java.lang.String streamId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
COMPONENT_ID((short)1, "componentId"),
STREAM_ID((short)2, "streamId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,20 +93,20 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COMPONENT_ID, new org.apache.thrift.meta_data.FieldMetaData("componentId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STREAM_ID, new org.apache.thrift.meta_data.FieldMetaData("streamId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GlobalStreamId.class, metaDataMap);
}
@@ -144,8 +114,8 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
}
public GlobalStreamId(
- String componentId,
- String streamId)
+ java.lang.String componentId,
+ java.lang.String streamId)
{
this();
this.componentId = componentId;
@@ -174,11 +144,11 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
this.streamId = null;
}
- public String get_componentId() {
+ public java.lang.String get_componentId() {
return this.componentId;
}
- public void set_componentId(String componentId) {
+ public void set_componentId(java.lang.String componentId) {
this.componentId = componentId;
}
@@ -197,11 +167,11 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
}
}
- public String get_streamId() {
+ public java.lang.String get_streamId() {
return this.streamId;
}
- public void set_streamId(String streamId) {
+ public void set_streamId(java.lang.String streamId) {
this.streamId = streamId;
}
@@ -220,13 +190,13 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case COMPONENT_ID:
if (value == null) {
unset_componentId();
} else {
- set_componentId((String)value);
+ set_componentId((java.lang.String)value);
}
break;
@@ -234,14 +204,14 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
if (value == null) {
unset_streamId();
} else {
- set_streamId((String)value);
+ set_streamId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COMPONENT_ID:
return get_componentId();
@@ -250,13 +220,13 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
return get_streamId();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -265,11 +235,11 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
case STREAM_ID:
return is_set_streamId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof GlobalStreamId)
@@ -280,6 +250,8 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
public boolean equals(GlobalStreamId that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_componentId = true && this.is_set_componentId();
boolean that_present_componentId = true && that.is_set_componentId();
@@ -304,19 +276,17 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_componentId = true && (is_set_componentId());
- list.add(present_componentId);
- if (present_componentId)
- list.add(componentId);
+ hashCode = hashCode * 8191 + ((is_set_componentId()) ? 131071 : 524287);
+ if (is_set_componentId())
+ hashCode = hashCode * 8191 + componentId.hashCode();
- boolean present_streamId = true && (is_set_streamId());
- list.add(present_streamId);
- if (present_streamId)
- list.add(streamId);
+ hashCode = hashCode * 8191 + ((is_set_streamId()) ? 131071 : 524287);
+ if (is_set_streamId())
+ hashCode = hashCode * 8191 + streamId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -327,7 +297,7 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_componentId()).compareTo(other.is_set_componentId());
+ lastComparison = java.lang.Boolean.valueOf(is_set_componentId()).compareTo(other.is_set_componentId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -337,7 +307,7 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_streamId()).compareTo(other.is_set_streamId());
+ lastComparison = java.lang.Boolean.valueOf(is_set_streamId()).compareTo(other.is_set_streamId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -355,16 +325,16 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("GlobalStreamId(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("GlobalStreamId(");
boolean first = true;
sb.append("componentId:");
@@ -407,7 +377,7 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -415,13 +385,13 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
}
}
- private static class GlobalStreamIdStandardSchemeFactory implements SchemeFactory {
+ private static class GlobalStreamIdStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GlobalStreamIdStandardScheme getScheme() {
return new GlobalStreamIdStandardScheme();
}
}
- private static class GlobalStreamIdStandardScheme extends StandardScheme<GlobalStreamId> {
+ private static class GlobalStreamIdStandardScheme extends org.apache.thrift.scheme.StandardScheme<GlobalStreamId> {
public void read(org.apache.thrift.protocol.TProtocol iprot, GlobalStreamId struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -478,24 +448,24 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
}
- private static class GlobalStreamIdTupleSchemeFactory implements SchemeFactory {
+ private static class GlobalStreamIdTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GlobalStreamIdTupleScheme getScheme() {
return new GlobalStreamIdTupleScheme();
}
}
- private static class GlobalStreamIdTupleScheme extends TupleScheme<GlobalStreamId> {
+ private static class GlobalStreamIdTupleScheme extends org.apache.thrift.scheme.TupleScheme<GlobalStreamId> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GlobalStreamId struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.componentId);
oprot.writeString(struct.streamId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GlobalStreamId struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.componentId = iprot.readString();
struct.set_componentId_isSet(true);
struct.streamId = iprot.readString();
@@ -503,5 +473,8 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[18/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/StormBase.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/StormBase.java b/storm-client/src/jvm/org/apache/storm/generated/StormBase.java
index 733da58..78cd90e 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/StormBase.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/StormBase.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._Fields>, java.io.Serializable, Cloneable, Comparable<StormBase> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StormBase");
@@ -67,23 +40,20 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
private static final org.apache.thrift.protocol.TField PRINCIPAL_FIELD_DESC = new org.apache.thrift.protocol.TField("principal", org.apache.thrift.protocol.TType.STRING, (short)10);
private static final org.apache.thrift.protocol.TField TOPOLOGY_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("topology_version", org.apache.thrift.protocol.TType.STRING, (short)11);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new StormBaseStandardSchemeFactory());
- schemes.put(TupleScheme.class, new StormBaseTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new StormBaseStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new StormBaseTupleSchemeFactory();
- private String name; // required
+ private java.lang.String name; // required
private TopologyStatus status; // required
private int num_workers; // required
- private Map<String,Integer> component_executors; // optional
+ private java.util.Map<java.lang.String,java.lang.Integer> component_executors; // optional
private int launch_time_secs; // optional
- private String owner; // optional
+ private java.lang.String owner; // optional
private TopologyActionOptions topology_action_options; // optional
private TopologyStatus prev_status; // optional
- private Map<String,DebugOptions> component_debug; // optional
- private String principal; // optional
- private String topology_version; // optional
+ private java.util.Map<java.lang.String,DebugOptions> component_debug; // optional
+ private java.lang.String principal; // optional
+ private java.lang.String topology_version; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -107,10 +77,10 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
PRINCIPAL((short)10, "principal"),
TOPOLOGY_VERSION((short)11, "topology_version");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -153,21 +123,21 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -176,7 +146,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -186,9 +156,9 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
private static final int __LAUNCH_TIME_SECS_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.COMPONENT_EXECUTORS,_Fields.LAUNCH_TIME_SECS,_Fields.OWNER,_Fields.TOPOLOGY_ACTION_OPTIONS,_Fields.PREV_STATUS,_Fields.COMPONENT_DEBUG,_Fields.PRINCIPAL,_Fields.TOPOLOGY_VERSION};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -215,7 +185,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TOPOLOGY_VERSION, new org.apache.thrift.meta_data.FieldMetaData("topology_version", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StormBase.class, metaDataMap);
}
@@ -223,7 +193,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
}
public StormBase(
- String name,
+ java.lang.String name,
TopologyStatus status,
int num_workers)
{
@@ -247,7 +217,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
}
this.num_workers = other.num_workers;
if (other.is_set_component_executors()) {
- Map<String,Integer> __this__component_executors = new HashMap<String,Integer>(other.component_executors);
+ java.util.Map<java.lang.String,java.lang.Integer> __this__component_executors = new java.util.HashMap<java.lang.String,java.lang.Integer>(other.component_executors);
this.component_executors = __this__component_executors;
}
this.launch_time_secs = other.launch_time_secs;
@@ -261,13 +231,13 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
this.prev_status = other.prev_status;
}
if (other.is_set_component_debug()) {
- Map<String,DebugOptions> __this__component_debug = new HashMap<String,DebugOptions>(other.component_debug.size());
- for (Map.Entry<String, DebugOptions> other_element : other.component_debug.entrySet()) {
+ java.util.Map<java.lang.String,DebugOptions> __this__component_debug = new java.util.HashMap<java.lang.String,DebugOptions>(other.component_debug.size());
+ for (java.util.Map.Entry<java.lang.String, DebugOptions> other_element : other.component_debug.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
DebugOptions other_element_value = other_element.getValue();
- String __this__component_debug_copy_key = other_element_key;
+ java.lang.String __this__component_debug_copy_key = other_element_key;
DebugOptions __this__component_debug_copy_value = new DebugOptions(other_element_value);
@@ -304,11 +274,11 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
this.topology_version = null;
}
- public String get_name() {
+ public java.lang.String get_name() {
return this.name;
}
- public void set_name(String name) {
+ public void set_name(java.lang.String name) {
this.name = name;
}
@@ -368,34 +338,34 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
}
public void unset_num_workers() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
}
/** Returns true if field num_workers is set (has been assigned a value) and false otherwise */
public boolean is_set_num_workers() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
}
public void set_num_workers_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID, value);
}
public int get_component_executors_size() {
return (this.component_executors == null) ? 0 : this.component_executors.size();
}
- public void put_to_component_executors(String key, int val) {
+ public void put_to_component_executors(java.lang.String key, int val) {
if (this.component_executors == null) {
- this.component_executors = new HashMap<String,Integer>();
+ this.component_executors = new java.util.HashMap<java.lang.String,java.lang.Integer>();
}
this.component_executors.put(key, val);
}
- public Map<String,Integer> get_component_executors() {
+ public java.util.Map<java.lang.String,java.lang.Integer> get_component_executors() {
return this.component_executors;
}
- public void set_component_executors(Map<String,Integer> component_executors) {
+ public void set_component_executors(java.util.Map<java.lang.String,java.lang.Integer> component_executors) {
this.component_executors = component_executors;
}
@@ -424,23 +394,23 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
}
public void unset_launch_time_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LAUNCH_TIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LAUNCH_TIME_SECS_ISSET_ID);
}
/** Returns true if field launch_time_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_launch_time_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __LAUNCH_TIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LAUNCH_TIME_SECS_ISSET_ID);
}
public void set_launch_time_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LAUNCH_TIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LAUNCH_TIME_SECS_ISSET_ID, value);
}
- public String get_owner() {
+ public java.lang.String get_owner() {
return this.owner;
}
- public void set_owner(String owner) {
+ public void set_owner(java.lang.String owner) {
this.owner = owner;
}
@@ -517,18 +487,18 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return (this.component_debug == null) ? 0 : this.component_debug.size();
}
- public void put_to_component_debug(String key, DebugOptions val) {
+ public void put_to_component_debug(java.lang.String key, DebugOptions val) {
if (this.component_debug == null) {
- this.component_debug = new HashMap<String,DebugOptions>();
+ this.component_debug = new java.util.HashMap<java.lang.String,DebugOptions>();
}
this.component_debug.put(key, val);
}
- public Map<String,DebugOptions> get_component_debug() {
+ public java.util.Map<java.lang.String,DebugOptions> get_component_debug() {
return this.component_debug;
}
- public void set_component_debug(Map<String,DebugOptions> component_debug) {
+ public void set_component_debug(java.util.Map<java.lang.String,DebugOptions> component_debug) {
this.component_debug = component_debug;
}
@@ -547,11 +517,11 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
}
}
- public String get_principal() {
+ public java.lang.String get_principal() {
return this.principal;
}
- public void set_principal(String principal) {
+ public void set_principal(java.lang.String principal) {
this.principal = principal;
}
@@ -570,11 +540,11 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
}
}
- public String get_topology_version() {
+ public java.lang.String get_topology_version() {
return this.topology_version;
}
- public void set_topology_version(String topology_version) {
+ public void set_topology_version(java.lang.String topology_version) {
this.topology_version = topology_version;
}
@@ -593,13 +563,13 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case NAME:
if (value == null) {
unset_name();
} else {
- set_name((String)value);
+ set_name((java.lang.String)value);
}
break;
@@ -615,7 +585,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
if (value == null) {
unset_num_workers();
} else {
- set_num_workers((Integer)value);
+ set_num_workers((java.lang.Integer)value);
}
break;
@@ -623,7 +593,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
if (value == null) {
unset_component_executors();
} else {
- set_component_executors((Map<String,Integer>)value);
+ set_component_executors((java.util.Map<java.lang.String,java.lang.Integer>)value);
}
break;
@@ -631,7 +601,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
if (value == null) {
unset_launch_time_secs();
} else {
- set_launch_time_secs((Integer)value);
+ set_launch_time_secs((java.lang.Integer)value);
}
break;
@@ -639,7 +609,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
if (value == null) {
unset_owner();
} else {
- set_owner((String)value);
+ set_owner((java.lang.String)value);
}
break;
@@ -663,7 +633,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
if (value == null) {
unset_component_debug();
} else {
- set_component_debug((Map<String,DebugOptions>)value);
+ set_component_debug((java.util.Map<java.lang.String,DebugOptions>)value);
}
break;
@@ -671,7 +641,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
if (value == null) {
unset_principal();
} else {
- set_principal((String)value);
+ set_principal((java.lang.String)value);
}
break;
@@ -679,14 +649,14 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
if (value == null) {
unset_topology_version();
} else {
- set_topology_version((String)value);
+ set_topology_version((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NAME:
return get_name();
@@ -722,13 +692,13 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return get_topology_version();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -755,11 +725,11 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
case TOPOLOGY_VERSION:
return is_set_topology_version();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof StormBase)
@@ -770,6 +740,8 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
public boolean equals(StormBase that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_name = true && this.is_set_name();
boolean that_present_name = true && that.is_set_name();
@@ -875,64 +847,51 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_name = true && (is_set_name());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_status = true && (is_set_status());
- list.add(present_status);
- if (present_status)
- list.add(status.getValue());
-
- boolean present_num_workers = true;
- list.add(present_num_workers);
- if (present_num_workers)
- list.add(num_workers);
-
- boolean present_component_executors = true && (is_set_component_executors());
- list.add(present_component_executors);
- if (present_component_executors)
- list.add(component_executors);
-
- boolean present_launch_time_secs = true && (is_set_launch_time_secs());
- list.add(present_launch_time_secs);
- if (present_launch_time_secs)
- list.add(launch_time_secs);
-
- boolean present_owner = true && (is_set_owner());
- list.add(present_owner);
- if (present_owner)
- list.add(owner);
-
- boolean present_topology_action_options = true && (is_set_topology_action_options());
- list.add(present_topology_action_options);
- if (present_topology_action_options)
- list.add(topology_action_options);
-
- boolean present_prev_status = true && (is_set_prev_status());
- list.add(present_prev_status);
- if (present_prev_status)
- list.add(prev_status.getValue());
-
- boolean present_component_debug = true && (is_set_component_debug());
- list.add(present_component_debug);
- if (present_component_debug)
- list.add(component_debug);
-
- boolean present_principal = true && (is_set_principal());
- list.add(present_principal);
- if (present_principal)
- list.add(principal);
-
- boolean present_topology_version = true && (is_set_topology_version());
- list.add(present_topology_version);
- if (present_topology_version)
- list.add(topology_version);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((is_set_name()) ? 131071 : 524287);
+ if (is_set_name())
+ hashCode = hashCode * 8191 + name.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_status()) ? 131071 : 524287);
+ if (is_set_status())
+ hashCode = hashCode * 8191 + status.getValue();
+
+ hashCode = hashCode * 8191 + num_workers;
+
+ hashCode = hashCode * 8191 + ((is_set_component_executors()) ? 131071 : 524287);
+ if (is_set_component_executors())
+ hashCode = hashCode * 8191 + component_executors.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_launch_time_secs()) ? 131071 : 524287);
+ if (is_set_launch_time_secs())
+ hashCode = hashCode * 8191 + launch_time_secs;
+
+ hashCode = hashCode * 8191 + ((is_set_owner()) ? 131071 : 524287);
+ if (is_set_owner())
+ hashCode = hashCode * 8191 + owner.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_topology_action_options()) ? 131071 : 524287);
+ if (is_set_topology_action_options())
+ hashCode = hashCode * 8191 + topology_action_options.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_prev_status()) ? 131071 : 524287);
+ if (is_set_prev_status())
+ hashCode = hashCode * 8191 + prev_status.getValue();
+
+ hashCode = hashCode * 8191 + ((is_set_component_debug()) ? 131071 : 524287);
+ if (is_set_component_debug())
+ hashCode = hashCode * 8191 + component_debug.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_principal()) ? 131071 : 524287);
+ if (is_set_principal())
+ hashCode = hashCode * 8191 + principal.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_topology_version()) ? 131071 : 524287);
+ if (is_set_topology_version())
+ hashCode = hashCode * 8191 + topology_version.hashCode();
+
+ return hashCode;
}
@Override
@@ -943,7 +902,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
+ lastComparison = java.lang.Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
if (lastComparison != 0) {
return lastComparison;
}
@@ -953,7 +912,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_status()).compareTo(other.is_set_status());
+ lastComparison = java.lang.Boolean.valueOf(is_set_status()).compareTo(other.is_set_status());
if (lastComparison != 0) {
return lastComparison;
}
@@ -963,7 +922,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_workers()).compareTo(other.is_set_num_workers());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_workers()).compareTo(other.is_set_num_workers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -973,7 +932,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_component_executors()).compareTo(other.is_set_component_executors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_component_executors()).compareTo(other.is_set_component_executors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -983,7 +942,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_launch_time_secs()).compareTo(other.is_set_launch_time_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_launch_time_secs()).compareTo(other.is_set_launch_time_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -993,7 +952,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
+ lastComparison = java.lang.Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1003,7 +962,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_action_options()).compareTo(other.is_set_topology_action_options());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_action_options()).compareTo(other.is_set_topology_action_options());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1013,7 +972,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_prev_status()).compareTo(other.is_set_prev_status());
+ lastComparison = java.lang.Boolean.valueOf(is_set_prev_status()).compareTo(other.is_set_prev_status());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1023,7 +982,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_component_debug()).compareTo(other.is_set_component_debug());
+ lastComparison = java.lang.Boolean.valueOf(is_set_component_debug()).compareTo(other.is_set_component_debug());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1033,7 +992,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_principal()).compareTo(other.is_set_principal());
+ lastComparison = java.lang.Boolean.valueOf(is_set_principal()).compareTo(other.is_set_principal());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1043,7 +1002,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topology_version()).compareTo(other.is_set_topology_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topology_version()).compareTo(other.is_set_topology_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1061,16 +1020,16 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("StormBase(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("StormBase(");
boolean first = true;
sb.append("name:");
@@ -1197,7 +1156,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1207,13 +1166,13 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
}
}
- private static class StormBaseStandardSchemeFactory implements SchemeFactory {
+ private static class StormBaseStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public StormBaseStandardScheme getScheme() {
return new StormBaseStandardScheme();
}
}
- private static class StormBaseStandardScheme extends StandardScheme<StormBase> {
+ private static class StormBaseStandardScheme extends org.apache.thrift.scheme.StandardScheme<StormBase> {
public void read(org.apache.thrift.protocol.TProtocol iprot, StormBase struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1253,8 +1212,8 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map752 = iprot.readMapBegin();
- struct.component_executors = new HashMap<String,Integer>(2*_map752.size);
- String _key753;
+ struct.component_executors = new java.util.HashMap<java.lang.String,java.lang.Integer>(2*_map752.size);
+ java.lang.String _key753;
int _val754;
for (int _i755 = 0; _i755 < _map752.size; ++_i755)
{
@@ -1306,8 +1265,8 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map756 = iprot.readMapBegin();
- struct.component_debug = new HashMap<String,DebugOptions>(2*_map756.size);
- String _key757;
+ struct.component_debug = new java.util.HashMap<java.lang.String,DebugOptions>(2*_map756.size);
+ java.lang.String _key757;
DebugOptions _val758;
for (int _i759 = 0; _i759 < _map756.size; ++_i759)
{
@@ -1370,7 +1329,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
oprot.writeFieldBegin(COMPONENT_EXECUTORS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.component_executors.size()));
- for (Map.Entry<String, Integer> _iter760 : struct.component_executors.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Integer> _iter760 : struct.component_executors.entrySet())
{
oprot.writeString(_iter760.getKey());
oprot.writeI32(_iter760.getValue());
@@ -1411,7 +1370,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
oprot.writeFieldBegin(COMPONENT_DEBUG_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.component_debug.size()));
- for (Map.Entry<String, DebugOptions> _iter761 : struct.component_debug.entrySet())
+ for (java.util.Map.Entry<java.lang.String, DebugOptions> _iter761 : struct.component_debug.entrySet())
{
oprot.writeString(_iter761.getKey());
_iter761.getValue().write(oprot);
@@ -1441,21 +1400,21 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
}
- private static class StormBaseTupleSchemeFactory implements SchemeFactory {
+ private static class StormBaseTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public StormBaseTupleScheme getScheme() {
return new StormBaseTupleScheme();
}
}
- private static class StormBaseTupleScheme extends TupleScheme<StormBase> {
+ private static class StormBaseTupleScheme extends org.apache.thrift.scheme.TupleScheme<StormBase> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, StormBase struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.name);
oprot.writeI32(struct.status.getValue());
oprot.writeI32(struct.num_workers);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_component_executors()) {
optionals.set(0);
}
@@ -1484,7 +1443,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
if (struct.is_set_component_executors()) {
{
oprot.writeI32(struct.component_executors.size());
- for (Map.Entry<String, Integer> _iter762 : struct.component_executors.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Integer> _iter762 : struct.component_executors.entrySet())
{
oprot.writeString(_iter762.getKey());
oprot.writeI32(_iter762.getValue());
@@ -1506,7 +1465,7 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
if (struct.is_set_component_debug()) {
{
oprot.writeI32(struct.component_debug.size());
- for (Map.Entry<String, DebugOptions> _iter763 : struct.component_debug.entrySet())
+ for (java.util.Map.Entry<java.lang.String, DebugOptions> _iter763 : struct.component_debug.entrySet())
{
oprot.writeString(_iter763.getKey());
_iter763.getValue().write(oprot);
@@ -1523,19 +1482,19 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, StormBase struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.name = iprot.readString();
struct.set_name_isSet(true);
struct.status = org.apache.storm.generated.TopologyStatus.findByValue(iprot.readI32());
struct.set_status_isSet(true);
struct.num_workers = iprot.readI32();
struct.set_num_workers_isSet(true);
- BitSet incoming = iprot.readBitSet(8);
+ java.util.BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map764 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.component_executors = new HashMap<String,Integer>(2*_map764.size);
- String _key765;
+ struct.component_executors = new java.util.HashMap<java.lang.String,java.lang.Integer>(2*_map764.size);
+ java.lang.String _key765;
int _val766;
for (int _i767 = 0; _i767 < _map764.size; ++_i767)
{
@@ -1566,8 +1525,8 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
if (incoming.get(5)) {
{
org.apache.thrift.protocol.TMap _map768 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.component_debug = new HashMap<String,DebugOptions>(2*_map768.size);
- String _key769;
+ struct.component_debug = new java.util.HashMap<java.lang.String,DebugOptions>(2*_map768.size);
+ java.lang.String _key769;
DebugOptions _val770;
for (int _i771 = 0; _i771 < _map768.size; ++_i771)
{
@@ -1590,5 +1549,8 @@ public class StormBase implements org.apache.thrift.TBase<StormBase, StormBase._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[15/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/Supervisor.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/Supervisor.java b/storm-client/src/jvm/org/apache/storm/generated/Supervisor.java
index 6923e60..f07f9c0 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/Supervisor.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/Supervisor.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class Supervisor {
public interface Iface {
@@ -68,7 +41,7 @@ public class Supervisor {
*
* @param id
*/
- public Assignment getLocalAssignmentForStorm(String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
+ public Assignment getLocalAssignmentForStorm(java.lang.String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException;
/**
* Send worker heartbeat to local supervisor
@@ -81,11 +54,11 @@ public class Supervisor {
public interface AsyncIface {
- public void sendSupervisorAssignments(SupervisorAssignments assignments, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void sendSupervisorAssignments(SupervisorAssignments assignments, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getLocalAssignmentForStorm(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getLocalAssignmentForStorm(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<Assignment> resultHandler) throws org.apache.thrift.TException;
- public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heartbeat, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heartbeat, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
}
@@ -132,13 +105,13 @@ public class Supervisor {
return;
}
- public Assignment getLocalAssignmentForStorm(String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
+ public Assignment getLocalAssignmentForStorm(java.lang.String id) throws NotAliveException, AuthorizationException, org.apache.thrift.TException
{
send_getLocalAssignmentForStorm(id);
return recv_getLocalAssignmentForStorm();
}
- public void send_getLocalAssignmentForStorm(String id) throws org.apache.thrift.TException
+ public void send_getLocalAssignmentForStorm(java.lang.String id) throws org.apache.thrift.TException
{
getLocalAssignmentForStorm_args args = new getLocalAssignmentForStorm_args();
args.set_id(id);
@@ -202,16 +175,16 @@ public class Supervisor {
super(protocolFactory, clientManager, transport);
}
- public void sendSupervisorAssignments(SupervisorAssignments assignments, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void sendSupervisorAssignments(SupervisorAssignments assignments, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
sendSupervisorAssignments_call method_call = new sendSupervisorAssignments_call(assignments, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class sendSupervisorAssignments_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class sendSupervisorAssignments_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private SupervisorAssignments assignments;
- public sendSupervisorAssignments_call(SupervisorAssignments assignments, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public sendSupervisorAssignments_call(SupervisorAssignments assignments, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.assignments = assignments;
}
@@ -224,26 +197,26 @@ public class Supervisor {
prot.writeMessageEnd();
}
- public void getResult() throws AuthorizationException, org.apache.thrift.TException {
+ public Void getResult() throws AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_sendSupervisorAssignments();
+ return null;
}
}
- public void getLocalAssignmentForStorm(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getLocalAssignmentForStorm(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<Assignment> resultHandler) throws org.apache.thrift.TException {
checkReady();
getLocalAssignmentForStorm_call method_call = new getLocalAssignmentForStorm_call(id, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getLocalAssignmentForStorm_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String id;
- public getLocalAssignmentForStorm_call(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getLocalAssignmentForStorm_call extends org.apache.thrift.async.TAsyncMethodCall<Assignment> {
+ private java.lang.String id;
+ public getLocalAssignmentForStorm_call(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<Assignment> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.id = id;
}
@@ -258,7 +231,7 @@ public class Supervisor {
public Assignment getResult() throws NotAliveException, AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -266,16 +239,16 @@ public class Supervisor {
}
}
- public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heartbeat, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heartbeat, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
sendSupervisorWorkerHeartbeat_call method_call = new sendSupervisorWorkerHeartbeat_call(heartbeat, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class sendSupervisorWorkerHeartbeat_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class sendSupervisorWorkerHeartbeat_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private SupervisorWorkerHeartbeat heartbeat;
- public sendSupervisorWorkerHeartbeat_call(SupervisorWorkerHeartbeat heartbeat, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public sendSupervisorWorkerHeartbeat_call(SupervisorWorkerHeartbeat heartbeat, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.heartbeat = heartbeat;
}
@@ -288,29 +261,29 @@ public class Supervisor {
prot.writeMessageEnd();
}
- public void getResult() throws AuthorizationException, org.apache.thrift.TException {
+ public Void getResult() throws AuthorizationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_sendSupervisorWorkerHeartbeat();
+ return null;
}
}
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("sendSupervisorAssignments", new sendSupervisorAssignments());
processMap.put("getLocalAssignmentForStorm", new getLocalAssignmentForStorm());
processMap.put("sendSupervisorWorkerHeartbeat", new sendSupervisorWorkerHeartbeat());
@@ -330,6 +303,11 @@ public class Supervisor {
return false;
}
+ @Override
+ protected boolean handleRuntimeExceptions() {
+ return false;
+ }
+
public sendSupervisorAssignments_result getResult(I iface, sendSupervisorAssignments_args args) throws org.apache.thrift.TException {
sendSupervisorAssignments_result result = new sendSupervisorAssignments_result();
try {
@@ -354,6 +332,11 @@ public class Supervisor {
return false;
}
+ @Override
+ protected boolean handleRuntimeExceptions() {
+ return false;
+ }
+
public getLocalAssignmentForStorm_result getResult(I iface, getLocalAssignmentForStorm_args args) throws org.apache.thrift.TException {
getLocalAssignmentForStorm_result result = new getLocalAssignmentForStorm_result();
try {
@@ -380,6 +363,11 @@ public class Supervisor {
return false;
}
+ @Override
+ protected boolean handleRuntimeExceptions() {
+ return false;
+ }
+
public sendSupervisorWorkerHeartbeat_result getResult(I iface, sendSupervisorWorkerHeartbeat_args args) throws org.apache.thrift.TException {
sendSupervisorWorkerHeartbeat_result result = new sendSupervisorWorkerHeartbeat_result();
try {
@@ -394,16 +382,16 @@ public class Supervisor {
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("sendSupervisorAssignments", new sendSupervisorAssignments());
processMap.put("getLocalAssignmentForStorm", new getLocalAssignmentForStorm());
processMap.put("sendSupervisorWorkerHeartbeat", new sendSupervisorWorkerHeartbeat());
@@ -419,40 +407,48 @@ public class Supervisor {
return new sendSupervisorAssignments_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
sendSupervisorAssignments_result result = new sendSupervisorAssignments_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.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);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
sendSupervisorAssignments_result result = new sendSupervisorAssignments_result();
if (e instanceof AuthorizationException) {
- result.aze = (AuthorizationException) e;
- result.set_aze_isSet(true);
- msg = result;
- }
- else
- {
+ result.aze = (AuthorizationException) e;
+ result.set_aze_isSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
@@ -461,7 +457,7 @@ public class Supervisor {
return false;
}
- public void start(I iface, sendSupervisorAssignments_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ public void start(I iface, sendSupervisorAssignments_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.sendSupervisorAssignments(args.assignments,resultHandler);
}
}
@@ -475,46 +471,53 @@ public class Supervisor {
return new getLocalAssignmentForStorm_args();
}
- public AsyncMethodCallback<Assignment> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<Assignment> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Assignment>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Assignment>() {
public void onComplete(Assignment o) {
getLocalAssignmentForStorm_result result = new getLocalAssignmentForStorm_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.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);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getLocalAssignmentForStorm_result result = new getLocalAssignmentForStorm_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
- {
+ 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.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
@@ -523,7 +526,7 @@ public class Supervisor {
return false;
}
- public void start(I iface, getLocalAssignmentForStorm_args args, org.apache.thrift.async.AsyncMethodCallback<Assignment> resultHandler) throws TException {
+ public void start(I iface, getLocalAssignmentForStorm_args args, org.apache.thrift.async.AsyncMethodCallback<Assignment> resultHandler) throws org.apache.thrift.TException {
iface.getLocalAssignmentForStorm(args.id,resultHandler);
}
}
@@ -537,40 +540,48 @@ public class Supervisor {
return new sendSupervisorWorkerHeartbeat_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
sendSupervisorWorkerHeartbeat_result result = new sendSupervisorWorkerHeartbeat_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.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);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.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
- {
+ result.aze = (AuthorizationException) e;
+ result.set_aze_isSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
@@ -579,7 +590,7 @@ public class Supervisor {
return false;
}
- public void start(I iface, sendSupervisorWorkerHeartbeat_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ public void start(I iface, sendSupervisorWorkerHeartbeat_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.sendSupervisorWorkerHeartbeat(args.heartbeat,resultHandler);
}
}
@@ -591,11 +602,8 @@ public class Supervisor {
private static final org.apache.thrift.protocol.TField ASSIGNMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("assignments", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new sendSupervisorAssignments_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new sendSupervisorAssignments_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sendSupervisorAssignments_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sendSupervisorAssignments_argsTupleSchemeFactory();
private SupervisorAssignments assignments; // required
@@ -603,10 +611,10 @@ public class Supervisor {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ASSIGNMENTS((short)1, "assignments");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -629,21 +637,21 @@ public class Supervisor {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -652,18 +660,18 @@ public class Supervisor {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ASSIGNMENTS, new org.apache.thrift.meta_data.FieldMetaData("assignments", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SupervisorAssignments.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendSupervisorAssignments_args.class, metaDataMap);
}
@@ -718,7 +726,7 @@ public class Supervisor {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ASSIGNMENTS:
if (value == null) {
@@ -731,30 +739,30 @@ public class Supervisor {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ASSIGNMENTS:
return get_assignments();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case ASSIGNMENTS:
return is_set_assignments();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof sendSupervisorAssignments_args)
@@ -765,6 +773,8 @@ public class Supervisor {
public boolean equals(sendSupervisorAssignments_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_assignments = true && this.is_set_assignments();
boolean that_present_assignments = true && that.is_set_assignments();
@@ -780,14 +790,13 @@ public class Supervisor {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_assignments = true && (is_set_assignments());
- list.add(present_assignments);
- if (present_assignments)
- list.add(assignments);
+ hashCode = hashCode * 8191 + ((is_set_assignments()) ? 131071 : 524287);
+ if (is_set_assignments())
+ hashCode = hashCode * 8191 + assignments.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -798,7 +807,7 @@ public class Supervisor {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_assignments()).compareTo(other.is_set_assignments());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assignments()).compareTo(other.is_set_assignments());
if (lastComparison != 0) {
return lastComparison;
}
@@ -816,16 +825,16 @@ public class Supervisor {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("sendSupervisorAssignments_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("sendSupervisorAssignments_args(");
boolean first = true;
sb.append("assignments:");
@@ -855,7 +864,7 @@ public class Supervisor {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -863,13 +872,13 @@ public class Supervisor {
}
}
- private static class sendSupervisorAssignments_argsStandardSchemeFactory implements SchemeFactory {
+ private static class sendSupervisorAssignments_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public sendSupervisorAssignments_argsStandardScheme getScheme() {
return new sendSupervisorAssignments_argsStandardScheme();
}
}
- private static class sendSupervisorAssignments_argsStandardScheme extends StandardScheme<sendSupervisorAssignments_args> {
+ private static class sendSupervisorAssignments_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<sendSupervisorAssignments_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, sendSupervisorAssignments_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -914,18 +923,18 @@ public class Supervisor {
}
- private static class sendSupervisorAssignments_argsTupleSchemeFactory implements SchemeFactory {
+ private static class sendSupervisorAssignments_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public sendSupervisorAssignments_argsTupleScheme getScheme() {
return new sendSupervisorAssignments_argsTupleScheme();
}
}
- private static class sendSupervisorAssignments_argsTupleScheme extends TupleScheme<sendSupervisorAssignments_args> {
+ private static class sendSupervisorAssignments_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<sendSupervisorAssignments_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sendSupervisorAssignments_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_assignments()) {
optionals.set(0);
}
@@ -937,8 +946,8 @@ public class Supervisor {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, sendSupervisorAssignments_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.assignments = new SupervisorAssignments();
struct.assignments.read(iprot);
@@ -947,6 +956,9 @@ public class Supervisor {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
public static class sendSupervisorAssignments_result implements org.apache.thrift.TBase<sendSupervisorAssignments_result, sendSupervisorAssignments_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendSupervisorAssignments_result> {
@@ -954,11 +966,8 @@ public class Supervisor {
private static final org.apache.thrift.protocol.TField AZE_FIELD_DESC = new org.apache.thrift.protocol.TField("aze", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new sendSupervisorAssignments_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new sendSupervisorAssignments_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sendSupervisorAssignments_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sendSupervisorAssignments_resultTupleSchemeFactory();
private AuthorizationException aze; // required
@@ -966,10 +975,10 @@ public class Supervisor {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
AZE((short)1, "aze");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -992,21 +1001,21 @@ public class Supervisor {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -1015,18 +1024,18 @@ public class Supervisor {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AZE, new org.apache.thrift.meta_data.FieldMetaData("aze", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AuthorizationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendSupervisorAssignments_result.class, metaDataMap);
}
@@ -1081,7 +1090,7 @@ public class Supervisor {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AZE:
if (value == null) {
@@ -1094,30 +1103,30 @@ public class Supervisor {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AZE:
return get_aze();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case AZE:
return is_set_aze();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof sendSupervisorAssignments_result)
@@ -1128,6 +1137,8 @@ public class Supervisor {
public boolean equals(sendSupervisorAssignments_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_aze = true && this.is_set_aze();
boolean that_present_aze = true && that.is_set_aze();
@@ -1143,14 +1154,13 @@ public class Supervisor {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_aze = true && (is_set_aze());
- list.add(present_aze);
- if (present_aze)
- list.add(aze);
+ hashCode = hashCode * 8191 + ((is_set_aze()) ? 131071 : 524287);
+ if (is_set_aze())
+ hashCode = hashCode * 8191 + aze.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1161,7 +1171,7 @@ public class Supervisor {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze());
+ lastComparison = java.lang.Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1179,16 +1189,16 @@ public class Supervisor {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("sendSupervisorAssignments_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("sendSupervisorAssignments_result(");
boolean first = true;
sb.append("aze:");
@@ -1215,7 +1225,7 @@ public class Supervisor {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -1223,13 +1233,13 @@ public class Supervisor {
}
}
- private static class sendSupervisorAssignments_resultStandardSchemeFactory implements SchemeFactory {
+ private static class sendSupervisorAssignments_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public sendSupervisorAssignments_resultStandardScheme getScheme() {
return new sendSupervisorAssignments_resultStandardScheme();
}
}
- private static class sendSupervisorAssignments_resultStandardScheme extends StandardScheme<sendSupervisorAssignments_result> {
+ private static class sendSupervisorAssignments_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<sendSupervisorAssignments_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, sendSupervisorAssignments_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1274,18 +1284,18 @@ public class Supervisor {
}
- private static class sendSupervisorAssignments_resultTupleSchemeFactory implements SchemeFactory {
+ private static class sendSupervisorAssignments_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public sendSupervisorAssignments_resultTupleScheme getScheme() {
return new sendSupervisorAssignments_resultTupleScheme();
}
}
- private static class sendSupervisorAssignments_resultTupleScheme extends TupleScheme<sendSupervisorAssignments_result> {
+ private static class sendSupervisorAssignments_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<sendSupervisorAssignments_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sendSupervisorAssignments_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_aze()) {
optionals.set(0);
}
@@ -1297,8 +1307,8 @@ public class Supervisor {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, sendSupervisorAssignments_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.aze = new AuthorizationException();
struct.aze.read(iprot);
@@ -1307,6 +1317,9 @@ public class Supervisor {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
public static class getLocalAssignmentForStorm_args implements org.apache.thrift.TBase<getLocalAssignmentForStorm_args, getLocalAssignmentForStorm_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLocalAssignmentForStorm_args> {
@@ -1314,22 +1327,19 @@ public class Supervisor {
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLocalAssignmentForStorm_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLocalAssignmentForStorm_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLocalAssignmentForStorm_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLocalAssignmentForStorm_argsTupleSchemeFactory();
- private String id; // required
+ private java.lang.String id; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ID((short)1, "id");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -1352,21 +1362,21 @@ public class Supervisor {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -1375,18 +1385,18 @@ public class Supervisor {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLocalAssignmentForStorm_args.class, metaDataMap);
}
@@ -1394,7 +1404,7 @@ public class Supervisor {
}
public getLocalAssignmentForStorm_args(
- String id)
+ java.lang.String id)
{
this();
this.id = id;
@@ -1418,11 +1428,11 @@ public class Supervisor {
this.id = null;
}
- public String get_id() {
+ public java.lang.String get_id() {
return this.id;
}
- public void set_id(String id) {
+ public void set_id(java.lang.String id) {
this.id = id;
}
@@ -1441,43 +1451,43 @@ public class Supervisor {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ID:
if (value == null) {
unset_id();
} else {
- set_id((String)value);
+ set_id((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return get_id();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case ID:
return is_set_id();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getLocalAssignmentForStorm_args)
@@ -1488,6 +1498,8 @@ public class Supervisor {
public boolean equals(getLocalAssignmentForStorm_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_id = true && this.is_set_id();
boolean that_present_id = true && that.is_set_id();
@@ -1503,14 +1515,13 @@ public class Supervisor {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_id = true && (is_set_id());
- list.add(present_id);
- if (present_id)
- list.add(id);
+ hashCode = hashCode * 8191 + ((is_set_id()) ? 131071 : 524287);
+ if (is_set_id())
+ hashCode = hashCode * 8191 + id.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1521,7 +1532,7 @@ public class Supervisor {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1539,16 +1550,16 @@ public class Supervisor {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLocalAssignmentForStorm_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getLocalAssignmentForStorm_args(");
boolean first = true;
sb.append("id:");
@@ -1575,7 +1586,7 @@ public class Supervisor {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -1583,13 +1594,13 @@ public class Supervisor {
}
}
- private static class getLocalAssignmentForStorm_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getLocalAssignmentForStorm_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getLocalAssignmentForStorm_argsStandardScheme getScheme() {
return new getLocalAssignmentForStorm_argsStandardScheme();
}
}
- private static class getLocalAssignmentForStorm_argsStandardScheme extends StandardScheme<getLocalAssignmentForStorm_args> {
+ private static class getLocalAssignmentForStorm_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getLocalAssignmentForStorm_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getLocalAssignmentForStorm_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1633,18 +1644,18 @@ public class Supervisor {
}
- private static class getLocalAssignmentForStorm_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getLocalAssignmentForStorm_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getLocalAssignmentForStorm_argsTupleScheme getScheme() {
return new getLocalAssignmentForStorm_argsTupleScheme();
}
}
- private static class getLocalAssignmentForStorm_argsTupleScheme extends TupleScheme<getLocalAssignmentForStorm_args> {
+ private static class getLocalAssignmentForStorm_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getLocalAssignmentForStorm_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getLocalAssignmentForStorm_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_id()) {
optionals.set(0);
}
@@ -1656,8 +1667,8 @@ public class Supervisor {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getLocalAssignmentForStorm_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.id = iprot.readString();
struct.set_id_isSet(true);
@@ -1665,6 +1676,9 @@ public class Supervisor {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
public static class getLocalAssignmentForStorm_result implements org.apache.thrift.TBase<getLocalAssignmentForStorm_result, getLocalAssignmentForStorm_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLocalAssignmentForStorm_result> {
@@ -1674,11 +1688,8 @@ public class Supervisor {
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField AZE_FIELD_DESC = new org.apache.thrift.protocol.TField("aze", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLocalAssignmentForStorm_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLocalAssignmentForStorm_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLocalAssignmentForStorm_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLocalAssignmentForStorm_resultTupleSchemeFactory();
private Assignment success; // required
private NotAliveException e; // required
@@ -1690,10 +1701,10 @@ public class Supervisor {
E((short)1, "e"),
AZE((short)2, "aze");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -1720,21 +1731,21 @@ public class Supervisor {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -1743,22 +1754,22 @@ public class Supervisor {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Assignment.class)));
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NotAliveException.class)));
tmpMap.put(_Fields.AZE, new org.apache.thrift.meta_data.FieldMetaData("aze", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AuthorizationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLocalAssignmentForStorm_result.class, metaDataMap);
}
@@ -1871,7 +1882,7 @@ public class Supervisor {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -1900,7 +1911,7 @@ public class Supervisor {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
@@ -1912,13 +1923,13 @@ public class Supervisor {
return get_aze();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -1929,11 +1940,11 @@ public class Supervisor {
case AZE:
return is_set_aze();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getLocalAssignmentForStorm_result)
@@ -1944,6 +1955,8 @@ public class Supervisor {
public boolean equals(getLocalAssignmentForStorm_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();
@@ -1977,24 +1990,21 @@ public class Supervisor {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (is_set_success());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((is_set_success()) ? 131071 : 524287);
+ if (is_set_success())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_e = true && (is_set_e());
- list.add(present_e);
- if (present_e)
- list.add(e);
+ hashCode = hashCode * 8191 + ((is_set_e()) ? 131071 : 524287);
+ if (is_set_e())
+ hashCode = hashCode * 8191 + e.hashCode();
- boolean present_aze = true && (is_set_aze());
- list.add(present_aze);
- if (present_aze)
- list.add(aze);
+ hashCode = hashCode * 8191 + ((is_set_aze()) ? 131071 : 524287);
+ if (is_set_aze())
+ hashCode = hashCode * 8191 + aze.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -2005,7 +2015,7 @@ public class Supervisor {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());
+ lastComparison = java.lang.Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2015,7 +2025,7 @@ public class Supervisor {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_e()).compareTo(other.is_set_e());
+ lastComparison = java.lang.Boolean.valueOf(is_set_e()).compareTo(other.is_set_e());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2025,7 +2035,7 @@ public class Supervisor {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze());
+ lastComparison = java.lang.Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2043,16 +2053,16 @@ public class Supervisor {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLocalAssignmentForStorm_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getLocalAssignmentForStorm_result(");
boolean first = true;
sb.append("success:");
@@ -2098,7 +2108,7 @@ public class Supervisor {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -2106,13 +2116,13 @@ public class Supervisor {
}
}
- private static class getLocalAssignmentForStorm_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getLocalAssignmentForStorm_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getLocalAssignmentForStorm_resultStandardScheme getScheme() {
return new getLocalAssignmentForStorm_resultStandardScheme();
}
}
- private static class getLocalAssignmentForStorm_resultStandardScheme extends StandardScheme<getLocalAssignmentForStorm_result> {
+ private static class getLocalAssignmentForStorm_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getLocalAssignmentForStorm_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getLocalAssignmentForStorm_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -2185,18 +2195,18 @@ public class Supervisor {
}
- private static class getLocalAssignmentForStorm_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getLocalAssignmentForStorm_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getLocalAssignmentForStorm_resultTupleScheme getScheme() {
return new getLocalAssignmentForStorm_resultTupleScheme();
}
}
- private static class getLocalAssignmentForStorm_resultTupleScheme extends TupleScheme<getLocalAssignmentForStorm_result> {
+ private static class getLocalAssignmentForStorm_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getLocalAssignmentForStorm_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getLocalAssignmentForStorm_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_success()) {
optionals.set(0);
}
@@ -2220,8 +2230,8 @@ public class Supervisor {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getLocalAssignmentForStorm_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = new Assignment();
struct.success.read(iprot);
@@ -2240,6 +2250,9 @@ public class Supervisor {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
public static class sendSupervisorWorkerHeartbeat_args implements org.apache.thrift.TBase<sendSupervisorWorkerHeartbeat_args, sendSupervisorWorkerHeartbeat_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendSupervisorWorkerHeartbeat_args> {
@@ -2247,11 +2260,8 @@ public class Supervisor {
private static final org.apache.thrift.protocol.TField HEARTBEAT_FIELD_DESC = new org.apache.thrift.protocol.TField("heartbeat", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new sendSupervisorWorkerHeartbeat_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new sendSupervisorWorkerHeartbeat_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sendSupervisorWorkerHeartbeat_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sendSupervisorWorkerHeartbeat_argsTupleSchemeFactory();
private SupervisorWorkerHeartbeat heartbeat; // required
@@ -2259,10 +2269,10 @@ public class Supervisor {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
HEARTBEAT((short)1, "heartbeat");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -2285,21 +2295,21 @@ public class Supervisor {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -2308,18 +2318,18 @@ public class Supervisor {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.HEARTBEAT, new org.apache.thrift.meta_data.FieldMetaData("heartbeat", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SupervisorWorkerHeartbeat.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendSupervisorWorkerHeartbeat_args.class, metaDataMap);
}
@@ -2374,7 +2384,7 @@ public class Supervisor {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case HEARTBEAT:
if (value == null) {
@@ -2387,30 +2397,30 @@ public class Supervisor {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case HEARTBEAT:
return get_heartbeat();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case HEARTBEAT:
return is_set_heartbeat();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof sendSupervisorWorkerHeartbeat_args)
@@ -2421,6 +2431,8 @@ public class Supervisor {
public boolean equals(sendSupervisorWorkerHeartbeat_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_heartbeat = true && this.is_set_heartbeat();
boolean that_present_heartbeat = true && that.is_set_heartbeat();
@@ -2436,14 +2448,13 @@ public class Supervisor {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_heartbeat = true && (is_set_heartbeat());
- list.add(present_heartbeat);
- if (present_heartbeat)
- list.add(heartbeat);
+ hashCode = hashCode * 8191 + ((is_set_heartbeat()) ? 131071 : 524287);
+ if (is_set_heartbeat())
+ hashCode = hashCode * 8191 + heartbeat.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -2454,7 +2465,7 @@ public class Supervisor {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_heartbeat()).compareTo(other.is_set_heartbeat());
+ lastComparison = java.lang.Boolean.valueOf(is_set_heartbeat()).compareTo(other.is_set_heartbeat());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2472,16 +2483,16 @@ public class Supervisor {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("sendSupervisorWorkerHeartbeat_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("sendSupervisorWorkerHeartbeat_args(");
boolean first = true;
sb.append("heartbeat:");
@@ -2511,7 +2522,7 @@ public class Supervisor {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -2519,13 +2530,13 @@ public class Supervisor {
}
}
- private static class sendSupervisorWorkerHeartbeat_argsStandardSchemeFactory implements SchemeFactory {
+ private static class sendSupervisorWorkerHeartbeat_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public sendSupervisorWorkerHeartbeat_argsStandardScheme getScheme() {
return new sendSupervisorWorkerHeartbeat_argsStandardScheme();
}
}
- private static class sendSupervisorWorkerHeartbeat_argsStandardScheme extends StandardScheme<sendSupervisorWorkerHeartbeat_args> {
+ private static class sendSupervisorWorkerHeartbeat_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<sendSupervisorWorkerHeartbeat_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, sendSupervisorWorkerHeartbeat_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -2570,18 +2581,18 @@ public class Supervisor {
}
- private static class sendSupervisorWorkerHeartbeat_argsTupleSchemeFactory implements SchemeFactory {
+ private static class sendSupervisorWorkerHeartbeat_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public sendSupervisorWorkerHeartbeat_argsTupleScheme getScheme() {
return new sendSupervisorWorkerHeartbeat_argsTupleScheme();
}
}
- private static class sendSupervisorWorkerHeartbeat_argsTupleScheme extends TupleScheme<sendSupervisorWorkerHeartbeat_args> {
+ private static class sendSupervisorWorkerHeartbeat_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<sendSupervisorWorkerHeartbeat_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sendSupervisorWorkerHeartbeat_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_heartbeat()) {
optionals.set(0);
}
@@ -2593,8 +2604,8 @@ public class Supervisor {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, sendSupervisorWorkerHeartbeat_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.heartbeat = new SupervisorWorkerHeartbeat();
struct.heartbeat.read(iprot);
@@ -2603,6 +2614,9 @@ public class Supervisor {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
public static class sendSupervisorWorkerHeartbeat_result implements org.apache.thrift.TBase<sendSupervisorWorkerHeartbeat_result, sendSupervisorWorkerHeartbeat_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendSupervisorWorkerHeartbeat_result> {
@@ -2610,11 +2624,8 @@ public class Supervisor {
private stat
<TRUNCATED>
[13/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SupervisorPageInfo.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SupervisorPageInfo.java b/storm-client/src/jvm/org/apache/storm/generated/SupervisorPageInfo.java
index dfaa77a..8d0c5e0 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SupervisorPageInfo.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SupervisorPageInfo.java
@@ -16,66 +16,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPageInfo, SupervisorPageInfo._Fields>, java.io.Serializable, Cloneable, Comparable<SupervisorPageInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SupervisorPageInfo");
private static final org.apache.thrift.protocol.TField SUPERVISOR_SUMMARIES_FIELD_DESC = new org.apache.thrift.protocol.TField("supervisor_summaries", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField WORKER_SUMMARIES_FIELD_DESC = new org.apache.thrift.protocol.TField("worker_summaries", org.apache.thrift.protocol.TType.LIST, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SupervisorPageInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SupervisorPageInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SupervisorPageInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SupervisorPageInfoTupleSchemeFactory();
- private List<SupervisorSummary> supervisor_summaries; // optional
- private List<WorkerSummary> worker_summaries; // optional
+ private java.util.List<SupervisorSummary> supervisor_summaries; // optional
+ private java.util.List<WorkerSummary> worker_summaries; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUPERVISOR_SUMMARIES((short)1, "supervisor_summaries"),
WORKER_SUMMARIES((short)2, "worker_summaries");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,23 +93,23 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.SUPERVISOR_SUMMARIES,_Fields.WORKER_SUMMARIES};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUPERVISOR_SUMMARIES, new org.apache.thrift.meta_data.FieldMetaData("supervisor_summaries", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SupervisorSummary.class))));
tmpMap.put(_Fields.WORKER_SUMMARIES, new org.apache.thrift.meta_data.FieldMetaData("worker_summaries", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkerSummary.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SupervisorPageInfo.class, metaDataMap);
}
@@ -151,14 +121,14 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
*/
public SupervisorPageInfo(SupervisorPageInfo other) {
if (other.is_set_supervisor_summaries()) {
- List<SupervisorSummary> __this__supervisor_summaries = new ArrayList<SupervisorSummary>(other.supervisor_summaries.size());
+ java.util.List<SupervisorSummary> __this__supervisor_summaries = new java.util.ArrayList<SupervisorSummary>(other.supervisor_summaries.size());
for (SupervisorSummary other_element : other.supervisor_summaries) {
__this__supervisor_summaries.add(new SupervisorSummary(other_element));
}
this.supervisor_summaries = __this__supervisor_summaries;
}
if (other.is_set_worker_summaries()) {
- List<WorkerSummary> __this__worker_summaries = new ArrayList<WorkerSummary>(other.worker_summaries.size());
+ java.util.List<WorkerSummary> __this__worker_summaries = new java.util.ArrayList<WorkerSummary>(other.worker_summaries.size());
for (WorkerSummary other_element : other.worker_summaries) {
__this__worker_summaries.add(new WorkerSummary(other_element));
}
@@ -186,16 +156,16 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
public void add_to_supervisor_summaries(SupervisorSummary elem) {
if (this.supervisor_summaries == null) {
- this.supervisor_summaries = new ArrayList<SupervisorSummary>();
+ this.supervisor_summaries = new java.util.ArrayList<SupervisorSummary>();
}
this.supervisor_summaries.add(elem);
}
- public List<SupervisorSummary> get_supervisor_summaries() {
+ public java.util.List<SupervisorSummary> get_supervisor_summaries() {
return this.supervisor_summaries;
}
- public void set_supervisor_summaries(List<SupervisorSummary> supervisor_summaries) {
+ public void set_supervisor_summaries(java.util.List<SupervisorSummary> supervisor_summaries) {
this.supervisor_summaries = supervisor_summaries;
}
@@ -224,16 +194,16 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
public void add_to_worker_summaries(WorkerSummary elem) {
if (this.worker_summaries == null) {
- this.worker_summaries = new ArrayList<WorkerSummary>();
+ this.worker_summaries = new java.util.ArrayList<WorkerSummary>();
}
this.worker_summaries.add(elem);
}
- public List<WorkerSummary> get_worker_summaries() {
+ public java.util.List<WorkerSummary> get_worker_summaries() {
return this.worker_summaries;
}
- public void set_worker_summaries(List<WorkerSummary> worker_summaries) {
+ public void set_worker_summaries(java.util.List<WorkerSummary> worker_summaries) {
this.worker_summaries = worker_summaries;
}
@@ -252,13 +222,13 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUPERVISOR_SUMMARIES:
if (value == null) {
unset_supervisor_summaries();
} else {
- set_supervisor_summaries((List<SupervisorSummary>)value);
+ set_supervisor_summaries((java.util.List<SupervisorSummary>)value);
}
break;
@@ -266,14 +236,14 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
if (value == null) {
unset_worker_summaries();
} else {
- set_worker_summaries((List<WorkerSummary>)value);
+ set_worker_summaries((java.util.List<WorkerSummary>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUPERVISOR_SUMMARIES:
return get_supervisor_summaries();
@@ -282,13 +252,13 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
return get_worker_summaries();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -297,11 +267,11 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
case WORKER_SUMMARIES:
return is_set_worker_summaries();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof SupervisorPageInfo)
@@ -312,6 +282,8 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
public boolean equals(SupervisorPageInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_supervisor_summaries = true && this.is_set_supervisor_summaries();
boolean that_present_supervisor_summaries = true && that.is_set_supervisor_summaries();
@@ -336,19 +308,17 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_supervisor_summaries = true && (is_set_supervisor_summaries());
- list.add(present_supervisor_summaries);
- if (present_supervisor_summaries)
- list.add(supervisor_summaries);
+ hashCode = hashCode * 8191 + ((is_set_supervisor_summaries()) ? 131071 : 524287);
+ if (is_set_supervisor_summaries())
+ hashCode = hashCode * 8191 + supervisor_summaries.hashCode();
- boolean present_worker_summaries = true && (is_set_worker_summaries());
- list.add(present_worker_summaries);
- if (present_worker_summaries)
- list.add(worker_summaries);
+ hashCode = hashCode * 8191 + ((is_set_worker_summaries()) ? 131071 : 524287);
+ if (is_set_worker_summaries())
+ hashCode = hashCode * 8191 + worker_summaries.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -359,7 +329,7 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_supervisor_summaries()).compareTo(other.is_set_supervisor_summaries());
+ lastComparison = java.lang.Boolean.valueOf(is_set_supervisor_summaries()).compareTo(other.is_set_supervisor_summaries());
if (lastComparison != 0) {
return lastComparison;
}
@@ -369,7 +339,7 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_worker_summaries()).compareTo(other.is_set_worker_summaries());
+ lastComparison = java.lang.Boolean.valueOf(is_set_worker_summaries()).compareTo(other.is_set_worker_summaries());
if (lastComparison != 0) {
return lastComparison;
}
@@ -387,16 +357,16 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SupervisorPageInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SupervisorPageInfo(");
boolean first = true;
if (is_set_supervisor_summaries()) {
@@ -435,7 +405,7 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -443,13 +413,13 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
}
}
- private static class SupervisorPageInfoStandardSchemeFactory implements SchemeFactory {
+ private static class SupervisorPageInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SupervisorPageInfoStandardScheme getScheme() {
return new SupervisorPageInfoStandardScheme();
}
}
- private static class SupervisorPageInfoStandardScheme extends StandardScheme<SupervisorPageInfo> {
+ private static class SupervisorPageInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<SupervisorPageInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SupervisorPageInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -465,7 +435,7 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list466 = iprot.readListBegin();
- struct.supervisor_summaries = new ArrayList<SupervisorSummary>(_list466.size);
+ struct.supervisor_summaries = new java.util.ArrayList<SupervisorSummary>(_list466.size);
SupervisorSummary _elem467;
for (int _i468 = 0; _i468 < _list466.size; ++_i468)
{
@@ -484,7 +454,7 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list469 = iprot.readListBegin();
- struct.worker_summaries = new ArrayList<WorkerSummary>(_list469.size);
+ struct.worker_summaries = new java.util.ArrayList<WorkerSummary>(_list469.size);
WorkerSummary _elem470;
for (int _i471 = 0; _i471 < _list469.size; ++_i471)
{
@@ -546,18 +516,18 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
}
- private static class SupervisorPageInfoTupleSchemeFactory implements SchemeFactory {
+ private static class SupervisorPageInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SupervisorPageInfoTupleScheme getScheme() {
return new SupervisorPageInfoTupleScheme();
}
}
- private static class SupervisorPageInfoTupleScheme extends TupleScheme<SupervisorPageInfo> {
+ private static class SupervisorPageInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<SupervisorPageInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SupervisorPageInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_supervisor_summaries()) {
optionals.set(0);
}
@@ -587,12 +557,12 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SupervisorPageInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list476 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.supervisor_summaries = new ArrayList<SupervisorSummary>(_list476.size);
+ struct.supervisor_summaries = new java.util.ArrayList<SupervisorSummary>(_list476.size);
SupervisorSummary _elem477;
for (int _i478 = 0; _i478 < _list476.size; ++_i478)
{
@@ -606,7 +576,7 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list479 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.worker_summaries = new ArrayList<WorkerSummary>(_list479.size);
+ struct.worker_summaries = new java.util.ArrayList<WorkerSummary>(_list479.size);
WorkerSummary _elem480;
for (int _i481 = 0; _i481 < _list479.size; ++_i481)
{
@@ -620,5 +590,8 @@ public class SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPag
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SupervisorSummary.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SupervisorSummary.java b/storm-client/src/jvm/org/apache/storm/generated/SupervisorSummary.java
index 049ebea..8de602d 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SupervisorSummary.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SupervisorSummary.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSummary, SupervisorSummary._Fields>, java.io.Serializable, Cloneable, Comparable<SupervisorSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SupervisorSummary");
@@ -67,19 +40,16 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
private static final org.apache.thrift.protocol.TField FRAGMENTED_MEM_FIELD_DESC = new org.apache.thrift.protocol.TField("fragmented_mem", org.apache.thrift.protocol.TType.DOUBLE, (short)10);
private static final org.apache.thrift.protocol.TField FRAGMENTED_CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("fragmented_cpu", org.apache.thrift.protocol.TType.DOUBLE, (short)11);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SupervisorSummaryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SupervisorSummaryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SupervisorSummaryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SupervisorSummaryTupleSchemeFactory();
- private String host; // required
+ private java.lang.String host; // required
private int uptime_secs; // required
private int num_workers; // required
private int num_used_workers; // required
- private String supervisor_id; // required
- private String version; // optional
- private Map<String,Double> total_resources; // optional
+ private java.lang.String supervisor_id; // required
+ private java.lang.String version; // optional
+ private java.util.Map<java.lang.String,java.lang.Double> total_resources; // optional
private double used_mem; // optional
private double used_cpu; // optional
private double fragmented_mem; // optional
@@ -99,10 +69,10 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
FRAGMENTED_MEM((short)10, "fragmented_mem"),
FRAGMENTED_CPU((short)11, "fragmented_cpu");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -145,21 +115,21 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -168,7 +138,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -183,9 +153,9 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
private static final int __FRAGMENTED_CPU_ISSET_ID = 6;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.VERSION,_Fields.TOTAL_RESOURCES,_Fields.USED_MEM,_Fields.USED_CPU,_Fields.FRAGMENTED_MEM,_Fields.FRAGMENTED_CPU};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.UPTIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("uptime_secs", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -210,7 +180,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.FRAGMENTED_CPU, new org.apache.thrift.meta_data.FieldMetaData("fragmented_cpu", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SupervisorSummary.class, metaDataMap);
}
@@ -220,11 +190,11 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
public SupervisorSummary(
- String host,
+ java.lang.String host,
int uptime_secs,
int num_workers,
int num_used_workers,
- String supervisor_id)
+ java.lang.String supervisor_id)
{
this();
this.host = host;
@@ -255,7 +225,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
this.version = other.version;
}
if (other.is_set_total_resources()) {
- Map<String,Double> __this__total_resources = new HashMap<String,Double>(other.total_resources);
+ java.util.Map<java.lang.String,java.lang.Double> __this__total_resources = new java.util.HashMap<java.lang.String,java.lang.Double>(other.total_resources);
this.total_resources = __this__total_resources;
}
this.used_mem = other.used_mem;
@@ -291,11 +261,11 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
this.fragmented_cpu = 0.0;
}
- public String get_host() {
+ public java.lang.String get_host() {
return this.host;
}
- public void set_host(String host) {
+ public void set_host(java.lang.String host) {
this.host = host;
}
@@ -324,16 +294,16 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
public void unset_uptime_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
/** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_uptime_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
public void set_uptime_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
}
public int get_num_workers() {
@@ -346,16 +316,16 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
public void unset_num_workers() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
}
/** Returns true if field num_workers is set (has been assigned a value) and false otherwise */
public boolean is_set_num_workers() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
}
public void set_num_workers_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID, value);
}
public int get_num_used_workers() {
@@ -368,23 +338,23 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
public void unset_num_used_workers() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_USED_WORKERS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_USED_WORKERS_ISSET_ID);
}
/** Returns true if field num_used_workers is set (has been assigned a value) and false otherwise */
public boolean is_set_num_used_workers() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_USED_WORKERS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_USED_WORKERS_ISSET_ID);
}
public void set_num_used_workers_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_USED_WORKERS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_USED_WORKERS_ISSET_ID, value);
}
- public String get_supervisor_id() {
+ public java.lang.String get_supervisor_id() {
return this.supervisor_id;
}
- public void set_supervisor_id(String supervisor_id) {
+ public void set_supervisor_id(java.lang.String supervisor_id) {
this.supervisor_id = supervisor_id;
}
@@ -403,11 +373,11 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
}
- public String get_version() {
+ public java.lang.String get_version() {
return this.version;
}
- public void set_version(String version) {
+ public void set_version(java.lang.String version) {
this.version = version;
}
@@ -430,18 +400,18 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return (this.total_resources == null) ? 0 : this.total_resources.size();
}
- public void put_to_total_resources(String key, double val) {
+ public void put_to_total_resources(java.lang.String key, double val) {
if (this.total_resources == null) {
- this.total_resources = new HashMap<String,Double>();
+ this.total_resources = new java.util.HashMap<java.lang.String,java.lang.Double>();
}
this.total_resources.put(key, val);
}
- public Map<String,Double> get_total_resources() {
+ public java.util.Map<java.lang.String,java.lang.Double> get_total_resources() {
return this.total_resources;
}
- public void set_total_resources(Map<String,Double> total_resources) {
+ public void set_total_resources(java.util.Map<java.lang.String,java.lang.Double> total_resources) {
this.total_resources = total_resources;
}
@@ -470,16 +440,16 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
public void unset_used_mem() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USED_MEM_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __USED_MEM_ISSET_ID);
}
/** Returns true if field used_mem is set (has been assigned a value) and false otherwise */
public boolean is_set_used_mem() {
- return EncodingUtils.testBit(__isset_bitfield, __USED_MEM_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USED_MEM_ISSET_ID);
}
public void set_used_mem_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USED_MEM_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __USED_MEM_ISSET_ID, value);
}
public double get_used_cpu() {
@@ -492,16 +462,16 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
public void unset_used_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USED_CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __USED_CPU_ISSET_ID);
}
/** Returns true if field used_cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_used_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __USED_CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USED_CPU_ISSET_ID);
}
public void set_used_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USED_CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __USED_CPU_ISSET_ID, value);
}
public double get_fragmented_mem() {
@@ -514,16 +484,16 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
public void unset_fragmented_mem() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FRAGMENTED_MEM_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FRAGMENTED_MEM_ISSET_ID);
}
/** Returns true if field fragmented_mem is set (has been assigned a value) and false otherwise */
public boolean is_set_fragmented_mem() {
- return EncodingUtils.testBit(__isset_bitfield, __FRAGMENTED_MEM_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FRAGMENTED_MEM_ISSET_ID);
}
public void set_fragmented_mem_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FRAGMENTED_MEM_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FRAGMENTED_MEM_ISSET_ID, value);
}
public double get_fragmented_cpu() {
@@ -536,25 +506,25 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
public void unset_fragmented_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FRAGMENTED_CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FRAGMENTED_CPU_ISSET_ID);
}
/** Returns true if field fragmented_cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_fragmented_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __FRAGMENTED_CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FRAGMENTED_CPU_ISSET_ID);
}
public void set_fragmented_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FRAGMENTED_CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FRAGMENTED_CPU_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case HOST:
if (value == null) {
unset_host();
} else {
- set_host((String)value);
+ set_host((java.lang.String)value);
}
break;
@@ -562,7 +532,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (value == null) {
unset_uptime_secs();
} else {
- set_uptime_secs((Integer)value);
+ set_uptime_secs((java.lang.Integer)value);
}
break;
@@ -570,7 +540,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (value == null) {
unset_num_workers();
} else {
- set_num_workers((Integer)value);
+ set_num_workers((java.lang.Integer)value);
}
break;
@@ -578,7 +548,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (value == null) {
unset_num_used_workers();
} else {
- set_num_used_workers((Integer)value);
+ set_num_used_workers((java.lang.Integer)value);
}
break;
@@ -586,7 +556,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (value == null) {
unset_supervisor_id();
} else {
- set_supervisor_id((String)value);
+ set_supervisor_id((java.lang.String)value);
}
break;
@@ -594,7 +564,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (value == null) {
unset_version();
} else {
- set_version((String)value);
+ set_version((java.lang.String)value);
}
break;
@@ -602,7 +572,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (value == null) {
unset_total_resources();
} else {
- set_total_resources((Map<String,Double>)value);
+ set_total_resources((java.util.Map<java.lang.String,java.lang.Double>)value);
}
break;
@@ -610,7 +580,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (value == null) {
unset_used_mem();
} else {
- set_used_mem((Double)value);
+ set_used_mem((java.lang.Double)value);
}
break;
@@ -618,7 +588,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (value == null) {
unset_used_cpu();
} else {
- set_used_cpu((Double)value);
+ set_used_cpu((java.lang.Double)value);
}
break;
@@ -626,7 +596,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (value == null) {
unset_fragmented_mem();
} else {
- set_fragmented_mem((Double)value);
+ set_fragmented_mem((java.lang.Double)value);
}
break;
@@ -634,14 +604,14 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (value == null) {
unset_fragmented_cpu();
} else {
- set_fragmented_cpu((Double)value);
+ set_fragmented_cpu((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case HOST:
return get_host();
@@ -677,13 +647,13 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return get_fragmented_cpu();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -710,11 +680,11 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
case FRAGMENTED_CPU:
return is_set_fragmented_cpu();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof SupervisorSummary)
@@ -725,6 +695,8 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
public boolean equals(SupervisorSummary that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_host = true && this.is_set_host();
boolean that_present_host = true && that.is_set_host();
@@ -830,64 +802,47 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_host = true && (is_set_host());
- list.add(present_host);
- if (present_host)
- list.add(host);
-
- boolean present_uptime_secs = true;
- list.add(present_uptime_secs);
- if (present_uptime_secs)
- list.add(uptime_secs);
-
- boolean present_num_workers = true;
- list.add(present_num_workers);
- if (present_num_workers)
- list.add(num_workers);
-
- boolean present_num_used_workers = true;
- list.add(present_num_used_workers);
- if (present_num_used_workers)
- list.add(num_used_workers);
-
- boolean present_supervisor_id = true && (is_set_supervisor_id());
- list.add(present_supervisor_id);
- if (present_supervisor_id)
- list.add(supervisor_id);
-
- boolean present_version = true && (is_set_version());
- list.add(present_version);
- if (present_version)
- list.add(version);
-
- boolean present_total_resources = true && (is_set_total_resources());
- list.add(present_total_resources);
- if (present_total_resources)
- list.add(total_resources);
-
- boolean present_used_mem = true && (is_set_used_mem());
- list.add(present_used_mem);
- if (present_used_mem)
- list.add(used_mem);
-
- boolean present_used_cpu = true && (is_set_used_cpu());
- list.add(present_used_cpu);
- if (present_used_cpu)
- list.add(used_cpu);
-
- boolean present_fragmented_mem = true && (is_set_fragmented_mem());
- list.add(present_fragmented_mem);
- if (present_fragmented_mem)
- list.add(fragmented_mem);
-
- boolean present_fragmented_cpu = true && (is_set_fragmented_cpu());
- list.add(present_fragmented_cpu);
- if (present_fragmented_cpu)
- list.add(fragmented_cpu);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((is_set_host()) ? 131071 : 524287);
+ if (is_set_host())
+ hashCode = hashCode * 8191 + host.hashCode();
+
+ hashCode = hashCode * 8191 + uptime_secs;
+
+ hashCode = hashCode * 8191 + num_workers;
+
+ hashCode = hashCode * 8191 + num_used_workers;
+
+ hashCode = hashCode * 8191 + ((is_set_supervisor_id()) ? 131071 : 524287);
+ if (is_set_supervisor_id())
+ hashCode = hashCode * 8191 + supervisor_id.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_version()) ? 131071 : 524287);
+ if (is_set_version())
+ hashCode = hashCode * 8191 + version.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_total_resources()) ? 131071 : 524287);
+ if (is_set_total_resources())
+ hashCode = hashCode * 8191 + total_resources.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_used_mem()) ? 131071 : 524287);
+ if (is_set_used_mem())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(used_mem);
+
+ hashCode = hashCode * 8191 + ((is_set_used_cpu()) ? 131071 : 524287);
+ if (is_set_used_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(used_cpu);
+
+ hashCode = hashCode * 8191 + ((is_set_fragmented_mem()) ? 131071 : 524287);
+ if (is_set_fragmented_mem())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(fragmented_mem);
+
+ hashCode = hashCode * 8191 + ((is_set_fragmented_cpu()) ? 131071 : 524287);
+ if (is_set_fragmented_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(fragmented_cpu);
+
+ return hashCode;
}
@Override
@@ -898,7 +853,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_host()).compareTo(other.is_set_host());
+ lastComparison = java.lang.Boolean.valueOf(is_set_host()).compareTo(other.is_set_host());
if (lastComparison != 0) {
return lastComparison;
}
@@ -908,7 +863,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -918,7 +873,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_workers()).compareTo(other.is_set_num_workers());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_workers()).compareTo(other.is_set_num_workers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -928,7 +883,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_used_workers()).compareTo(other.is_set_num_used_workers());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_used_workers()).compareTo(other.is_set_num_used_workers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -938,7 +893,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_supervisor_id()).compareTo(other.is_set_supervisor_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_supervisor_id()).compareTo(other.is_set_supervisor_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -948,7 +903,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -958,7 +913,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_total_resources()).compareTo(other.is_set_total_resources());
+ lastComparison = java.lang.Boolean.valueOf(is_set_total_resources()).compareTo(other.is_set_total_resources());
if (lastComparison != 0) {
return lastComparison;
}
@@ -968,7 +923,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_used_mem()).compareTo(other.is_set_used_mem());
+ lastComparison = java.lang.Boolean.valueOf(is_set_used_mem()).compareTo(other.is_set_used_mem());
if (lastComparison != 0) {
return lastComparison;
}
@@ -978,7 +933,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_used_cpu()).compareTo(other.is_set_used_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_used_cpu()).compareTo(other.is_set_used_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -988,7 +943,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_fragmented_mem()).compareTo(other.is_set_fragmented_mem());
+ lastComparison = java.lang.Boolean.valueOf(is_set_fragmented_mem()).compareTo(other.is_set_fragmented_mem());
if (lastComparison != 0) {
return lastComparison;
}
@@ -998,7 +953,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_fragmented_cpu()).compareTo(other.is_set_fragmented_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_fragmented_cpu()).compareTo(other.is_set_fragmented_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1016,16 +971,16 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SupervisorSummary(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SupervisorSummary(");
boolean first = true;
sb.append("host:");
@@ -1136,7 +1091,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1146,13 +1101,13 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
}
- private static class SupervisorSummaryStandardSchemeFactory implements SchemeFactory {
+ private static class SupervisorSummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SupervisorSummaryStandardScheme getScheme() {
return new SupervisorSummaryStandardScheme();
}
}
- private static class SupervisorSummaryStandardScheme extends StandardScheme<SupervisorSummary> {
+ private static class SupervisorSummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<SupervisorSummary> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SupervisorSummary struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1216,8 +1171,8 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map126 = iprot.readMapBegin();
- struct.total_resources = new HashMap<String,Double>(2*_map126.size);
- String _key127;
+ struct.total_resources = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map126.size);
+ java.lang.String _key127;
double _val128;
for (int _i129 = 0; _i129 < _map126.size; ++_i129)
{
@@ -1308,7 +1263,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
oprot.writeFieldBegin(TOTAL_RESOURCES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, struct.total_resources.size()));
- for (Map.Entry<String, Double> _iter130 : struct.total_resources.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter130 : struct.total_resources.entrySet())
{
oprot.writeString(_iter130.getKey());
oprot.writeDouble(_iter130.getValue());
@@ -1344,23 +1299,23 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
- private static class SupervisorSummaryTupleSchemeFactory implements SchemeFactory {
+ private static class SupervisorSummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SupervisorSummaryTupleScheme getScheme() {
return new SupervisorSummaryTupleScheme();
}
}
- private static class SupervisorSummaryTupleScheme extends TupleScheme<SupervisorSummary> {
+ private static class SupervisorSummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<SupervisorSummary> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SupervisorSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.host);
oprot.writeI32(struct.uptime_secs);
oprot.writeI32(struct.num_workers);
oprot.writeI32(struct.num_used_workers);
oprot.writeString(struct.supervisor_id);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_version()) {
optionals.set(0);
}
@@ -1386,7 +1341,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (struct.is_set_total_resources()) {
{
oprot.writeI32(struct.total_resources.size());
- for (Map.Entry<String, Double> _iter131 : struct.total_resources.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter131 : struct.total_resources.entrySet())
{
oprot.writeString(_iter131.getKey());
oprot.writeDouble(_iter131.getValue());
@@ -1409,7 +1364,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SupervisorSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.host = iprot.readString();
struct.set_host_isSet(true);
struct.uptime_secs = iprot.readI32();
@@ -1420,7 +1375,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
struct.set_num_used_workers_isSet(true);
struct.supervisor_id = iprot.readString();
struct.set_supervisor_id_isSet(true);
- BitSet incoming = iprot.readBitSet(6);
+ java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.version = iprot.readString();
struct.set_version_isSet(true);
@@ -1428,8 +1383,8 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map132 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- struct.total_resources = new HashMap<String,Double>(2*_map132.size);
- String _key133;
+ struct.total_resources = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map132.size);
+ java.lang.String _key133;
double _val134;
for (int _i135 = 0; _i135 < _map132.size; ++_i135)
{
@@ -1459,5 +1414,8 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SupervisorWorkerHeartbeat.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SupervisorWorkerHeartbeat.java b/storm-client/src/jvm/org/apache/storm/generated/SupervisorWorkerHeartbeat.java
index 0d5c65f..caa12af 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SupervisorWorkerHeartbeat.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SupervisorWorkerHeartbeat.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<SupervisorWorkerHeartbeat, SupervisorWorkerHeartbeat._Fields>, java.io.Serializable, Cloneable, Comparable<SupervisorWorkerHeartbeat> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SupervisorWorkerHeartbeat");
@@ -59,14 +32,11 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
private static final org.apache.thrift.protocol.TField EXECUTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("executors", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField TIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("time_secs", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SupervisorWorkerHeartbeatStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SupervisorWorkerHeartbeatTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SupervisorWorkerHeartbeatStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SupervisorWorkerHeartbeatTupleSchemeFactory();
- private String storm_id; // required
- private List<ExecutorInfo> executors; // required
+ private java.lang.String storm_id; // required
+ private java.util.List<ExecutorInfo> executors; // required
private int time_secs; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -75,10 +45,10 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
EXECUTORS((short)2, "executors"),
TIME_SECS((short)3, "time_secs");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -105,21 +75,21 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -128,7 +98,7 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -136,9 +106,9 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
// isset id assignments
private static final int __TIME_SECS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.STORM_ID, new org.apache.thrift.meta_data.FieldMetaData("storm_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXECUTORS, new org.apache.thrift.meta_data.FieldMetaData("executors", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -146,7 +116,7 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutorInfo.class))));
tmpMap.put(_Fields.TIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("time_secs", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SupervisorWorkerHeartbeat.class, metaDataMap);
}
@@ -154,8 +124,8 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
}
public SupervisorWorkerHeartbeat(
- String storm_id,
- List<ExecutorInfo> executors,
+ java.lang.String storm_id,
+ java.util.List<ExecutorInfo> executors,
int time_secs)
{
this();
@@ -174,7 +144,7 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
this.storm_id = other.storm_id;
}
if (other.is_set_executors()) {
- List<ExecutorInfo> __this__executors = new ArrayList<ExecutorInfo>(other.executors.size());
+ java.util.List<ExecutorInfo> __this__executors = new java.util.ArrayList<ExecutorInfo>(other.executors.size());
for (ExecutorInfo other_element : other.executors) {
__this__executors.add(new ExecutorInfo(other_element));
}
@@ -195,11 +165,11 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
this.time_secs = 0;
}
- public String get_storm_id() {
+ public java.lang.String get_storm_id() {
return this.storm_id;
}
- public void set_storm_id(String storm_id) {
+ public void set_storm_id(java.lang.String storm_id) {
this.storm_id = storm_id;
}
@@ -228,16 +198,16 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
public void add_to_executors(ExecutorInfo elem) {
if (this.executors == null) {
- this.executors = new ArrayList<ExecutorInfo>();
+ this.executors = new java.util.ArrayList<ExecutorInfo>();
}
this.executors.add(elem);
}
- public List<ExecutorInfo> get_executors() {
+ public java.util.List<ExecutorInfo> get_executors() {
return this.executors;
}
- public void set_executors(List<ExecutorInfo> executors) {
+ public void set_executors(java.util.List<ExecutorInfo> executors) {
this.executors = executors;
}
@@ -266,25 +236,25 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
}
public void unset_time_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
}
/** Returns true if field time_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_time_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
}
public void set_time_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_SECS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case STORM_ID:
if (value == null) {
unset_storm_id();
} else {
- set_storm_id((String)value);
+ set_storm_id((java.lang.String)value);
}
break;
@@ -292,7 +262,7 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
if (value == null) {
unset_executors();
} else {
- set_executors((List<ExecutorInfo>)value);
+ set_executors((java.util.List<ExecutorInfo>)value);
}
break;
@@ -300,14 +270,14 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
if (value == null) {
unset_time_secs();
} else {
- set_time_secs((Integer)value);
+ set_time_secs((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case STORM_ID:
return get_storm_id();
@@ -319,13 +289,13 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
return get_time_secs();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -336,11 +306,11 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
case TIME_SECS:
return is_set_time_secs();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof SupervisorWorkerHeartbeat)
@@ -351,6 +321,8 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
public boolean equals(SupervisorWorkerHeartbeat that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_storm_id = true && this.is_set_storm_id();
boolean that_present_storm_id = true && that.is_set_storm_id();
@@ -384,24 +356,19 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_storm_id = true && (is_set_storm_id());
- list.add(present_storm_id);
- if (present_storm_id)
- list.add(storm_id);
+ hashCode = hashCode * 8191 + ((is_set_storm_id()) ? 131071 : 524287);
+ if (is_set_storm_id())
+ hashCode = hashCode * 8191 + storm_id.hashCode();
- boolean present_executors = true && (is_set_executors());
- list.add(present_executors);
- if (present_executors)
- list.add(executors);
+ hashCode = hashCode * 8191 + ((is_set_executors()) ? 131071 : 524287);
+ if (is_set_executors())
+ hashCode = hashCode * 8191 + executors.hashCode();
- boolean present_time_secs = true;
- list.add(present_time_secs);
- if (present_time_secs)
- list.add(time_secs);
+ hashCode = hashCode * 8191 + time_secs;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -412,7 +379,7 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_storm_id()).compareTo(other.is_set_storm_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_storm_id()).compareTo(other.is_set_storm_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -422,7 +389,7 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -432,7 +399,7 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -450,16 +417,16 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SupervisorWorkerHeartbeat(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SupervisorWorkerHeartbeat(");
boolean first = true;
sb.append("storm_id:");
@@ -510,7 +477,7 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -520,13 +487,13 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
}
}
- private static class SupervisorWorkerHeartbeatStandardSchemeFactory implements SchemeFactory {
+ private static class SupervisorWorkerHeartbeatStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SupervisorWorkerHeartbeatStandardScheme getScheme() {
return new SupervisorWorkerHeartbeatStandardScheme();
}
}
- private static class SupervisorWorkerHeartbeatStandardScheme extends StandardScheme<SupervisorWorkerHeartbeat> {
+ private static class SupervisorWorkerHeartbeatStandardScheme extends org.apache.thrift.scheme.StandardScheme<SupervisorWorkerHeartbeat> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SupervisorWorkerHeartbeat struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -550,7 +517,7 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list870 = iprot.readListBegin();
- struct.executors = new ArrayList<ExecutorInfo>(_list870.size);
+ struct.executors = new java.util.ArrayList<ExecutorInfo>(_list870.size);
ExecutorInfo _elem871;
for (int _i872 = 0; _i872 < _list870.size; ++_i872)
{
@@ -612,17 +579,17 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
}
- private static class SupervisorWorkerHeartbeatTupleSchemeFactory implements SchemeFactory {
+ private static class SupervisorWorkerHeartbeatTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SupervisorWorkerHeartbeatTupleScheme getScheme() {
return new SupervisorWorkerHeartbeatTupleScheme();
}
}
- private static class SupervisorWorkerHeartbeatTupleScheme extends TupleScheme<SupervisorWorkerHeartbeat> {
+ private static class SupervisorWorkerHeartbeatTupleScheme extends org.apache.thrift.scheme.TupleScheme<SupervisorWorkerHeartbeat> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SupervisorWorkerHeartbeat struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.storm_id);
{
oprot.writeI32(struct.executors.size());
@@ -636,12 +603,12 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SupervisorWorkerHeartbeat struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.storm_id = iprot.readString();
struct.set_storm_id_isSet(true);
{
org.apache.thrift.protocol.TList _list875 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.executors = new ArrayList<ExecutorInfo>(_list875.size);
+ struct.executors = new java.util.ArrayList<ExecutorInfo>(_list875.size);
ExecutorInfo _elem876;
for (int _i877 = 0; _i877 < _list875.size; ++_i877)
{
@@ -656,5 +623,8 @@ public class SupervisorWorkerHeartbeat implements org.apache.thrift.TBase<Superv
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[04/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/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 603b628..280c42b 100644
--- a/storm-client/src/py/storm/Nimbus-remote
+++ b/storm-client/src/py/storm/Nimbus-remote
@@ -18,7 +18,7 @@
#!/usr/bin/env python
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
@@ -27,429 +27,452 @@
import sys
import pprint
-from urlparse import urlparse
-from thrift.transport import TTransport
-from thrift.transport import TSocket
-from thrift.transport import TSSLSocket
-from thrift.transport import THttpClient
-from thrift.protocol import TBinaryProtocol
+if sys.version_info[0] > 2:
+ from urllib.parse import urlparse
+else:
+ from urlparse import urlparse
+from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
+from thrift.protocol.TBinaryProtocol import TBinaryProtocol
from storm import Nimbus
from storm.ttypes import *
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
- print('')
- print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] function [arg1 [arg2...]]')
- print('')
- print('Functions:')
- print(' void submitTopology(string name, string uploadedJarLocation, string jsonConf, StormTopology topology)')
- print(' void submitTopologyWithOpts(string name, string uploadedJarLocation, string jsonConf, StormTopology topology, SubmitOptions options)')
- print(' void killTopology(string name)')
- print(' void killTopologyWithOpts(string name, KillOptions options)')
- print(' void activate(string name)')
- print(' void deactivate(string name)')
- print(' void rebalance(string name, RebalanceOptions options)')
- print(' void setLogConfig(string name, LogConfig config)')
- print(' LogConfig getLogConfig(string name)')
- print(' void debug(string name, string component, bool enable, double samplingPercentage)')
- print(' void setWorkerProfiler(string id, ProfileRequest profileRequest)')
- print(' getComponentPendingProfileActions(string id, string component_id, ProfileAction action)')
- print(' void uploadNewCredentials(string name, Credentials creds)')
- print(' string beginCreateBlob(string key, SettableBlobMeta meta)')
- print(' string beginUpdateBlob(string key)')
- print(' void uploadBlobChunk(string session, string chunk)')
- print(' void finishBlobUpload(string session)')
- print(' void cancelBlobUpload(string session)')
- print(' ReadableBlobMeta getBlobMeta(string key)')
- print(' void setBlobMeta(string key, SettableBlobMeta meta)')
- print(' BeginDownloadResult beginBlobDownload(string key)')
- print(' string downloadBlobChunk(string session)')
- print(' void deleteBlob(string key)')
- print(' ListBlobsResult listBlobs(string session)')
- print(' i32 getBlobReplication(string key)')
- print(' i32 updateBlobReplication(string key, i32 replication)')
- print(' void createStateInZookeeper(string key)')
- print(' string beginFileUpload()')
- print(' void uploadChunk(string location, string chunk)')
- print(' void finishFileUpload(string location)')
- print(' string beginFileDownload(string file)')
- print(' string downloadChunk(string id)')
- print(' string getNimbusConf()')
- print(' ClusterSummary getClusterInfo()')
- print(' NimbusSummary getLeader()')
- print(' bool isTopologyNameAllowed(string name)')
- print(' TopologyInfo getTopologyInfo(string id)')
- print(' TopologyInfo getTopologyInfoWithOpts(string id, GetInfoOptions options)')
- print(' TopologyPageInfo getTopologyPageInfo(string id, string window, bool is_include_sys)')
- print(' SupervisorPageInfo getSupervisorPageInfo(string id, string host, bool is_include_sys)')
- print(' ComponentPageInfo getComponentPageInfo(string topology_id, string component_id, string window, bool is_include_sys)')
- print(' string getTopologyConf(string id)')
- print(' StormTopology getTopology(string id)')
- print(' StormTopology getUserTopology(string id)')
- print(' TopologyHistoryInfo getTopologyHistory(string user)')
- print(' getOwnerResourceSummaries(string owner)')
- print(' SupervisorAssignments getSupervisorAssignments(string node)')
- print(' void sendSupervisorWorkerHeartbeats(SupervisorWorkerHeartbeats heartbeats)')
- print(' void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat)')
- print(' void processWorkerMetrics(WorkerMetrics metrics)')
- print('')
- sys.exit(0)
-
-pp = pprint.PrettyPrinter(indent = 2)
+ print('')
+ print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
+ print('')
+ print('Functions:')
+ print(' void submitTopology(string name, string uploadedJarLocation, string jsonConf, StormTopology topology)')
+ print(' void submitTopologyWithOpts(string name, string uploadedJarLocation, string jsonConf, StormTopology topology, SubmitOptions options)')
+ print(' void killTopology(string name)')
+ print(' void killTopologyWithOpts(string name, KillOptions options)')
+ print(' void activate(string name)')
+ print(' void deactivate(string name)')
+ print(' void rebalance(string name, RebalanceOptions options)')
+ print(' void setLogConfig(string name, LogConfig config)')
+ print(' LogConfig getLogConfig(string name)')
+ print(' void debug(string name, string component, bool enable, double samplingPercentage)')
+ print(' void setWorkerProfiler(string id, ProfileRequest profileRequest)')
+ print(' getComponentPendingProfileActions(string id, string component_id, ProfileAction action)')
+ print(' void uploadNewCredentials(string name, Credentials creds)')
+ print(' string beginCreateBlob(string key, SettableBlobMeta meta)')
+ print(' string beginUpdateBlob(string key)')
+ print(' void uploadBlobChunk(string session, string chunk)')
+ print(' void finishBlobUpload(string session)')
+ print(' void cancelBlobUpload(string session)')
+ print(' ReadableBlobMeta getBlobMeta(string key)')
+ print(' void setBlobMeta(string key, SettableBlobMeta meta)')
+ print(' BeginDownloadResult beginBlobDownload(string key)')
+ print(' string downloadBlobChunk(string session)')
+ print(' void deleteBlob(string key)')
+ print(' ListBlobsResult listBlobs(string session)')
+ print(' i32 getBlobReplication(string key)')
+ print(' i32 updateBlobReplication(string key, i32 replication)')
+ print(' void createStateInZookeeper(string key)')
+ print(' string beginFileUpload()')
+ print(' void uploadChunk(string location, string chunk)')
+ print(' void finishFileUpload(string location)')
+ print(' string beginFileDownload(string file)')
+ print(' string downloadChunk(string id)')
+ print(' string getNimbusConf()')
+ print(' ClusterSummary getClusterInfo()')
+ print(' NimbusSummary getLeader()')
+ print(' bool isTopologyNameAllowed(string name)')
+ print(' TopologyInfo getTopologyInfo(string id)')
+ print(' TopologyInfo getTopologyInfoWithOpts(string id, GetInfoOptions options)')
+ print(' TopologyPageInfo getTopologyPageInfo(string id, string window, bool is_include_sys)')
+ print(' SupervisorPageInfo getSupervisorPageInfo(string id, string host, bool is_include_sys)')
+ print(' ComponentPageInfo getComponentPageInfo(string topology_id, string component_id, string window, bool is_include_sys)')
+ print(' string getTopologyConf(string id)')
+ print(' StormTopology getTopology(string id)')
+ print(' StormTopology getUserTopology(string id)')
+ print(' TopologyHistoryInfo getTopologyHistory(string user)')
+ print(' getOwnerResourceSummaries(string owner)')
+ print(' SupervisorAssignments getSupervisorAssignments(string node)')
+ print(' void sendSupervisorWorkerHeartbeats(SupervisorWorkerHeartbeats heartbeats)')
+ print(' void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat)')
+ print(' void processWorkerMetrics(WorkerMetrics metrics)')
+ print('')
+ sys.exit(0)
+
+pp = pprint.PrettyPrinter(indent=2)
host = 'localhost'
port = 9090
uri = ''
framed = False
ssl = False
+validate = True
+ca_certs = None
+keyfile = None
+certfile = None
http = False
argi = 1
if sys.argv[argi] == '-h':
- parts = sys.argv[argi+1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- argi += 2
+ parts = sys.argv[argi + 1].split(':')
+ host = parts[0]
+ if len(parts) > 1:
+ port = int(parts[1])
+ argi += 2
if sys.argv[argi] == '-u':
- url = urlparse(sys.argv[argi+1])
- parts = url[1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- else:
- port = 80
- uri = url[2]
- if url[4]:
- uri += '?%s' % url[4]
- http = True
- argi += 2
+ url = urlparse(sys.argv[argi + 1])
+ parts = url[1].split(':')
+ host = parts[0]
+ if len(parts) > 1:
+ port = int(parts[1])
+ else:
+ port = 80
+ uri = url[2]
+ if url[4]:
+ uri += '?%s' % url[4]
+ http = True
+ argi += 2
if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
- framed = True
- argi += 1
+ framed = True
+ argi += 1
if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl':
- ssl = True
- argi += 1
+ ssl = True
+ argi += 1
+
+if sys.argv[argi] == '-novalidate':
+ validate = False
+ argi += 1
+
+if sys.argv[argi] == '-ca_certs':
+ ca_certs = sys.argv[argi+1]
+ argi += 2
+
+if sys.argv[argi] == '-keyfile':
+ keyfile = sys.argv[argi+1]
+ argi += 2
+
+if sys.argv[argi] == '-certfile':
+ certfile = sys.argv[argi+1]
+ argi += 2
cmd = sys.argv[argi]
-args = sys.argv[argi+1:]
+args = sys.argv[argi + 1:]
if http:
- transport = THttpClient.THttpClient(host, port, uri)
+ transport = THttpClient.THttpClient(host, port, uri)
else:
- socket = TSSLSocket.TSSLSocket(host, port, validate=False) if ssl else TSocket.TSocket(host, port)
- if framed:
- transport = TTransport.TFramedTransport(socket)
- else:
- transport = TTransport.TBufferedTransport(socket)
-protocol = TBinaryProtocol.TBinaryProtocol(transport)
+ if ssl:
+ socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile)
+ else:
+ socket = TSocket.TSocket(host, port)
+ if framed:
+ transport = TTransport.TFramedTransport(socket)
+ else:
+ transport = TTransport.TBufferedTransport(socket)
+protocol = TBinaryProtocol(transport)
client = Nimbus.Client(protocol)
transport.open()
if cmd == 'submitTopology':
- if len(args) != 4:
- print('submitTopology requires 4 args')
- sys.exit(1)
- pp.pprint(client.submitTopology(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('submitTopology requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.submitTopology(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'submitTopologyWithOpts':
- if len(args) != 5:
- print('submitTopologyWithOpts requires 5 args')
- sys.exit(1)
- pp.pprint(client.submitTopologyWithOpts(args[0],args[1],args[2],eval(args[3]),eval(args[4]),))
+ if len(args) != 5:
+ print('submitTopologyWithOpts requires 5 args')
+ sys.exit(1)
+ pp.pprint(client.submitTopologyWithOpts(args[0], args[1], args[2], eval(args[3]), eval(args[4]),))
elif cmd == 'killTopology':
- if len(args) != 1:
- print('killTopology requires 1 args')
- sys.exit(1)
- pp.pprint(client.killTopology(args[0],))
+ if len(args) != 1:
+ print('killTopology requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.killTopology(args[0],))
elif cmd == 'killTopologyWithOpts':
- if len(args) != 2:
- print('killTopologyWithOpts requires 2 args')
- sys.exit(1)
- pp.pprint(client.killTopologyWithOpts(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('killTopologyWithOpts requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.killTopologyWithOpts(args[0], eval(args[1]),))
elif cmd == 'activate':
- if len(args) != 1:
- print('activate requires 1 args')
- sys.exit(1)
- pp.pprint(client.activate(args[0],))
+ if len(args) != 1:
+ print('activate requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.activate(args[0],))
elif cmd == 'deactivate':
- if len(args) != 1:
- print('deactivate requires 1 args')
- sys.exit(1)
- pp.pprint(client.deactivate(args[0],))
+ if len(args) != 1:
+ print('deactivate requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.deactivate(args[0],))
elif cmd == 'rebalance':
- if len(args) != 2:
- print('rebalance requires 2 args')
- sys.exit(1)
- pp.pprint(client.rebalance(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('rebalance requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.rebalance(args[0], eval(args[1]),))
elif cmd == 'setLogConfig':
- if len(args) != 2:
- print('setLogConfig requires 2 args')
- sys.exit(1)
- pp.pprint(client.setLogConfig(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('setLogConfig requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.setLogConfig(args[0], eval(args[1]),))
elif cmd == 'getLogConfig':
- if len(args) != 1:
- print('getLogConfig requires 1 args')
- sys.exit(1)
- pp.pprint(client.getLogConfig(args[0],))
+ if len(args) != 1:
+ print('getLogConfig requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getLogConfig(args[0],))
elif cmd == 'debug':
- if len(args) != 4:
- print('debug requires 4 args')
- sys.exit(1)
- pp.pprint(client.debug(args[0],args[1],eval(args[2]),eval(args[3]),))
+ if len(args) != 4:
+ print('debug requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.debug(args[0], args[1], eval(args[2]), eval(args[3]),))
elif cmd == 'setWorkerProfiler':
- if len(args) != 2:
- print('setWorkerProfiler requires 2 args')
- sys.exit(1)
- pp.pprint(client.setWorkerProfiler(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('setWorkerProfiler requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.setWorkerProfiler(args[0], eval(args[1]),))
elif cmd == 'getComponentPendingProfileActions':
- if len(args) != 3:
- print('getComponentPendingProfileActions requires 3 args')
- sys.exit(1)
- pp.pprint(client.getComponentPendingProfileActions(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('getComponentPendingProfileActions requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.getComponentPendingProfileActions(args[0], args[1], eval(args[2]),))
elif cmd == 'uploadNewCredentials':
- if len(args) != 2:
- print('uploadNewCredentials requires 2 args')
- sys.exit(1)
- pp.pprint(client.uploadNewCredentials(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('uploadNewCredentials requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.uploadNewCredentials(args[0], eval(args[1]),))
elif cmd == 'beginCreateBlob':
- if len(args) != 2:
- print('beginCreateBlob requires 2 args')
- sys.exit(1)
- pp.pprint(client.beginCreateBlob(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('beginCreateBlob requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.beginCreateBlob(args[0], eval(args[1]),))
elif cmd == 'beginUpdateBlob':
- if len(args) != 1:
- print('beginUpdateBlob requires 1 args')
- sys.exit(1)
- pp.pprint(client.beginUpdateBlob(args[0],))
+ if len(args) != 1:
+ print('beginUpdateBlob requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.beginUpdateBlob(args[0],))
elif cmd == 'uploadBlobChunk':
- if len(args) != 2:
- print('uploadBlobChunk requires 2 args')
- sys.exit(1)
- pp.pprint(client.uploadBlobChunk(args[0],args[1],))
+ if len(args) != 2:
+ print('uploadBlobChunk requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.uploadBlobChunk(args[0], args[1],))
elif cmd == 'finishBlobUpload':
- if len(args) != 1:
- print('finishBlobUpload requires 1 args')
- sys.exit(1)
- pp.pprint(client.finishBlobUpload(args[0],))
+ if len(args) != 1:
+ print('finishBlobUpload requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.finishBlobUpload(args[0],))
elif cmd == 'cancelBlobUpload':
- if len(args) != 1:
- print('cancelBlobUpload requires 1 args')
- sys.exit(1)
- pp.pprint(client.cancelBlobUpload(args[0],))
+ if len(args) != 1:
+ print('cancelBlobUpload requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.cancelBlobUpload(args[0],))
elif cmd == 'getBlobMeta':
- if len(args) != 1:
- print('getBlobMeta requires 1 args')
- sys.exit(1)
- pp.pprint(client.getBlobMeta(args[0],))
+ if len(args) != 1:
+ print('getBlobMeta requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getBlobMeta(args[0],))
elif cmd == 'setBlobMeta':
- if len(args) != 2:
- print('setBlobMeta requires 2 args')
- sys.exit(1)
- pp.pprint(client.setBlobMeta(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('setBlobMeta requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.setBlobMeta(args[0], eval(args[1]),))
elif cmd == 'beginBlobDownload':
- if len(args) != 1:
- print('beginBlobDownload requires 1 args')
- sys.exit(1)
- pp.pprint(client.beginBlobDownload(args[0],))
+ if len(args) != 1:
+ print('beginBlobDownload requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.beginBlobDownload(args[0],))
elif cmd == 'downloadBlobChunk':
- if len(args) != 1:
- print('downloadBlobChunk requires 1 args')
- sys.exit(1)
- pp.pprint(client.downloadBlobChunk(args[0],))
+ if len(args) != 1:
+ print('downloadBlobChunk requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.downloadBlobChunk(args[0],))
elif cmd == 'deleteBlob':
- if len(args) != 1:
- print('deleteBlob requires 1 args')
- sys.exit(1)
- pp.pprint(client.deleteBlob(args[0],))
+ if len(args) != 1:
+ print('deleteBlob requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.deleteBlob(args[0],))
elif cmd == 'listBlobs':
- if len(args) != 1:
- print('listBlobs requires 1 args')
- sys.exit(1)
- pp.pprint(client.listBlobs(args[0],))
+ if len(args) != 1:
+ print('listBlobs requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.listBlobs(args[0],))
elif cmd == 'getBlobReplication':
- if len(args) != 1:
- print('getBlobReplication requires 1 args')
- sys.exit(1)
- pp.pprint(client.getBlobReplication(args[0],))
+ if len(args) != 1:
+ print('getBlobReplication requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getBlobReplication(args[0],))
elif cmd == 'updateBlobReplication':
- if len(args) != 2:
- print('updateBlobReplication requires 2 args')
- sys.exit(1)
- pp.pprint(client.updateBlobReplication(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('updateBlobReplication requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.updateBlobReplication(args[0], eval(args[1]),))
elif cmd == 'createStateInZookeeper':
- if len(args) != 1:
- print('createStateInZookeeper requires 1 args')
- sys.exit(1)
- pp.pprint(client.createStateInZookeeper(args[0],))
+ if len(args) != 1:
+ print('createStateInZookeeper requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.createStateInZookeeper(args[0],))
elif cmd == 'beginFileUpload':
- if len(args) != 0:
- print('beginFileUpload requires 0 args')
- sys.exit(1)
- pp.pprint(client.beginFileUpload())
+ if len(args) != 0:
+ print('beginFileUpload requires 0 args')
+ sys.exit(1)
+ pp.pprint(client.beginFileUpload())
elif cmd == 'uploadChunk':
- if len(args) != 2:
- print('uploadChunk requires 2 args')
- sys.exit(1)
- pp.pprint(client.uploadChunk(args[0],args[1],))
+ if len(args) != 2:
+ print('uploadChunk requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.uploadChunk(args[0], args[1],))
elif cmd == 'finishFileUpload':
- if len(args) != 1:
- print('finishFileUpload requires 1 args')
- sys.exit(1)
- pp.pprint(client.finishFileUpload(args[0],))
+ if len(args) != 1:
+ print('finishFileUpload requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.finishFileUpload(args[0],))
elif cmd == 'beginFileDownload':
- if len(args) != 1:
- print('beginFileDownload requires 1 args')
- sys.exit(1)
- pp.pprint(client.beginFileDownload(args[0],))
+ if len(args) != 1:
+ print('beginFileDownload requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.beginFileDownload(args[0],))
elif cmd == 'downloadChunk':
- if len(args) != 1:
- print('downloadChunk requires 1 args')
- sys.exit(1)
- pp.pprint(client.downloadChunk(args[0],))
+ if len(args) != 1:
+ print('downloadChunk requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.downloadChunk(args[0],))
elif cmd == 'getNimbusConf':
- if len(args) != 0:
- print('getNimbusConf requires 0 args')
- sys.exit(1)
- pp.pprint(client.getNimbusConf())
+ if len(args) != 0:
+ print('getNimbusConf requires 0 args')
+ sys.exit(1)
+ pp.pprint(client.getNimbusConf())
elif cmd == 'getClusterInfo':
- if len(args) != 0:
- print('getClusterInfo requires 0 args')
- sys.exit(1)
- pp.pprint(client.getClusterInfo())
+ if len(args) != 0:
+ print('getClusterInfo requires 0 args')
+ sys.exit(1)
+ pp.pprint(client.getClusterInfo())
elif cmd == 'getLeader':
- if len(args) != 0:
- print('getLeader requires 0 args')
- sys.exit(1)
- pp.pprint(client.getLeader())
+ if len(args) != 0:
+ print('getLeader requires 0 args')
+ sys.exit(1)
+ pp.pprint(client.getLeader())
elif cmd == 'isTopologyNameAllowed':
- if len(args) != 1:
- print('isTopologyNameAllowed requires 1 args')
- sys.exit(1)
- pp.pprint(client.isTopologyNameAllowed(args[0],))
+ if len(args) != 1:
+ print('isTopologyNameAllowed requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.isTopologyNameAllowed(args[0],))
elif cmd == 'getTopologyInfo':
- if len(args) != 1:
- print('getTopologyInfo requires 1 args')
- sys.exit(1)
- pp.pprint(client.getTopologyInfo(args[0],))
+ if len(args) != 1:
+ print('getTopologyInfo requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getTopologyInfo(args[0],))
elif cmd == 'getTopologyInfoWithOpts':
- if len(args) != 2:
- print('getTopologyInfoWithOpts requires 2 args')
- sys.exit(1)
- pp.pprint(client.getTopologyInfoWithOpts(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('getTopologyInfoWithOpts requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.getTopologyInfoWithOpts(args[0], eval(args[1]),))
elif cmd == 'getTopologyPageInfo':
- if len(args) != 3:
- print('getTopologyPageInfo requires 3 args')
- sys.exit(1)
- pp.pprint(client.getTopologyPageInfo(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('getTopologyPageInfo requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.getTopologyPageInfo(args[0], args[1], eval(args[2]),))
elif cmd == 'getSupervisorPageInfo':
- if len(args) != 3:
- print('getSupervisorPageInfo requires 3 args')
- sys.exit(1)
- pp.pprint(client.getSupervisorPageInfo(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('getSupervisorPageInfo requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.getSupervisorPageInfo(args[0], args[1], eval(args[2]),))
elif cmd == 'getComponentPageInfo':
- if len(args) != 4:
- print('getComponentPageInfo requires 4 args')
- sys.exit(1)
- pp.pprint(client.getComponentPageInfo(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('getComponentPageInfo requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.getComponentPageInfo(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'getTopologyConf':
- if len(args) != 1:
- print('getTopologyConf requires 1 args')
- sys.exit(1)
- pp.pprint(client.getTopologyConf(args[0],))
+ if len(args) != 1:
+ print('getTopologyConf requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getTopologyConf(args[0],))
elif cmd == 'getTopology':
- if len(args) != 1:
- print('getTopology requires 1 args')
- sys.exit(1)
- pp.pprint(client.getTopology(args[0],))
+ if len(args) != 1:
+ print('getTopology requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getTopology(args[0],))
elif cmd == 'getUserTopology':
- if len(args) != 1:
- print('getUserTopology requires 1 args')
- sys.exit(1)
- pp.pprint(client.getUserTopology(args[0],))
+ if len(args) != 1:
+ print('getUserTopology requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getUserTopology(args[0],))
elif cmd == 'getTopologyHistory':
- if len(args) != 1:
- print('getTopologyHistory requires 1 args')
- sys.exit(1)
- pp.pprint(client.getTopologyHistory(args[0],))
+ if len(args) != 1:
+ print('getTopologyHistory requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getTopologyHistory(args[0],))
elif cmd == 'getOwnerResourceSummaries':
- if len(args) != 1:
- print('getOwnerResourceSummaries requires 1 args')
- sys.exit(1)
- pp.pprint(client.getOwnerResourceSummaries(args[0],))
+ if len(args) != 1:
+ print('getOwnerResourceSummaries requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getOwnerResourceSummaries(args[0],))
elif cmd == 'getSupervisorAssignments':
- if len(args) != 1:
- print('getSupervisorAssignments requires 1 args')
- sys.exit(1)
- pp.pprint(client.getSupervisorAssignments(args[0],))
+ if len(args) != 1:
+ print('getSupervisorAssignments requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getSupervisorAssignments(args[0],))
elif cmd == 'sendSupervisorWorkerHeartbeats':
- if len(args) != 1:
- print('sendSupervisorWorkerHeartbeats requires 1 args')
- sys.exit(1)
- pp.pprint(client.sendSupervisorWorkerHeartbeats(eval(args[0]),))
+ if len(args) != 1:
+ print('sendSupervisorWorkerHeartbeats requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.sendSupervisorWorkerHeartbeats(eval(args[0]),))
elif cmd == 'sendSupervisorWorkerHeartbeat':
- if len(args) != 1:
- print('sendSupervisorWorkerHeartbeat requires 1 args')
- sys.exit(1)
- pp.pprint(client.sendSupervisorWorkerHeartbeat(eval(args[0]),))
+ if len(args) != 1:
+ print('sendSupervisorWorkerHeartbeat requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.sendSupervisorWorkerHeartbeat(eval(args[0]),))
elif cmd == 'processWorkerMetrics':
- if len(args) != 1:
- print('processWorkerMetrics requires 1 args')
- sys.exit(1)
- pp.pprint(client.processWorkerMetrics(eval(args[0]),))
+ if len(args) != 1:
+ print('processWorkerMetrics requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.processWorkerMetrics(eval(args[0]),))
else:
- print('Unrecognized method %s' % cmd)
- sys.exit(1)
+ print('Unrecognized method %s' % cmd)
+ sys.exit(1)
transport.close()
[12/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/SupervisorWorkerHeartbeats.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/SupervisorWorkerHeartbeats.java b/storm-client/src/jvm/org/apache/storm/generated/SupervisorWorkerHeartbeats.java
index 2856869..bc10f7f 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/SupervisorWorkerHeartbeats.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/SupervisorWorkerHeartbeats.java
@@ -16,66 +16,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<SupervisorWorkerHeartbeats, SupervisorWorkerHeartbeats._Fields>, java.io.Serializable, Cloneable, Comparable<SupervisorWorkerHeartbeats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SupervisorWorkerHeartbeats");
private static final org.apache.thrift.protocol.TField SUPERVISOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("supervisor_id", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField WORKER_HEARTBEATS_FIELD_DESC = new org.apache.thrift.protocol.TField("worker_heartbeats", org.apache.thrift.protocol.TType.LIST, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SupervisorWorkerHeartbeatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SupervisorWorkerHeartbeatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SupervisorWorkerHeartbeatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SupervisorWorkerHeartbeatsTupleSchemeFactory();
- private String supervisor_id; // required
- private List<SupervisorWorkerHeartbeat> worker_heartbeats; // required
+ private java.lang.String supervisor_id; // required
+ private java.util.List<SupervisorWorkerHeartbeat> worker_heartbeats; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUPERVISOR_ID((short)1, "supervisor_id"),
WORKER_HEARTBEATS((short)2, "worker_heartbeats");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,21 +93,21 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUPERVISOR_ID, new org.apache.thrift.meta_data.FieldMetaData("supervisor_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.WORKER_HEARTBEATS, new org.apache.thrift.meta_data.FieldMetaData("worker_heartbeats", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SupervisorWorkerHeartbeat.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SupervisorWorkerHeartbeats.class, metaDataMap);
}
@@ -145,8 +115,8 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
}
public SupervisorWorkerHeartbeats(
- String supervisor_id,
- List<SupervisorWorkerHeartbeat> worker_heartbeats)
+ java.lang.String supervisor_id,
+ java.util.List<SupervisorWorkerHeartbeat> worker_heartbeats)
{
this();
this.supervisor_id = supervisor_id;
@@ -161,7 +131,7 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
this.supervisor_id = other.supervisor_id;
}
if (other.is_set_worker_heartbeats()) {
- List<SupervisorWorkerHeartbeat> __this__worker_heartbeats = new ArrayList<SupervisorWorkerHeartbeat>(other.worker_heartbeats.size());
+ java.util.List<SupervisorWorkerHeartbeat> __this__worker_heartbeats = new java.util.ArrayList<SupervisorWorkerHeartbeat>(other.worker_heartbeats.size());
for (SupervisorWorkerHeartbeat other_element : other.worker_heartbeats) {
__this__worker_heartbeats.add(new SupervisorWorkerHeartbeat(other_element));
}
@@ -179,11 +149,11 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
this.worker_heartbeats = null;
}
- public String get_supervisor_id() {
+ public java.lang.String get_supervisor_id() {
return this.supervisor_id;
}
- public void set_supervisor_id(String supervisor_id) {
+ public void set_supervisor_id(java.lang.String supervisor_id) {
this.supervisor_id = supervisor_id;
}
@@ -212,16 +182,16 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
public void add_to_worker_heartbeats(SupervisorWorkerHeartbeat elem) {
if (this.worker_heartbeats == null) {
- this.worker_heartbeats = new ArrayList<SupervisorWorkerHeartbeat>();
+ this.worker_heartbeats = new java.util.ArrayList<SupervisorWorkerHeartbeat>();
}
this.worker_heartbeats.add(elem);
}
- public List<SupervisorWorkerHeartbeat> get_worker_heartbeats() {
+ public java.util.List<SupervisorWorkerHeartbeat> get_worker_heartbeats() {
return this.worker_heartbeats;
}
- public void set_worker_heartbeats(List<SupervisorWorkerHeartbeat> worker_heartbeats) {
+ public void set_worker_heartbeats(java.util.List<SupervisorWorkerHeartbeat> worker_heartbeats) {
this.worker_heartbeats = worker_heartbeats;
}
@@ -240,13 +210,13 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUPERVISOR_ID:
if (value == null) {
unset_supervisor_id();
} else {
- set_supervisor_id((String)value);
+ set_supervisor_id((java.lang.String)value);
}
break;
@@ -254,14 +224,14 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
if (value == null) {
unset_worker_heartbeats();
} else {
- set_worker_heartbeats((List<SupervisorWorkerHeartbeat>)value);
+ set_worker_heartbeats((java.util.List<SupervisorWorkerHeartbeat>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUPERVISOR_ID:
return get_supervisor_id();
@@ -270,13 +240,13 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
return get_worker_heartbeats();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -285,11 +255,11 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
case WORKER_HEARTBEATS:
return is_set_worker_heartbeats();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof SupervisorWorkerHeartbeats)
@@ -300,6 +270,8 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
public boolean equals(SupervisorWorkerHeartbeats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_supervisor_id = true && this.is_set_supervisor_id();
boolean that_present_supervisor_id = true && that.is_set_supervisor_id();
@@ -324,19 +296,17 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_supervisor_id = true && (is_set_supervisor_id());
- list.add(present_supervisor_id);
- if (present_supervisor_id)
- list.add(supervisor_id);
+ hashCode = hashCode * 8191 + ((is_set_supervisor_id()) ? 131071 : 524287);
+ if (is_set_supervisor_id())
+ hashCode = hashCode * 8191 + supervisor_id.hashCode();
- boolean present_worker_heartbeats = true && (is_set_worker_heartbeats());
- list.add(present_worker_heartbeats);
- if (present_worker_heartbeats)
- list.add(worker_heartbeats);
+ hashCode = hashCode * 8191 + ((is_set_worker_heartbeats()) ? 131071 : 524287);
+ if (is_set_worker_heartbeats())
+ hashCode = hashCode * 8191 + worker_heartbeats.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -347,7 +317,7 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_supervisor_id()).compareTo(other.is_set_supervisor_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_supervisor_id()).compareTo(other.is_set_supervisor_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -357,7 +327,7 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_worker_heartbeats()).compareTo(other.is_set_worker_heartbeats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_worker_heartbeats()).compareTo(other.is_set_worker_heartbeats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -375,16 +345,16 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SupervisorWorkerHeartbeats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SupervisorWorkerHeartbeats(");
boolean first = true;
sb.append("supervisor_id:");
@@ -427,7 +397,7 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -435,13 +405,13 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
}
}
- private static class SupervisorWorkerHeartbeatsStandardSchemeFactory implements SchemeFactory {
+ private static class SupervisorWorkerHeartbeatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SupervisorWorkerHeartbeatsStandardScheme getScheme() {
return new SupervisorWorkerHeartbeatsStandardScheme();
}
}
- private static class SupervisorWorkerHeartbeatsStandardScheme extends StandardScheme<SupervisorWorkerHeartbeats> {
+ private static class SupervisorWorkerHeartbeatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<SupervisorWorkerHeartbeats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SupervisorWorkerHeartbeats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -465,7 +435,7 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list878 = iprot.readListBegin();
- struct.worker_heartbeats = new ArrayList<SupervisorWorkerHeartbeat>(_list878.size);
+ struct.worker_heartbeats = new java.util.ArrayList<SupervisorWorkerHeartbeat>(_list878.size);
SupervisorWorkerHeartbeat _elem879;
for (int _i880 = 0; _i880 < _list878.size; ++_i880)
{
@@ -516,17 +486,17 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
}
- private static class SupervisorWorkerHeartbeatsTupleSchemeFactory implements SchemeFactory {
+ private static class SupervisorWorkerHeartbeatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SupervisorWorkerHeartbeatsTupleScheme getScheme() {
return new SupervisorWorkerHeartbeatsTupleScheme();
}
}
- private static class SupervisorWorkerHeartbeatsTupleScheme extends TupleScheme<SupervisorWorkerHeartbeats> {
+ private static class SupervisorWorkerHeartbeatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<SupervisorWorkerHeartbeats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SupervisorWorkerHeartbeats struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.supervisor_id);
{
oprot.writeI32(struct.worker_heartbeats.size());
@@ -539,12 +509,12 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SupervisorWorkerHeartbeats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.supervisor_id = iprot.readString();
struct.set_supervisor_id_isSet(true);
{
org.apache.thrift.protocol.TList _list883 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.worker_heartbeats = new ArrayList<SupervisorWorkerHeartbeat>(_list883.size);
+ struct.worker_heartbeats = new java.util.ArrayList<SupervisorWorkerHeartbeat>(_list883.size);
SupervisorWorkerHeartbeat _elem884;
for (int _i885 = 0; _i885 < _list883.size; ++_i885)
{
@@ -557,5 +527,8 @@ public class SupervisorWorkerHeartbeats implements org.apache.thrift.TBase<Super
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ThriftSerializedObject.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ThriftSerializedObject.java b/storm-client/src/jvm/org/apache/storm/generated/ThriftSerializedObject.java
index 4aee162..8a44842 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ThriftSerializedObject.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ThriftSerializedObject.java
@@ -16,66 +16,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSerializedObject, ThriftSerializedObject._Fields>, java.io.Serializable, Cloneable, Comparable<ThriftSerializedObject> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ThriftSerializedObject");
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField BITS_FIELD_DESC = new org.apache.thrift.protocol.TField("bits", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ThriftSerializedObjectStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ThriftSerializedObjectTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ThriftSerializedObjectStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ThriftSerializedObjectTupleSchemeFactory();
- private String name; // required
- private ByteBuffer bits; // required
+ private java.lang.String name; // required
+ private java.nio.ByteBuffer bits; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
NAME((short)1, "name"),
BITS((short)2, "bits");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,20 +93,20 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.BITS, new org.apache.thrift.meta_data.FieldMetaData("bits", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ThriftSerializedObject.class, metaDataMap);
}
@@ -144,8 +114,8 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
}
public ThriftSerializedObject(
- String name,
- ByteBuffer bits)
+ java.lang.String name,
+ java.nio.ByteBuffer bits)
{
this();
this.name = name;
@@ -174,11 +144,11 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
this.bits = null;
}
- public String get_name() {
+ public java.lang.String get_name() {
return this.name;
}
- public void set_name(String name) {
+ public void set_name(java.lang.String name) {
this.name = name;
}
@@ -202,15 +172,15 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
return bits == null ? null : bits.array();
}
- public ByteBuffer buffer_for_bits() {
+ public java.nio.ByteBuffer buffer_for_bits() {
return org.apache.thrift.TBaseHelper.copyBinary(bits);
}
public void set_bits(byte[] bits) {
- this.bits = bits == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(bits, bits.length));
+ this.bits = bits == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(bits.clone());
}
- public void set_bits(ByteBuffer bits) {
+ public void set_bits(java.nio.ByteBuffer bits) {
this.bits = org.apache.thrift.TBaseHelper.copyBinary(bits);
}
@@ -229,13 +199,13 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case NAME:
if (value == null) {
unset_name();
} else {
- set_name((String)value);
+ set_name((java.lang.String)value);
}
break;
@@ -243,14 +213,18 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
if (value == null) {
unset_bits();
} else {
- set_bits((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ set_bits((byte[])value);
+ } else {
+ set_bits((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NAME:
return get_name();
@@ -259,13 +233,13 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
return get_bits();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -274,11 +248,11 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
case BITS:
return is_set_bits();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ThriftSerializedObject)
@@ -289,6 +263,8 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
public boolean equals(ThriftSerializedObject that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_name = true && this.is_set_name();
boolean that_present_name = true && that.is_set_name();
@@ -313,19 +289,17 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_name = true && (is_set_name());
- list.add(present_name);
- if (present_name)
- list.add(name);
+ hashCode = hashCode * 8191 + ((is_set_name()) ? 131071 : 524287);
+ if (is_set_name())
+ hashCode = hashCode * 8191 + name.hashCode();
- boolean present_bits = true && (is_set_bits());
- list.add(present_bits);
- if (present_bits)
- list.add(bits);
+ hashCode = hashCode * 8191 + ((is_set_bits()) ? 131071 : 524287);
+ if (is_set_bits())
+ hashCode = hashCode * 8191 + bits.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -336,7 +310,7 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
+ lastComparison = java.lang.Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
if (lastComparison != 0) {
return lastComparison;
}
@@ -346,7 +320,7 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_bits()).compareTo(other.is_set_bits());
+ lastComparison = java.lang.Boolean.valueOf(is_set_bits()).compareTo(other.is_set_bits());
if (lastComparison != 0) {
return lastComparison;
}
@@ -364,16 +338,16 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ThriftSerializedObject(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ThriftSerializedObject(");
boolean first = true;
sb.append("name:");
@@ -416,7 +390,7 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -424,13 +398,13 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
}
}
- private static class ThriftSerializedObjectStandardSchemeFactory implements SchemeFactory {
+ private static class ThriftSerializedObjectStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ThriftSerializedObjectStandardScheme getScheme() {
return new ThriftSerializedObjectStandardScheme();
}
}
- private static class ThriftSerializedObjectStandardScheme extends StandardScheme<ThriftSerializedObject> {
+ private static class ThriftSerializedObjectStandardScheme extends org.apache.thrift.scheme.StandardScheme<ThriftSerializedObject> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ThriftSerializedObject struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -487,24 +461,24 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
}
- private static class ThriftSerializedObjectTupleSchemeFactory implements SchemeFactory {
+ private static class ThriftSerializedObjectTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ThriftSerializedObjectTupleScheme getScheme() {
return new ThriftSerializedObjectTupleScheme();
}
}
- private static class ThriftSerializedObjectTupleScheme extends TupleScheme<ThriftSerializedObject> {
+ private static class ThriftSerializedObjectTupleScheme extends org.apache.thrift.scheme.TupleScheme<ThriftSerializedObject> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ThriftSerializedObject struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.name);
oprot.writeBinary(struct.bits);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ThriftSerializedObject struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.name = iprot.readString();
struct.set_name_isSet(true);
struct.bits = iprot.readBinary();
@@ -512,5 +486,8 @@ public class ThriftSerializedObject implements org.apache.thrift.TBase<ThriftSer
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/TopologyActionOptions.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/TopologyActionOptions.java b/storm-client/src/jvm/org/apache/storm/generated/TopologyActionOptions.java
index 1b6b69d..a0755aa 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/TopologyActionOptions.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/TopologyActionOptions.java
@@ -16,41 +16,14 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActionOptions, TopologyActionOptions._Fields> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TopologyActionOptions");
private static final org.apache.thrift.protocol.TField KILL_OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("kill_options", org.apache.thrift.protocol.TType.STRUCT, (short)1);
@@ -61,10 +34,10 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
KILL_OPTIONS((short)1, "kill_options"),
REBALANCE_OPTIONS((short)2, "rebalance_options");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -89,21 +62,21 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -112,19 +85,19 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.KILL_OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("kill_options", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, KillOptions.class)));
tmpMap.put(_Fields.REBALANCE_OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("rebalance_options", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RebalanceOptions.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TopologyActionOptions.class, metaDataMap);
}
@@ -132,7 +105,7 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
super();
}
- public TopologyActionOptions(_Fields setField, Object value) {
+ public TopologyActionOptions(_Fields setField, java.lang.Object value) {
super(setField, value);
}
@@ -157,25 +130,25 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
@Override
- protected void checkType(_Fields setField, Object value) throws ClassCastException {
+ protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException {
switch (setField) {
case KILL_OPTIONS:
if (value instanceof KillOptions) {
break;
}
- throw new ClassCastException("Was expecting value of type KillOptions for field 'kill_options', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type KillOptions for field 'kill_options', but got " + value.getClass().getSimpleName());
case REBALANCE_OPTIONS:
if (value instanceof RebalanceOptions) {
break;
}
- throw new ClassCastException("Was expecting value of type RebalanceOptions for field 'rebalance_options', but got " + value.getClass().getSimpleName());
+ throw new java.lang.ClassCastException("Was expecting value of type RebalanceOptions for field 'rebalance_options', but got " + value.getClass().getSimpleName());
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@Override
- protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
+ protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(field.id);
if (setField != null) {
switch (setField) {
@@ -200,7 +173,7 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
return null;
}
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
@@ -220,12 +193,12 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
rebalance_options.write(oprot);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@Override
- protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
+ protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(fieldID);
if (setField != null) {
switch (setField) {
@@ -240,10 +213,10 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
rebalance_options.read(iprot);
return rebalance_options;
default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
- throw new TProtocolException("Couldn't find a field with field id " + fieldID);
+ throw new org.apache.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID);
}
}
@@ -259,7 +232,7 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
rebalance_options.write(oprot);
return;
default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@@ -271,7 +244,7 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
case REBALANCE_OPTIONS:
return REBALANCE_OPTIONS_FIELD_DESC;
default:
- throw new IllegalArgumentException("Unknown field id " + setField);
+ throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@@ -294,12 +267,12 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
if (getSetField() == _Fields.KILL_OPTIONS) {
return (KillOptions)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'kill_options' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'kill_options' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_kill_options(KillOptions value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.KILL_OPTIONS;
value_ = value;
}
@@ -308,12 +281,12 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
if (getSetField() == _Fields.REBALANCE_OPTIONS) {
return (RebalanceOptions)getFieldValue();
} else {
- throw new RuntimeException("Cannot get field 'rebalance_options' because union is currently set to " + getFieldDesc(getSetField()).name);
+ throw new java.lang.RuntimeException("Cannot get field 'rebalance_options' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void set_rebalance_options(RebalanceOptions value) {
- if (value == null) throw new NullPointerException();
+ if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.REBALANCE_OPTIONS;
value_ = value;
}
@@ -328,7 +301,7 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
}
- public boolean equals(Object other) {
+ public boolean equals(java.lang.Object other) {
if (other instanceof TopologyActionOptions) {
return equals((TopologyActionOptions)other);
} else {
@@ -352,12 +325,12 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>();
list.add(this.getClass().getName());
org.apache.thrift.TFieldIdEnum setField = getSetField();
if (setField != null) {
list.add(setField.getThriftFieldId());
- Object value = getFieldValue();
+ java.lang.Object value = getFieldValue();
if (value instanceof org.apache.thrift.TEnum) {
list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue());
} else {
@@ -375,7 +348,7 @@ public class TopologyActionOptions extends org.apache.thrift.TUnion<TopologyActi
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/TopologyHistoryInfo.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/TopologyHistoryInfo.java b/storm-client/src/jvm/org/apache/storm/generated/TopologyHistoryInfo.java
index 51a7625..2986a0c 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/TopologyHistoryInfo.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/TopologyHistoryInfo.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHistoryInfo, TopologyHistoryInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TopologyHistoryInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TopologyHistoryInfo");
private static final org.apache.thrift.protocol.TField TOPO_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("topo_ids", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TopologyHistoryInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TopologyHistoryInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TopologyHistoryInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TopologyHistoryInfoTupleSchemeFactory();
- private List<String> topo_ids; // required
+ private java.util.List<java.lang.String> topo_ids; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TOPO_IDS((short)1, "topo_ids");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,19 +88,19 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TOPO_IDS, new org.apache.thrift.meta_data.FieldMetaData("topo_ids", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TopologyHistoryInfo.class, metaDataMap);
}
@@ -138,7 +108,7 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
}
public TopologyHistoryInfo(
- List<String> topo_ids)
+ java.util.List<java.lang.String> topo_ids)
{
this();
this.topo_ids = topo_ids;
@@ -149,7 +119,7 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
*/
public TopologyHistoryInfo(TopologyHistoryInfo other) {
if (other.is_set_topo_ids()) {
- List<String> __this__topo_ids = new ArrayList<String>(other.topo_ids);
+ java.util.List<java.lang.String> __this__topo_ids = new java.util.ArrayList<java.lang.String>(other.topo_ids);
this.topo_ids = __this__topo_ids;
}
}
@@ -167,22 +137,22 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
return (this.topo_ids == null) ? 0 : this.topo_ids.size();
}
- public java.util.Iterator<String> get_topo_ids_iterator() {
+ public java.util.Iterator<java.lang.String> get_topo_ids_iterator() {
return (this.topo_ids == null) ? null : this.topo_ids.iterator();
}
- public void add_to_topo_ids(String elem) {
+ public void add_to_topo_ids(java.lang.String elem) {
if (this.topo_ids == null) {
- this.topo_ids = new ArrayList<String>();
+ this.topo_ids = new java.util.ArrayList<java.lang.String>();
}
this.topo_ids.add(elem);
}
- public List<String> get_topo_ids() {
+ public java.util.List<java.lang.String> get_topo_ids() {
return this.topo_ids;
}
- public void set_topo_ids(List<String> topo_ids) {
+ public void set_topo_ids(java.util.List<java.lang.String> topo_ids) {
this.topo_ids = topo_ids;
}
@@ -201,43 +171,43 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TOPO_IDS:
if (value == null) {
unset_topo_ids();
} else {
- set_topo_ids((List<String>)value);
+ set_topo_ids((java.util.List<java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOPO_IDS:
return get_topo_ids();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TOPO_IDS:
return is_set_topo_ids();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TopologyHistoryInfo)
@@ -248,6 +218,8 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
public boolean equals(TopologyHistoryInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_topo_ids = true && this.is_set_topo_ids();
boolean that_present_topo_ids = true && that.is_set_topo_ids();
@@ -263,14 +235,13 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_topo_ids = true && (is_set_topo_ids());
- list.add(present_topo_ids);
- if (present_topo_ids)
- list.add(topo_ids);
+ hashCode = hashCode * 8191 + ((is_set_topo_ids()) ? 131071 : 524287);
+ if (is_set_topo_ids())
+ hashCode = hashCode * 8191 + topo_ids.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -281,7 +252,7 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_topo_ids()).compareTo(other.is_set_topo_ids());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topo_ids()).compareTo(other.is_set_topo_ids());
if (lastComparison != 0) {
return lastComparison;
}
@@ -299,16 +270,16 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TopologyHistoryInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TopologyHistoryInfo(");
boolean first = true;
sb.append("topo_ids:");
@@ -335,7 +306,7 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -343,13 +314,13 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
}
}
- private static class TopologyHistoryInfoStandardSchemeFactory implements SchemeFactory {
+ private static class TopologyHistoryInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TopologyHistoryInfoStandardScheme getScheme() {
return new TopologyHistoryInfoStandardScheme();
}
}
- private static class TopologyHistoryInfoStandardScheme extends StandardScheme<TopologyHistoryInfo> {
+ private static class TopologyHistoryInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TopologyHistoryInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TopologyHistoryInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -365,8 +336,8 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list862 = iprot.readListBegin();
- struct.topo_ids = new ArrayList<String>(_list862.size);
- String _elem863;
+ struct.topo_ids = new java.util.ArrayList<java.lang.String>(_list862.size);
+ java.lang.String _elem863;
for (int _i864 = 0; _i864 < _list862.size; ++_i864)
{
_elem863 = iprot.readString();
@@ -396,7 +367,7 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
oprot.writeFieldBegin(TOPO_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.topo_ids.size()));
- for (String _iter865 : struct.topo_ids)
+ for (java.lang.String _iter865 : struct.topo_ids)
{
oprot.writeString(_iter865);
}
@@ -410,18 +381,18 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
}
- private static class TopologyHistoryInfoTupleSchemeFactory implements SchemeFactory {
+ private static class TopologyHistoryInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TopologyHistoryInfoTupleScheme getScheme() {
return new TopologyHistoryInfoTupleScheme();
}
}
- private static class TopologyHistoryInfoTupleScheme extends TupleScheme<TopologyHistoryInfo> {
+ private static class TopologyHistoryInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TopologyHistoryInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TopologyHistoryInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_topo_ids()) {
optionals.set(0);
}
@@ -429,7 +400,7 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
if (struct.is_set_topo_ids()) {
{
oprot.writeI32(struct.topo_ids.size());
- for (String _iter866 : struct.topo_ids)
+ for (java.lang.String _iter866 : struct.topo_ids)
{
oprot.writeString(_iter866);
}
@@ -439,13 +410,13 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TopologyHistoryInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list867 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.topo_ids = new ArrayList<String>(_list867.size);
- String _elem868;
+ struct.topo_ids = new java.util.ArrayList<java.lang.String>(_list867.size);
+ java.lang.String _elem868;
for (int _i869 = 0; _i869 < _list867.size; ++_i869)
{
_elem868 = iprot.readString();
@@ -457,5 +428,8 @@ public class TopologyHistoryInfo implements org.apache.thrift.TBase<TopologyHist
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[23/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/NimbusSummary.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/NimbusSummary.java b/storm-client/src/jvm/org/apache/storm/generated/NimbusSummary.java
index c0c5247..cc7f95c 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/NimbusSummary.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/NimbusSummary.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, NimbusSummary._Fields>, java.io.Serializable, Cloneable, Comparable<NimbusSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NimbusSummary");
@@ -61,17 +34,14 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
private static final org.apache.thrift.protocol.TField IS_LEADER_FIELD_DESC = new org.apache.thrift.protocol.TField("isLeader", org.apache.thrift.protocol.TType.BOOL, (short)4);
private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NimbusSummaryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NimbusSummaryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NimbusSummaryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NimbusSummaryTupleSchemeFactory();
- private String host; // required
+ private java.lang.String host; // required
private int port; // required
private int uptime_secs; // required
private boolean isLeader; // required
- private String version; // required
+ private java.lang.String version; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -81,10 +51,10 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
IS_LEADER((short)4, "isLeader"),
VERSION((short)5, "version");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -115,21 +85,21 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -138,7 +108,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -148,9 +118,9 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
private static final int __UPTIME_SECS_ISSET_ID = 1;
private static final int __ISLEADER_ISSET_ID = 2;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -161,7 +131,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NimbusSummary.class, metaDataMap);
}
@@ -169,11 +139,11 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
public NimbusSummary(
- String host,
+ java.lang.String host,
int port,
int uptime_secs,
boolean isLeader,
- String version)
+ java.lang.String version)
{
this();
this.host = host;
@@ -218,11 +188,11 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
this.version = null;
}
- public String get_host() {
+ public java.lang.String get_host() {
return this.host;
}
- public void set_host(String host) {
+ public void set_host(java.lang.String host) {
this.host = host;
}
@@ -251,16 +221,16 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
public void unset_port() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean is_set_port() {
- return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
}
public void set_port_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
}
public int get_uptime_secs() {
@@ -273,16 +243,16 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
public void unset_uptime_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
/** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_uptime_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
public void set_uptime_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
}
public boolean is_isLeader() {
@@ -295,23 +265,23 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
public void unset_isLeader() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISLEADER_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISLEADER_ISSET_ID);
}
/** Returns true if field isLeader is set (has been assigned a value) and false otherwise */
public boolean is_set_isLeader() {
- return EncodingUtils.testBit(__isset_bitfield, __ISLEADER_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISLEADER_ISSET_ID);
}
public void set_isLeader_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISLEADER_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISLEADER_ISSET_ID, value);
}
- public String get_version() {
+ public java.lang.String get_version() {
return this.version;
}
- public void set_version(String version) {
+ public void set_version(java.lang.String version) {
this.version = version;
}
@@ -330,13 +300,13 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case HOST:
if (value == null) {
unset_host();
} else {
- set_host((String)value);
+ set_host((java.lang.String)value);
}
break;
@@ -344,7 +314,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
if (value == null) {
unset_port();
} else {
- set_port((Integer)value);
+ set_port((java.lang.Integer)value);
}
break;
@@ -352,7 +322,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
if (value == null) {
unset_uptime_secs();
} else {
- set_uptime_secs((Integer)value);
+ set_uptime_secs((java.lang.Integer)value);
}
break;
@@ -360,7 +330,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
if (value == null) {
unset_isLeader();
} else {
- set_isLeader((Boolean)value);
+ set_isLeader((java.lang.Boolean)value);
}
break;
@@ -368,14 +338,14 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
if (value == null) {
unset_version();
} else {
- set_version((String)value);
+ set_version((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case HOST:
return get_host();
@@ -393,13 +363,13 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
return get_version();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -414,11 +384,11 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
case VERSION:
return is_set_version();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof NimbusSummary)
@@ -429,6 +399,8 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
public boolean equals(NimbusSummary that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_host = true && this.is_set_host();
boolean that_present_host = true && that.is_set_host();
@@ -480,34 +452,23 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_host = true && (is_set_host());
- list.add(present_host);
- if (present_host)
- list.add(host);
+ hashCode = hashCode * 8191 + ((is_set_host()) ? 131071 : 524287);
+ if (is_set_host())
+ hashCode = hashCode * 8191 + host.hashCode();
- boolean present_port = true;
- list.add(present_port);
- if (present_port)
- list.add(port);
+ hashCode = hashCode * 8191 + port;
- boolean present_uptime_secs = true;
- list.add(present_uptime_secs);
- if (present_uptime_secs)
- list.add(uptime_secs);
+ hashCode = hashCode * 8191 + uptime_secs;
- boolean present_isLeader = true;
- list.add(present_isLeader);
- if (present_isLeader)
- list.add(isLeader);
+ hashCode = hashCode * 8191 + ((isLeader) ? 131071 : 524287);
- boolean present_version = true && (is_set_version());
- list.add(present_version);
- if (present_version)
- list.add(version);
+ hashCode = hashCode * 8191 + ((is_set_version()) ? 131071 : 524287);
+ if (is_set_version())
+ hashCode = hashCode * 8191 + version.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -518,7 +479,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_host()).compareTo(other.is_set_host());
+ lastComparison = java.lang.Boolean.valueOf(is_set_host()).compareTo(other.is_set_host());
if (lastComparison != 0) {
return lastComparison;
}
@@ -528,7 +489,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
+ lastComparison = java.lang.Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
if (lastComparison != 0) {
return lastComparison;
}
@@ -538,7 +499,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -548,7 +509,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_isLeader()).compareTo(other.is_set_isLeader());
+ lastComparison = java.lang.Boolean.valueOf(is_set_isLeader()).compareTo(other.is_set_isLeader());
if (lastComparison != 0) {
return lastComparison;
}
@@ -558,7 +519,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -576,16 +537,16 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("NimbusSummary(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NimbusSummary(");
boolean first = true;
sb.append("host:");
@@ -652,7 +613,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -662,13 +623,13 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
}
- private static class NimbusSummaryStandardSchemeFactory implements SchemeFactory {
+ private static class NimbusSummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NimbusSummaryStandardScheme getScheme() {
return new NimbusSummaryStandardScheme();
}
}
- private static class NimbusSummaryStandardScheme extends StandardScheme<NimbusSummary> {
+ private static class NimbusSummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<NimbusSummary> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NimbusSummary struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -758,17 +719,17 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
- private static class NimbusSummaryTupleSchemeFactory implements SchemeFactory {
+ private static class NimbusSummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NimbusSummaryTupleScheme getScheme() {
return new NimbusSummaryTupleScheme();
}
}
- private static class NimbusSummaryTupleScheme extends TupleScheme<NimbusSummary> {
+ private static class NimbusSummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<NimbusSummary> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NimbusSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.host);
oprot.writeI32(struct.port);
oprot.writeI32(struct.uptime_secs);
@@ -778,7 +739,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NimbusSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.host = iprot.readString();
struct.set_host_isSet(true);
struct.port = iprot.readI32();
@@ -792,5 +753,8 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/NodeInfo.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/NodeInfo.java b/storm-client/src/jvm/org/apache/storm/generated/NodeInfo.java
index 6bb9c1f..88cfe14 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/NodeInfo.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/NodeInfo.java
@@ -16,66 +16,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fields>, java.io.Serializable, Cloneable, Comparable<NodeInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NodeInfo");
private static final org.apache.thrift.protocol.TField NODE_FIELD_DESC = new org.apache.thrift.protocol.TField("node", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.SET, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NodeInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NodeInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NodeInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NodeInfoTupleSchemeFactory();
- private String node; // required
- private Set<Long> port; // required
+ private java.lang.String node; // required
+ private java.util.Set<java.lang.Long> port; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
NODE((short)1, "node"),
PORT((short)2, "port");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,21 +93,21 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NODE, new org.apache.thrift.meta_data.FieldMetaData("node", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NodeInfo.class, metaDataMap);
}
@@ -145,8 +115,8 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
}
public NodeInfo(
- String node,
- Set<Long> port)
+ java.lang.String node,
+ java.util.Set<java.lang.Long> port)
{
this();
this.node = node;
@@ -161,7 +131,7 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
this.node = other.node;
}
if (other.is_set_port()) {
- Set<Long> __this__port = new HashSet<Long>(other.port);
+ java.util.Set<java.lang.Long> __this__port = new java.util.HashSet<java.lang.Long>(other.port);
this.port = __this__port;
}
}
@@ -176,11 +146,11 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
this.port = null;
}
- public String get_node() {
+ public java.lang.String get_node() {
return this.node;
}
- public void set_node(String node) {
+ public void set_node(java.lang.String node) {
this.node = node;
}
@@ -203,22 +173,22 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
return (this.port == null) ? 0 : this.port.size();
}
- public java.util.Iterator<Long> get_port_iterator() {
+ public java.util.Iterator<java.lang.Long> get_port_iterator() {
return (this.port == null) ? null : this.port.iterator();
}
public void add_to_port(long elem) {
if (this.port == null) {
- this.port = new HashSet<Long>();
+ this.port = new java.util.HashSet<java.lang.Long>();
}
this.port.add(elem);
}
- public Set<Long> get_port() {
+ public java.util.Set<java.lang.Long> get_port() {
return this.port;
}
- public void set_port(Set<Long> port) {
+ public void set_port(java.util.Set<java.lang.Long> port) {
this.port = port;
}
@@ -237,13 +207,13 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case NODE:
if (value == null) {
unset_node();
} else {
- set_node((String)value);
+ set_node((java.lang.String)value);
}
break;
@@ -251,14 +221,14 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
if (value == null) {
unset_port();
} else {
- set_port((Set<Long>)value);
+ set_port((java.util.Set<java.lang.Long>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NODE:
return get_node();
@@ -267,13 +237,13 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
return get_port();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -282,11 +252,11 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
case PORT:
return is_set_port();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof NodeInfo)
@@ -297,6 +267,8 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
public boolean equals(NodeInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_node = true && this.is_set_node();
boolean that_present_node = true && that.is_set_node();
@@ -321,19 +293,17 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_node = true && (is_set_node());
- list.add(present_node);
- if (present_node)
- list.add(node);
+ hashCode = hashCode * 8191 + ((is_set_node()) ? 131071 : 524287);
+ if (is_set_node())
+ hashCode = hashCode * 8191 + node.hashCode();
- boolean present_port = true && (is_set_port());
- list.add(present_port);
- if (present_port)
- list.add(port);
+ hashCode = hashCode * 8191 + ((is_set_port()) ? 131071 : 524287);
+ if (is_set_port())
+ hashCode = hashCode * 8191 + port.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -344,7 +314,7 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_node()).compareTo(other.is_set_node());
+ lastComparison = java.lang.Boolean.valueOf(is_set_node()).compareTo(other.is_set_node());
if (lastComparison != 0) {
return lastComparison;
}
@@ -354,7 +324,7 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
+ lastComparison = java.lang.Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
if (lastComparison != 0) {
return lastComparison;
}
@@ -372,16 +342,16 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("NodeInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NodeInfo(");
boolean first = true;
sb.append("node:");
@@ -424,7 +394,7 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -432,13 +402,13 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
}
}
- private static class NodeInfoStandardSchemeFactory implements SchemeFactory {
+ private static class NodeInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NodeInfoStandardScheme getScheme() {
return new NodeInfoStandardScheme();
}
}
- private static class NodeInfoStandardScheme extends StandardScheme<NodeInfo> {
+ private static class NodeInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<NodeInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NodeInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -462,7 +432,7 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
org.apache.thrift.protocol.TSet _set658 = iprot.readSetBegin();
- struct.port = new HashSet<Long>(2*_set658.size);
+ struct.port = new java.util.HashSet<java.lang.Long>(2*_set658.size);
long _elem659;
for (int _i660 = 0; _i660 < _set658.size; ++_i660)
{
@@ -512,17 +482,17 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
}
- private static class NodeInfoTupleSchemeFactory implements SchemeFactory {
+ private static class NodeInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NodeInfoTupleScheme getScheme() {
return new NodeInfoTupleScheme();
}
}
- private static class NodeInfoTupleScheme extends TupleScheme<NodeInfo> {
+ private static class NodeInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<NodeInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NodeInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.node);
{
oprot.writeI32(struct.port.size());
@@ -535,12 +505,12 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NodeInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.node = iprot.readString();
struct.set_node_isSet(true);
{
org.apache.thrift.protocol.TSet _set663 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.port = new HashSet<Long>(2*_set663.size);
+ struct.port = new java.util.HashSet<java.lang.Long>(2*_set663.size);
long _elem664;
for (int _i665 = 0; _i665 < _set663.size; ++_i665)
{
@@ -552,5 +522,8 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/NotAliveException.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/NotAliveException.java b/storm-client/src/jvm/org/apache/storm/generated/NotAliveException.java
index 8d9374a..733f4c9 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/NotAliveException.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/NotAliveException.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class NotAliveException extends TException implements org.apache.thrift.TBase<NotAliveException, NotAliveException._Fields>, java.io.Serializable, Cloneable, Comparable<NotAliveException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
+public class NotAliveException extends org.apache.thrift.TException implements org.apache.thrift.TBase<NotAliveException, NotAliveException._Fields>, java.io.Serializable, Cloneable, Comparable<NotAliveException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotAliveException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NotAliveExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NotAliveExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NotAliveExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NotAliveExceptionTupleSchemeFactory();
- private String msg; // required
+ private java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class NotAliveException extends TException implements org.apache.thrift.T
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,18 +88,18 @@ public class NotAliveException extends TException implements org.apache.thrift.T
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotAliveException.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class NotAliveException extends TException implements org.apache.thrift.T
}
public NotAliveException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -161,11 +131,11 @@ public class NotAliveException extends TException implements org.apache.thrift.T
this.msg = null;
}
- public String get_msg() {
+ public java.lang.String get_msg() {
return this.msg;
}
- public void set_msg(String msg) {
+ public void set_msg(java.lang.String msg) {
this.msg = msg;
}
@@ -184,43 +154,43 @@ public class NotAliveException extends TException implements org.apache.thrift.T
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unset_msg();
} else {
- set_msg((String)value);
+ set_msg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return get_msg();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return is_set_msg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof NotAliveException)
@@ -231,6 +201,8 @@ public class NotAliveException extends TException implements org.apache.thrift.T
public boolean equals(NotAliveException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.is_set_msg();
boolean that_present_msg = true && that.is_set_msg();
@@ -246,14 +218,13 @@ public class NotAliveException extends TException implements org.apache.thrift.T
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (is_set_msg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((is_set_msg()) ? 131071 : 524287);
+ if (is_set_msg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class NotAliveException extends TException implements org.apache.thrift.T
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class NotAliveException extends TException implements org.apache.thrift.T
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("NotAliveException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NotAliveException(");
boolean first = true;
sb.append("msg:");
@@ -322,7 +293,7 @@ public class NotAliveException extends TException implements org.apache.thrift.T
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -330,13 +301,13 @@ public class NotAliveException extends TException implements org.apache.thrift.T
}
}
- private static class NotAliveExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class NotAliveExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NotAliveExceptionStandardScheme getScheme() {
return new NotAliveExceptionStandardScheme();
}
}
- private static class NotAliveExceptionStandardScheme extends StandardScheme<NotAliveException> {
+ private static class NotAliveExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<NotAliveException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NotAliveException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -380,27 +351,30 @@ public class NotAliveException extends TException implements org.apache.thrift.T
}
- private static class NotAliveExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class NotAliveExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NotAliveExceptionTupleScheme getScheme() {
return new NotAliveExceptionTupleScheme();
}
}
- private static class NotAliveExceptionTupleScheme extends TupleScheme<NotAliveException> {
+ private static class NotAliveExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<NotAliveException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NotAliveException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.msg);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NotAliveException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.msg = iprot.readString();
struct.set_msg_isSet(true);
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/NullStruct.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/NullStruct.java b/storm-client/src/jvm/org/apache/storm/generated/NullStruct.java
index a37ecbd..e89f71b 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/NullStruct.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/NullStruct.java
@@ -16,61 +16,31 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruct._Fields>, java.io.Serializable, Cloneable, Comparable<NullStruct> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NullStruct");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NullStructStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NullStructTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NullStructStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NullStructTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -91,21 +61,21 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -114,14 +84,14 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NullStruct.class, metaDataMap);
}
@@ -142,30 +112,30 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof NullStruct)
@@ -176,15 +146,17 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
public boolean equals(NullStruct that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -203,16 +175,16 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("NullStruct(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NullStruct(");
boolean first = true;
sb.append(")");
@@ -232,7 +204,7 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -240,13 +212,13 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
}
}
- private static class NullStructStandardSchemeFactory implements SchemeFactory {
+ private static class NullStructStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NullStructStandardScheme getScheme() {
return new NullStructStandardScheme();
}
}
- private static class NullStructStandardScheme extends StandardScheme<NullStruct> {
+ private static class NullStructStandardScheme extends org.apache.thrift.scheme.StandardScheme<NullStruct> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NullStruct struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -277,24 +249,27 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
}
- private static class NullStructTupleSchemeFactory implements SchemeFactory {
+ private static class NullStructTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NullStructTupleScheme getScheme() {
return new NullStructTupleScheme();
}
}
- private static class NullStructTupleScheme extends TupleScheme<NullStruct> {
+ private static class NullStructTupleScheme extends org.apache.thrift.scheme.TupleScheme<NullStruct> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NullStruct struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NullStruct struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/NumErrorsChoice.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/NumErrorsChoice.java b/storm-client/src/jvm/org/apache/storm/generated/NumErrorsChoice.java
index 73421ee..bdafbab 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/NumErrorsChoice.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/NumErrorsChoice.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -24,10 +24,6 @@
package org.apache.storm.generated;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
public enum NumErrorsChoice implements org.apache.thrift.TEnum {
ALL(0),
NONE(1),
[22/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/OwnerResourceSummary.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/OwnerResourceSummary.java b/storm-client/src/jvm/org/apache/storm/generated/OwnerResourceSummary.java
index be1c687..ee273d3 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/OwnerResourceSummary.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/OwnerResourceSummary.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResourceSummary, OwnerResourceSummary._Fields>, java.io.Serializable, Cloneable, Comparable<OwnerResourceSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OwnerResourceSummary");
@@ -74,13 +47,10 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
private static final org.apache.thrift.protocol.TField ASSIGNED_ON_HEAP_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("assigned_on_heap_memory", org.apache.thrift.protocol.TType.DOUBLE, (short)17);
private static final org.apache.thrift.protocol.TField ASSIGNED_OFF_HEAP_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("assigned_off_heap_memory", org.apache.thrift.protocol.TType.DOUBLE, (short)18);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new OwnerResourceSummaryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new OwnerResourceSummaryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new OwnerResourceSummaryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new OwnerResourceSummaryTupleSchemeFactory();
- private String owner; // required
+ private java.lang.String owner; // required
private int total_topologies; // optional
private int total_executors; // optional
private int total_workers; // optional
@@ -120,10 +90,10 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
ASSIGNED_ON_HEAP_MEMORY((short)17, "assigned_on_heap_memory"),
ASSIGNED_OFF_HEAP_MEMORY((short)18, "assigned_off_heap_memory");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -180,21 +150,21 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -203,7 +173,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -228,9 +198,9 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
private static final int __ASSIGNED_OFF_HEAP_MEMORY_ISSET_ID = 16;
private int __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.TOTAL_TOPOLOGIES,_Fields.TOTAL_EXECUTORS,_Fields.TOTAL_WORKERS,_Fields.MEMORY_USAGE,_Fields.CPU_USAGE,_Fields.MEMORY_GUARANTEE,_Fields.CPU_GUARANTEE,_Fields.MEMORY_GUARANTEE_REMAINING,_Fields.CPU_GUARANTEE_REMAINING,_Fields.ISOLATED_NODE_GUARANTEE,_Fields.TOTAL_TASKS,_Fields.REQUESTED_ON_HEAP_MEMORY,_Fields.REQUESTED_OFF_HEAP_MEMORY,_Fields.REQUESTED_TOTAL_MEMORY,_Fields.REQUESTED_CPU,_Fields.ASSIGNED_ON_HEAP_MEMORY,_Fields.ASSIGNED_OFF_HEAP_MEMORY};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TOTAL_TOPOLOGIES, new org.apache.thrift.meta_data.FieldMetaData("total_topologies", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -267,7 +237,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.ASSIGNED_OFF_HEAP_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("assigned_off_heap_memory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OwnerResourceSummary.class, metaDataMap);
}
@@ -275,7 +245,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public OwnerResourceSummary(
- String owner)
+ java.lang.String owner)
{
this();
this.owner = owner;
@@ -351,11 +321,11 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
this.assigned_off_heap_memory = 0.0;
}
- public String get_owner() {
+ public java.lang.String get_owner() {
return this.owner;
}
- public void set_owner(String owner) {
+ public void set_owner(java.lang.String owner) {
this.owner = owner;
}
@@ -384,16 +354,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_total_topologies() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTAL_TOPOLOGIES_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TOTAL_TOPOLOGIES_ISSET_ID);
}
/** Returns true if field total_topologies is set (has been assigned a value) and false otherwise */
public boolean is_set_total_topologies() {
- return EncodingUtils.testBit(__isset_bitfield, __TOTAL_TOPOLOGIES_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOTAL_TOPOLOGIES_ISSET_ID);
}
public void set_total_topologies_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTAL_TOPOLOGIES_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOTAL_TOPOLOGIES_ISSET_ID, value);
}
public int get_total_executors() {
@@ -406,16 +376,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_total_executors() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTAL_EXECUTORS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TOTAL_EXECUTORS_ISSET_ID);
}
/** Returns true if field total_executors is set (has been assigned a value) and false otherwise */
public boolean is_set_total_executors() {
- return EncodingUtils.testBit(__isset_bitfield, __TOTAL_EXECUTORS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOTAL_EXECUTORS_ISSET_ID);
}
public void set_total_executors_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTAL_EXECUTORS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOTAL_EXECUTORS_ISSET_ID, value);
}
public int get_total_workers() {
@@ -428,16 +398,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_total_workers() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTAL_WORKERS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TOTAL_WORKERS_ISSET_ID);
}
/** Returns true if field total_workers is set (has been assigned a value) and false otherwise */
public boolean is_set_total_workers() {
- return EncodingUtils.testBit(__isset_bitfield, __TOTAL_WORKERS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOTAL_WORKERS_ISSET_ID);
}
public void set_total_workers_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTAL_WORKERS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOTAL_WORKERS_ISSET_ID, value);
}
public double get_memory_usage() {
@@ -450,16 +420,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_memory_usage() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEMORY_USAGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MEMORY_USAGE_ISSET_ID);
}
/** Returns true if field memory_usage is set (has been assigned a value) and false otherwise */
public boolean is_set_memory_usage() {
- return EncodingUtils.testBit(__isset_bitfield, __MEMORY_USAGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MEMORY_USAGE_ISSET_ID);
}
public void set_memory_usage_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEMORY_USAGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MEMORY_USAGE_ISSET_ID, value);
}
public double get_cpu_usage() {
@@ -472,16 +442,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_cpu_usage() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPU_USAGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CPU_USAGE_ISSET_ID);
}
/** Returns true if field cpu_usage is set (has been assigned a value) and false otherwise */
public boolean is_set_cpu_usage() {
- return EncodingUtils.testBit(__isset_bitfield, __CPU_USAGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CPU_USAGE_ISSET_ID);
}
public void set_cpu_usage_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPU_USAGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CPU_USAGE_ISSET_ID, value);
}
public double get_memory_guarantee() {
@@ -494,16 +464,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_memory_guarantee() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEMORY_GUARANTEE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MEMORY_GUARANTEE_ISSET_ID);
}
/** Returns true if field memory_guarantee is set (has been assigned a value) and false otherwise */
public boolean is_set_memory_guarantee() {
- return EncodingUtils.testBit(__isset_bitfield, __MEMORY_GUARANTEE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MEMORY_GUARANTEE_ISSET_ID);
}
public void set_memory_guarantee_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEMORY_GUARANTEE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MEMORY_GUARANTEE_ISSET_ID, value);
}
public double get_cpu_guarantee() {
@@ -516,16 +486,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_cpu_guarantee() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPU_GUARANTEE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CPU_GUARANTEE_ISSET_ID);
}
/** Returns true if field cpu_guarantee is set (has been assigned a value) and false otherwise */
public boolean is_set_cpu_guarantee() {
- return EncodingUtils.testBit(__isset_bitfield, __CPU_GUARANTEE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CPU_GUARANTEE_ISSET_ID);
}
public void set_cpu_guarantee_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPU_GUARANTEE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CPU_GUARANTEE_ISSET_ID, value);
}
public double get_memory_guarantee_remaining() {
@@ -538,16 +508,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_memory_guarantee_remaining() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEMORY_GUARANTEE_REMAINING_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MEMORY_GUARANTEE_REMAINING_ISSET_ID);
}
/** Returns true if field memory_guarantee_remaining is set (has been assigned a value) and false otherwise */
public boolean is_set_memory_guarantee_remaining() {
- return EncodingUtils.testBit(__isset_bitfield, __MEMORY_GUARANTEE_REMAINING_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MEMORY_GUARANTEE_REMAINING_ISSET_ID);
}
public void set_memory_guarantee_remaining_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEMORY_GUARANTEE_REMAINING_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MEMORY_GUARANTEE_REMAINING_ISSET_ID, value);
}
public double get_cpu_guarantee_remaining() {
@@ -560,16 +530,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_cpu_guarantee_remaining() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPU_GUARANTEE_REMAINING_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CPU_GUARANTEE_REMAINING_ISSET_ID);
}
/** Returns true if field cpu_guarantee_remaining is set (has been assigned a value) and false otherwise */
public boolean is_set_cpu_guarantee_remaining() {
- return EncodingUtils.testBit(__isset_bitfield, __CPU_GUARANTEE_REMAINING_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CPU_GUARANTEE_REMAINING_ISSET_ID);
}
public void set_cpu_guarantee_remaining_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPU_GUARANTEE_REMAINING_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CPU_GUARANTEE_REMAINING_ISSET_ID, value);
}
public int get_isolated_node_guarantee() {
@@ -582,16 +552,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_isolated_node_guarantee() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISOLATED_NODE_GUARANTEE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISOLATED_NODE_GUARANTEE_ISSET_ID);
}
/** Returns true if field isolated_node_guarantee is set (has been assigned a value) and false otherwise */
public boolean is_set_isolated_node_guarantee() {
- return EncodingUtils.testBit(__isset_bitfield, __ISOLATED_NODE_GUARANTEE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISOLATED_NODE_GUARANTEE_ISSET_ID);
}
public void set_isolated_node_guarantee_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISOLATED_NODE_GUARANTEE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISOLATED_NODE_GUARANTEE_ISSET_ID, value);
}
public int get_total_tasks() {
@@ -604,16 +574,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_total_tasks() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTAL_TASKS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TOTAL_TASKS_ISSET_ID);
}
/** Returns true if field total_tasks is set (has been assigned a value) and false otherwise */
public boolean is_set_total_tasks() {
- return EncodingUtils.testBit(__isset_bitfield, __TOTAL_TASKS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOTAL_TASKS_ISSET_ID);
}
public void set_total_tasks_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTAL_TASKS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOTAL_TASKS_ISSET_ID, value);
}
public double get_requested_on_heap_memory() {
@@ -626,16 +596,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_requested_on_heap_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_ON_HEAP_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_ON_HEAP_MEMORY_ISSET_ID);
}
/** Returns true if field requested_on_heap_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_on_heap_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_ON_HEAP_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_ON_HEAP_MEMORY_ISSET_ID);
}
public void set_requested_on_heap_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_ON_HEAP_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_ON_HEAP_MEMORY_ISSET_ID, value);
}
public double get_requested_off_heap_memory() {
@@ -648,16 +618,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_requested_off_heap_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_OFF_HEAP_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_OFF_HEAP_MEMORY_ISSET_ID);
}
/** Returns true if field requested_off_heap_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_off_heap_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_OFF_HEAP_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_OFF_HEAP_MEMORY_ISSET_ID);
}
public void set_requested_off_heap_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_OFF_HEAP_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_OFF_HEAP_MEMORY_ISSET_ID, value);
}
public double get_requested_total_memory() {
@@ -670,16 +640,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_requested_total_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_TOTAL_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_TOTAL_MEMORY_ISSET_ID);
}
/** Returns true if field requested_total_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_total_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_TOTAL_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_TOTAL_MEMORY_ISSET_ID);
}
public void set_requested_total_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_TOTAL_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_TOTAL_MEMORY_ISSET_ID, value);
}
public double get_requested_cpu() {
@@ -692,16 +662,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_requested_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
}
/** Returns true if field requested_cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_requested_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID);
}
public void set_requested_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REQUESTED_CPU_ISSET_ID, value);
}
public double get_assigned_on_heap_memory() {
@@ -714,16 +684,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_assigned_on_heap_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_ON_HEAP_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_ON_HEAP_MEMORY_ISSET_ID);
}
/** Returns true if field assigned_on_heap_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_on_heap_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_ON_HEAP_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_ON_HEAP_MEMORY_ISSET_ID);
}
public void set_assigned_on_heap_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_ON_HEAP_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_ON_HEAP_MEMORY_ISSET_ID, value);
}
public double get_assigned_off_heap_memory() {
@@ -736,25 +706,25 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void unset_assigned_off_heap_memory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_OFF_HEAP_MEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASSIGNED_OFF_HEAP_MEMORY_ISSET_ID);
}
/** Returns true if field assigned_off_heap_memory is set (has been assigned a value) and false otherwise */
public boolean is_set_assigned_off_heap_memory() {
- return EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_OFF_HEAP_MEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASSIGNED_OFF_HEAP_MEMORY_ISSET_ID);
}
public void set_assigned_off_heap_memory_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_OFF_HEAP_MEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASSIGNED_OFF_HEAP_MEMORY_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case OWNER:
if (value == null) {
unset_owner();
} else {
- set_owner((String)value);
+ set_owner((java.lang.String)value);
}
break;
@@ -762,7 +732,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_total_topologies();
} else {
- set_total_topologies((Integer)value);
+ set_total_topologies((java.lang.Integer)value);
}
break;
@@ -770,7 +740,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_total_executors();
} else {
- set_total_executors((Integer)value);
+ set_total_executors((java.lang.Integer)value);
}
break;
@@ -778,7 +748,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_total_workers();
} else {
- set_total_workers((Integer)value);
+ set_total_workers((java.lang.Integer)value);
}
break;
@@ -786,7 +756,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_memory_usage();
} else {
- set_memory_usage((Double)value);
+ set_memory_usage((java.lang.Double)value);
}
break;
@@ -794,7 +764,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_cpu_usage();
} else {
- set_cpu_usage((Double)value);
+ set_cpu_usage((java.lang.Double)value);
}
break;
@@ -802,7 +772,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_memory_guarantee();
} else {
- set_memory_guarantee((Double)value);
+ set_memory_guarantee((java.lang.Double)value);
}
break;
@@ -810,7 +780,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_cpu_guarantee();
} else {
- set_cpu_guarantee((Double)value);
+ set_cpu_guarantee((java.lang.Double)value);
}
break;
@@ -818,7 +788,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_memory_guarantee_remaining();
} else {
- set_memory_guarantee_remaining((Double)value);
+ set_memory_guarantee_remaining((java.lang.Double)value);
}
break;
@@ -826,7 +796,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_cpu_guarantee_remaining();
} else {
- set_cpu_guarantee_remaining((Double)value);
+ set_cpu_guarantee_remaining((java.lang.Double)value);
}
break;
@@ -834,7 +804,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_isolated_node_guarantee();
} else {
- set_isolated_node_guarantee((Integer)value);
+ set_isolated_node_guarantee((java.lang.Integer)value);
}
break;
@@ -842,7 +812,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_total_tasks();
} else {
- set_total_tasks((Integer)value);
+ set_total_tasks((java.lang.Integer)value);
}
break;
@@ -850,7 +820,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_requested_on_heap_memory();
} else {
- set_requested_on_heap_memory((Double)value);
+ set_requested_on_heap_memory((java.lang.Double)value);
}
break;
@@ -858,7 +828,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_requested_off_heap_memory();
} else {
- set_requested_off_heap_memory((Double)value);
+ set_requested_off_heap_memory((java.lang.Double)value);
}
break;
@@ -866,7 +836,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_requested_total_memory();
} else {
- set_requested_total_memory((Double)value);
+ set_requested_total_memory((java.lang.Double)value);
}
break;
@@ -874,7 +844,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_requested_cpu();
} else {
- set_requested_cpu((Double)value);
+ set_requested_cpu((java.lang.Double)value);
}
break;
@@ -882,7 +852,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_assigned_on_heap_memory();
} else {
- set_assigned_on_heap_memory((Double)value);
+ set_assigned_on_heap_memory((java.lang.Double)value);
}
break;
@@ -890,14 +860,14 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
if (value == null) {
unset_assigned_off_heap_memory();
} else {
- set_assigned_off_heap_memory((Double)value);
+ set_assigned_off_heap_memory((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case OWNER:
return get_owner();
@@ -954,13 +924,13 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return get_assigned_off_heap_memory();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -1001,11 +971,11 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
case ASSIGNED_OFF_HEAP_MEMORY:
return is_set_assigned_off_heap_memory();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof OwnerResourceSummary)
@@ -1016,6 +986,8 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
public boolean equals(OwnerResourceSummary that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_owner = true && this.is_set_owner();
boolean that_present_owner = true && that.is_set_owner();
@@ -1184,99 +1156,81 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_owner = true && (is_set_owner());
- list.add(present_owner);
- if (present_owner)
- list.add(owner);
-
- boolean present_total_topologies = true && (is_set_total_topologies());
- list.add(present_total_topologies);
- if (present_total_topologies)
- list.add(total_topologies);
-
- boolean present_total_executors = true && (is_set_total_executors());
- list.add(present_total_executors);
- if (present_total_executors)
- list.add(total_executors);
-
- boolean present_total_workers = true && (is_set_total_workers());
- list.add(present_total_workers);
- if (present_total_workers)
- list.add(total_workers);
-
- boolean present_memory_usage = true && (is_set_memory_usage());
- list.add(present_memory_usage);
- if (present_memory_usage)
- list.add(memory_usage);
-
- boolean present_cpu_usage = true && (is_set_cpu_usage());
- list.add(present_cpu_usage);
- if (present_cpu_usage)
- list.add(cpu_usage);
-
- boolean present_memory_guarantee = true && (is_set_memory_guarantee());
- list.add(present_memory_guarantee);
- if (present_memory_guarantee)
- list.add(memory_guarantee);
-
- boolean present_cpu_guarantee = true && (is_set_cpu_guarantee());
- list.add(present_cpu_guarantee);
- if (present_cpu_guarantee)
- list.add(cpu_guarantee);
-
- boolean present_memory_guarantee_remaining = true && (is_set_memory_guarantee_remaining());
- list.add(present_memory_guarantee_remaining);
- if (present_memory_guarantee_remaining)
- list.add(memory_guarantee_remaining);
-
- boolean present_cpu_guarantee_remaining = true && (is_set_cpu_guarantee_remaining());
- list.add(present_cpu_guarantee_remaining);
- if (present_cpu_guarantee_remaining)
- list.add(cpu_guarantee_remaining);
-
- boolean present_isolated_node_guarantee = true && (is_set_isolated_node_guarantee());
- list.add(present_isolated_node_guarantee);
- if (present_isolated_node_guarantee)
- list.add(isolated_node_guarantee);
-
- boolean present_total_tasks = true && (is_set_total_tasks());
- list.add(present_total_tasks);
- if (present_total_tasks)
- list.add(total_tasks);
-
- boolean present_requested_on_heap_memory = true && (is_set_requested_on_heap_memory());
- list.add(present_requested_on_heap_memory);
- if (present_requested_on_heap_memory)
- list.add(requested_on_heap_memory);
-
- boolean present_requested_off_heap_memory = true && (is_set_requested_off_heap_memory());
- list.add(present_requested_off_heap_memory);
- if (present_requested_off_heap_memory)
- list.add(requested_off_heap_memory);
-
- boolean present_requested_total_memory = true && (is_set_requested_total_memory());
- list.add(present_requested_total_memory);
- if (present_requested_total_memory)
- list.add(requested_total_memory);
-
- boolean present_requested_cpu = true && (is_set_requested_cpu());
- list.add(present_requested_cpu);
- if (present_requested_cpu)
- list.add(requested_cpu);
-
- boolean present_assigned_on_heap_memory = true && (is_set_assigned_on_heap_memory());
- list.add(present_assigned_on_heap_memory);
- if (present_assigned_on_heap_memory)
- list.add(assigned_on_heap_memory);
-
- boolean present_assigned_off_heap_memory = true && (is_set_assigned_off_heap_memory());
- list.add(present_assigned_off_heap_memory);
- if (present_assigned_off_heap_memory)
- list.add(assigned_off_heap_memory);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((is_set_owner()) ? 131071 : 524287);
+ if (is_set_owner())
+ hashCode = hashCode * 8191 + owner.hashCode();
+
+ hashCode = hashCode * 8191 + ((is_set_total_topologies()) ? 131071 : 524287);
+ if (is_set_total_topologies())
+ hashCode = hashCode * 8191 + total_topologies;
+
+ hashCode = hashCode * 8191 + ((is_set_total_executors()) ? 131071 : 524287);
+ if (is_set_total_executors())
+ hashCode = hashCode * 8191 + total_executors;
+
+ hashCode = hashCode * 8191 + ((is_set_total_workers()) ? 131071 : 524287);
+ if (is_set_total_workers())
+ hashCode = hashCode * 8191 + total_workers;
+
+ hashCode = hashCode * 8191 + ((is_set_memory_usage()) ? 131071 : 524287);
+ if (is_set_memory_usage())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(memory_usage);
+
+ hashCode = hashCode * 8191 + ((is_set_cpu_usage()) ? 131071 : 524287);
+ if (is_set_cpu_usage())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(cpu_usage);
+
+ hashCode = hashCode * 8191 + ((is_set_memory_guarantee()) ? 131071 : 524287);
+ if (is_set_memory_guarantee())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(memory_guarantee);
+
+ hashCode = hashCode * 8191 + ((is_set_cpu_guarantee()) ? 131071 : 524287);
+ if (is_set_cpu_guarantee())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(cpu_guarantee);
+
+ hashCode = hashCode * 8191 + ((is_set_memory_guarantee_remaining()) ? 131071 : 524287);
+ if (is_set_memory_guarantee_remaining())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(memory_guarantee_remaining);
+
+ hashCode = hashCode * 8191 + ((is_set_cpu_guarantee_remaining()) ? 131071 : 524287);
+ if (is_set_cpu_guarantee_remaining())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(cpu_guarantee_remaining);
+
+ hashCode = hashCode * 8191 + ((is_set_isolated_node_guarantee()) ? 131071 : 524287);
+ if (is_set_isolated_node_guarantee())
+ hashCode = hashCode * 8191 + isolated_node_guarantee;
+
+ hashCode = hashCode * 8191 + ((is_set_total_tasks()) ? 131071 : 524287);
+ if (is_set_total_tasks())
+ hashCode = hashCode * 8191 + total_tasks;
+
+ hashCode = hashCode * 8191 + ((is_set_requested_on_heap_memory()) ? 131071 : 524287);
+ if (is_set_requested_on_heap_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_on_heap_memory);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_off_heap_memory()) ? 131071 : 524287);
+ if (is_set_requested_off_heap_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_off_heap_memory);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_total_memory()) ? 131071 : 524287);
+ if (is_set_requested_total_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_total_memory);
+
+ hashCode = hashCode * 8191 + ((is_set_requested_cpu()) ? 131071 : 524287);
+ if (is_set_requested_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(requested_cpu);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_on_heap_memory()) ? 131071 : 524287);
+ if (is_set_assigned_on_heap_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_on_heap_memory);
+
+ hashCode = hashCode * 8191 + ((is_set_assigned_off_heap_memory()) ? 131071 : 524287);
+ if (is_set_assigned_off_heap_memory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(assigned_off_heap_memory);
+
+ return hashCode;
}
@Override
@@ -1287,7 +1241,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
+ lastComparison = java.lang.Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1297,7 +1251,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_total_topologies()).compareTo(other.is_set_total_topologies());
+ lastComparison = java.lang.Boolean.valueOf(is_set_total_topologies()).compareTo(other.is_set_total_topologies());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1307,7 +1261,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_total_executors()).compareTo(other.is_set_total_executors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_total_executors()).compareTo(other.is_set_total_executors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1317,7 +1271,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_total_workers()).compareTo(other.is_set_total_workers());
+ lastComparison = java.lang.Boolean.valueOf(is_set_total_workers()).compareTo(other.is_set_total_workers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1327,7 +1281,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_memory_usage()).compareTo(other.is_set_memory_usage());
+ lastComparison = java.lang.Boolean.valueOf(is_set_memory_usage()).compareTo(other.is_set_memory_usage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1337,7 +1291,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_cpu_usage()).compareTo(other.is_set_cpu_usage());
+ lastComparison = java.lang.Boolean.valueOf(is_set_cpu_usage()).compareTo(other.is_set_cpu_usage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1347,7 +1301,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_memory_guarantee()).compareTo(other.is_set_memory_guarantee());
+ lastComparison = java.lang.Boolean.valueOf(is_set_memory_guarantee()).compareTo(other.is_set_memory_guarantee());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1357,7 +1311,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_cpu_guarantee()).compareTo(other.is_set_cpu_guarantee());
+ lastComparison = java.lang.Boolean.valueOf(is_set_cpu_guarantee()).compareTo(other.is_set_cpu_guarantee());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1367,7 +1321,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_memory_guarantee_remaining()).compareTo(other.is_set_memory_guarantee_remaining());
+ lastComparison = java.lang.Boolean.valueOf(is_set_memory_guarantee_remaining()).compareTo(other.is_set_memory_guarantee_remaining());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1377,7 +1331,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_cpu_guarantee_remaining()).compareTo(other.is_set_cpu_guarantee_remaining());
+ lastComparison = java.lang.Boolean.valueOf(is_set_cpu_guarantee_remaining()).compareTo(other.is_set_cpu_guarantee_remaining());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1387,7 +1341,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_isolated_node_guarantee()).compareTo(other.is_set_isolated_node_guarantee());
+ lastComparison = java.lang.Boolean.valueOf(is_set_isolated_node_guarantee()).compareTo(other.is_set_isolated_node_guarantee());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1397,7 +1351,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_total_tasks()).compareTo(other.is_set_total_tasks());
+ lastComparison = java.lang.Boolean.valueOf(is_set_total_tasks()).compareTo(other.is_set_total_tasks());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1407,7 +1361,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_on_heap_memory()).compareTo(other.is_set_requested_on_heap_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_on_heap_memory()).compareTo(other.is_set_requested_on_heap_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1417,7 +1371,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_off_heap_memory()).compareTo(other.is_set_requested_off_heap_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_off_heap_memory()).compareTo(other.is_set_requested_off_heap_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1427,7 +1381,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_total_memory()).compareTo(other.is_set_requested_total_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_total_memory()).compareTo(other.is_set_requested_total_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1437,7 +1391,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_requested_cpu()).compareTo(other.is_set_requested_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_requested_cpu()).compareTo(other.is_set_requested_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1447,7 +1401,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_on_heap_memory()).compareTo(other.is_set_assigned_on_heap_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_on_heap_memory()).compareTo(other.is_set_assigned_on_heap_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1457,7 +1411,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_assigned_off_heap_memory()).compareTo(other.is_set_assigned_off_heap_memory());
+ lastComparison = java.lang.Boolean.valueOf(is_set_assigned_off_heap_memory()).compareTo(other.is_set_assigned_off_heap_memory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1475,16 +1429,16 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("OwnerResourceSummary(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("OwnerResourceSummary(");
boolean first = true;
sb.append("owner:");
@@ -1617,7 +1571,7 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1627,13 +1581,13 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
}
- private static class OwnerResourceSummaryStandardSchemeFactory implements SchemeFactory {
+ private static class OwnerResourceSummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public OwnerResourceSummaryStandardScheme getScheme() {
return new OwnerResourceSummaryStandardScheme();
}
}
- private static class OwnerResourceSummaryStandardScheme extends StandardScheme<OwnerResourceSummary> {
+ private static class OwnerResourceSummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<OwnerResourceSummary> {
public void read(org.apache.thrift.protocol.TProtocol iprot, OwnerResourceSummary struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1898,19 +1852,19 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
- private static class OwnerResourceSummaryTupleSchemeFactory implements SchemeFactory {
+ private static class OwnerResourceSummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public OwnerResourceSummaryTupleScheme getScheme() {
return new OwnerResourceSummaryTupleScheme();
}
}
- private static class OwnerResourceSummaryTupleScheme extends TupleScheme<OwnerResourceSummary> {
+ private static class OwnerResourceSummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<OwnerResourceSummary> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, OwnerResourceSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.owner);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_total_topologies()) {
optionals.set(0);
}
@@ -2018,10 +1972,10 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, OwnerResourceSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.owner = iprot.readString();
struct.set_owner_isSet(true);
- BitSet incoming = iprot.readBitSet(17);
+ java.util.BitSet incoming = iprot.readBitSet(17);
if (incoming.get(0)) {
struct.total_topologies = iprot.readI32();
struct.set_total_topologies_isSet(true);
@@ -2093,5 +2047,8 @@ public class OwnerResourceSummary implements org.apache.thrift.TBase<OwnerResour
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/PrivateWorkerKey.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/PrivateWorkerKey.java b/storm-client/src/jvm/org/apache/storm/generated/PrivateWorkerKey.java
index 9884e09..27a22c2 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/PrivateWorkerKey.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/PrivateWorkerKey.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKey, PrivateWorkerKey._Fields>, java.io.Serializable, Cloneable, Comparable<PrivateWorkerKey> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrivateWorkerKey");
@@ -59,14 +32,11 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField EXPIRATION_TIME_MILLIS_FIELD_DESC = new org.apache.thrift.protocol.TField("expirationTimeMillis", org.apache.thrift.protocol.TType.I64, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new PrivateWorkerKeyStandardSchemeFactory());
- schemes.put(TupleScheme.class, new PrivateWorkerKeyTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new PrivateWorkerKeyStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new PrivateWorkerKeyTupleSchemeFactory();
- private ByteBuffer key; // required
- private String userName; // required
+ private java.nio.ByteBuffer key; // required
+ private java.lang.String userName; // required
private long expirationTimeMillis; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -75,10 +45,10 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
USER_NAME((short)2, "userName"),
EXPIRATION_TIME_MILLIS((short)3, "expirationTimeMillis");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -105,21 +75,21 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -128,7 +98,7 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -136,16 +106,16 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
// isset id assignments
private static final int __EXPIRATIONTIMEMILLIS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXPIRATION_TIME_MILLIS, new org.apache.thrift.meta_data.FieldMetaData("expirationTimeMillis", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrivateWorkerKey.class, metaDataMap);
}
@@ -153,8 +123,8 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
}
public PrivateWorkerKey(
- ByteBuffer key,
- String userName,
+ java.nio.ByteBuffer key,
+ java.lang.String userName,
long expirationTimeMillis)
{
this();
@@ -195,15 +165,15 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
return key == null ? null : key.array();
}
- public ByteBuffer buffer_for_key() {
+ public java.nio.ByteBuffer buffer_for_key() {
return org.apache.thrift.TBaseHelper.copyBinary(key);
}
public void set_key(byte[] key) {
- this.key = key == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(key, key.length));
+ this.key = key == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(key.clone());
}
- public void set_key(ByteBuffer key) {
+ public void set_key(java.nio.ByteBuffer key) {
this.key = org.apache.thrift.TBaseHelper.copyBinary(key);
}
@@ -222,11 +192,11 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
}
}
- public String get_userName() {
+ public java.lang.String get_userName() {
return this.userName;
}
- public void set_userName(String userName) {
+ public void set_userName(java.lang.String userName) {
this.userName = userName;
}
@@ -255,25 +225,29 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
}
public void unset_expirationTimeMillis() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRATIONTIMEMILLIS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXPIRATIONTIMEMILLIS_ISSET_ID);
}
/** Returns true if field expirationTimeMillis is set (has been assigned a value) and false otherwise */
public boolean is_set_expirationTimeMillis() {
- return EncodingUtils.testBit(__isset_bitfield, __EXPIRATIONTIMEMILLIS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPIRATIONTIMEMILLIS_ISSET_ID);
}
public void set_expirationTimeMillis_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRATIONTIMEMILLIS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXPIRATIONTIMEMILLIS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case KEY:
if (value == null) {
unset_key();
} else {
- set_key((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ set_key((byte[])value);
+ } else {
+ set_key((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -281,7 +255,7 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
if (value == null) {
unset_userName();
} else {
- set_userName((String)value);
+ set_userName((java.lang.String)value);
}
break;
@@ -289,14 +263,14 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
if (value == null) {
unset_expirationTimeMillis();
} else {
- set_expirationTimeMillis((Long)value);
+ set_expirationTimeMillis((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case KEY:
return get_key();
@@ -308,13 +282,13 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
return get_expirationTimeMillis();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -325,11 +299,11 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
case EXPIRATION_TIME_MILLIS:
return is_set_expirationTimeMillis();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof PrivateWorkerKey)
@@ -340,6 +314,8 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
public boolean equals(PrivateWorkerKey that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_key = true && this.is_set_key();
boolean that_present_key = true && that.is_set_key();
@@ -373,24 +349,19 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_key = true && (is_set_key());
- list.add(present_key);
- if (present_key)
- list.add(key);
+ hashCode = hashCode * 8191 + ((is_set_key()) ? 131071 : 524287);
+ if (is_set_key())
+ hashCode = hashCode * 8191 + key.hashCode();
- boolean present_userName = true && (is_set_userName());
- list.add(present_userName);
- if (present_userName)
- list.add(userName);
+ hashCode = hashCode * 8191 + ((is_set_userName()) ? 131071 : 524287);
+ if (is_set_userName())
+ hashCode = hashCode * 8191 + userName.hashCode();
- boolean present_expirationTimeMillis = true;
- list.add(present_expirationTimeMillis);
- if (present_expirationTimeMillis)
- list.add(expirationTimeMillis);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(expirationTimeMillis);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -401,7 +372,7 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_key()).compareTo(other.is_set_key());
+ lastComparison = java.lang.Boolean.valueOf(is_set_key()).compareTo(other.is_set_key());
if (lastComparison != 0) {
return lastComparison;
}
@@ -411,7 +382,7 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_userName()).compareTo(other.is_set_userName());
+ lastComparison = java.lang.Boolean.valueOf(is_set_userName()).compareTo(other.is_set_userName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -421,7 +392,7 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_expirationTimeMillis()).compareTo(other.is_set_expirationTimeMillis());
+ lastComparison = java.lang.Boolean.valueOf(is_set_expirationTimeMillis()).compareTo(other.is_set_expirationTimeMillis());
if (lastComparison != 0) {
return lastComparison;
}
@@ -439,16 +410,16 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("PrivateWorkerKey(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("PrivateWorkerKey(");
boolean first = true;
sb.append("key:");
@@ -499,7 +470,7 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -509,13 +480,13 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
}
}
- private static class PrivateWorkerKeyStandardSchemeFactory implements SchemeFactory {
+ private static class PrivateWorkerKeyStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public PrivateWorkerKeyStandardScheme getScheme() {
return new PrivateWorkerKeyStandardScheme();
}
}
- private static class PrivateWorkerKeyStandardScheme extends StandardScheme<PrivateWorkerKey> {
+ private static class PrivateWorkerKeyStandardScheme extends org.apache.thrift.scheme.StandardScheme<PrivateWorkerKey> {
public void read(org.apache.thrift.protocol.TProtocol iprot, PrivateWorkerKey struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -583,17 +554,17 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
}
- private static class PrivateWorkerKeyTupleSchemeFactory implements SchemeFactory {
+ private static class PrivateWorkerKeyTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public PrivateWorkerKeyTupleScheme getScheme() {
return new PrivateWorkerKeyTupleScheme();
}
}
- private static class PrivateWorkerKeyTupleScheme extends TupleScheme<PrivateWorkerKey> {
+ private static class PrivateWorkerKeyTupleScheme extends org.apache.thrift.scheme.TupleScheme<PrivateWorkerKey> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, PrivateWorkerKey struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeBinary(struct.key);
oprot.writeString(struct.userName);
oprot.writeI64(struct.expirationTimeMillis);
@@ -601,7 +572,7 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, PrivateWorkerKey struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.key = iprot.readBinary();
struct.set_key_isSet(true);
struct.userName = iprot.readString();
@@ -611,5 +582,8 @@ public class PrivateWorkerKey implements org.apache.thrift.TBase<PrivateWorkerKe
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ProfileAction.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ProfileAction.java b/storm-client/src/jvm/org/apache/storm/generated/ProfileAction.java
index f783c98..8581b8a 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ProfileAction.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ProfileAction.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -24,10 +24,6 @@
package org.apache.storm.generated;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
public enum ProfileAction implements org.apache.thrift.TEnum {
JPROFILE_STOP(0),
JPROFILE_START(1),
[38/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ClusterWorkerHeartbeat.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ClusterWorkerHeartbeat.java b/storm-client/src/jvm/org/apache/storm/generated/ClusterWorkerHeartbeat.java
index a2651cd..3c2d031 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ClusterWorkerHeartbeat.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ClusterWorkerHeartbeat.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWorkerHeartbeat, ClusterWorkerHeartbeat._Fields>, java.io.Serializable, Cloneable, Comparable<ClusterWorkerHeartbeat> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClusterWorkerHeartbeat");
@@ -60,14 +33,11 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
private static final org.apache.thrift.protocol.TField TIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("time_secs", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.protocol.TField UPTIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("uptime_secs", org.apache.thrift.protocol.TType.I32, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ClusterWorkerHeartbeatStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ClusterWorkerHeartbeatTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ClusterWorkerHeartbeatStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ClusterWorkerHeartbeatTupleSchemeFactory();
- private String storm_id; // required
- private Map<ExecutorInfo,ExecutorStats> executor_stats; // required
+ private java.lang.String storm_id; // required
+ private java.util.Map<ExecutorInfo,ExecutorStats> executor_stats; // required
private int time_secs; // required
private int uptime_secs; // required
@@ -78,10 +48,10 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
TIME_SECS((short)3, "time_secs"),
UPTIME_SECS((short)4, "uptime_secs");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -110,21 +80,21 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -133,7 +103,7 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -142,9 +112,9 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
private static final int __TIME_SECS_ISSET_ID = 0;
private static final int __UPTIME_SECS_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.STORM_ID, new org.apache.thrift.meta_data.FieldMetaData("storm_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXECUTOR_STATS, new org.apache.thrift.meta_data.FieldMetaData("executor_stats", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -155,7 +125,7 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.UPTIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("uptime_secs", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClusterWorkerHeartbeat.class, metaDataMap);
}
@@ -163,8 +133,8 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
}
public ClusterWorkerHeartbeat(
- String storm_id,
- Map<ExecutorInfo,ExecutorStats> executor_stats,
+ java.lang.String storm_id,
+ java.util.Map<ExecutorInfo,ExecutorStats> executor_stats,
int time_secs,
int uptime_secs)
{
@@ -186,8 +156,8 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
this.storm_id = other.storm_id;
}
if (other.is_set_executor_stats()) {
- Map<ExecutorInfo,ExecutorStats> __this__executor_stats = new HashMap<ExecutorInfo,ExecutorStats>(other.executor_stats.size());
- for (Map.Entry<ExecutorInfo, ExecutorStats> other_element : other.executor_stats.entrySet()) {
+ java.util.Map<ExecutorInfo,ExecutorStats> __this__executor_stats = new java.util.HashMap<ExecutorInfo,ExecutorStats>(other.executor_stats.size());
+ for (java.util.Map.Entry<ExecutorInfo, ExecutorStats> other_element : other.executor_stats.entrySet()) {
ExecutorInfo other_element_key = other_element.getKey();
ExecutorStats other_element_value = other_element.getValue();
@@ -218,11 +188,11 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
this.uptime_secs = 0;
}
- public String get_storm_id() {
+ public java.lang.String get_storm_id() {
return this.storm_id;
}
- public void set_storm_id(String storm_id) {
+ public void set_storm_id(java.lang.String storm_id) {
this.storm_id = storm_id;
}
@@ -247,16 +217,16 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
public void put_to_executor_stats(ExecutorInfo key, ExecutorStats val) {
if (this.executor_stats == null) {
- this.executor_stats = new HashMap<ExecutorInfo,ExecutorStats>();
+ this.executor_stats = new java.util.HashMap<ExecutorInfo,ExecutorStats>();
}
this.executor_stats.put(key, val);
}
- public Map<ExecutorInfo,ExecutorStats> get_executor_stats() {
+ public java.util.Map<ExecutorInfo,ExecutorStats> get_executor_stats() {
return this.executor_stats;
}
- public void set_executor_stats(Map<ExecutorInfo,ExecutorStats> executor_stats) {
+ public void set_executor_stats(java.util.Map<ExecutorInfo,ExecutorStats> executor_stats) {
this.executor_stats = executor_stats;
}
@@ -285,16 +255,16 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
}
public void unset_time_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
}
/** Returns true if field time_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_time_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_SECS_ISSET_ID);
}
public void set_time_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_SECS_ISSET_ID, value);
}
public int get_uptime_secs() {
@@ -307,25 +277,25 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
}
public void unset_uptime_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
/** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_uptime_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
public void set_uptime_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case STORM_ID:
if (value == null) {
unset_storm_id();
} else {
- set_storm_id((String)value);
+ set_storm_id((java.lang.String)value);
}
break;
@@ -333,7 +303,7 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
if (value == null) {
unset_executor_stats();
} else {
- set_executor_stats((Map<ExecutorInfo,ExecutorStats>)value);
+ set_executor_stats((java.util.Map<ExecutorInfo,ExecutorStats>)value);
}
break;
@@ -341,7 +311,7 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
if (value == null) {
unset_time_secs();
} else {
- set_time_secs((Integer)value);
+ set_time_secs((java.lang.Integer)value);
}
break;
@@ -349,14 +319,14 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
if (value == null) {
unset_uptime_secs();
} else {
- set_uptime_secs((Integer)value);
+ set_uptime_secs((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case STORM_ID:
return get_storm_id();
@@ -371,13 +341,13 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
return get_uptime_secs();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -390,11 +360,11 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
case UPTIME_SECS:
return is_set_uptime_secs();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ClusterWorkerHeartbeat)
@@ -405,6 +375,8 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
public boolean equals(ClusterWorkerHeartbeat that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_storm_id = true && this.is_set_storm_id();
boolean that_present_storm_id = true && that.is_set_storm_id();
@@ -447,29 +419,21 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_storm_id = true && (is_set_storm_id());
- list.add(present_storm_id);
- if (present_storm_id)
- list.add(storm_id);
+ hashCode = hashCode * 8191 + ((is_set_storm_id()) ? 131071 : 524287);
+ if (is_set_storm_id())
+ hashCode = hashCode * 8191 + storm_id.hashCode();
- boolean present_executor_stats = true && (is_set_executor_stats());
- list.add(present_executor_stats);
- if (present_executor_stats)
- list.add(executor_stats);
+ hashCode = hashCode * 8191 + ((is_set_executor_stats()) ? 131071 : 524287);
+ if (is_set_executor_stats())
+ hashCode = hashCode * 8191 + executor_stats.hashCode();
- boolean present_time_secs = true;
- list.add(present_time_secs);
- if (present_time_secs)
- list.add(time_secs);
+ hashCode = hashCode * 8191 + time_secs;
- boolean present_uptime_secs = true;
- list.add(present_uptime_secs);
- if (present_uptime_secs)
- list.add(uptime_secs);
+ hashCode = hashCode * 8191 + uptime_secs;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -480,7 +444,7 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_storm_id()).compareTo(other.is_set_storm_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_storm_id()).compareTo(other.is_set_storm_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -490,7 +454,7 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_executor_stats()).compareTo(other.is_set_executor_stats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_executor_stats()).compareTo(other.is_set_executor_stats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -500,7 +464,7 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -510,7 +474,7 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -528,16 +492,16 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ClusterWorkerHeartbeat(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ClusterWorkerHeartbeat(");
boolean first = true;
sb.append("storm_id:");
@@ -596,7 +560,7 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -606,13 +570,13 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
}
}
- private static class ClusterWorkerHeartbeatStandardSchemeFactory implements SchemeFactory {
+ private static class ClusterWorkerHeartbeatStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ClusterWorkerHeartbeatStandardScheme getScheme() {
return new ClusterWorkerHeartbeatStandardScheme();
}
}
- private static class ClusterWorkerHeartbeatStandardScheme extends StandardScheme<ClusterWorkerHeartbeat> {
+ private static class ClusterWorkerHeartbeatStandardScheme extends org.apache.thrift.scheme.StandardScheme<ClusterWorkerHeartbeat> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ClusterWorkerHeartbeat struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -636,7 +600,7 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map772 = iprot.readMapBegin();
- struct.executor_stats = new HashMap<ExecutorInfo,ExecutorStats>(2*_map772.size);
+ struct.executor_stats = new java.util.HashMap<ExecutorInfo,ExecutorStats>(2*_map772.size);
ExecutorInfo _key773;
ExecutorStats _val774;
for (int _i775 = 0; _i775 < _map772.size; ++_i775)
@@ -692,7 +656,7 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
oprot.writeFieldBegin(EXECUTOR_STATS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, struct.executor_stats.size()));
- for (Map.Entry<ExecutorInfo, ExecutorStats> _iter776 : struct.executor_stats.entrySet())
+ for (java.util.Map.Entry<ExecutorInfo, ExecutorStats> _iter776 : struct.executor_stats.entrySet())
{
_iter776.getKey().write(oprot);
_iter776.getValue().write(oprot);
@@ -713,21 +677,21 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
}
- private static class ClusterWorkerHeartbeatTupleSchemeFactory implements SchemeFactory {
+ private static class ClusterWorkerHeartbeatTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ClusterWorkerHeartbeatTupleScheme getScheme() {
return new ClusterWorkerHeartbeatTupleScheme();
}
}
- private static class ClusterWorkerHeartbeatTupleScheme extends TupleScheme<ClusterWorkerHeartbeat> {
+ private static class ClusterWorkerHeartbeatTupleScheme extends org.apache.thrift.scheme.TupleScheme<ClusterWorkerHeartbeat> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ClusterWorkerHeartbeat struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.storm_id);
{
oprot.writeI32(struct.executor_stats.size());
- for (Map.Entry<ExecutorInfo, ExecutorStats> _iter777 : struct.executor_stats.entrySet())
+ for (java.util.Map.Entry<ExecutorInfo, ExecutorStats> _iter777 : struct.executor_stats.entrySet())
{
_iter777.getKey().write(oprot);
_iter777.getValue().write(oprot);
@@ -739,12 +703,12 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ClusterWorkerHeartbeat struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.storm_id = iprot.readString();
struct.set_storm_id_isSet(true);
{
org.apache.thrift.protocol.TMap _map778 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.executor_stats = new HashMap<ExecutorInfo,ExecutorStats>(2*_map778.size);
+ struct.executor_stats = new java.util.HashMap<ExecutorInfo,ExecutorStats>(2*_map778.size);
ExecutorInfo _key779;
ExecutorStats _val780;
for (int _i781 = 0; _i781 < _map778.size; ++_i781)
@@ -764,5 +728,8 @@ public class ClusterWorkerHeartbeat implements org.apache.thrift.TBase<ClusterWo
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/CommonAggregateStats.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/CommonAggregateStats.java b/storm-client/src/jvm/org/apache/storm/generated/CommonAggregateStats.java
index 991ac60..44be3cc 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/CommonAggregateStats.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/CommonAggregateStats.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggregateStats, CommonAggregateStats._Fields>, java.io.Serializable, Cloneable, Comparable<CommonAggregateStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CommonAggregateStats");
@@ -63,11 +36,8 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
private static final org.apache.thrift.protocol.TField FAILED_FIELD_DESC = new org.apache.thrift.protocol.TField("failed", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.protocol.TField RESOURCES_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("resources_map", org.apache.thrift.protocol.TType.MAP, (short)7);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new CommonAggregateStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new CommonAggregateStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new CommonAggregateStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new CommonAggregateStatsTupleSchemeFactory();
private int num_executors; // optional
private int num_tasks; // optional
@@ -75,7 +45,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
private long transferred; // optional
private long acked; // optional
private long failed; // optional
- private Map<String,Double> resources_map; // optional
+ private java.util.Map<java.lang.String,java.lang.Double> resources_map; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -87,10 +57,10 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
FAILED((short)6, "failed"),
RESOURCES_MAP((short)7, "resources_map");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -125,21 +95,21 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -148,7 +118,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -162,9 +132,9 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
private static final int __FAILED_ISSET_ID = 5;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.NUM_EXECUTORS,_Fields.NUM_TASKS,_Fields.EMITTED,_Fields.TRANSFERRED,_Fields.ACKED,_Fields.FAILED,_Fields.RESOURCES_MAP};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NUM_EXECUTORS, new org.apache.thrift.meta_data.FieldMetaData("num_executors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.NUM_TASKS, new org.apache.thrift.meta_data.FieldMetaData("num_tasks", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -181,7 +151,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CommonAggregateStats.class, metaDataMap);
}
@@ -200,7 +170,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
this.acked = other.acked;
this.failed = other.failed;
if (other.is_set_resources_map()) {
- Map<String,Double> __this__resources_map = new HashMap<String,Double>(other.resources_map);
+ java.util.Map<java.lang.String,java.lang.Double> __this__resources_map = new java.util.HashMap<java.lang.String,java.lang.Double>(other.resources_map);
this.resources_map = __this__resources_map;
}
}
@@ -236,16 +206,16 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
}
public void unset_num_executors() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
}
/** Returns true if field num_executors is set (has been assigned a value) and false otherwise */
public boolean is_set_num_executors() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID);
}
public void set_num_executors_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_EXECUTORS_ISSET_ID, value);
}
public int get_num_tasks() {
@@ -258,16 +228,16 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
}
public void unset_num_tasks() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
}
/** Returns true if field num_tasks is set (has been assigned a value) and false otherwise */
public boolean is_set_num_tasks() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_TASKS_ISSET_ID);
}
public void set_num_tasks_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_TASKS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_TASKS_ISSET_ID, value);
}
public long get_emitted() {
@@ -280,16 +250,16 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
}
public void unset_emitted() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EMITTED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EMITTED_ISSET_ID);
}
/** Returns true if field emitted is set (has been assigned a value) and false otherwise */
public boolean is_set_emitted() {
- return EncodingUtils.testBit(__isset_bitfield, __EMITTED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMITTED_ISSET_ID);
}
public void set_emitted_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EMITTED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EMITTED_ISSET_ID, value);
}
public long get_transferred() {
@@ -302,16 +272,16 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
}
public void unset_transferred() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRANSFERRED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSFERRED_ISSET_ID);
}
/** Returns true if field transferred is set (has been assigned a value) and false otherwise */
public boolean is_set_transferred() {
- return EncodingUtils.testBit(__isset_bitfield, __TRANSFERRED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSFERRED_ISSET_ID);
}
public void set_transferred_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRANSFERRED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSFERRED_ISSET_ID, value);
}
public long get_acked() {
@@ -324,16 +294,16 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
}
public void unset_acked() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ACKED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ACKED_ISSET_ID);
}
/** Returns true if field acked is set (has been assigned a value) and false otherwise */
public boolean is_set_acked() {
- return EncodingUtils.testBit(__isset_bitfield, __ACKED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ACKED_ISSET_ID);
}
public void set_acked_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ACKED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ACKED_ISSET_ID, value);
}
public long get_failed() {
@@ -346,34 +316,34 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
}
public void unset_failed() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FAILED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FAILED_ISSET_ID);
}
/** Returns true if field failed is set (has been assigned a value) and false otherwise */
public boolean is_set_failed() {
- return EncodingUtils.testBit(__isset_bitfield, __FAILED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FAILED_ISSET_ID);
}
public void set_failed_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FAILED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FAILED_ISSET_ID, value);
}
public int get_resources_map_size() {
return (this.resources_map == null) ? 0 : this.resources_map.size();
}
- public void put_to_resources_map(String key, double val) {
+ public void put_to_resources_map(java.lang.String key, double val) {
if (this.resources_map == null) {
- this.resources_map = new HashMap<String,Double>();
+ this.resources_map = new java.util.HashMap<java.lang.String,java.lang.Double>();
}
this.resources_map.put(key, val);
}
- public Map<String,Double> get_resources_map() {
+ public java.util.Map<java.lang.String,java.lang.Double> get_resources_map() {
return this.resources_map;
}
- public void set_resources_map(Map<String,Double> resources_map) {
+ public void set_resources_map(java.util.Map<java.lang.String,java.lang.Double> resources_map) {
this.resources_map = resources_map;
}
@@ -392,13 +362,13 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case NUM_EXECUTORS:
if (value == null) {
unset_num_executors();
} else {
- set_num_executors((Integer)value);
+ set_num_executors((java.lang.Integer)value);
}
break;
@@ -406,7 +376,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
if (value == null) {
unset_num_tasks();
} else {
- set_num_tasks((Integer)value);
+ set_num_tasks((java.lang.Integer)value);
}
break;
@@ -414,7 +384,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
if (value == null) {
unset_emitted();
} else {
- set_emitted((Long)value);
+ set_emitted((java.lang.Long)value);
}
break;
@@ -422,7 +392,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
if (value == null) {
unset_transferred();
} else {
- set_transferred((Long)value);
+ set_transferred((java.lang.Long)value);
}
break;
@@ -430,7 +400,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
if (value == null) {
unset_acked();
} else {
- set_acked((Long)value);
+ set_acked((java.lang.Long)value);
}
break;
@@ -438,7 +408,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
if (value == null) {
unset_failed();
} else {
- set_failed((Long)value);
+ set_failed((java.lang.Long)value);
}
break;
@@ -446,14 +416,14 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
if (value == null) {
unset_resources_map();
} else {
- set_resources_map((Map<String,Double>)value);
+ set_resources_map((java.util.Map<java.lang.String,java.lang.Double>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NUM_EXECUTORS:
return get_num_executors();
@@ -477,13 +447,13 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
return get_resources_map();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -502,11 +472,11 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
case RESOURCES_MAP:
return is_set_resources_map();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof CommonAggregateStats)
@@ -517,6 +487,8 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
public boolean equals(CommonAggregateStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_num_executors = true && this.is_set_num_executors();
boolean that_present_num_executors = true && that.is_set_num_executors();
@@ -586,44 +558,37 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_num_executors = true && (is_set_num_executors());
- list.add(present_num_executors);
- if (present_num_executors)
- list.add(num_executors);
-
- boolean present_num_tasks = true && (is_set_num_tasks());
- list.add(present_num_tasks);
- if (present_num_tasks)
- list.add(num_tasks);
-
- boolean present_emitted = true && (is_set_emitted());
- list.add(present_emitted);
- if (present_emitted)
- list.add(emitted);
-
- boolean present_transferred = true && (is_set_transferred());
- list.add(present_transferred);
- if (present_transferred)
- list.add(transferred);
-
- boolean present_acked = true && (is_set_acked());
- list.add(present_acked);
- if (present_acked)
- list.add(acked);
-
- boolean present_failed = true && (is_set_failed());
- list.add(present_failed);
- if (present_failed)
- list.add(failed);
-
- boolean present_resources_map = true && (is_set_resources_map());
- list.add(present_resources_map);
- if (present_resources_map)
- list.add(resources_map);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((is_set_num_executors()) ? 131071 : 524287);
+ if (is_set_num_executors())
+ hashCode = hashCode * 8191 + num_executors;
+
+ hashCode = hashCode * 8191 + ((is_set_num_tasks()) ? 131071 : 524287);
+ if (is_set_num_tasks())
+ hashCode = hashCode * 8191 + num_tasks;
+
+ hashCode = hashCode * 8191 + ((is_set_emitted()) ? 131071 : 524287);
+ if (is_set_emitted())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(emitted);
+
+ hashCode = hashCode * 8191 + ((is_set_transferred()) ? 131071 : 524287);
+ if (is_set_transferred())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transferred);
+
+ hashCode = hashCode * 8191 + ((is_set_acked()) ? 131071 : 524287);
+ if (is_set_acked())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(acked);
+
+ hashCode = hashCode * 8191 + ((is_set_failed()) ? 131071 : 524287);
+ if (is_set_failed())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(failed);
+
+ hashCode = hashCode * 8191 + ((is_set_resources_map()) ? 131071 : 524287);
+ if (is_set_resources_map())
+ hashCode = hashCode * 8191 + resources_map.hashCode();
+
+ return hashCode;
}
@Override
@@ -634,7 +599,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_num_executors()).compareTo(other.is_set_num_executors());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_executors()).compareTo(other.is_set_num_executors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -644,7 +609,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_tasks()).compareTo(other.is_set_num_tasks());
+ lastComparison = java.lang.Boolean.valueOf(is_set_num_tasks()).compareTo(other.is_set_num_tasks());
if (lastComparison != 0) {
return lastComparison;
}
@@ -654,7 +619,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_emitted()).compareTo(other.is_set_emitted());
+ lastComparison = java.lang.Boolean.valueOf(is_set_emitted()).compareTo(other.is_set_emitted());
if (lastComparison != 0) {
return lastComparison;
}
@@ -664,7 +629,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_transferred()).compareTo(other.is_set_transferred());
+ lastComparison = java.lang.Boolean.valueOf(is_set_transferred()).compareTo(other.is_set_transferred());
if (lastComparison != 0) {
return lastComparison;
}
@@ -674,7 +639,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_acked()).compareTo(other.is_set_acked());
+ lastComparison = java.lang.Boolean.valueOf(is_set_acked()).compareTo(other.is_set_acked());
if (lastComparison != 0) {
return lastComparison;
}
@@ -684,7 +649,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_failed()).compareTo(other.is_set_failed());
+ lastComparison = java.lang.Boolean.valueOf(is_set_failed()).compareTo(other.is_set_failed());
if (lastComparison != 0) {
return lastComparison;
}
@@ -694,7 +659,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_resources_map()).compareTo(other.is_set_resources_map());
+ lastComparison = java.lang.Boolean.valueOf(is_set_resources_map()).compareTo(other.is_set_resources_map());
if (lastComparison != 0) {
return lastComparison;
}
@@ -712,16 +677,16 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("CommonAggregateStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("CommonAggregateStats(");
boolean first = true;
if (is_set_num_executors()) {
@@ -786,7 +751,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -796,13 +761,13 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
}
}
- private static class CommonAggregateStatsStandardSchemeFactory implements SchemeFactory {
+ private static class CommonAggregateStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public CommonAggregateStatsStandardScheme getScheme() {
return new CommonAggregateStatsStandardScheme();
}
}
- private static class CommonAggregateStatsStandardScheme extends StandardScheme<CommonAggregateStats> {
+ private static class CommonAggregateStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<CommonAggregateStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, CommonAggregateStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -866,8 +831,8 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map396 = iprot.readMapBegin();
- struct.resources_map = new HashMap<String,Double>(2*_map396.size);
- String _key397;
+ struct.resources_map = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map396.size);
+ java.lang.String _key397;
double _val398;
for (int _i399 = 0; _i399 < _map396.size; ++_i399)
{
@@ -930,7 +895,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
oprot.writeFieldBegin(RESOURCES_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, struct.resources_map.size()));
- for (Map.Entry<String, Double> _iter400 : struct.resources_map.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter400 : struct.resources_map.entrySet())
{
oprot.writeString(_iter400.getKey());
oprot.writeDouble(_iter400.getValue());
@@ -946,18 +911,18 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
}
- private static class CommonAggregateStatsTupleSchemeFactory implements SchemeFactory {
+ private static class CommonAggregateStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public CommonAggregateStatsTupleScheme getScheme() {
return new CommonAggregateStatsTupleScheme();
}
}
- private static class CommonAggregateStatsTupleScheme extends TupleScheme<CommonAggregateStats> {
+ private static class CommonAggregateStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<CommonAggregateStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, CommonAggregateStats struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_num_executors()) {
optionals.set(0);
}
@@ -1001,7 +966,7 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
if (struct.is_set_resources_map()) {
{
oprot.writeI32(struct.resources_map.size());
- for (Map.Entry<String, Double> _iter401 : struct.resources_map.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter401 : struct.resources_map.entrySet())
{
oprot.writeString(_iter401.getKey());
oprot.writeDouble(_iter401.getValue());
@@ -1012,8 +977,8 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, CommonAggregateStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(7);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
struct.num_executors = iprot.readI32();
struct.set_num_executors_isSet(true);
@@ -1041,8 +1006,8 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
if (incoming.get(6)) {
{
org.apache.thrift.protocol.TMap _map402 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- struct.resources_map = new HashMap<String,Double>(2*_map402.size);
- String _key403;
+ struct.resources_map = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map402.size);
+ java.lang.String _key403;
double _val404;
for (int _i405 = 0; _i405 < _map402.size; ++_i405)
{
@@ -1056,5 +1021,8 @@ public class CommonAggregateStats implements org.apache.thrift.TBase<CommonAggre
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ComponentAggregateStats.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/ComponentAggregateStats.java b/storm-client/src/jvm/org/apache/storm/generated/ComponentAggregateStats.java
index 2c68331..83a7fae 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/ComponentAggregateStats.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/ComponentAggregateStats.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class ComponentAggregateStats implements org.apache.thrift.TBase<ComponentAggregateStats, ComponentAggregateStats._Fields>, java.io.Serializable, Cloneable, Comparable<ComponentAggregateStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComponentAggregateStats");
@@ -60,11 +33,8 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
private static final org.apache.thrift.protocol.TField SPECIFIC_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("specific_stats", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField LAST_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("last_error", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ComponentAggregateStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ComponentAggregateStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ComponentAggregateStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ComponentAggregateStatsTupleSchemeFactory();
private ComponentType type; // optional
private CommonAggregateStats common_stats; // optional
@@ -82,10 +52,10 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
SPECIFIC_STATS((short)3, "specific_stats"),
LAST_ERROR((short)4, "last_error");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -114,21 +84,21 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -137,16 +107,16 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.TYPE,_Fields.COMMON_STATS,_Fields.SPECIFIC_STATS,_Fields.LAST_ERROR};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ComponentType.class)));
tmpMap.put(_Fields.COMMON_STATS, new org.apache.thrift.meta_data.FieldMetaData("common_stats", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -155,7 +125,7 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SpecificAggregateStats.class)));
tmpMap.put(_Fields.LAST_ERROR, new org.apache.thrift.meta_data.FieldMetaData("last_error", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ErrorInfo.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComponentAggregateStats.class, metaDataMap);
}
@@ -292,7 +262,7 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TYPE:
if (value == null) {
@@ -329,7 +299,7 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TYPE:
return get_type();
@@ -344,13 +314,13 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
return get_last_error();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -363,11 +333,11 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
case LAST_ERROR:
return is_set_last_error();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ComponentAggregateStats)
@@ -378,6 +348,8 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
public boolean equals(ComponentAggregateStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_type = true && this.is_set_type();
boolean that_present_type = true && that.is_set_type();
@@ -420,29 +392,25 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_type = true && (is_set_type());
- list.add(present_type);
- if (present_type)
- list.add(type.getValue());
+ hashCode = hashCode * 8191 + ((is_set_type()) ? 131071 : 524287);
+ if (is_set_type())
+ hashCode = hashCode * 8191 + type.getValue();
- boolean present_common_stats = true && (is_set_common_stats());
- list.add(present_common_stats);
- if (present_common_stats)
- list.add(common_stats);
+ hashCode = hashCode * 8191 + ((is_set_common_stats()) ? 131071 : 524287);
+ if (is_set_common_stats())
+ hashCode = hashCode * 8191 + common_stats.hashCode();
- boolean present_specific_stats = true && (is_set_specific_stats());
- list.add(present_specific_stats);
- if (present_specific_stats)
- list.add(specific_stats);
+ hashCode = hashCode * 8191 + ((is_set_specific_stats()) ? 131071 : 524287);
+ if (is_set_specific_stats())
+ hashCode = hashCode * 8191 + specific_stats.hashCode();
- boolean present_last_error = true && (is_set_last_error());
- list.add(present_last_error);
- if (present_last_error)
- list.add(last_error);
+ hashCode = hashCode * 8191 + ((is_set_last_error()) ? 131071 : 524287);
+ if (is_set_last_error())
+ hashCode = hashCode * 8191 + last_error.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -453,7 +421,7 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_type()).compareTo(other.is_set_type());
+ lastComparison = java.lang.Boolean.valueOf(is_set_type()).compareTo(other.is_set_type());
if (lastComparison != 0) {
return lastComparison;
}
@@ -463,7 +431,7 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_common_stats()).compareTo(other.is_set_common_stats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_common_stats()).compareTo(other.is_set_common_stats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -473,7 +441,7 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_specific_stats()).compareTo(other.is_set_specific_stats());
+ lastComparison = java.lang.Boolean.valueOf(is_set_specific_stats()).compareTo(other.is_set_specific_stats());
if (lastComparison != 0) {
return lastComparison;
}
@@ -483,7 +451,7 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_last_error()).compareTo(other.is_set_last_error());
+ lastComparison = java.lang.Boolean.valueOf(is_set_last_error()).compareTo(other.is_set_last_error());
if (lastComparison != 0) {
return lastComparison;
}
@@ -501,16 +469,16 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ComponentAggregateStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ComponentAggregateStats(");
boolean first = true;
if (is_set_type()) {
@@ -575,7 +543,7 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -583,13 +551,13 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
}
}
- private static class ComponentAggregateStatsStandardSchemeFactory implements SchemeFactory {
+ private static class ComponentAggregateStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ComponentAggregateStatsStandardScheme getScheme() {
return new ComponentAggregateStatsStandardScheme();
}
}
- private static class ComponentAggregateStatsStandardScheme extends StandardScheme<ComponentAggregateStats> {
+ private static class ComponentAggregateStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ComponentAggregateStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ComponentAggregateStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -683,18 +651,18 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
}
- private static class ComponentAggregateStatsTupleSchemeFactory implements SchemeFactory {
+ private static class ComponentAggregateStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ComponentAggregateStatsTupleScheme getScheme() {
return new ComponentAggregateStatsTupleScheme();
}
}
- private static class ComponentAggregateStatsTupleScheme extends TupleScheme<ComponentAggregateStats> {
+ private static class ComponentAggregateStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ComponentAggregateStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ComponentAggregateStats struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_type()) {
optionals.set(0);
}
@@ -724,8 +692,8 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ComponentAggregateStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.type = org.apache.storm.generated.ComponentType.findByValue(iprot.readI32());
struct.set_type_isSet(true);
@@ -748,5 +716,8 @@ public class ComponentAggregateStats implements org.apache.thrift.TBase<Componen
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[40/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/Bolt.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/Bolt.java b/storm-client/src/jvm/org/apache/storm/generated/Bolt.java
index 878ebde..1a3b712 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/Bolt.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/Bolt.java
@@ -16,53 +16,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.io.Serializable, Cloneable, Comparable<Bolt> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Bolt");
private static final org.apache.thrift.protocol.TField BOLT_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("bolt_object", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField COMMON_FIELD_DESC = new org.apache.thrift.protocol.TField("common", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new BoltStandardSchemeFactory());
- schemes.put(TupleScheme.class, new BoltTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new BoltStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new BoltTupleSchemeFactory();
private ComponentObject bolt_object; // required
private ComponentCommon common; // required
@@ -72,10 +42,10 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
BOLT_OBJECT((short)1, "bolt_object"),
COMMON((short)2, "common");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,20 +93,20 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.BOLT_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("bolt_object", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentObject.class)));
tmpMap.put(_Fields.COMMON, new org.apache.thrift.meta_data.FieldMetaData("common", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentCommon.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Bolt.class, metaDataMap);
}
@@ -220,7 +190,7 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case BOLT_OBJECT:
if (value == null) {
@@ -241,7 +211,7 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case BOLT_OBJECT:
return get_bolt_object();
@@ -250,13 +220,13 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
return get_common();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -265,11 +235,11 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
case COMMON:
return is_set_common();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof Bolt)
@@ -280,6 +250,8 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
public boolean equals(Bolt that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_bolt_object = true && this.is_set_bolt_object();
boolean that_present_bolt_object = true && that.is_set_bolt_object();
@@ -304,19 +276,17 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_bolt_object = true && (is_set_bolt_object());
- list.add(present_bolt_object);
- if (present_bolt_object)
- list.add(bolt_object);
+ hashCode = hashCode * 8191 + ((is_set_bolt_object()) ? 131071 : 524287);
+ if (is_set_bolt_object())
+ hashCode = hashCode * 8191 + bolt_object.hashCode();
- boolean present_common = true && (is_set_common());
- list.add(present_common);
- if (present_common)
- list.add(common);
+ hashCode = hashCode * 8191 + ((is_set_common()) ? 131071 : 524287);
+ if (is_set_common())
+ hashCode = hashCode * 8191 + common.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -327,7 +297,7 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_bolt_object()).compareTo(other.is_set_bolt_object());
+ lastComparison = java.lang.Boolean.valueOf(is_set_bolt_object()).compareTo(other.is_set_bolt_object());
if (lastComparison != 0) {
return lastComparison;
}
@@ -337,7 +307,7 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_common()).compareTo(other.is_set_common());
+ lastComparison = java.lang.Boolean.valueOf(is_set_common()).compareTo(other.is_set_common());
if (lastComparison != 0) {
return lastComparison;
}
@@ -355,16 +325,16 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("Bolt(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Bolt(");
boolean first = true;
sb.append("bolt_object:");
@@ -410,7 +380,7 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -418,13 +388,13 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
}
}
- private static class BoltStandardSchemeFactory implements SchemeFactory {
+ private static class BoltStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BoltStandardScheme getScheme() {
return new BoltStandardScheme();
}
}
- private static class BoltStandardScheme extends StandardScheme<Bolt> {
+ private static class BoltStandardScheme extends org.apache.thrift.scheme.StandardScheme<Bolt> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Bolt struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -483,24 +453,24 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
}
- private static class BoltTupleSchemeFactory implements SchemeFactory {
+ private static class BoltTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BoltTupleScheme getScheme() {
return new BoltTupleScheme();
}
}
- private static class BoltTupleScheme extends TupleScheme<Bolt> {
+ private static class BoltTupleScheme extends org.apache.thrift.scheme.TupleScheme<Bolt> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Bolt struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.bolt_object.write(oprot);
struct.common.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Bolt struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.bolt_object = new ComponentObject();
struct.bolt_object.read(iprot);
struct.set_bolt_object_isSet(true);
@@ -510,5 +480,8 @@ public class Bolt implements org.apache.thrift.TBase<Bolt, Bolt._Fields>, java.i
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/BoltAggregateStats.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/BoltAggregateStats.java b/storm-client/src/jvm/org/apache/storm/generated/BoltAggregateStats.java
index c5e6bf9..5b1b034 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/BoltAggregateStats.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/BoltAggregateStats.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregateStats, BoltAggregateStats._Fields>, java.io.Serializable, Cloneable, Comparable<BoltAggregateStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BoltAggregateStats");
@@ -60,11 +33,8 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
private static final org.apache.thrift.protocol.TField EXECUTED_FIELD_DESC = new org.apache.thrift.protocol.TField("executed", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField CAPACITY_FIELD_DESC = new org.apache.thrift.protocol.TField("capacity", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new BoltAggregateStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new BoltAggregateStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new BoltAggregateStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new BoltAggregateStatsTupleSchemeFactory();
private double execute_latency_ms; // optional
private double process_latency_ms; // optional
@@ -78,10 +48,10 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
EXECUTED((short)3, "executed"),
CAPACITY((short)4, "capacity");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -110,21 +80,21 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -133,7 +103,7 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -145,9 +115,9 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
private static final int __CAPACITY_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.EXECUTE_LATENCY_MS,_Fields.PROCESS_LATENCY_MS,_Fields.EXECUTED,_Fields.CAPACITY};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXECUTE_LATENCY_MS, new org.apache.thrift.meta_data.FieldMetaData("execute_latency_ms", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.PROCESS_LATENCY_MS, new org.apache.thrift.meta_data.FieldMetaData("process_latency_ms", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -156,7 +126,7 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.CAPACITY, new org.apache.thrift.meta_data.FieldMetaData("capacity", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BoltAggregateStats.class, metaDataMap);
}
@@ -200,16 +170,16 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
}
public void unset_execute_latency_ms() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXECUTE_LATENCY_MS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXECUTE_LATENCY_MS_ISSET_ID);
}
/** Returns true if field execute_latency_ms is set (has been assigned a value) and false otherwise */
public boolean is_set_execute_latency_ms() {
- return EncodingUtils.testBit(__isset_bitfield, __EXECUTE_LATENCY_MS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXECUTE_LATENCY_MS_ISSET_ID);
}
public void set_execute_latency_ms_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXECUTE_LATENCY_MS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXECUTE_LATENCY_MS_ISSET_ID, value);
}
public double get_process_latency_ms() {
@@ -222,16 +192,16 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
}
public void unset_process_latency_ms() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PROCESS_LATENCY_MS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PROCESS_LATENCY_MS_ISSET_ID);
}
/** Returns true if field process_latency_ms is set (has been assigned a value) and false otherwise */
public boolean is_set_process_latency_ms() {
- return EncodingUtils.testBit(__isset_bitfield, __PROCESS_LATENCY_MS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PROCESS_LATENCY_MS_ISSET_ID);
}
public void set_process_latency_ms_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PROCESS_LATENCY_MS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PROCESS_LATENCY_MS_ISSET_ID, value);
}
public long get_executed() {
@@ -244,16 +214,16 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
}
public void unset_executed() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXECUTED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXECUTED_ISSET_ID);
}
/** Returns true if field executed is set (has been assigned a value) and false otherwise */
public boolean is_set_executed() {
- return EncodingUtils.testBit(__isset_bitfield, __EXECUTED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXECUTED_ISSET_ID);
}
public void set_executed_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXECUTED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXECUTED_ISSET_ID, value);
}
public double get_capacity() {
@@ -266,25 +236,25 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
}
public void unset_capacity() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CAPACITY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CAPACITY_ISSET_ID);
}
/** Returns true if field capacity is set (has been assigned a value) and false otherwise */
public boolean is_set_capacity() {
- return EncodingUtils.testBit(__isset_bitfield, __CAPACITY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CAPACITY_ISSET_ID);
}
public void set_capacity_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CAPACITY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CAPACITY_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXECUTE_LATENCY_MS:
if (value == null) {
unset_execute_latency_ms();
} else {
- set_execute_latency_ms((Double)value);
+ set_execute_latency_ms((java.lang.Double)value);
}
break;
@@ -292,7 +262,7 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
if (value == null) {
unset_process_latency_ms();
} else {
- set_process_latency_ms((Double)value);
+ set_process_latency_ms((java.lang.Double)value);
}
break;
@@ -300,7 +270,7 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
if (value == null) {
unset_executed();
} else {
- set_executed((Long)value);
+ set_executed((java.lang.Long)value);
}
break;
@@ -308,14 +278,14 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
if (value == null) {
unset_capacity();
} else {
- set_capacity((Double)value);
+ set_capacity((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXECUTE_LATENCY_MS:
return get_execute_latency_ms();
@@ -330,13 +300,13 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
return get_capacity();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -349,11 +319,11 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
case CAPACITY:
return is_set_capacity();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof BoltAggregateStats)
@@ -364,6 +334,8 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
public boolean equals(BoltAggregateStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_execute_latency_ms = true && this.is_set_execute_latency_ms();
boolean that_present_execute_latency_ms = true && that.is_set_execute_latency_ms();
@@ -406,29 +378,25 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_execute_latency_ms = true && (is_set_execute_latency_ms());
- list.add(present_execute_latency_ms);
- if (present_execute_latency_ms)
- list.add(execute_latency_ms);
+ hashCode = hashCode * 8191 + ((is_set_execute_latency_ms()) ? 131071 : 524287);
+ if (is_set_execute_latency_ms())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(execute_latency_ms);
- boolean present_process_latency_ms = true && (is_set_process_latency_ms());
- list.add(present_process_latency_ms);
- if (present_process_latency_ms)
- list.add(process_latency_ms);
+ hashCode = hashCode * 8191 + ((is_set_process_latency_ms()) ? 131071 : 524287);
+ if (is_set_process_latency_ms())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(process_latency_ms);
- boolean present_executed = true && (is_set_executed());
- list.add(present_executed);
- if (present_executed)
- list.add(executed);
+ hashCode = hashCode * 8191 + ((is_set_executed()) ? 131071 : 524287);
+ if (is_set_executed())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(executed);
- boolean present_capacity = true && (is_set_capacity());
- list.add(present_capacity);
- if (present_capacity)
- list.add(capacity);
+ hashCode = hashCode * 8191 + ((is_set_capacity()) ? 131071 : 524287);
+ if (is_set_capacity())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(capacity);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -439,7 +407,7 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_execute_latency_ms()).compareTo(other.is_set_execute_latency_ms());
+ lastComparison = java.lang.Boolean.valueOf(is_set_execute_latency_ms()).compareTo(other.is_set_execute_latency_ms());
if (lastComparison != 0) {
return lastComparison;
}
@@ -449,7 +417,7 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_process_latency_ms()).compareTo(other.is_set_process_latency_ms());
+ lastComparison = java.lang.Boolean.valueOf(is_set_process_latency_ms()).compareTo(other.is_set_process_latency_ms());
if (lastComparison != 0) {
return lastComparison;
}
@@ -459,7 +427,7 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_executed()).compareTo(other.is_set_executed());
+ lastComparison = java.lang.Boolean.valueOf(is_set_executed()).compareTo(other.is_set_executed());
if (lastComparison != 0) {
return lastComparison;
}
@@ -469,7 +437,7 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_capacity()).compareTo(other.is_set_capacity());
+ lastComparison = java.lang.Boolean.valueOf(is_set_capacity()).compareTo(other.is_set_capacity());
if (lastComparison != 0) {
return lastComparison;
}
@@ -487,16 +455,16 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("BoltAggregateStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("BoltAggregateStats(");
boolean first = true;
if (is_set_execute_latency_ms()) {
@@ -539,7 +507,7 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -549,13 +517,13 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
}
}
- private static class BoltAggregateStatsStandardSchemeFactory implements SchemeFactory {
+ private static class BoltAggregateStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BoltAggregateStatsStandardScheme getScheme() {
return new BoltAggregateStatsStandardScheme();
}
}
- private static class BoltAggregateStatsStandardScheme extends StandardScheme<BoltAggregateStats> {
+ private static class BoltAggregateStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<BoltAggregateStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, BoltAggregateStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -638,18 +606,18 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
}
- private static class BoltAggregateStatsTupleSchemeFactory implements SchemeFactory {
+ private static class BoltAggregateStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BoltAggregateStatsTupleScheme getScheme() {
return new BoltAggregateStatsTupleScheme();
}
}
- private static class BoltAggregateStatsTupleScheme extends TupleScheme<BoltAggregateStats> {
+ private static class BoltAggregateStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<BoltAggregateStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, BoltAggregateStats struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_execute_latency_ms()) {
optionals.set(0);
}
@@ -679,8 +647,8 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, BoltAggregateStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.execute_latency_ms = iprot.readDouble();
struct.set_execute_latency_ms_isSet(true);
@@ -700,5 +668,8 @@ public class BoltAggregateStats implements org.apache.thrift.TBase<BoltAggregate
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[41/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/Assignment.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/Assignment.java b/storm-client/src/jvm/org/apache/storm/generated/Assignment.java
index e8741df..8240934 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/Assignment.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/Assignment.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class Assignment implements org.apache.thrift.TBase<Assignment, Assignment._Fields>, java.io.Serializable, Cloneable, Comparable<Assignment> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Assignment");
@@ -63,19 +36,16 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
private static final org.apache.thrift.protocol.TField TOTAL_SHARED_OFF_HEAP_FIELD_DESC = new org.apache.thrift.protocol.TField("total_shared_off_heap", org.apache.thrift.protocol.TType.MAP, (short)6);
private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AssignmentStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AssignmentTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AssignmentStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AssignmentTupleSchemeFactory();
- private String master_code_dir; // required
- private Map<String,String> node_host; // optional
- private Map<List<Long>,NodeInfo> executor_node_port; // optional
- private Map<List<Long>,Long> executor_start_time_secs; // optional
- private Map<NodeInfo,WorkerResources> worker_resources; // optional
- private Map<String,Double> total_shared_off_heap; // optional
- private String owner; // optional
+ private java.lang.String master_code_dir; // required
+ private java.util.Map<java.lang.String,java.lang.String> node_host; // optional
+ private java.util.Map<java.util.List<java.lang.Long>,NodeInfo> executor_node_port; // optional
+ private java.util.Map<java.util.List<java.lang.Long>,java.lang.Long> executor_start_time_secs; // optional
+ private java.util.Map<NodeInfo,WorkerResources> worker_resources; // optional
+ private java.util.Map<java.lang.String,java.lang.Double> total_shared_off_heap; // optional
+ private java.lang.String owner; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -87,10 +57,10 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
TOTAL_SHARED_OFF_HEAP((short)6, "total_shared_off_heap"),
OWNER((short)7, "owner");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -125,21 +95,21 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -148,16 +118,16 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.NODE_HOST,_Fields.EXECUTOR_NODE_PORT,_Fields.EXECUTOR_START_TIME_SECS,_Fields.WORKER_RESOURCES,_Fields.TOTAL_SHARED_OFF_HEAP,_Fields.OWNER};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MASTER_CODE_DIR, new org.apache.thrift.meta_data.FieldMetaData("master_code_dir", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NODE_HOST, new org.apache.thrift.meta_data.FieldMetaData("node_host", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -184,25 +154,25 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Assignment.class, metaDataMap);
}
public Assignment() {
- this.node_host = new HashMap<String,String>();
+ this.node_host = new java.util.HashMap<java.lang.String,java.lang.String>();
- this.executor_node_port = new HashMap<List<Long>,NodeInfo>();
+ this.executor_node_port = new java.util.HashMap<java.util.List<java.lang.Long>,NodeInfo>();
- this.executor_start_time_secs = new HashMap<List<Long>,Long>();
+ this.executor_start_time_secs = new java.util.HashMap<java.util.List<java.lang.Long>,java.lang.Long>();
- this.worker_resources = new HashMap<NodeInfo,WorkerResources>();
+ this.worker_resources = new java.util.HashMap<NodeInfo,WorkerResources>();
- this.total_shared_off_heap = new HashMap<String,Double>();
+ this.total_shared_off_heap = new java.util.HashMap<java.lang.String,java.lang.Double>();
}
public Assignment(
- String master_code_dir)
+ java.lang.String master_code_dir)
{
this();
this.master_code_dir = master_code_dir;
@@ -216,17 +186,17 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
this.master_code_dir = other.master_code_dir;
}
if (other.is_set_node_host()) {
- Map<String,String> __this__node_host = new HashMap<String,String>(other.node_host);
+ java.util.Map<java.lang.String,java.lang.String> __this__node_host = new java.util.HashMap<java.lang.String,java.lang.String>(other.node_host);
this.node_host = __this__node_host;
}
if (other.is_set_executor_node_port()) {
- Map<List<Long>,NodeInfo> __this__executor_node_port = new HashMap<List<Long>,NodeInfo>(other.executor_node_port.size());
- for (Map.Entry<List<Long>, NodeInfo> other_element : other.executor_node_port.entrySet()) {
+ java.util.Map<java.util.List<java.lang.Long>,NodeInfo> __this__executor_node_port = new java.util.HashMap<java.util.List<java.lang.Long>,NodeInfo>(other.executor_node_port.size());
+ for (java.util.Map.Entry<java.util.List<java.lang.Long>, NodeInfo> other_element : other.executor_node_port.entrySet()) {
- List<Long> other_element_key = other_element.getKey();
+ java.util.List<java.lang.Long> other_element_key = other_element.getKey();
NodeInfo other_element_value = other_element.getValue();
- List<Long> __this__executor_node_port_copy_key = new ArrayList<Long>(other_element_key);
+ java.util.List<java.lang.Long> __this__executor_node_port_copy_key = new java.util.ArrayList<java.lang.Long>(other_element_key);
NodeInfo __this__executor_node_port_copy_value = new NodeInfo(other_element_value);
@@ -235,23 +205,23 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
this.executor_node_port = __this__executor_node_port;
}
if (other.is_set_executor_start_time_secs()) {
- Map<List<Long>,Long> __this__executor_start_time_secs = new HashMap<List<Long>,Long>(other.executor_start_time_secs.size());
- for (Map.Entry<List<Long>, Long> other_element : other.executor_start_time_secs.entrySet()) {
+ java.util.Map<java.util.List<java.lang.Long>,java.lang.Long> __this__executor_start_time_secs = new java.util.HashMap<java.util.List<java.lang.Long>,java.lang.Long>(other.executor_start_time_secs.size());
+ for (java.util.Map.Entry<java.util.List<java.lang.Long>, java.lang.Long> other_element : other.executor_start_time_secs.entrySet()) {
- List<Long> other_element_key = other_element.getKey();
- Long other_element_value = other_element.getValue();
+ java.util.List<java.lang.Long> other_element_key = other_element.getKey();
+ java.lang.Long other_element_value = other_element.getValue();
- List<Long> __this__executor_start_time_secs_copy_key = new ArrayList<Long>(other_element_key);
+ java.util.List<java.lang.Long> __this__executor_start_time_secs_copy_key = new java.util.ArrayList<java.lang.Long>(other_element_key);
- Long __this__executor_start_time_secs_copy_value = other_element_value;
+ java.lang.Long __this__executor_start_time_secs_copy_value = other_element_value;
__this__executor_start_time_secs.put(__this__executor_start_time_secs_copy_key, __this__executor_start_time_secs_copy_value);
}
this.executor_start_time_secs = __this__executor_start_time_secs;
}
if (other.is_set_worker_resources()) {
- Map<NodeInfo,WorkerResources> __this__worker_resources = new HashMap<NodeInfo,WorkerResources>(other.worker_resources.size());
- for (Map.Entry<NodeInfo, WorkerResources> other_element : other.worker_resources.entrySet()) {
+ java.util.Map<NodeInfo,WorkerResources> __this__worker_resources = new java.util.HashMap<NodeInfo,WorkerResources>(other.worker_resources.size());
+ for (java.util.Map.Entry<NodeInfo, WorkerResources> other_element : other.worker_resources.entrySet()) {
NodeInfo other_element_key = other_element.getKey();
WorkerResources other_element_value = other_element.getValue();
@@ -265,7 +235,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
this.worker_resources = __this__worker_resources;
}
if (other.is_set_total_shared_off_heap()) {
- Map<String,Double> __this__total_shared_off_heap = new HashMap<String,Double>(other.total_shared_off_heap);
+ java.util.Map<java.lang.String,java.lang.Double> __this__total_shared_off_heap = new java.util.HashMap<java.lang.String,java.lang.Double>(other.total_shared_off_heap);
this.total_shared_off_heap = __this__total_shared_off_heap;
}
if (other.is_set_owner()) {
@@ -280,24 +250,24 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
@Override
public void clear() {
this.master_code_dir = null;
- this.node_host = new HashMap<String,String>();
+ this.node_host = new java.util.HashMap<java.lang.String,java.lang.String>();
- this.executor_node_port = new HashMap<List<Long>,NodeInfo>();
+ this.executor_node_port = new java.util.HashMap<java.util.List<java.lang.Long>,NodeInfo>();
- this.executor_start_time_secs = new HashMap<List<Long>,Long>();
+ this.executor_start_time_secs = new java.util.HashMap<java.util.List<java.lang.Long>,java.lang.Long>();
- this.worker_resources = new HashMap<NodeInfo,WorkerResources>();
+ this.worker_resources = new java.util.HashMap<NodeInfo,WorkerResources>();
- this.total_shared_off_heap = new HashMap<String,Double>();
+ this.total_shared_off_heap = new java.util.HashMap<java.lang.String,java.lang.Double>();
this.owner = null;
}
- public String get_master_code_dir() {
+ public java.lang.String get_master_code_dir() {
return this.master_code_dir;
}
- public void set_master_code_dir(String master_code_dir) {
+ public void set_master_code_dir(java.lang.String master_code_dir) {
this.master_code_dir = master_code_dir;
}
@@ -320,18 +290,18 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
return (this.node_host == null) ? 0 : this.node_host.size();
}
- public void put_to_node_host(String key, String val) {
+ public void put_to_node_host(java.lang.String key, java.lang.String val) {
if (this.node_host == null) {
- this.node_host = new HashMap<String,String>();
+ this.node_host = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.node_host.put(key, val);
}
- public Map<String,String> get_node_host() {
+ public java.util.Map<java.lang.String,java.lang.String> get_node_host() {
return this.node_host;
}
- public void set_node_host(Map<String,String> node_host) {
+ public void set_node_host(java.util.Map<java.lang.String,java.lang.String> node_host) {
this.node_host = node_host;
}
@@ -354,18 +324,18 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
return (this.executor_node_port == null) ? 0 : this.executor_node_port.size();
}
- public void put_to_executor_node_port(List<Long> key, NodeInfo val) {
+ public void put_to_executor_node_port(java.util.List<java.lang.Long> key, NodeInfo val) {
if (this.executor_node_port == null) {
- this.executor_node_port = new HashMap<List<Long>,NodeInfo>();
+ this.executor_node_port = new java.util.HashMap<java.util.List<java.lang.Long>,NodeInfo>();
}
this.executor_node_port.put(key, val);
}
- public Map<List<Long>,NodeInfo> get_executor_node_port() {
+ public java.util.Map<java.util.List<java.lang.Long>,NodeInfo> get_executor_node_port() {
return this.executor_node_port;
}
- public void set_executor_node_port(Map<List<Long>,NodeInfo> executor_node_port) {
+ public void set_executor_node_port(java.util.Map<java.util.List<java.lang.Long>,NodeInfo> executor_node_port) {
this.executor_node_port = executor_node_port;
}
@@ -388,18 +358,18 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
return (this.executor_start_time_secs == null) ? 0 : this.executor_start_time_secs.size();
}
- public void put_to_executor_start_time_secs(List<Long> key, long val) {
+ public void put_to_executor_start_time_secs(java.util.List<java.lang.Long> key, long val) {
if (this.executor_start_time_secs == null) {
- this.executor_start_time_secs = new HashMap<List<Long>,Long>();
+ this.executor_start_time_secs = new java.util.HashMap<java.util.List<java.lang.Long>,java.lang.Long>();
}
this.executor_start_time_secs.put(key, val);
}
- public Map<List<Long>,Long> get_executor_start_time_secs() {
+ public java.util.Map<java.util.List<java.lang.Long>,java.lang.Long> get_executor_start_time_secs() {
return this.executor_start_time_secs;
}
- public void set_executor_start_time_secs(Map<List<Long>,Long> executor_start_time_secs) {
+ public void set_executor_start_time_secs(java.util.Map<java.util.List<java.lang.Long>,java.lang.Long> executor_start_time_secs) {
this.executor_start_time_secs = executor_start_time_secs;
}
@@ -424,16 +394,16 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
public void put_to_worker_resources(NodeInfo key, WorkerResources val) {
if (this.worker_resources == null) {
- this.worker_resources = new HashMap<NodeInfo,WorkerResources>();
+ this.worker_resources = new java.util.HashMap<NodeInfo,WorkerResources>();
}
this.worker_resources.put(key, val);
}
- public Map<NodeInfo,WorkerResources> get_worker_resources() {
+ public java.util.Map<NodeInfo,WorkerResources> get_worker_resources() {
return this.worker_resources;
}
- public void set_worker_resources(Map<NodeInfo,WorkerResources> worker_resources) {
+ public void set_worker_resources(java.util.Map<NodeInfo,WorkerResources> worker_resources) {
this.worker_resources = worker_resources;
}
@@ -456,18 +426,18 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
return (this.total_shared_off_heap == null) ? 0 : this.total_shared_off_heap.size();
}
- public void put_to_total_shared_off_heap(String key, double val) {
+ public void put_to_total_shared_off_heap(java.lang.String key, double val) {
if (this.total_shared_off_heap == null) {
- this.total_shared_off_heap = new HashMap<String,Double>();
+ this.total_shared_off_heap = new java.util.HashMap<java.lang.String,java.lang.Double>();
}
this.total_shared_off_heap.put(key, val);
}
- public Map<String,Double> get_total_shared_off_heap() {
+ public java.util.Map<java.lang.String,java.lang.Double> get_total_shared_off_heap() {
return this.total_shared_off_heap;
}
- public void set_total_shared_off_heap(Map<String,Double> total_shared_off_heap) {
+ public void set_total_shared_off_heap(java.util.Map<java.lang.String,java.lang.Double> total_shared_off_heap) {
this.total_shared_off_heap = total_shared_off_heap;
}
@@ -486,11 +456,11 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
}
}
- public String get_owner() {
+ public java.lang.String get_owner() {
return this.owner;
}
- public void set_owner(String owner) {
+ public void set_owner(java.lang.String owner) {
this.owner = owner;
}
@@ -509,13 +479,13 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MASTER_CODE_DIR:
if (value == null) {
unset_master_code_dir();
} else {
- set_master_code_dir((String)value);
+ set_master_code_dir((java.lang.String)value);
}
break;
@@ -523,7 +493,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (value == null) {
unset_node_host();
} else {
- set_node_host((Map<String,String>)value);
+ set_node_host((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
@@ -531,7 +501,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (value == null) {
unset_executor_node_port();
} else {
- set_executor_node_port((Map<List<Long>,NodeInfo>)value);
+ set_executor_node_port((java.util.Map<java.util.List<java.lang.Long>,NodeInfo>)value);
}
break;
@@ -539,7 +509,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (value == null) {
unset_executor_start_time_secs();
} else {
- set_executor_start_time_secs((Map<List<Long>,Long>)value);
+ set_executor_start_time_secs((java.util.Map<java.util.List<java.lang.Long>,java.lang.Long>)value);
}
break;
@@ -547,7 +517,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (value == null) {
unset_worker_resources();
} else {
- set_worker_resources((Map<NodeInfo,WorkerResources>)value);
+ set_worker_resources((java.util.Map<NodeInfo,WorkerResources>)value);
}
break;
@@ -555,7 +525,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (value == null) {
unset_total_shared_off_heap();
} else {
- set_total_shared_off_heap((Map<String,Double>)value);
+ set_total_shared_off_heap((java.util.Map<java.lang.String,java.lang.Double>)value);
}
break;
@@ -563,14 +533,14 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (value == null) {
unset_owner();
} else {
- set_owner((String)value);
+ set_owner((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MASTER_CODE_DIR:
return get_master_code_dir();
@@ -594,13 +564,13 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
return get_owner();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -619,11 +589,11 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
case OWNER:
return is_set_owner();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof Assignment)
@@ -634,6 +604,8 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
public boolean equals(Assignment that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_master_code_dir = true && this.is_set_master_code_dir();
boolean that_present_master_code_dir = true && that.is_set_master_code_dir();
@@ -703,44 +675,37 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_master_code_dir = true && (is_set_master_code_dir());
- list.add(present_master_code_dir);
- if (present_master_code_dir)
- list.add(master_code_dir);
+ hashCode = hashCode * 8191 + ((is_set_master_code_dir()) ? 131071 : 524287);
+ if (is_set_master_code_dir())
+ hashCode = hashCode * 8191 + master_code_dir.hashCode();
- boolean present_node_host = true && (is_set_node_host());
- list.add(present_node_host);
- if (present_node_host)
- list.add(node_host);
+ hashCode = hashCode * 8191 + ((is_set_node_host()) ? 131071 : 524287);
+ if (is_set_node_host())
+ hashCode = hashCode * 8191 + node_host.hashCode();
- boolean present_executor_node_port = true && (is_set_executor_node_port());
- list.add(present_executor_node_port);
- if (present_executor_node_port)
- list.add(executor_node_port);
+ hashCode = hashCode * 8191 + ((is_set_executor_node_port()) ? 131071 : 524287);
+ if (is_set_executor_node_port())
+ hashCode = hashCode * 8191 + executor_node_port.hashCode();
- boolean present_executor_start_time_secs = true && (is_set_executor_start_time_secs());
- list.add(present_executor_start_time_secs);
- if (present_executor_start_time_secs)
- list.add(executor_start_time_secs);
+ hashCode = hashCode * 8191 + ((is_set_executor_start_time_secs()) ? 131071 : 524287);
+ if (is_set_executor_start_time_secs())
+ hashCode = hashCode * 8191 + executor_start_time_secs.hashCode();
- boolean present_worker_resources = true && (is_set_worker_resources());
- list.add(present_worker_resources);
- if (present_worker_resources)
- list.add(worker_resources);
+ hashCode = hashCode * 8191 + ((is_set_worker_resources()) ? 131071 : 524287);
+ if (is_set_worker_resources())
+ hashCode = hashCode * 8191 + worker_resources.hashCode();
- boolean present_total_shared_off_heap = true && (is_set_total_shared_off_heap());
- list.add(present_total_shared_off_heap);
- if (present_total_shared_off_heap)
- list.add(total_shared_off_heap);
+ hashCode = hashCode * 8191 + ((is_set_total_shared_off_heap()) ? 131071 : 524287);
+ if (is_set_total_shared_off_heap())
+ hashCode = hashCode * 8191 + total_shared_off_heap.hashCode();
- boolean present_owner = true && (is_set_owner());
- list.add(present_owner);
- if (present_owner)
- list.add(owner);
+ hashCode = hashCode * 8191 + ((is_set_owner()) ? 131071 : 524287);
+ if (is_set_owner())
+ hashCode = hashCode * 8191 + owner.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -751,7 +716,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_master_code_dir()).compareTo(other.is_set_master_code_dir());
+ lastComparison = java.lang.Boolean.valueOf(is_set_master_code_dir()).compareTo(other.is_set_master_code_dir());
if (lastComparison != 0) {
return lastComparison;
}
@@ -761,7 +726,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_node_host()).compareTo(other.is_set_node_host());
+ lastComparison = java.lang.Boolean.valueOf(is_set_node_host()).compareTo(other.is_set_node_host());
if (lastComparison != 0) {
return lastComparison;
}
@@ -771,7 +736,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_executor_node_port()).compareTo(other.is_set_executor_node_port());
+ lastComparison = java.lang.Boolean.valueOf(is_set_executor_node_port()).compareTo(other.is_set_executor_node_port());
if (lastComparison != 0) {
return lastComparison;
}
@@ -781,7 +746,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_executor_start_time_secs()).compareTo(other.is_set_executor_start_time_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_executor_start_time_secs()).compareTo(other.is_set_executor_start_time_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -791,7 +756,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_worker_resources()).compareTo(other.is_set_worker_resources());
+ lastComparison = java.lang.Boolean.valueOf(is_set_worker_resources()).compareTo(other.is_set_worker_resources());
if (lastComparison != 0) {
return lastComparison;
}
@@ -801,7 +766,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_total_shared_off_heap()).compareTo(other.is_set_total_shared_off_heap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_total_shared_off_heap()).compareTo(other.is_set_total_shared_off_heap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -811,7 +776,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
+ lastComparison = java.lang.Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
if (lastComparison != 0) {
return lastComparison;
}
@@ -829,16 +794,16 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("Assignment(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Assignment(");
boolean first = true;
sb.append("master_code_dir:");
@@ -929,7 +894,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -937,13 +902,13 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
}
}
- private static class AssignmentStandardSchemeFactory implements SchemeFactory {
+ private static class AssignmentStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AssignmentStandardScheme getScheme() {
return new AssignmentStandardScheme();
}
}
- private static class AssignmentStandardScheme extends StandardScheme<Assignment> {
+ private static class AssignmentStandardScheme extends org.apache.thrift.scheme.StandardScheme<Assignment> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Assignment struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -967,9 +932,9 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map686 = iprot.readMapBegin();
- struct.node_host = new HashMap<String,String>(2*_map686.size);
- String _key687;
- String _val688;
+ struct.node_host = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map686.size);
+ java.lang.String _key687;
+ java.lang.String _val688;
for (int _i689 = 0; _i689 < _map686.size; ++_i689)
{
_key687 = iprot.readString();
@@ -987,14 +952,14 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map690 = iprot.readMapBegin();
- struct.executor_node_port = new HashMap<List<Long>,NodeInfo>(2*_map690.size);
- List<Long> _key691;
+ struct.executor_node_port = new java.util.HashMap<java.util.List<java.lang.Long>,NodeInfo>(2*_map690.size);
+ java.util.List<java.lang.Long> _key691;
NodeInfo _val692;
for (int _i693 = 0; _i693 < _map690.size; ++_i693)
{
{
org.apache.thrift.protocol.TList _list694 = iprot.readListBegin();
- _key691 = new ArrayList<Long>(_list694.size);
+ _key691 = new java.util.ArrayList<java.lang.Long>(_list694.size);
long _elem695;
for (int _i696 = 0; _i696 < _list694.size; ++_i696)
{
@@ -1018,14 +983,14 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map697 = iprot.readMapBegin();
- struct.executor_start_time_secs = new HashMap<List<Long>,Long>(2*_map697.size);
- List<Long> _key698;
+ struct.executor_start_time_secs = new java.util.HashMap<java.util.List<java.lang.Long>,java.lang.Long>(2*_map697.size);
+ java.util.List<java.lang.Long> _key698;
long _val699;
for (int _i700 = 0; _i700 < _map697.size; ++_i700)
{
{
org.apache.thrift.protocol.TList _list701 = iprot.readListBegin();
- _key698 = new ArrayList<Long>(_list701.size);
+ _key698 = new java.util.ArrayList<java.lang.Long>(_list701.size);
long _elem702;
for (int _i703 = 0; _i703 < _list701.size; ++_i703)
{
@@ -1048,7 +1013,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map704 = iprot.readMapBegin();
- struct.worker_resources = new HashMap<NodeInfo,WorkerResources>(2*_map704.size);
+ struct.worker_resources = new java.util.HashMap<NodeInfo,WorkerResources>(2*_map704.size);
NodeInfo _key705;
WorkerResources _val706;
for (int _i707 = 0; _i707 < _map704.size; ++_i707)
@@ -1070,8 +1035,8 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map708 = iprot.readMapBegin();
- struct.total_shared_off_heap = new HashMap<String,Double>(2*_map708.size);
- String _key709;
+ struct.total_shared_off_heap = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map708.size);
+ java.lang.String _key709;
double _val710;
for (int _i711 = 0; _i711 < _map708.size; ++_i711)
{
@@ -1117,7 +1082,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
oprot.writeFieldBegin(NODE_HOST_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.node_host.size()));
- for (Map.Entry<String, String> _iter712 : struct.node_host.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter712 : struct.node_host.entrySet())
{
oprot.writeString(_iter712.getKey());
oprot.writeString(_iter712.getValue());
@@ -1132,7 +1097,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
oprot.writeFieldBegin(EXECUTOR_NODE_PORT_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRUCT, struct.executor_node_port.size()));
- for (Map.Entry<List<Long>, NodeInfo> _iter713 : struct.executor_node_port.entrySet())
+ for (java.util.Map.Entry<java.util.List<java.lang.Long>, NodeInfo> _iter713 : struct.executor_node_port.entrySet())
{
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, _iter713.getKey().size()));
@@ -1154,7 +1119,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
oprot.writeFieldBegin(EXECUTOR_START_TIME_SECS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.I64, struct.executor_start_time_secs.size()));
- for (Map.Entry<List<Long>, Long> _iter715 : struct.executor_start_time_secs.entrySet())
+ for (java.util.Map.Entry<java.util.List<java.lang.Long>, java.lang.Long> _iter715 : struct.executor_start_time_secs.entrySet())
{
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, _iter715.getKey().size()));
@@ -1176,7 +1141,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
oprot.writeFieldBegin(WORKER_RESOURCES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, struct.worker_resources.size()));
- for (Map.Entry<NodeInfo, WorkerResources> _iter717 : struct.worker_resources.entrySet())
+ for (java.util.Map.Entry<NodeInfo, WorkerResources> _iter717 : struct.worker_resources.entrySet())
{
_iter717.getKey().write(oprot);
_iter717.getValue().write(oprot);
@@ -1191,7 +1156,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
oprot.writeFieldBegin(TOTAL_SHARED_OFF_HEAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, struct.total_shared_off_heap.size()));
- for (Map.Entry<String, Double> _iter718 : struct.total_shared_off_heap.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter718 : struct.total_shared_off_heap.entrySet())
{
oprot.writeString(_iter718.getKey());
oprot.writeDouble(_iter718.getValue());
@@ -1214,19 +1179,19 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
}
- private static class AssignmentTupleSchemeFactory implements SchemeFactory {
+ private static class AssignmentTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AssignmentTupleScheme getScheme() {
return new AssignmentTupleScheme();
}
}
- private static class AssignmentTupleScheme extends TupleScheme<Assignment> {
+ private static class AssignmentTupleScheme extends org.apache.thrift.scheme.TupleScheme<Assignment> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Assignment struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.master_code_dir);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_node_host()) {
optionals.set(0);
}
@@ -1249,7 +1214,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (struct.is_set_node_host()) {
{
oprot.writeI32(struct.node_host.size());
- for (Map.Entry<String, String> _iter719 : struct.node_host.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter719 : struct.node_host.entrySet())
{
oprot.writeString(_iter719.getKey());
oprot.writeString(_iter719.getValue());
@@ -1259,7 +1224,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (struct.is_set_executor_node_port()) {
{
oprot.writeI32(struct.executor_node_port.size());
- for (Map.Entry<List<Long>, NodeInfo> _iter720 : struct.executor_node_port.entrySet())
+ for (java.util.Map.Entry<java.util.List<java.lang.Long>, NodeInfo> _iter720 : struct.executor_node_port.entrySet())
{
{
oprot.writeI32(_iter720.getKey().size());
@@ -1275,7 +1240,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (struct.is_set_executor_start_time_secs()) {
{
oprot.writeI32(struct.executor_start_time_secs.size());
- for (Map.Entry<List<Long>, Long> _iter722 : struct.executor_start_time_secs.entrySet())
+ for (java.util.Map.Entry<java.util.List<java.lang.Long>, java.lang.Long> _iter722 : struct.executor_start_time_secs.entrySet())
{
{
oprot.writeI32(_iter722.getKey().size());
@@ -1291,7 +1256,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (struct.is_set_worker_resources()) {
{
oprot.writeI32(struct.worker_resources.size());
- for (Map.Entry<NodeInfo, WorkerResources> _iter724 : struct.worker_resources.entrySet())
+ for (java.util.Map.Entry<NodeInfo, WorkerResources> _iter724 : struct.worker_resources.entrySet())
{
_iter724.getKey().write(oprot);
_iter724.getValue().write(oprot);
@@ -1301,7 +1266,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (struct.is_set_total_shared_off_heap()) {
{
oprot.writeI32(struct.total_shared_off_heap.size());
- for (Map.Entry<String, Double> _iter725 : struct.total_shared_off_heap.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter725 : struct.total_shared_off_heap.entrySet())
{
oprot.writeString(_iter725.getKey());
oprot.writeDouble(_iter725.getValue());
@@ -1315,16 +1280,16 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Assignment struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.master_code_dir = iprot.readString();
struct.set_master_code_dir_isSet(true);
- BitSet incoming = iprot.readBitSet(6);
+ java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map726 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.node_host = new HashMap<String,String>(2*_map726.size);
- String _key727;
- String _val728;
+ struct.node_host = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map726.size);
+ java.lang.String _key727;
+ java.lang.String _val728;
for (int _i729 = 0; _i729 < _map726.size; ++_i729)
{
_key727 = iprot.readString();
@@ -1337,14 +1302,14 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map730 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.executor_node_port = new HashMap<List<Long>,NodeInfo>(2*_map730.size);
- List<Long> _key731;
+ struct.executor_node_port = new java.util.HashMap<java.util.List<java.lang.Long>,NodeInfo>(2*_map730.size);
+ java.util.List<java.lang.Long> _key731;
NodeInfo _val732;
for (int _i733 = 0; _i733 < _map730.size; ++_i733)
{
{
org.apache.thrift.protocol.TList _list734 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- _key731 = new ArrayList<Long>(_list734.size);
+ _key731 = new java.util.ArrayList<java.lang.Long>(_list734.size);
long _elem735;
for (int _i736 = 0; _i736 < _list734.size; ++_i736)
{
@@ -1362,14 +1327,14 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TMap _map737 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.executor_start_time_secs = new HashMap<List<Long>,Long>(2*_map737.size);
- List<Long> _key738;
+ struct.executor_start_time_secs = new java.util.HashMap<java.util.List<java.lang.Long>,java.lang.Long>(2*_map737.size);
+ java.util.List<java.lang.Long> _key738;
long _val739;
for (int _i740 = 0; _i740 < _map737.size; ++_i740)
{
{
org.apache.thrift.protocol.TList _list741 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- _key738 = new ArrayList<Long>(_list741.size);
+ _key738 = new java.util.ArrayList<java.lang.Long>(_list741.size);
long _elem742;
for (int _i743 = 0; _i743 < _list741.size; ++_i743)
{
@@ -1386,7 +1351,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TMap _map744 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.worker_resources = new HashMap<NodeInfo,WorkerResources>(2*_map744.size);
+ struct.worker_resources = new java.util.HashMap<NodeInfo,WorkerResources>(2*_map744.size);
NodeInfo _key745;
WorkerResources _val746;
for (int _i747 = 0; _i747 < _map744.size; ++_i747)
@@ -1403,8 +1368,8 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
if (incoming.get(4)) {
{
org.apache.thrift.protocol.TMap _map748 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- struct.total_shared_off_heap = new HashMap<String,Double>(2*_map748.size);
- String _key749;
+ struct.total_shared_off_heap = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map748.size);
+ java.lang.String _key749;
double _val750;
for (int _i751 = 0; _i751 < _map748.size; ++_i751)
{
@@ -1422,5 +1387,8 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/AuthorizationException.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/AuthorizationException.java b/storm-client/src/jvm/org/apache/storm/generated/AuthorizationException.java
index 7358535..b025e86 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/AuthorizationException.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/AuthorizationException.java
@@ -16,63 +16,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class AuthorizationException extends TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
+public class AuthorizationException extends org.apache.thrift.TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AuthorizationExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AuthorizationExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AuthorizationExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AuthorizationExceptionTupleSchemeFactory();
- private String msg; // required
+ private java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,21 +65,21 @@ public class AuthorizationException extends TException implements org.apache.thr
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -118,18 +88,18 @@ public class AuthorizationException extends TException implements org.apache.thr
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AuthorizationException.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class AuthorizationException extends TException implements org.apache.thr
}
public AuthorizationException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -161,11 +131,11 @@ public class AuthorizationException extends TException implements org.apache.thr
this.msg = null;
}
- public String get_msg() {
+ public java.lang.String get_msg() {
return this.msg;
}
- public void set_msg(String msg) {
+ public void set_msg(java.lang.String msg) {
this.msg = msg;
}
@@ -184,43 +154,43 @@ public class AuthorizationException extends TException implements org.apache.thr
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unset_msg();
} else {
- set_msg((String)value);
+ set_msg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return get_msg();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return is_set_msg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof AuthorizationException)
@@ -231,6 +201,8 @@ public class AuthorizationException extends TException implements org.apache.thr
public boolean equals(AuthorizationException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.is_set_msg();
boolean that_present_msg = true && that.is_set_msg();
@@ -246,14 +218,13 @@ public class AuthorizationException extends TException implements org.apache.thr
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (is_set_msg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((is_set_msg()) ? 131071 : 524287);
+ if (is_set_msg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class AuthorizationException extends TException implements org.apache.thr
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class AuthorizationException extends TException implements org.apache.thr
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("AuthorizationException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("AuthorizationException(");
boolean first = true;
sb.append("msg:");
@@ -322,7 +293,7 @@ public class AuthorizationException extends TException implements org.apache.thr
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -330,13 +301,13 @@ public class AuthorizationException extends TException implements org.apache.thr
}
}
- private static class AuthorizationExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class AuthorizationExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AuthorizationExceptionStandardScheme getScheme() {
return new AuthorizationExceptionStandardScheme();
}
}
- private static class AuthorizationExceptionStandardScheme extends StandardScheme<AuthorizationException> {
+ private static class AuthorizationExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<AuthorizationException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, AuthorizationException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -380,27 +351,30 @@ public class AuthorizationException extends TException implements org.apache.thr
}
- private static class AuthorizationExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class AuthorizationExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AuthorizationExceptionTupleScheme getScheme() {
return new AuthorizationExceptionTupleScheme();
}
}
- private static class AuthorizationExceptionTupleScheme extends TupleScheme<AuthorizationException> {
+ private static class AuthorizationExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<AuthorizationException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.msg);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.msg = iprot.readString();
struct.set_msg_isSet(true);
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/BeginDownloadResult.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/BeginDownloadResult.java b/storm-client/src/jvm/org/apache/storm/generated/BeginDownloadResult.java
index 925f00b..17436aa 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/BeginDownloadResult.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/BeginDownloadResult.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloadResult, BeginDownloadResult._Fields>, java.io.Serializable, Cloneable, Comparable<BeginDownloadResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BeginDownloadResult");
@@ -59,14 +32,11 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField DATA_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("data_size", org.apache.thrift.protocol.TType.I64, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new BeginDownloadResultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new BeginDownloadResultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new BeginDownloadResultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new BeginDownloadResultTupleSchemeFactory();
private long version; // required
- private String session; // required
+ private java.lang.String session; // required
private long data_size; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -75,10 +45,10 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
SESSION((short)2, "session"),
DATA_SIZE((short)3, "data_size");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -105,21 +75,21 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -128,7 +98,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -138,16 +108,16 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
private static final int __DATA_SIZE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.DATA_SIZE};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DATA_SIZE, new org.apache.thrift.meta_data.FieldMetaData("data_size", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BeginDownloadResult.class, metaDataMap);
}
@@ -156,7 +126,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
public BeginDownloadResult(
long version,
- String session)
+ java.lang.String session)
{
this();
this.version = version;
@@ -199,23 +169,23 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
}
public void unset_version() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
}
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean is_set_version() {
- return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
}
public void set_version_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
}
- public String get_session() {
+ public java.lang.String get_session() {
return this.session;
}
- public void set_session(String session) {
+ public void set_session(java.lang.String session) {
this.session = session;
}
@@ -244,25 +214,25 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
}
public void unset_data_size() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATA_SIZE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DATA_SIZE_ISSET_ID);
}
/** Returns true if field data_size is set (has been assigned a value) and false otherwise */
public boolean is_set_data_size() {
- return EncodingUtils.testBit(__isset_bitfield, __DATA_SIZE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATA_SIZE_ISSET_ID);
}
public void set_data_size_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATA_SIZE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATA_SIZE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case VERSION:
if (value == null) {
unset_version();
} else {
- set_version((Long)value);
+ set_version((java.lang.Long)value);
}
break;
@@ -270,7 +240,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
if (value == null) {
unset_session();
} else {
- set_session((String)value);
+ set_session((java.lang.String)value);
}
break;
@@ -278,14 +248,14 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
if (value == null) {
unset_data_size();
} else {
- set_data_size((Long)value);
+ set_data_size((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case VERSION:
return get_version();
@@ -297,13 +267,13 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
return get_data_size();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -314,11 +284,11 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
case DATA_SIZE:
return is_set_data_size();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof BeginDownloadResult)
@@ -329,6 +299,8 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
public boolean equals(BeginDownloadResult that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_version = true;
boolean that_present_version = true;
@@ -362,24 +334,19 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_version = true;
- list.add(present_version);
- if (present_version)
- list.add(version);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(version);
- boolean present_session = true && (is_set_session());
- list.add(present_session);
- if (present_session)
- list.add(session);
+ hashCode = hashCode * 8191 + ((is_set_session()) ? 131071 : 524287);
+ if (is_set_session())
+ hashCode = hashCode * 8191 + session.hashCode();
- boolean present_data_size = true && (is_set_data_size());
- list.add(present_data_size);
- if (present_data_size)
- list.add(data_size);
+ hashCode = hashCode * 8191 + ((is_set_data_size()) ? 131071 : 524287);
+ if (is_set_data_size())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(data_size);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -390,7 +357,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -400,7 +367,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_session()).compareTo(other.is_set_session());
+ lastComparison = java.lang.Boolean.valueOf(is_set_session()).compareTo(other.is_set_session());
if (lastComparison != 0) {
return lastComparison;
}
@@ -410,7 +377,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_data_size()).compareTo(other.is_set_data_size());
+ lastComparison = java.lang.Boolean.valueOf(is_set_data_size()).compareTo(other.is_set_data_size());
if (lastComparison != 0) {
return lastComparison;
}
@@ -428,16 +395,16 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("BeginDownloadResult(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("BeginDownloadResult(");
boolean first = true;
sb.append("version:");
@@ -482,7 +449,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -492,13 +459,13 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
}
}
- private static class BeginDownloadResultStandardSchemeFactory implements SchemeFactory {
+ private static class BeginDownloadResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BeginDownloadResultStandardScheme getScheme() {
return new BeginDownloadResultStandardScheme();
}
}
- private static class BeginDownloadResultStandardScheme extends StandardScheme<BeginDownloadResult> {
+ private static class BeginDownloadResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<BeginDownloadResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, BeginDownloadResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -566,20 +533,20 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
}
- private static class BeginDownloadResultTupleSchemeFactory implements SchemeFactory {
+ private static class BeginDownloadResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BeginDownloadResultTupleScheme getScheme() {
return new BeginDownloadResultTupleScheme();
}
}
- private static class BeginDownloadResultTupleScheme extends TupleScheme<BeginDownloadResult> {
+ private static class BeginDownloadResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<BeginDownloadResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, BeginDownloadResult struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.version);
oprot.writeString(struct.session);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_data_size()) {
optionals.set(0);
}
@@ -591,12 +558,12 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, BeginDownloadResult struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.version = iprot.readI64();
struct.set_version_isSet(true);
struct.session = iprot.readString();
struct.set_session_isSet(true);
- BitSet incoming = iprot.readBitSet(1);
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.data_size = iprot.readI64();
struct.set_data_size_isSet(true);
@@ -604,5 +571,8 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
[35/43] storm git commit: STORM-3061: thrift 0.11
Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/DRPCExecutionException.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/DRPCExecutionException.java b/storm-client/src/jvm/org/apache/storm/generated/DRPCExecutionException.java
index fd701ff..2ef23eb 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/DRPCExecutionException.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/DRPCExecutionException.java
@@ -16,55 +16,25 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class DRPCExecutionException extends TException implements org.apache.thrift.TBase<DRPCExecutionException, DRPCExecutionException._Fields>, java.io.Serializable, Cloneable, Comparable<DRPCExecutionException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
+public class DRPCExecutionException extends org.apache.thrift.TException implements org.apache.thrift.TBase<DRPCExecutionException, DRPCExecutionException._Fields>, java.io.Serializable, Cloneable, Comparable<DRPCExecutionException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DRPCExecutionException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new DRPCExecutionExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new DRPCExecutionExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DRPCExecutionExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DRPCExecutionExceptionTupleSchemeFactory();
- private String msg; // required
+ private java.lang.String msg; // required
private DRPCExceptionType type; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -76,10 +46,10 @@ public class DRPCExecutionException extends TException implements org.apache.thr
*/
TYPE((short)2, "type");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -104,21 +74,21 @@ public class DRPCExecutionException extends TException implements org.apache.thr
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -127,21 +97,21 @@ public class DRPCExecutionException extends TException implements org.apache.thr
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.TYPE};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DRPCExceptionType.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DRPCExecutionException.class, metaDataMap);
}
@@ -149,7 +119,7 @@ public class DRPCExecutionException extends TException implements org.apache.thr
}
public DRPCExecutionException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -177,11 +147,11 @@ public class DRPCExecutionException extends TException implements org.apache.thr
this.type = null;
}
- public String get_msg() {
+ public java.lang.String get_msg() {
return this.msg;
}
- public void set_msg(String msg) {
+ public void set_msg(java.lang.String msg) {
this.msg = msg;
}
@@ -231,13 +201,13 @@ public class DRPCExecutionException extends TException implements org.apache.thr
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unset_msg();
} else {
- set_msg((String)value);
+ set_msg((java.lang.String)value);
}
break;
@@ -252,7 +222,7 @@ public class DRPCExecutionException extends TException implements org.apache.thr
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return get_msg();
@@ -261,13 +231,13 @@ public class DRPCExecutionException extends TException implements org.apache.thr
return get_type();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -276,11 +246,11 @@ public class DRPCExecutionException extends TException implements org.apache.thr
case TYPE:
return is_set_type();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof DRPCExecutionException)
@@ -291,6 +261,8 @@ public class DRPCExecutionException extends TException implements org.apache.thr
public boolean equals(DRPCExecutionException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.is_set_msg();
boolean that_present_msg = true && that.is_set_msg();
@@ -315,19 +287,17 @@ public class DRPCExecutionException extends TException implements org.apache.thr
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (is_set_msg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((is_set_msg()) ? 131071 : 524287);
+ if (is_set_msg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- boolean present_type = true && (is_set_type());
- list.add(present_type);
- if (present_type)
- list.add(type.getValue());
+ hashCode = hashCode * 8191 + ((is_set_type()) ? 131071 : 524287);
+ if (is_set_type())
+ hashCode = hashCode * 8191 + type.getValue();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -338,7 +308,7 @@ public class DRPCExecutionException extends TException implements org.apache.thr
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -348,7 +318,7 @@ public class DRPCExecutionException extends TException implements org.apache.thr
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_type()).compareTo(other.is_set_type());
+ lastComparison = java.lang.Boolean.valueOf(is_set_type()).compareTo(other.is_set_type());
if (lastComparison != 0) {
return lastComparison;
}
@@ -366,16 +336,16 @@ public class DRPCExecutionException extends TException implements org.apache.thr
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("DRPCExecutionException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("DRPCExecutionException(");
boolean first = true;
sb.append("msg:");
@@ -416,7 +386,7 @@ public class DRPCExecutionException extends TException implements org.apache.thr
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -424,13 +394,13 @@ public class DRPCExecutionException extends TException implements org.apache.thr
}
}
- private static class DRPCExecutionExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class DRPCExecutionExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public DRPCExecutionExceptionStandardScheme getScheme() {
return new DRPCExecutionExceptionStandardScheme();
}
}
- private static class DRPCExecutionExceptionStandardScheme extends StandardScheme<DRPCExecutionException> {
+ private static class DRPCExecutionExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<DRPCExecutionException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, DRPCExecutionException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -489,19 +459,19 @@ public class DRPCExecutionException extends TException implements org.apache.thr
}
- private static class DRPCExecutionExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class DRPCExecutionExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public DRPCExecutionExceptionTupleScheme getScheme() {
return new DRPCExecutionExceptionTupleScheme();
}
}
- private static class DRPCExecutionExceptionTupleScheme extends TupleScheme<DRPCExecutionException> {
+ private static class DRPCExecutionExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<DRPCExecutionException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DRPCExecutionException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.msg);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_type()) {
optionals.set(0);
}
@@ -513,10 +483,10 @@ public class DRPCExecutionException extends TException implements org.apache.thr
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, DRPCExecutionException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.msg = iprot.readString();
struct.set_msg_isSet(true);
- BitSet incoming = iprot.readBitSet(1);
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.type = org.apache.storm.generated.DRPCExceptionType.findByValue(iprot.readI32());
struct.set_type_isSet(true);
@@ -524,5 +494,8 @@ public class DRPCExecutionException extends TException implements org.apache.thr
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/DRPCRequest.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/DRPCRequest.java b/storm-client/src/jvm/org/apache/storm/generated/DRPCRequest.java
index 33d85c2..9e90a33 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/DRPCRequest.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/DRPCRequest.java
@@ -16,66 +16,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCRequest._Fields>, java.io.Serializable, Cloneable, Comparable<DRPCRequest> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DRPCRequest");
private static final org.apache.thrift.protocol.TField FUNC_ARGS_FIELD_DESC = new org.apache.thrift.protocol.TField("func_args", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField REQUEST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("request_id", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new DRPCRequestStandardSchemeFactory());
- schemes.put(TupleScheme.class, new DRPCRequestTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DRPCRequestStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DRPCRequestTupleSchemeFactory();
- private String func_args; // required
- private String request_id; // required
+ private java.lang.String func_args; // required
+ private java.lang.String request_id; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
FUNC_ARGS((short)1, "func_args"),
REQUEST_ID((short)2, "request_id");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,20 +93,20 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.FUNC_ARGS, new org.apache.thrift.meta_data.FieldMetaData("func_args", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData("request_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DRPCRequest.class, metaDataMap);
}
@@ -144,8 +114,8 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
}
public DRPCRequest(
- String func_args,
- String request_id)
+ java.lang.String func_args,
+ java.lang.String request_id)
{
this();
this.func_args = func_args;
@@ -174,11 +144,11 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
this.request_id = null;
}
- public String get_func_args() {
+ public java.lang.String get_func_args() {
return this.func_args;
}
- public void set_func_args(String func_args) {
+ public void set_func_args(java.lang.String func_args) {
this.func_args = func_args;
}
@@ -197,11 +167,11 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
}
}
- public String get_request_id() {
+ public java.lang.String get_request_id() {
return this.request_id;
}
- public void set_request_id(String request_id) {
+ public void set_request_id(java.lang.String request_id) {
this.request_id = request_id;
}
@@ -220,13 +190,13 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case FUNC_ARGS:
if (value == null) {
unset_func_args();
} else {
- set_func_args((String)value);
+ set_func_args((java.lang.String)value);
}
break;
@@ -234,14 +204,14 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
if (value == null) {
unset_request_id();
} else {
- set_request_id((String)value);
+ set_request_id((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case FUNC_ARGS:
return get_func_args();
@@ -250,13 +220,13 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
return get_request_id();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -265,11 +235,11 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
case REQUEST_ID:
return is_set_request_id();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof DRPCRequest)
@@ -280,6 +250,8 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
public boolean equals(DRPCRequest that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_func_args = true && this.is_set_func_args();
boolean that_present_func_args = true && that.is_set_func_args();
@@ -304,19 +276,17 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_func_args = true && (is_set_func_args());
- list.add(present_func_args);
- if (present_func_args)
- list.add(func_args);
+ hashCode = hashCode * 8191 + ((is_set_func_args()) ? 131071 : 524287);
+ if (is_set_func_args())
+ hashCode = hashCode * 8191 + func_args.hashCode();
- boolean present_request_id = true && (is_set_request_id());
- list.add(present_request_id);
- if (present_request_id)
- list.add(request_id);
+ hashCode = hashCode * 8191 + ((is_set_request_id()) ? 131071 : 524287);
+ if (is_set_request_id())
+ hashCode = hashCode * 8191 + request_id.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -327,7 +297,7 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_func_args()).compareTo(other.is_set_func_args());
+ lastComparison = java.lang.Boolean.valueOf(is_set_func_args()).compareTo(other.is_set_func_args());
if (lastComparison != 0) {
return lastComparison;
}
@@ -337,7 +307,7 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_request_id()).compareTo(other.is_set_request_id());
+ lastComparison = java.lang.Boolean.valueOf(is_set_request_id()).compareTo(other.is_set_request_id());
if (lastComparison != 0) {
return lastComparison;
}
@@ -355,16 +325,16 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("DRPCRequest(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("DRPCRequest(");
boolean first = true;
sb.append("func_args:");
@@ -407,7 +377,7 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -415,13 +385,13 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
}
}
- private static class DRPCRequestStandardSchemeFactory implements SchemeFactory {
+ private static class DRPCRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public DRPCRequestStandardScheme getScheme() {
return new DRPCRequestStandardScheme();
}
}
- private static class DRPCRequestStandardScheme extends StandardScheme<DRPCRequest> {
+ private static class DRPCRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<DRPCRequest> {
public void read(org.apache.thrift.protocol.TProtocol iprot, DRPCRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -478,24 +448,24 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
}
- private static class DRPCRequestTupleSchemeFactory implements SchemeFactory {
+ private static class DRPCRequestTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public DRPCRequestTupleScheme getScheme() {
return new DRPCRequestTupleScheme();
}
}
- private static class DRPCRequestTupleScheme extends TupleScheme<DRPCRequest> {
+ private static class DRPCRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<DRPCRequest> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DRPCRequest struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.func_args);
oprot.writeString(struct.request_id);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, DRPCRequest struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.func_args = iprot.readString();
struct.set_func_args_isSet(true);
struct.request_id = iprot.readString();
@@ -503,5 +473,8 @@ public class DRPCRequest implements org.apache.thrift.TBase<DRPCRequest, DRPCReq
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/DebugOptions.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/DebugOptions.java b/storm-client/src/jvm/org/apache/storm/generated/DebugOptions.java
index 1ceb853..8532ee8 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/DebugOptions.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/DebugOptions.java
@@ -16,53 +16,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, DebugOptions._Fields>, java.io.Serializable, Cloneable, Comparable<DebugOptions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DebugOptions");
private static final org.apache.thrift.protocol.TField ENABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("enable", org.apache.thrift.protocol.TType.BOOL, (short)1);
private static final org.apache.thrift.protocol.TField SAMPLINGPCT_FIELD_DESC = new org.apache.thrift.protocol.TField("samplingpct", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new DebugOptionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new DebugOptionsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DebugOptionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DebugOptionsTupleSchemeFactory();
private boolean enable; // optional
private double samplingpct; // optional
@@ -72,10 +42,10 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
ENABLE((short)1, "enable"),
SAMPLINGPCT((short)2, "samplingpct");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -100,21 +70,21 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -123,7 +93,7 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -133,14 +103,14 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
private static final int __SAMPLINGPCT_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.ENABLE,_Fields.SAMPLINGPCT};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ENABLE, new org.apache.thrift.meta_data.FieldMetaData("enable", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.SAMPLINGPCT, new org.apache.thrift.meta_data.FieldMetaData("samplingpct", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DebugOptions.class, metaDataMap);
}
@@ -178,16 +148,16 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
}
public void unset_enable() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLE_ISSET_ID);
}
/** Returns true if field enable is set (has been assigned a value) and false otherwise */
public boolean is_set_enable() {
- return EncodingUtils.testBit(__isset_bitfield, __ENABLE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLE_ISSET_ID);
}
public void set_enable_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLE_ISSET_ID, value);
}
public double get_samplingpct() {
@@ -200,25 +170,25 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
}
public void unset_samplingpct() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SAMPLINGPCT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SAMPLINGPCT_ISSET_ID);
}
/** Returns true if field samplingpct is set (has been assigned a value) and false otherwise */
public boolean is_set_samplingpct() {
- return EncodingUtils.testBit(__isset_bitfield, __SAMPLINGPCT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SAMPLINGPCT_ISSET_ID);
}
public void set_samplingpct_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SAMPLINGPCT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SAMPLINGPCT_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ENABLE:
if (value == null) {
unset_enable();
} else {
- set_enable((Boolean)value);
+ set_enable((java.lang.Boolean)value);
}
break;
@@ -226,14 +196,14 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
if (value == null) {
unset_samplingpct();
} else {
- set_samplingpct((Double)value);
+ set_samplingpct((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ENABLE:
return is_enable();
@@ -242,13 +212,13 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
return get_samplingpct();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -257,11 +227,11 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
case SAMPLINGPCT:
return is_set_samplingpct();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof DebugOptions)
@@ -272,6 +242,8 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
public boolean equals(DebugOptions that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_enable = true && this.is_set_enable();
boolean that_present_enable = true && that.is_set_enable();
@@ -296,19 +268,17 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_enable = true && (is_set_enable());
- list.add(present_enable);
- if (present_enable)
- list.add(enable);
+ hashCode = hashCode * 8191 + ((is_set_enable()) ? 131071 : 524287);
+ if (is_set_enable())
+ hashCode = hashCode * 8191 + ((enable) ? 131071 : 524287);
- boolean present_samplingpct = true && (is_set_samplingpct());
- list.add(present_samplingpct);
- if (present_samplingpct)
- list.add(samplingpct);
+ hashCode = hashCode * 8191 + ((is_set_samplingpct()) ? 131071 : 524287);
+ if (is_set_samplingpct())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(samplingpct);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -319,7 +289,7 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_enable()).compareTo(other.is_set_enable());
+ lastComparison = java.lang.Boolean.valueOf(is_set_enable()).compareTo(other.is_set_enable());
if (lastComparison != 0) {
return lastComparison;
}
@@ -329,7 +299,7 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_samplingpct()).compareTo(other.is_set_samplingpct());
+ lastComparison = java.lang.Boolean.valueOf(is_set_samplingpct()).compareTo(other.is_set_samplingpct());
if (lastComparison != 0) {
return lastComparison;
}
@@ -347,16 +317,16 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("DebugOptions(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("DebugOptions(");
boolean first = true;
if (is_set_enable()) {
@@ -387,7 +357,7 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -397,13 +367,13 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
}
}
- private static class DebugOptionsStandardSchemeFactory implements SchemeFactory {
+ private static class DebugOptionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public DebugOptionsStandardScheme getScheme() {
return new DebugOptionsStandardScheme();
}
}
- private static class DebugOptionsStandardScheme extends StandardScheme<DebugOptions> {
+ private static class DebugOptionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<DebugOptions> {
public void read(org.apache.thrift.protocol.TProtocol iprot, DebugOptions struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -460,18 +430,18 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
}
- private static class DebugOptionsTupleSchemeFactory implements SchemeFactory {
+ private static class DebugOptionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public DebugOptionsTupleScheme getScheme() {
return new DebugOptionsTupleScheme();
}
}
- private static class DebugOptionsTupleScheme extends TupleScheme<DebugOptions> {
+ private static class DebugOptionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<DebugOptions> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DebugOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.is_set_enable()) {
optionals.set(0);
}
@@ -489,8 +459,8 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, DebugOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.enable = iprot.readBool();
struct.set_enable_isSet(true);
@@ -502,5 +472,8 @@ public class DebugOptions implements org.apache.thrift.TBase<DebugOptions, Debug
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}