@Override public void write(org.apache.thrift.protocol.TProtocol prot, CompactionRequest struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.dbname); oprot.writeString(struct.tablename); oprot.writeI32(struct.type.getValue()); BitSet optionals = new BitSet(); if (struct.isSetPartitionname()) { optionals.set(0); } if (struct.isSetRunas()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetPartitionname()) { oprot.writeString(struct.partitionname); } if (struct.isSetRunas()) { oprot.writeString(struct.runas); } }
/** Performs a deep copy on <i>other</i>. */ public CompactionRequest(CompactionRequest other) { if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetPartitionname()) { this.partitionname = other.partitionname; } if (other.isSetType()) { this.type = other.type; } if (other.isSetRunas()) { this.runas = other.runas; } }
public boolean equals(CompactionRequest that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) return false; if (!this.tablename.equals(that.tablename)) return false; } boolean this_present_partitionname = true && this.isSetPartitionname(); boolean that_present_partitionname = true && that.isSetPartitionname(); if (this_present_partitionname || that_present_partitionname) { if (!(this_present_partitionname && that_present_partitionname)) return false; if (!this.partitionname.equals(that.partitionname)) return false; } boolean this_present_type = true && this.isSetType(); boolean that_present_type = true && that.isSetType(); if (this_present_type || that_present_type) { if (!(this_present_type && that_present_type)) return false; if (!this.type.equals(that.type)) return false; } boolean this_present_runas = true && this.isSetRunas(); boolean that_present_runas = true && that.isSetRunas(); if (this_present_runas || that_present_runas) { if (!(this_present_runas && that_present_runas)) return false; if (!this.runas.equals(that.runas)) return false; } return true; }
public void write(org.apache.thrift.protocol.TProtocol oprot, CompactionRequest struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } if (struct.tablename != null) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(struct.tablename); oprot.writeFieldEnd(); } if (struct.partitionname != null) { if (struct.isSetPartitionname()) { oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC); oprot.writeString(struct.partitionname); oprot.writeFieldEnd(); } } if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeI32(struct.type.getValue()); oprot.writeFieldEnd(); } if (struct.runas != null) { if (struct.isSetRunas()) { oprot.writeFieldBegin(RUNAS_FIELD_DESC); oprot.writeString(struct.runas); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public int compareTo(CompactionRequest other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); if (lastComparison != 0) { return lastComparison; } if (isSetTablename()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPartitionname()).compareTo(other.isSetPartitionname()); if (lastComparison != 0) { return lastComparison; } if (isSetPartitionname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionname, other.partitionname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRunas()).compareTo(other.isSetRunas()); if (lastComparison != 0) { return lastComparison; } if (isSetRunas()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runas, other.runas); if (lastComparison != 0) { return lastComparison; } } return 0; }