@Override public void read(org.apache.thrift.protocol.TProtocol prot, TDelete struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.row = iprot.readBinary(); struct.setRowIsSet(true); BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.columns = new ArrayList<TColumn>(_list55.size); for (int _i56 = 0; _i56 < _list55.size; ++_i56) { TColumn _elem57; // required _elem57 = new TColumn(); _elem57.read(iprot); struct.columns.add(_elem57); } } struct.setColumnsIsSet(true); } if (incoming.get(1)) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } if (incoming.get(2)) { struct.deleteType = TDeleteType.findByValue(iprot.readI32()); struct.setDeleteTypeIsSet(true); } if (incoming.get(3)) { struct.writeToWal = iprot.readBool(); struct.setWriteToWalIsSet(true); } if (incoming.get(4)) { { org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap( org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.attributes = new HashMap<ByteBuffer, ByteBuffer>(2 * _map58.size); for (int _i59 = 0; _i59 < _map58.size; ++_i59) { ByteBuffer _key60; // required ByteBuffer _val61; // optional _key60 = iprot.readBinary(); _val61 = iprot.readBinary(); struct.attributes.put(_key60, _val61); } } struct.setAttributesIsSet(true); } if (incoming.get(5)) { struct.durability = TDurability.findByValue(iprot.readI32()); struct.setDurabilityIsSet(true); } }
public void read(org.apache.thrift.protocol.TProtocol iprot, TDelete struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // ROW if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.row = iprot.readBinary(); struct.setRowIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // COLUMNS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list44 = iprot.readListBegin(); struct.columns = new ArrayList<TColumn>(_list44.size); for (int _i45 = 0; _i45 < _list44.size; ++_i45) { TColumn _elem46; // required _elem46 = new TColumn(); _elem46.read(iprot); struct.columns.add(_elem46); } iprot.readListEnd(); } struct.setColumnsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TIMESTAMP if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DELETE_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.deleteType = TDeleteType.findByValue(iprot.readI32()); struct.setDeleteTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // WRITE_TO_WAL if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.writeToWal = iprot.readBool(); struct.setWriteToWalIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // ATTRIBUTES if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map47 = iprot.readMapBegin(); struct.attributes = new HashMap<ByteBuffer, ByteBuffer>(2 * _map47.size); for (int _i48 = 0; _i48 < _map47.size; ++_i48) { ByteBuffer _key49; // required ByteBuffer _val50; // optional _key49 = iprot.readBinary(); _val50 = iprot.readBinary(); struct.attributes.put(_key49, _val50); } iprot.readMapEnd(); } struct.setAttributesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // DURABILITY if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.durability = TDurability.findByValue(iprot.readI32()); struct.setDurabilityIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); }