Exemple #1
0
 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('MutateSpec')
   if self.appname != None:
     oprot.writeFieldBegin('appname', TType.STRING, 1)
     oprot.writeString(self.appname)
     oprot.writeFieldEnd()
   if self.flush_interval != None:
     oprot.writeFieldBegin('flush_interval', TType.I32, 2)
     oprot.writeI32(self.flush_interval)
     oprot.writeFieldEnd()
   if self.flags != None:
     oprot.writeFieldBegin('flags', TType.I32, 3)
     oprot.writeI32(self.flags)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     if self.appname is None:
       raise TProtocol.TProtocolException(message='Required field appname is unset!')
     if self.flush_interval is None:
       raise TProtocol.TProtocolException(message='Required field flush_interval is unset!')
     if self.flags is None:
       raise TProtocol.TProtocolException(message='Required field flags is unset!')
     return
Exemple #2
0
 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('hql_exec2_args')
   if self.ns != None:
     oprot.writeFieldBegin('ns', TType.I64, 1)
     oprot.writeI64(self.ns)
     oprot.writeFieldEnd()
   if self.command != None:
     oprot.writeFieldBegin('command', TType.STRING, 2)
     oprot.writeString(self.command)
     oprot.writeFieldEnd()
   if self.noflush != None:
     oprot.writeFieldBegin('noflush', TType.BOOL, 3)
     oprot.writeBool(self.noflush)
     oprot.writeFieldEnd()
   if self.unbuffered != None:
     oprot.writeFieldBegin('unbuffered', TType.BOOL, 4)
     oprot.writeBool(self.unbuffered)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
Exemple #3
0
 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('Schema')
   if self.access_groups != None:
     oprot.writeFieldBegin('access_groups', TType.MAP, 1)
     oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.access_groups))
     for kiter42, viter43 in self.access_groups.items():
       oprot.writeString(kiter42)
       viter43.write(oprot)
     oprot.writeMapEnd()
     oprot.writeFieldEnd()
   if self.column_families != None:
     oprot.writeFieldBegin('column_families', TType.MAP, 2)
     oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.column_families))
     for kiter44, viter45 in self.column_families.items():
       oprot.writeString(kiter44)
       viter45.write(oprot)
     oprot.writeMapEnd()
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
Exemple #4
0
 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('Key')
   if self.row != None:
     oprot.writeFieldBegin('row', TType.STRING, 1)
     oprot.writeString(self.row)
     oprot.writeFieldEnd()
   if self.column_family != None:
     oprot.writeFieldBegin('column_family', TType.STRING, 2)
     oprot.writeString(self.column_family)
     oprot.writeFieldEnd()
   if self.column_qualifier != None:
     oprot.writeFieldBegin('column_qualifier', TType.STRING, 3)
     oprot.writeString(self.column_qualifier)
     oprot.writeFieldEnd()
   if self.timestamp != None:
     oprot.writeFieldBegin('timestamp', TType.I64, 4)
     oprot.writeI64(self.timestamp)
     oprot.writeFieldEnd()
   if self.revision != None:
     oprot.writeFieldBegin('revision', TType.I64, 5)
     oprot.writeI64(self.revision)
     oprot.writeFieldEnd()
   if self.flag != None:
     oprot.writeFieldBegin('flag', TType.I32, 6)
     oprot.writeI32(self.flag)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
Exemple #5
0
 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('CellInterval')
   if self.start_row != None:
     oprot.writeFieldBegin('start_row', TType.STRING, 1)
     oprot.writeString(self.start_row)
     oprot.writeFieldEnd()
   if self.start_column != None:
     oprot.writeFieldBegin('start_column', TType.STRING, 2)
     oprot.writeString(self.start_column)
     oprot.writeFieldEnd()
   if self.start_inclusive != None:
     oprot.writeFieldBegin('start_inclusive', TType.BOOL, 3)
     oprot.writeBool(self.start_inclusive)
     oprot.writeFieldEnd()
   if self.end_row != None:
     oprot.writeFieldBegin('end_row', TType.STRING, 4)
     oprot.writeString(self.end_row)
     oprot.writeFieldEnd()
   if self.end_column != None:
     oprot.writeFieldBegin('end_column', TType.STRING, 5)
     oprot.writeString(self.end_column)
     oprot.writeFieldEnd()
   if self.end_inclusive != None:
     oprot.writeFieldBegin('end_inclusive', TType.BOOL, 6)
     oprot.writeBool(self.end_inclusive)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
