public void write(org.apache.thrift.protocol.TProtocol oprot, ChunkCompressionMeta struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.compression_codec != null) { oprot.writeFieldBegin(COMPRESSION_CODEC_FIELD_DESC); oprot.writeI32(struct.compression_codec.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(TOTAL_UNCOMPRESSED_SIZE_FIELD_DESC); oprot.writeI64(struct.total_uncompressed_size); oprot.writeFieldEnd(); oprot.writeFieldBegin(TOTAL_COMPRESSED_SIZE_FIELD_DESC); oprot.writeI64(struct.total_compressed_size); oprot.writeFieldEnd(); if (struct.compressor_name != null) { if (struct.isSetCompressor_name()) { oprot.writeFieldBegin(COMPRESSOR_NAME_FIELD_DESC); oprot.writeString(struct.compressor_name); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void validate() throws org.apache.thrift.TException { // check for required fields if (chunk_meta == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'chunk_meta' was not present! Struct: " + toString()); } // alas, we cannot check 'rowMajor' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'data_page_length' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity if (chunk_meta != null) { chunk_meta.validate(); } if (presence != null) { presence.validate(); } if (min_max != null) { min_max.validate(); } }
throw new org.apache.thrift.protocol.TProtocolException("Required field 'total_compressed_size' was not found in serialized data! Struct: " + toString()); struct.validate();
public void validate() throws org.apache.thrift.TException { // check for required fields if (chunk_meta == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'chunk_meta' was not present! Struct: " + toString()); } // alas, we cannot check 'rowMajor' because it's a primitive and you chose the non-beans generator. if (column_ids == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_ids' was not present! Struct: " + toString()); } // alas, we cannot check 'data_page_offset' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'data_page_length' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity if (chunk_meta != null) { chunk_meta.validate(); } if (presence != null) { presence.validate(); } }