You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pt...@apache.org on 2016/05/20 18:09:52 UTC
[1/3] storm git commit: STORM-1842 Forward references in storm.thrift
cause tooling issues
Repository: storm
Updated Branches:
refs/heads/1.x-branch ba5f42630 -> 068d5c9c2
STORM-1842 Forward references in storm.thrift cause tooling issues
* python doesn't support forward reference so ttypes.py has a problem regarding this issue
* reorder HBPulse, HBRecords, HBNodes to resolve forward reference issue
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/4c7117d7
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/4c7117d7
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/4c7117d7
Branch: refs/heads/1.x-branch
Commit: 4c7117d75f80b820da110c3abee88134ca6ecaaa
Parents: 3d20fcf
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Tue May 17 20:45:03 2016 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Tue May 17 20:45:03 2016 +0900
----------------------------------------------------------------------
.../apache/storm/generated/HBMessageData.java | 6 +-
storm-core/src/py/storm/ttypes.py | 422 +++++++++----------
storm-core/src/storm.thrift | 27 +-
3 files changed, 227 insertions(+), 228 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/4c7117d7/storm-core/src/jvm/org/apache/storm/generated/HBMessageData.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/generated/HBMessageData.java b/storm-core/src/jvm/org/apache/storm/generated/HBMessageData.java
index 77368f7..b100da1 100644
--- a/storm-core/src/jvm/org/apache/storm/generated/HBMessageData.java
+++ b/storm-core/src/jvm/org/apache/storm/generated/HBMessageData.java
@@ -139,13 +139,13 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
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,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "HBPulse")));
+ 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,
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,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "HBRecords")));
+ 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,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "HBNodes")));
+ 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);
http://git-wip-us.apache.org/repos/asf/storm/blob/4c7117d7/storm-core/src/py/storm/ttypes.py
----------------------------------------------------------------------
diff --git a/storm-core/src/py/storm/ttypes.py b/storm-core/src/py/storm/ttypes.py
index 98a7ba4..1934fb2 100644
--- a/storm-core/src/py/storm/ttypes.py
+++ b/storm-core/src/py/storm/ttypes.py
@@ -10095,35 +10095,22 @@ class DRPCExecutionException(TException):
def __ne__(self, other):
return not (self == other)
-class HBMessageData:
+class HBPulse:
"""
Attributes:
- - path
- - pulse
- - boolval
- - records
- - nodes
- - message_blob
+ - id
+ - details
"""
thrift_spec = (
None, # 0
- (1, TType.STRING, 'path', None, None, ), # 1
- (2, TType.STRUCT, 'pulse', (HBPulse, HBPulse.thrift_spec), None, ), # 2
- (3, TType.BOOL, 'boolval', None, None, ), # 3
- (4, TType.STRUCT, 'records', (HBRecords, HBRecords.thrift_spec), None, ), # 4
- (5, TType.STRUCT, 'nodes', (HBNodes, HBNodes.thrift_spec), None, ), # 5
- None, # 6
- (7, TType.STRING, 'message_blob', None, None, ), # 7
+ (1, TType.STRING, 'id', None, None, ), # 1
+ (2, TType.STRING, 'details', None, None, ), # 2
)
- def __init__(self, path=None, pulse=None, boolval=None, records=None, nodes=None, message_blob=None,):
- self.path = path
- self.pulse = pulse
- self.boolval = boolval
- self.records = records
- self.nodes = nodes
- self.message_blob = message_blob
+ def __init__(self, id=None, details=None,):
+ self.id = id
+ self.details = details
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:
@@ -10136,35 +10123,12 @@ class HBMessageData:
break
if fid == 1:
if ftype == TType.STRING:
- self.path = iprot.readString().decode('utf-8')
+ self.id = iprot.readString().decode('utf-8')
else:
iprot.skip(ftype)
elif fid == 2:
- if ftype == TType.STRUCT:
- self.pulse = HBPulse()
- self.pulse.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.BOOL:
- self.boolval = iprot.readBool()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.STRUCT:
- self.records = HBRecords()
- self.records.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.STRUCT:
- self.nodes = HBNodes()
- self.nodes.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 7:
if ftype == TType.STRING:
- self.message_blob = iprot.readString()
+ self.details = iprot.readString()
else:
iprot.skip(ftype)
else:
@@ -10176,46 +10140,28 @@ class HBMessageData:
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('HBMessageData')
- if self.path is not None:
- oprot.writeFieldBegin('path', TType.STRING, 1)
- oprot.writeString(self.path.encode('utf-8'))
- oprot.writeFieldEnd()
- if self.pulse is not None:
- oprot.writeFieldBegin('pulse', TType.STRUCT, 2)
- self.pulse.write(oprot)
- oprot.writeFieldEnd()
- if self.boolval is not None:
- oprot.writeFieldBegin('boolval', TType.BOOL, 3)
- oprot.writeBool(self.boolval)
- oprot.writeFieldEnd()
- if self.records is not None:
- oprot.writeFieldBegin('records', TType.STRUCT, 4)
- self.records.write(oprot)
- oprot.writeFieldEnd()
- if self.nodes is not None:
- oprot.writeFieldBegin('nodes', TType.STRUCT, 5)
- self.nodes.write(oprot)
+ oprot.writeStructBegin('HBPulse')
+ if self.id is not None:
+ oprot.writeFieldBegin('id', TType.STRING, 1)
+ oprot.writeString(self.id.encode('utf-8'))
oprot.writeFieldEnd()
- if self.message_blob is not None:
- oprot.writeFieldBegin('message_blob', TType.STRING, 7)
- oprot.writeString(self.message_blob)
+ if self.details is not None:
+ oprot.writeFieldBegin('details', TType.STRING, 2)
+ oprot.writeString(self.details)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
+ if self.id is None:
+ raise TProtocol.TProtocolException(message='Required field id is unset!')
return
def __hash__(self):
value = 17
- value = (value * 31) ^ hash(self.path)
- value = (value * 31) ^ hash(self.pulse)
- value = (value * 31) ^ hash(self.boolval)
- value = (value * 31) ^ hash(self.records)
- value = (value * 31) ^ hash(self.nodes)
- value = (value * 31) ^ hash(self.message_blob)
+ value = (value * 31) ^ hash(self.id)
+ value = (value * 31) ^ hash(self.details)
return value
def __repr__(self):
@@ -10229,25 +10175,19 @@ class HBMessageData:
def __ne__(self, other):
return not (self == other)
-class HBMessage:
+class HBRecords:
"""
Attributes:
- - type
- - data
- - message_id
+ - pulses
"""
thrift_spec = (
None, # 0
- (1, TType.I32, 'type', None, None, ), # 1
- (2, TType.STRUCT, 'data', (HBMessageData, HBMessageData.thrift_spec), None, ), # 2
- (3, TType.I32, 'message_id', None, -1, ), # 3
+ (1, TType.LIST, 'pulses', (TType.STRUCT,(HBPulse, HBPulse.thrift_spec)), None, ), # 1
)
- def __init__(self, type=None, data=None, message_id=thrift_spec[3][4],):
- self.type = type
- self.data = data
- self.message_id = message_id
+ def __init__(self, pulses=None,):
+ self.pulses = pulses
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:
@@ -10259,19 +10199,14 @@ class HBMessage:
if ftype == TType.STOP:
break
if fid == 1:
- if ftype == TType.I32:
- self.type = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.data = HBMessageData()
- self.data.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.I32:
- self.message_id = iprot.readI32()
+ if ftype == TType.LIST:
+ self.pulses = []
+ (_etype648, _size645) = iprot.readListBegin()
+ for _i649 in xrange(_size645):
+ _elem650 = HBPulse()
+ _elem650.read(iprot)
+ self.pulses.append(_elem650)
+ iprot.readListEnd()
else:
iprot.skip(ftype)
else:
@@ -10283,18 +10218,13 @@ class HBMessage:
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('HBMessage')
- if self.type is not None:
- oprot.writeFieldBegin('type', TType.I32, 1)
- oprot.writeI32(self.type)
- oprot.writeFieldEnd()
- if self.data is not None:
- oprot.writeFieldBegin('data', TType.STRUCT, 2)
- self.data.write(oprot)
- oprot.writeFieldEnd()
- if self.message_id is not None:
- oprot.writeFieldBegin('message_id', TType.I32, 3)
- oprot.writeI32(self.message_id)
+ oprot.writeStructBegin('HBRecords')
+ if self.pulses is not None:
+ oprot.writeFieldBegin('pulses', TType.LIST, 1)
+ oprot.writeListBegin(TType.STRUCT, len(self.pulses))
+ for iter651 in self.pulses:
+ iter651.write(oprot)
+ oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -10305,9 +10235,7 @@ class HBMessage:
def __hash__(self):
value = 17
- value = (value * 31) ^ hash(self.type)
- value = (value * 31) ^ hash(self.data)
- value = (value * 31) ^ hash(self.message_id)
+ value = (value * 31) ^ hash(self.pulses)
return value
def __repr__(self):
@@ -10321,19 +10249,19 @@ class HBMessage:
def __ne__(self, other):
return not (self == other)
-class HBAuthorizationException(TException):
+class HBNodes:
"""
Attributes:
- - msg
+ - pulseIds
"""
thrift_spec = (
None, # 0
- (1, TType.STRING, 'msg', None, None, ), # 1
+ (1, TType.LIST, 'pulseIds', (TType.STRING,None), None, ), # 1
)
- def __init__(self, msg=None,):
- self.msg = msg
+ def __init__(self, pulseIds=None,):
+ self.pulseIds = pulseIds
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:
@@ -10345,8 +10273,13 @@ class HBAuthorizationException(TException):
if ftype == TType.STOP:
break
if fid == 1:
- if ftype == TType.STRING:
- self.msg = iprot.readString().decode('utf-8')
+ if ftype == TType.LIST:
+ self.pulseIds = []
+ (_etype655, _size652) = iprot.readListBegin()
+ for _i656 in xrange(_size652):
+ _elem657 = iprot.readString().decode('utf-8')
+ self.pulseIds.append(_elem657)
+ iprot.readListEnd()
else:
iprot.skip(ftype)
else:
@@ -10358,26 +10291,24 @@ class HBAuthorizationException(TException):
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('HBAuthorizationException')
- if self.msg is not None:
- oprot.writeFieldBegin('msg', TType.STRING, 1)
- oprot.writeString(self.msg.encode('utf-8'))
+ oprot.writeStructBegin('HBNodes')
+ if self.pulseIds is not None:
+ oprot.writeFieldBegin('pulseIds', TType.LIST, 1)
+ oprot.writeListBegin(TType.STRING, len(self.pulseIds))
+ for iter658 in self.pulseIds:
+ oprot.writeString(iter658.encode('utf-8'))
+ oprot.writeListEnd()
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)
+ value = (value * 31) ^ hash(self.pulseIds)
return value
def __repr__(self):
@@ -10391,19 +10322,35 @@ class HBAuthorizationException(TException):
def __ne__(self, other):
return not (self == other)
-class HBExecutionException(TException):
+class HBMessageData:
"""
Attributes:
- - msg
+ - path
+ - pulse
+ - boolval
+ - records
+ - nodes
+ - message_blob
"""
thrift_spec = (
None, # 0
- (1, TType.STRING, 'msg', None, None, ), # 1
+ (1, TType.STRING, 'path', None, None, ), # 1
+ (2, TType.STRUCT, 'pulse', (HBPulse, HBPulse.thrift_spec), None, ), # 2
+ (3, TType.BOOL, 'boolval', None, None, ), # 3
+ (4, TType.STRUCT, 'records', (HBRecords, HBRecords.thrift_spec), None, ), # 4
+ (5, TType.STRUCT, 'nodes', (HBNodes, HBNodes.thrift_spec), None, ), # 5
+ None, # 6
+ (7, TType.STRING, 'message_blob', None, None, ), # 7
)
- def __init__(self, msg=None,):
- self.msg = msg
+ def __init__(self, path=None, pulse=None, boolval=None, records=None, nodes=None, message_blob=None,):
+ self.path = path
+ self.pulse = pulse
+ self.boolval = boolval
+ self.records = records
+ self.nodes = nodes
+ self.message_blob = message_blob
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:
@@ -10416,7 +10363,35 @@ class HBExecutionException(TException):
break
if fid == 1:
if ftype == TType.STRING:
- self.msg = iprot.readString().decode('utf-8')
+ self.path = iprot.readString().decode('utf-8')
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.pulse = HBPulse()
+ self.pulse.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.BOOL:
+ self.boolval = iprot.readBool()
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.STRUCT:
+ self.records = HBRecords()
+ self.records.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 5:
+ if ftype == TType.STRUCT:
+ self.nodes = HBNodes()
+ self.nodes.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 7:
+ if ftype == TType.STRING:
+ self.message_blob = iprot.readString()
else:
iprot.skip(ftype)
else:
@@ -10428,26 +10403,46 @@ class HBExecutionException(TException):
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('HBExecutionException')
- if self.msg is not None:
- oprot.writeFieldBegin('msg', TType.STRING, 1)
- oprot.writeString(self.msg.encode('utf-8'))
+ oprot.writeStructBegin('HBMessageData')
+ if self.path is not None:
+ oprot.writeFieldBegin('path', TType.STRING, 1)
+ oprot.writeString(self.path.encode('utf-8'))
+ oprot.writeFieldEnd()
+ if self.pulse is not None:
+ oprot.writeFieldBegin('pulse', TType.STRUCT, 2)
+ self.pulse.write(oprot)
+ oprot.writeFieldEnd()
+ if self.boolval is not None:
+ oprot.writeFieldBegin('boolval', TType.BOOL, 3)
+ oprot.writeBool(self.boolval)
+ oprot.writeFieldEnd()
+ if self.records is not None:
+ oprot.writeFieldBegin('records', TType.STRUCT, 4)
+ self.records.write(oprot)
+ oprot.writeFieldEnd()
+ if self.nodes is not None:
+ oprot.writeFieldBegin('nodes', TType.STRUCT, 5)
+ self.nodes.write(oprot)
+ oprot.writeFieldEnd()
+ if self.message_blob is not None:
+ oprot.writeFieldBegin('message_blob', TType.STRING, 7)
+ oprot.writeString(self.message_blob)
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)
+ value = (value * 31) ^ hash(self.path)
+ value = (value * 31) ^ hash(self.pulse)
+ value = (value * 31) ^ hash(self.boolval)
+ value = (value * 31) ^ hash(self.records)
+ value = (value * 31) ^ hash(self.nodes)
+ value = (value * 31) ^ hash(self.message_blob)
return value
def __repr__(self):
@@ -10461,22 +10456,25 @@ class HBExecutionException(TException):
def __ne__(self, other):
return not (self == other)
-class HBPulse:
+class HBMessage:
"""
Attributes:
- - id
- - details
+ - type
+ - data
+ - message_id
"""
thrift_spec = (
None, # 0
- (1, TType.STRING, 'id', None, None, ), # 1
- (2, TType.STRING, 'details', None, None, ), # 2
+ (1, TType.I32, 'type', None, None, ), # 1
+ (2, TType.STRUCT, 'data', (HBMessageData, HBMessageData.thrift_spec), None, ), # 2
+ (3, TType.I32, 'message_id', None, -1, ), # 3
)
- def __init__(self, id=None, details=None,):
- self.id = id
- self.details = details
+ def __init__(self, type=None, data=None, message_id=thrift_spec[3][4],):
+ self.type = type
+ self.data = data
+ self.message_id = message_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:
@@ -10488,13 +10486,19 @@ class HBPulse:
if ftype == TType.STOP:
break
if fid == 1:
- if ftype == TType.STRING:
- self.id = iprot.readString().decode('utf-8')
+ if ftype == TType.I32:
+ self.type = iprot.readI32()
else:
iprot.skip(ftype)
elif fid == 2:
- if ftype == TType.STRING:
- self.details = iprot.readString()
+ if ftype == TType.STRUCT:
+ self.data = HBMessageData()
+ self.data.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.I32:
+ self.message_id = iprot.readI32()
else:
iprot.skip(ftype)
else:
@@ -10506,28 +10510,31 @@ class HBPulse:
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('HBPulse')
- if self.id is not None:
- oprot.writeFieldBegin('id', TType.STRING, 1)
- oprot.writeString(self.id.encode('utf-8'))
+ oprot.writeStructBegin('HBMessage')
+ if self.type is not None:
+ oprot.writeFieldBegin('type', TType.I32, 1)
+ oprot.writeI32(self.type)
oprot.writeFieldEnd()
- if self.details is not None:
- oprot.writeFieldBegin('details', TType.STRING, 2)
- oprot.writeString(self.details)
+ if self.data is not None:
+ oprot.writeFieldBegin('data', TType.STRUCT, 2)
+ self.data.write(oprot)
+ oprot.writeFieldEnd()
+ if self.message_id is not None:
+ oprot.writeFieldBegin('message_id', TType.I32, 3)
+ oprot.writeI32(self.message_id)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
- if self.id is None:
- raise TProtocol.TProtocolException(message='Required field id is unset!')
return
def __hash__(self):
value = 17
- value = (value * 31) ^ hash(self.id)
- value = (value * 31) ^ hash(self.details)
+ value = (value * 31) ^ hash(self.type)
+ value = (value * 31) ^ hash(self.data)
+ value = (value * 31) ^ hash(self.message_id)
return value
def __repr__(self):
@@ -10541,19 +10548,19 @@ class HBPulse:
def __ne__(self, other):
return not (self == other)
-class HBRecords:
+class HBAuthorizationException(TException):
"""
Attributes:
- - pulses
+ - msg
"""
thrift_spec = (
None, # 0
- (1, TType.LIST, 'pulses', (TType.STRUCT,(HBPulse, HBPulse.thrift_spec)), None, ), # 1
+ (1, TType.STRING, 'msg', None, None, ), # 1
)
- def __init__(self, pulses=None,):
- self.pulses = pulses
+ 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:
@@ -10565,14 +10572,8 @@ class HBRecords:
if ftype == TType.STOP:
break
if fid == 1:
- if ftype == TType.LIST:
- self.pulses = []
- (_etype648, _size645) = iprot.readListBegin()
- for _i649 in xrange(_size645):
- _elem650 = HBPulse()
- _elem650.read(iprot)
- self.pulses.append(_elem650)
- iprot.readListEnd()
+ if ftype == TType.STRING:
+ self.msg = iprot.readString().decode('utf-8')
else:
iprot.skip(ftype)
else:
@@ -10584,24 +10585,26 @@ class HBRecords:
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('HBRecords')
- if self.pulses is not None:
- oprot.writeFieldBegin('pulses', TType.LIST, 1)
- oprot.writeListBegin(TType.STRUCT, len(self.pulses))
- for iter651 in self.pulses:
- iter651.write(oprot)
- oprot.writeListEnd()
+ oprot.writeStructBegin('HBAuthorizationException')
+ 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.pulses)
+ value = (value * 31) ^ hash(self.msg)
return value
def __repr__(self):
@@ -10615,19 +10618,19 @@ class HBRecords:
def __ne__(self, other):
return not (self == other)
-class HBNodes:
+class HBExecutionException(TException):
"""
Attributes:
- - pulseIds
+ - msg
"""
thrift_spec = (
None, # 0
- (1, TType.LIST, 'pulseIds', (TType.STRING,None), None, ), # 1
+ (1, TType.STRING, 'msg', None, None, ), # 1
)
- def __init__(self, pulseIds=None,):
- self.pulseIds = pulseIds
+ 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:
@@ -10639,13 +10642,8 @@ class HBNodes:
if ftype == TType.STOP:
break
if fid == 1:
- if ftype == TType.LIST:
- self.pulseIds = []
- (_etype655, _size652) = iprot.readListBegin()
- for _i656 in xrange(_size652):
- _elem657 = iprot.readString().decode('utf-8')
- self.pulseIds.append(_elem657)
- iprot.readListEnd()
+ if ftype == TType.STRING:
+ self.msg = iprot.readString().decode('utf-8')
else:
iprot.skip(ftype)
else:
@@ -10657,24 +10655,26 @@ class HBNodes:
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('HBNodes')
- if self.pulseIds is not None:
- oprot.writeFieldBegin('pulseIds', TType.LIST, 1)
- oprot.writeListBegin(TType.STRING, len(self.pulseIds))
- for iter658 in self.pulseIds:
- oprot.writeString(iter658.encode('utf-8'))
- oprot.writeListEnd()
+ oprot.writeStructBegin('HBExecutionException')
+ 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.pulseIds)
+ value = (value * 31) ^ hash(self.msg)
return value
def __repr__(self):
http://git-wip-us.apache.org/repos/asf/storm/blob/4c7117d7/storm-core/src/storm.thrift
----------------------------------------------------------------------
diff --git a/storm-core/src/storm.thrift b/storm-core/src/storm.thrift
index 5a7169b..4cfb9ad 100644
--- a/storm-core/src/storm.thrift
+++ b/storm-core/src/storm.thrift
@@ -697,6 +697,19 @@ enum HBServerMessageType {
NOT_AUTHORIZED
}
+struct HBPulse {
+ 1: required string id;
+ 2: binary details;
+}
+
+struct HBRecords {
+ 1: list<HBPulse> pulses;
+}
+
+struct HBNodes {
+ 1: list<string> pulseIds;
+}
+
union HBMessageData {
1: string path,
2: HBPulse pulse,
@@ -712,7 +725,6 @@ struct HBMessage {
3: optional i32 message_id = -1,
}
-
exception HBAuthorizationException {
1: required string msg;
}
@@ -720,16 +732,3 @@ exception HBAuthorizationException {
exception HBExecutionException {
1: required string msg;
}
-
-struct HBPulse {
- 1: required string id;
- 2: binary details;
-}
-
-struct HBRecords {
- 1: list<HBPulse> pulses;
-}
-
-struct HBNodes {
- 1: list<string> pulseIds;
-}
[2/3] storm git commit: Merge branch 'STORM-1842-1.x' of
github.com:HeartSaVioR/storm into 1.x-branch
Posted by pt...@apache.org.
Merge branch 'STORM-1842-1.x' of github.com:HeartSaVioR/storm into 1.x-branch
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/14745085
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/14745085
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/14745085
Branch: refs/heads/1.x-branch
Commit: 147450856ddc4fbb99b740ecd2b6eae4e6ec7e95
Parents: ba5f426 4c7117d
Author: P. Taylor Goetz <pt...@gmail.com>
Authored: Fri May 20 14:07:53 2016 -0400
Committer: P. Taylor Goetz <pt...@gmail.com>
Committed: Fri May 20 14:07:53 2016 -0400
----------------------------------------------------------------------
.../apache/storm/generated/HBMessageData.java | 6 +-
storm-core/src/py/storm/ttypes.py | 422 +++++++++----------
storm-core/src/storm.thrift | 27 +-
3 files changed, 227 insertions(+), 228 deletions(-)
----------------------------------------------------------------------
[3/3] storm git commit: add STORM-1842 to changelog
Posted by pt...@apache.org.
add STORM-1842 to changelog
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/068d5c9c
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/068d5c9c
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/068d5c9c
Branch: refs/heads/1.x-branch
Commit: 068d5c9c2d75f6a0031b3783333c514628ff8333
Parents: 1474508
Author: P. Taylor Goetz <pt...@gmail.com>
Authored: Fri May 20 14:09:27 2016 -0400
Committer: P. Taylor Goetz <pt...@gmail.com>
Committed: Fri May 20 14:09:27 2016 -0400
----------------------------------------------------------------------
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/068d5c9c/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bc4e352..a315b1b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
## 1.1.0
+ * STORM-1842: Forward references in storm.thrift cause tooling issues
* STORM-1730: LocalCluster#shutdown() does not terminate all storm threads/thread pools.
* STORM-1841: Address a few minor issues in windowing and doc
* STORM-1709: Added group by support in storm sql standalone mode