Exemple #6
0
 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('ColumnFamily')
   if self.name != None:
     oprot.writeFieldBegin('name', TType.STRING, 1)
     oprot.writeString(self.name)
     oprot.writeFieldEnd()
   if self.ag != None:
     oprot.writeFieldBegin('ag', TType.STRING, 2)
     oprot.writeString(self.ag)
     oprot.writeFieldEnd()
   if self.max_versions != None:
     oprot.writeFieldBegin('max_versions', TType.I32, 3)
     oprot.writeI32(self.max_versions)
     oprot.writeFieldEnd()
   if self.ttl != None:
     oprot.writeFieldBegin('ttl', TType.STRING, 4)
     oprot.writeString(self.ttl)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
Exemple #7
0
 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('TableSplit')
   if self.start_row != None:
     oprot.writeFieldBegin('start_row', TType.STRING, 1)
     oprot.writeString(self.start_row)
     oprot.writeFieldEnd()
   if self.end_row != None:
     oprot.writeFieldBegin('end_row', TType.STRING, 2)
     oprot.writeString(self.end_row)
     oprot.writeFieldEnd()
   if self.location != None:
     oprot.writeFieldBegin('location', TType.STRING, 3)
     oprot.writeString(self.location)
     oprot.writeFieldEnd()
   if self.ip_address != None:
     oprot.writeFieldBegin('ip_address', TType.STRING, 4)
     oprot.writeString(self.ip_address)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
Exemple #8
0
 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('HqlResult2')
   if self.results != None:
     oprot.writeFieldBegin('results', TType.LIST, 1)
     oprot.writeListBegin(TType.STRING, len(self.results))
     for iter32 in self.results:
       oprot.writeString(iter32)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   if self.cells != None:
     oprot.writeFieldBegin('cells', TType.LIST, 2)
     oprot.writeListBegin(TType.LIST, len(self.cells))
     for iter33 in self.cells:
       oprot.writeListBegin(TType.STRING, len(iter33))
       for iter34 in iter33:
         oprot.writeString(iter34)
       oprot.writeListEnd()
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   if self.scanner != None:
     oprot.writeFieldBegin('scanner', TType.I64, 3)
     oprot.writeI64(self.scanner)
     oprot.writeFieldEnd()
   if self.mutator != None:
     oprot.writeFieldBegin('mutator', TType.I64, 4)
     oprot.writeI64(self.mutator)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
Exemple #9
0
 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('hql_query2_result')
   if self.success != None:
     oprot.writeFieldBegin('success', TType.STRUCT, 0)
     self.success.write(oprot)
     oprot.writeFieldEnd()
   if self.e != None:
     oprot.writeFieldBegin('e', TType.STRUCT, 1)
     self.e.write(oprot)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
Exemple #10
0
 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('Cell')
   if self.key != None:
     oprot.writeFieldBegin('key', TType.STRUCT, 1)
     self.key.write(oprot)
     oprot.writeFieldEnd()
   if self.value != None:
     oprot.writeFieldBegin('value', TType.STRING, 2)
     oprot.writeString(self.value)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
Exemple #11
0
 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('ClientException')
   if self.code != None:
     oprot.writeFieldBegin('code', TType.I32, 1)
     oprot.writeI32(self.code)
     oprot.writeFieldEnd()
   if self.message != None:
     oprot.writeFieldBegin('message', TType.STRING, 2)
     oprot.writeString(self.message)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
Exemple #12
0
 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('NamespaceListing')
   if self.name != None:
     oprot.writeFieldBegin('name', TType.STRING, 1)
     oprot.writeString(self.name)
     oprot.writeFieldEnd()
   if self.is_namespace != None:
     oprot.writeFieldBegin('is_namespace', TType.BOOL, 2)
     oprot.writeBool(self.is_namespace)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     if self.name is None:
       raise TProtocol.TProtocolException(message='Required field name is unset!')
     if self.is_namespace is None:
       raise TProtocol.TProtocolException(message='Required field is_namespace is unset!')
     return
