blob: 2bd65b8b99eb5b802b5eddf977a8a274110e2583 [file] [log] [blame]
#!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Autogenerated by Thrift Compiler (0.13.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, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive import fix_spec
import sys
from thrift.transport import TTransport
all_structs = []
class ComponentType(object):
BOLT = 1
SPOUT = 2
_VALUES_TO_NAMES = {
1: "BOLT",
2: "SPOUT",
}
_NAMES_TO_VALUES = {
"BOLT": 1,
"SPOUT": 2,
}
class TopologyInitialStatus(object):
ACTIVE = 1
INACTIVE = 2
_VALUES_TO_NAMES = {
1: "ACTIVE",
2: "INACTIVE",
}
_NAMES_TO_VALUES = {
"ACTIVE": 1,
"INACTIVE": 2,
}
class AccessControlType(object):
OTHER = 1
USER = 2
_VALUES_TO_NAMES = {
1: "OTHER",
2: "USER",
}
_NAMES_TO_VALUES = {
"OTHER": 1,
"USER": 2,
}
class TopologyStatus(object):
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(object):
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(object):
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(object):
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(object):
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(object):
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(object):
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(object):
"""
Attributes:
- int_arg
- long_arg
- string_arg
- bool_arg
- binary_arg
- double_arg
"""
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._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.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') if sys.version_info[0] == 2 else iprot.readString()
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.readBinary()
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._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('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') if sys.version_info[0] == 2 else self.string_arg)
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.writeBinary(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 __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)
class JavaObject(object):
"""
Attributes:
- full_class_name
- args_list
"""
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._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.full_class_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.LIST:
self.args_list = []
(_etype3, _size0) = iprot.readListBegin()
for _i4 in range(_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._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('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') if sys.version_info[0] == 2 else self.full_class_name)
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 TProtocolException(message='Required field full_class_name is unset!')
if self.args_list is None:
raise TProtocolException(message='Required field args_list is unset!')
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)
class NullStruct(object):
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
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('NullStruct')
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)
class GlobalStreamId(object):
"""
Attributes:
- componentId
- streamId
"""
def __init__(self, componentId=None, streamId=None,):
self.componentId = componentId
self.streamId = streamId
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.componentId = 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.streamId = 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('GlobalStreamId')
if self.componentId is not None:
oprot.writeFieldBegin('componentId', TType.STRING, 1)
oprot.writeString(self.componentId.encode('utf-8') if sys.version_info[0] == 2 else self.componentId)
oprot.writeFieldEnd()
if self.streamId is not None:
oprot.writeFieldBegin('streamId', TType.STRING, 2)
oprot.writeString(self.streamId.encode('utf-8') if sys.version_info[0] == 2 else self.streamId)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.componentId is None:
raise TProtocolException(message='Required field componentId is unset!')
if self.streamId is None:
raise TProtocolException(message='Required field streamId is unset!')
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)
class Grouping(object):
"""
Attributes:
- fields
- shuffle
- all
- none
- direct
- custom_object
- custom_serialized
- local_or_shuffle
"""
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._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.LIST:
self.fields = []
(_etype10, _size7) = iprot.readListBegin()
for _i11 in range(_size7):
_elem12 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
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.readBinary()
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._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('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') if sys.version_info[0] == 2 else iter13)
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.writeBinary(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 __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)
class StreamInfo(object):
"""
Attributes:
- output_fields
- direct
"""
def __init__(self, output_fields=None, direct=None,):
self.output_fields = output_fields
self.direct = direct
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.LIST:
self.output_fields = []
(_etype17, _size14) = iprot.readListBegin()
for _i18 in range(_size14):
_elem19 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
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._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('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') if sys.version_info[0] == 2 else iter20)
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 TProtocolException(message='Required field output_fields is unset!')
if self.direct is None:
raise TProtocolException(message='Required field direct is unset!')
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)
class ShellComponent(object):
"""
Attributes:
- execution_command
- script
"""
def __init__(self, execution_command=None, script=None,):
self.execution_command = execution_command
self.script = script
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.execution_command = 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.script = 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('ShellComponent')
if self.execution_command is not None:
oprot.writeFieldBegin('execution_command', TType.STRING, 1)
oprot.writeString(self.execution_command.encode('utf-8') if sys.version_info[0] == 2 else self.execution_command)
oprot.writeFieldEnd()
if self.script is not None:
oprot.writeFieldBegin('script', TType.STRING, 2)
oprot.writeString(self.script.encode('utf-8') if sys.version_info[0] == 2 else self.script)
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)
class ComponentObject(object):
"""
Attributes:
- serialized_java
- shell
- java_object
"""
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._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.serialized_java = iprot.readBinary()
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._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('ComponentObject')
if self.serialized_java is not None:
oprot.writeFieldBegin('serialized_java', TType.STRING, 1)
oprot.writeBinary(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 __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)
class ComponentCommon(object):
"""
Attributes:
- inputs
- streams
- parallelism_hint
- json_conf
"""
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._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.MAP:
self.inputs = {}
(_ktype22, _vtype23, _size21) = iprot.readMapBegin()
for _i25 in range(_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 range(_size28):
_key33 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
_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') 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('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') if sys.version_info[0] == 2 else kiter37)
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') if sys.version_info[0] == 2 else self.json_conf)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.inputs is None:
raise TProtocolException(message='Required field inputs is unset!')
if self.streams is None:
raise TProtocolException(message='Required field streams is unset!')
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)
class SpoutSpec(object):
"""
Attributes:
- spout_object
- common
"""
def __init__(self, spout_object=None, common=None,):
self.spout_object = spout_object
self.common = common
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.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._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('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 TProtocolException(message='Required field spout_object is unset!')
if self.common is None:
raise TProtocolException(message='Required field common is unset!')
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)
class Bolt(object):
"""
Attributes:
- bolt_object
- common
"""
def __init__(self, bolt_object=None, common=None,):
self.bolt_object = bolt_object
self.common = common
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.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._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('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 TProtocolException(message='Required field bolt_object is unset!')
if self.common is None:
raise TProtocolException(message='Required field common is unset!')
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)
class StateSpoutSpec(object):
"""
Attributes:
- state_spout_object
- common
"""
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._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.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._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('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 TProtocolException(message='Required field state_spout_object is unset!')
if self.common is None:
raise TProtocolException(message='Required field common is unset!')
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)
class SharedMemory(object):
"""
Attributes:
- name
- on_heap
- off_heap_worker
- off_heap_node
"""
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._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.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
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._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('SharedMemory')
if self.name is not None:
oprot.writeFieldBegin('name', TType.STRING, 1)
oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
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 TProtocolException(message='Required field name is unset!')
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)
class StormTopology(object):
"""
Attributes:
- spouts
- bolts
- state_spouts
- worker_hooks
- dependency_jars
- dependency_artifacts
- storm_version
- jdk_version
- component_to_shared_memory
- shared_memory
"""
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._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.MAP:
self.spouts = {}
(_ktype40, _vtype41, _size39) = iprot.readMapBegin()
for _i43 in range(_size39):
_key44 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
_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 range(_size46):
_key51 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
_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 range(_size53):
_key58 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
_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 range(_size60):
_elem65 = iprot.readBinary()
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 range(_size66):
_elem71 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
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 range(_size72):
_elem77 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
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') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 8:
if ftype == TType.STRING:
self.jdk_version = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 9:
if ftype == TType.MAP:
self.component_to_shared_memory = {}
(_ktype79, _vtype80, _size78) = iprot.readMapBegin()
for _i82 in range(_size78):
_key83 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
_val84 = set()
(_etype88, _size85) = iprot.readSetBegin()
for _i89 in range(_size85):
_elem90 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
_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 range(_size91):
_key96 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
_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._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('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') if sys.version_info[0] == 2 else kiter98)
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') if sys.version_info[0] == 2 else kiter100)
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') if sys.version_info[0] == 2 else kiter102)
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.writeBinary(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') if sys.version_info[0] == 2 else iter105)
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') if sys.version_info[0] == 2 else iter106)
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') if sys.version_info[0] == 2 else self.storm_version)
oprot.writeFieldEnd()
if self.jdk_version is not None:
oprot.writeFieldBegin('jdk_version', TType.STRING, 8)
oprot.writeString(self.jdk_version.encode('utf-8') if sys.version_info[0] == 2 else self.jdk_version)
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') if sys.version_info[0] == 2 else kiter107)
oprot.writeSetBegin(TType.STRING, len(viter108))
for iter109 in viter108:
oprot.writeString(iter109.encode('utf-8') if sys.version_info[0] == 2 else iter109)
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') if sys.version_info[0] == 2 else kiter110)
viter111.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.spouts is None:
raise TProtocolException(message='Required field spouts is unset!')
if self.bolts is None:
raise TProtocolException(message='Required field bolts is unset!')
if self.state_spouts is None:
raise TProtocolException(message='Required field state_spouts is unset!')
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)
class AlreadyAliveException(TException):
"""
Attributes:
- msg
"""
def __init__(self, msg=None,):
self.msg = msg
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.msg = 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('AlreadyAliveException')
if self.msg is not None:
oprot.writeFieldBegin('msg', TType.STRING, 1)
oprot.writeString(self.msg.encode('utf-8') if sys.version_info[0] == 2 else self.msg)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.msg is None:
raise TProtocolException(message='Required field msg is unset!')
return
def __str__(self):
return repr(self)
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.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)
class NotAliveException(TException):
"""
Attributes:
- msg
"""
def __init__(self, msg=None,):
self.msg = msg
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.msg = 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('NotAliveException')
if self.msg is not None:
oprot.writeFieldBegin('msg', TType.STRING, 1)
oprot.writeString(self.msg.encode('utf-8') if sys.version_info[0] == 2 else self.msg)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.msg is None:
raise TProtocolException(message='Required field msg is unset!')
return
def __str__(self):
return repr(self)
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.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)
class AuthorizationException(TException):
"""
Attributes:
- msg
"""
def __init__(self, msg=None,):
self.msg = msg
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.msg = 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('AuthorizationException')
if self.msg is not None:
oprot.writeFieldBegin('msg', TType.STRING, 1)
oprot.writeString(self.msg.encode('utf-8') if sys.version_info[0] == 2 else self.msg)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.msg is None:
raise TProtocolException(message='Required field msg is unset!')
return
def __str__(self):
return repr(self)
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.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)
class InvalidTopologyException(TException):
"""
Attributes:
- msg
"""
def __init__(self, msg=None,):
self.msg = msg
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.msg = 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('InvalidTopologyException')
if self.msg is not None:
oprot.writeFieldBegin('msg', TType.STRING, 1)
oprot.writeString(self.msg.encode('utf-8') if sys.version_info[0] == 2 else self.msg)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.msg is None:
raise TProtocolException(message='Required field msg is unset!')
return
def __str__(self):
return repr(self)
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.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)
class KeyNotFoundException(TException):
"""
Attributes:
- msg
"""
def __init__(self, msg=None,):
self.msg = msg
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.msg = 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('KeyNotFoundException')
if self.msg is not None:
oprot.writeFieldBegin('msg', TType.STRING, 1)
oprot.writeString(self.msg.encode('utf-8') if sys.version_info[0] == 2 else self.msg)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.msg is None:
raise TProtocolException(message='Required field msg is unset!')
return
def __str__(self):
return repr(self)
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.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)
class IllegalStateException(TException):
"""
Attributes:
- msg
"""
def __init__(self, msg=None,):
self.msg = msg
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.msg = 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('IllegalStateException')
if self.msg is not None:
oprot.writeFieldBegin('msg', TType.STRING, 1)
oprot.writeString(self.msg.encode('utf-8') if sys.version_info[0] == 2 else self.msg)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.msg is None:
raise TProtocolException(message='Required field msg is unset!')
return
def __str__(self):
return repr(self)
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.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)
class KeyAlreadyExistsException(TException):
"""
Attributes:
- msg
"""
def __init__(self, msg=None,):
self.msg = msg
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.msg = 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('KeyAlreadyExistsException')
if self.msg is not None:
oprot.writeFieldBegin('msg', TType.STRING, 1)
oprot.writeString(self.msg.encode('utf-8') if sys.version_info[0] == 2 else self.msg)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.msg is None:
raise TProtocolException(message='Required field msg is unset!')
return
def __str__(self):
return repr(self)
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.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)
class TopologySummary(object):
"""
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
- requested_generic_resources
- assigned_generic_resources
"""
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, requested_generic_resources=None, assigned_generic_resources=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
self.requested_generic_resources = requested_generic_resources
self.assigned_generic_resources = assigned_generic_resources
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.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
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') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 8:
if ftype == TType.STRING:
self.storm_version = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 9:
if ftype == TType.STRING:
self.topology_version = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 513:
if ftype == TType.STRING:
self.sched_status = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 514:
if ftype == TType.STRING:
self.owner = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
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)
elif fid == 527:
if ftype == TType.MAP:
self.requested_generic_resources = {}
(_ktype113, _vtype114, _size112) = iprot.readMapBegin()
for _i116 in range(_size112):
_key117 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
_val118 = iprot.readDouble()
self.requested_generic_resources[_key117] = _val118
iprot.readMapEnd()
else:
iprot.skip(ftype)
elif fid == 528:
if ftype == TType.MAP:
self.assigned_generic_resources = {}
(_ktype120, _vtype121, _size119) = iprot.readMapBegin()
for _i123 in range(_size119):
_key124 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
_val125 = iprot.readDouble()
self.assigned_generic_resources[_key124] = _val125
iprot.readMapEnd()
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('TopologySummary')
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.name is not None:
oprot.writeFieldBegin('name', TType.STRING, 2)
oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
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') if sys.version_info[0] == 2 else self.status)
oprot.writeFieldEnd()
if self.storm_version is not None:
oprot.writeFieldBegin('storm_version', TType.STRING, 8)
oprot.writeString(self.storm_version.encode('utf-8') if sys.version_info[0] == 2 else self.storm_version)
oprot.writeFieldEnd()
if self.topology_version is not None:
oprot.writeFieldBegin('topology_version', TType.STRING, 9)
oprot.writeString(self.topology_version.encode('utf-8') if sys.version_info[0] == 2 else self.topology_version)
oprot.writeFieldEnd()
if self.sched_status is not None:
oprot.writeFieldBegin('sched_status', TType.STRING, 513)
oprot.writeString(self.sched_status.encode('utf-8') if sys.version_info[0] == 2 else self.sched_status)
oprot.writeFieldEnd()
if self.owner is not None:
oprot.writeFieldBegin('owner', TType.STRING, 514)
oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner)
oprot.writeFieldEnd()
if self.replication_count is not None:
oprot.writeFieldBegin('replication_count', TType.I32, 515)
oprot.writeI32(self.replication_count)
oprot.writeFieldEnd()
if self.requested_memonheap is not None:
oprot.writeFieldBegin('requested_memonheap', TType.DOUBLE, 521)
oprot.writeDouble(self.requested_memonheap)
oprot.writeFieldEnd()
if self.requested_memoffheap is not None:
oprot.writeFieldBegin('requested_memoffheap', TType.DOUBLE, 522)
oprot.writeDouble(self.requested_memoffheap)
oprot.writeFieldEnd()
if self.requested_cpu is not None:
oprot.writeFieldBegin('requested_cpu', TType.DOUBLE, 523)
oprot.writeDouble(self.requested_cpu)
oprot.writeFieldEnd()
if self.assigned_memonheap is not None:
oprot.writeFieldBegin('assigned_memonheap', TType.DOUBLE, 524)
oprot.writeDouble(self.assigned_memonheap)
oprot.writeFieldEnd()
if self.assigned_memoffheap is not None:
oprot.writeFieldBegin('assigned_memoffheap', TType.DOUBLE, 525)
oprot.writeDouble(self.assigned_memoffheap)
oprot.writeFieldEnd()
if self.assigned_cpu is not None:
oprot.writeFieldBegin('assigned_cpu', TType.DOUBLE, 526)
oprot.writeDouble(self.assigned_cpu)
oprot.writeFieldEnd()
if self.requested_generic_resources is not None:
oprot.writeFieldBegin('requested_generic_resources', TType.MAP, 527)
oprot.writeMapBegin(TType.STRING, TType.DOUBLE, len(self.requested_generic_resources))
for kiter126, viter127 in self.requested_generic_resources.items():
oprot.writeString(kiter126.encode('utf-8') if sys.version_info[0] == 2 else kiter126)
oprot.writeDouble(viter127)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.assigned_generic_resources is not None:
oprot.writeFieldBegin('assigned_generic_resources', TType.MAP, 528)
oprot.writeMapBegin(TType.STRING, TType.DOUBLE, len(self.assigned_generic_resources))
for kiter128, viter129 in self.assigned_generic_resources.items():
oprot.writeString(kiter128.encode('utf-8') if sys.version_info[0] == 2 else kiter128)
oprot.writeDouble(viter129)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.id is None:
raise TProtocolException(message='Required field id is unset!')
if self.name is None:
raise TProtocolException(message='Required field name is unset!')
if self.num_tasks is None:
raise TProtocolException(message='Required field num_tasks is unset!')