public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.oldTablet != null) { oprot.writeFieldBegin(OLD_TABLET_FIELD_DESC); this.oldTablet.write(oprot); oprot.writeFieldEnd(); } if (this.newTablets != null) { oprot.writeFieldBegin(NEW_TABLETS_FIELD_DESC); { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, this.newTablets.size())); for (org.apache.accumulo.core.data.thrift.TKeyExtent _iter46 : this.newTablets) { _iter46.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void read(org.apache.thrift.protocol.TProtocol iprot, TabletSplit 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: // OLD_TABLET if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.oldTablet = new org.apache.accumulo.core.data.thrift.TKeyExtent(); struct.oldTablet.read(iprot); struct.setOldTabletIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NEW_TABLETS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list62 = iprot.readListBegin(); struct.newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list62.size); for (int _i63 = 0; _i63 < _list62.size; ++_i63) { org.apache.accumulo.core.data.thrift.TKeyExtent _elem64; // required _elem64 = new org.apache.accumulo.core.data.thrift.TKeyExtent(); _elem64.read(iprot); struct.newTablets.add(_elem64); } iprot.readListEnd(); } struct.setNewTabletsIsSet(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(); }
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // OLD_TABLET if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.oldTablet = new org.apache.accumulo.core.data.thrift.TKeyExtent(); this.oldTablet.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // NEW_TABLETS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list43 = iprot.readListBegin(); this.newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list43.size); for (int _i44 = 0; _i44 < _list43.size; ++_i44) { org.apache.accumulo.core.data.thrift.TKeyExtent _elem45; _elem45 = new org.apache.accumulo.core.data.thrift.TKeyExtent(); _elem45.read(iprot); this.newTablets.add(_elem45); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); }