Exemple #13
0
 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('AccessGroup')
   if self.name != None:
     oprot.writeFieldBegin('name', TType.STRING, 1)
     oprot.writeString(self.name)
     oprot.writeFieldEnd()
   if self.in_memory != None:
     oprot.writeFieldBegin('in_memory', TType.BOOL, 2)
     oprot.writeBool(self.in_memory)
     oprot.writeFieldEnd()
   if self.replication != None:
     oprot.writeFieldBegin('replication', TType.I16, 3)
     oprot.writeI16(self.replication)
     oprot.writeFieldEnd()
   if self.blocksize != None:
     oprot.writeFieldBegin('blocksize', TType.I32, 4)
     oprot.writeI32(self.blocksize)
     oprot.writeFieldEnd()
   if self.compressor != None:
     oprot.writeFieldBegin('compressor', TType.STRING, 5)
     oprot.writeString(self.compressor)
     oprot.writeFieldEnd()
   if self.bloom_filter != None:
     oprot.writeFieldBegin('bloom_filter', TType.STRING, 6)
     oprot.writeString(self.bloom_filter)
     oprot.writeFieldEnd()
   if self.columns != None:
     oprot.writeFieldBegin('columns', TType.LIST, 7)
     oprot.writeListBegin(TType.STRUCT, len(self.columns))
     for iter27 in self.columns:
       iter27.write(oprot)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
Exemple #14
0
 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('ScanSpec')
   if self.row_intervals != None:
     oprot.writeFieldBegin('row_intervals', TType.LIST, 1)
     oprot.writeListBegin(TType.STRUCT, len(self.row_intervals))
     for iter18 in self.row_intervals:
       iter18.write(oprot)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   if self.cell_intervals != None:
     oprot.writeFieldBegin('cell_intervals', TType.LIST, 2)
     oprot.writeListBegin(TType.STRUCT, len(self.cell_intervals))
     for iter19 in self.cell_intervals:
       iter19.write(oprot)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   if self.return_deletes != None:
     oprot.writeFieldBegin('return_deletes', TType.BOOL, 3)
     oprot.writeBool(self.return_deletes)
     oprot.writeFieldEnd()
   if self.revs != None:
     oprot.writeFieldBegin('revs', TType.I32, 4)
     oprot.writeI32(self.revs)
     oprot.writeFieldEnd()
   if self.row_limit != None:
     oprot.writeFieldBegin('row_limit', TType.I32, 5)
     oprot.writeI32(self.row_limit)
     oprot.writeFieldEnd()
   if self.start_time != None:
     oprot.writeFieldBegin('start_time', TType.I64, 6)
     oprot.writeI64(self.start_time)
     oprot.writeFieldEnd()
   if self.end_time != None:
     oprot.writeFieldBegin('end_time', TType.I64, 7)
     oprot.writeI64(self.end_time)
     oprot.writeFieldEnd()
   if self.columns != None:
     oprot.writeFieldBegin('columns', TType.LIST, 8)
     oprot.writeListBegin(TType.STRING, len(self.columns))
     for iter20 in self.columns:
       oprot.writeString(iter20)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   if self.keys_only != None:
     oprot.writeFieldBegin('keys_only', TType.BOOL, 9)
     oprot.writeBool(self.keys_only)
     oprot.writeFieldEnd()
   if self.cell_limit != None:
     oprot.writeFieldBegin('cell_limit', TType.I32, 10)
     oprot.writeI32(self.cell_limit)
     oprot.writeFieldEnd()
   if self.row_regexp != None:
     oprot.writeFieldBegin('row_regexp', TType.STRING, 11)
     oprot.writeString(self.row_regexp)
     oprot.writeFieldEnd()
   if self.value_regexp != None:
     oprot.writeFieldBegin('value_regexp', TType.STRING, 12)
     oprot.writeString(self.value_regexp)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return