/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NUM_BYTES: return is_set_num_bytes(); case NUM_RECORDS: return is_set_num_records(); } throw new IllegalStateException(); }
public int compareTo(PartitionMetadata other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; PartitionMetadata typedOther = (PartitionMetadata)other; lastComparison = Boolean.valueOf(is_set_num_bytes()).compareTo(typedOther.is_set_num_bytes()); if (lastComparison != 0) { return lastComparison; } if (is_set_num_bytes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_bytes, typedOther.num_bytes); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_num_records()).compareTo(typedOther.is_set_num_records()); if (lastComparison != 0) { return lastComparison; } if (is_set_num_records()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_records, typedOther.num_records); if (lastComparison != 0) { return lastComparison; } } return 0; }
if (!struct.is_set_num_bytes()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_bytes' was not found in serialized data! Struct: " + toString());