TDownloadReq.java
/**
* Autogenerated by Thrift Compiler (0.16.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.doris.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TDownloadReq implements org.apache.thrift.TBase<TDownloadReq, TDownloadReq._Fields>, java.io.Serializable, Cloneable, Comparable<TDownloadReq> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDownloadReq");
private static final org.apache.thrift.protocol.TField JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("job_id", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField SRC_DEST_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("src_dest_map", org.apache.thrift.protocol.TType.MAP, (short)2);
private static final org.apache.thrift.protocol.TField BROKER_ADDR_FIELD_DESC = new org.apache.thrift.protocol.TField("broker_addr", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField BROKER_PROP_FIELD_DESC = new org.apache.thrift.protocol.TField("broker_prop", org.apache.thrift.protocol.TType.MAP, (short)4);
private static final org.apache.thrift.protocol.TField STORAGE_BACKEND_FIELD_DESC = new org.apache.thrift.protocol.TField("storage_backend", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("location", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField REMOTE_TABLET_SNAPSHOTS_FIELD_DESC = new org.apache.thrift.protocol.TField("remote_tablet_snapshots", org.apache.thrift.protocol.TType.LIST, (short)7);
private static final org.apache.thrift.protocol.TField VAULT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vault_id", org.apache.thrift.protocol.TType.STRING, (short)8);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TDownloadReqStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TDownloadReqTupleSchemeFactory();
public long job_id; // required
public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> src_dest_map; // required
public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNetworkAddress broker_addr; // required
public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> broker_prop; // optional
/**
*
* @see org.apache.doris.thrift.TStorageBackendType
*/
public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStorageBackendType storage_backend; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String location; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<TRemoteTabletSnapshot> remote_tablet_snapshots; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String vault_id; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
JOB_ID((short)1, "job_id"),
SRC_DEST_MAP((short)2, "src_dest_map"),
BROKER_ADDR((short)3, "broker_addr"),
BROKER_PROP((short)4, "broker_prop"),
/**
*
* @see org.apache.doris.thrift.TStorageBackendType
*/
STORAGE_BACKEND((short)5, "storage_backend"),
LOCATION((short)6, "location"),
REMOTE_TABLET_SNAPSHOTS((short)7, "remote_tablet_snapshots"),
VAULT_ID((short)8, "vault_id");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // JOB_ID
return JOB_ID;
case 2: // SRC_DEST_MAP
return SRC_DEST_MAP;
case 3: // BROKER_ADDR
return BROKER_ADDR;
case 4: // BROKER_PROP
return BROKER_PROP;
case 5: // STORAGE_BACKEND
return STORAGE_BACKEND;
case 6: // LOCATION
return LOCATION;
case 7: // REMOTE_TABLET_SNAPSHOTS
return REMOTE_TABLET_SNAPSHOTS;
case 8: // VAULT_ID
return VAULT_ID;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __JOB_ID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.BROKER_PROP,_Fields.STORAGE_BACKEND,_Fields.LOCATION,_Fields.REMOTE_TABLET_SNAPSHOTS,_Fields.VAULT_ID};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("job_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SRC_DEST_MAP, new org.apache.thrift.meta_data.FieldMetaData("src_dest_map", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.BROKER_ADDR, new org.apache.thrift.meta_data.FieldMetaData("broker_addr", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TNetworkAddress.class)));
tmpMap.put(_Fields.BROKER_PROP, new org.apache.thrift.meta_data.FieldMetaData("broker_prop", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.STORAGE_BACKEND, new org.apache.thrift.meta_data.FieldMetaData("storage_backend", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.doris.thrift.TStorageBackendType.class)));
tmpMap.put(_Fields.LOCATION, new org.apache.thrift.meta_data.FieldMetaData("location", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.REMOTE_TABLET_SNAPSHOTS, new org.apache.thrift.meta_data.FieldMetaData("remote_tablet_snapshots", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRemoteTabletSnapshot.class))));
tmpMap.put(_Fields.VAULT_ID, new org.apache.thrift.meta_data.FieldMetaData("vault_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDownloadReq.class, metaDataMap);
}
public TDownloadReq() {
this.storage_backend = org.apache.doris.thrift.TStorageBackendType.BROKER;
}
public TDownloadReq(
long job_id,
java.util.Map<java.lang.String,java.lang.String> src_dest_map,
org.apache.doris.thrift.TNetworkAddress broker_addr)
{
this();
this.job_id = job_id;
setJobIdIsSet(true);
this.src_dest_map = src_dest_map;
this.broker_addr = broker_addr;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TDownloadReq(TDownloadReq other) {
__isset_bitfield = other.__isset_bitfield;
this.job_id = other.job_id;
if (other.isSetSrcDestMap()) {
java.util.Map<java.lang.String,java.lang.String> __this__src_dest_map = new java.util.HashMap<java.lang.String,java.lang.String>(other.src_dest_map);
this.src_dest_map = __this__src_dest_map;
}
if (other.isSetBrokerAddr()) {
this.broker_addr = new org.apache.doris.thrift.TNetworkAddress(other.broker_addr);
}
if (other.isSetBrokerProp()) {
java.util.Map<java.lang.String,java.lang.String> __this__broker_prop = new java.util.HashMap<java.lang.String,java.lang.String>(other.broker_prop);
this.broker_prop = __this__broker_prop;
}
if (other.isSetStorageBackend()) {
this.storage_backend = other.storage_backend;
}
if (other.isSetLocation()) {
this.location = other.location;
}
if (other.isSetRemoteTabletSnapshots()) {
java.util.List<TRemoteTabletSnapshot> __this__remote_tablet_snapshots = new java.util.ArrayList<TRemoteTabletSnapshot>(other.remote_tablet_snapshots.size());
for (TRemoteTabletSnapshot other_element : other.remote_tablet_snapshots) {
__this__remote_tablet_snapshots.add(new TRemoteTabletSnapshot(other_element));
}
this.remote_tablet_snapshots = __this__remote_tablet_snapshots;
}
if (other.isSetVaultId()) {
this.vault_id = other.vault_id;
}
}
public TDownloadReq deepCopy() {
return new TDownloadReq(this);
}
@Override
public void clear() {
setJobIdIsSet(false);
this.job_id = 0;
this.src_dest_map = null;
this.broker_addr = null;
this.broker_prop = null;
this.storage_backend = org.apache.doris.thrift.TStorageBackendType.BROKER;
this.location = null;
this.remote_tablet_snapshots = null;
this.vault_id = null;
}
public long getJobId() {
return this.job_id;
}
public TDownloadReq setJobId(long job_id) {
this.job_id = job_id;
setJobIdIsSet(true);
return this;
}
public void unsetJobId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JOB_ID_ISSET_ID);
}
/** Returns true if field job_id is set (has been assigned a value) and false otherwise */
public boolean isSetJobId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JOB_ID_ISSET_ID);
}
public void setJobIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JOB_ID_ISSET_ID, value);
}
public int getSrcDestMapSize() {
return (this.src_dest_map == null) ? 0 : this.src_dest_map.size();
}
public void putToSrcDestMap(java.lang.String key, java.lang.String val) {
if (this.src_dest_map == null) {
this.src_dest_map = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.src_dest_map.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.lang.String,java.lang.String> getSrcDestMap() {
return this.src_dest_map;
}
public TDownloadReq setSrcDestMap(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> src_dest_map) {
this.src_dest_map = src_dest_map;
return this;
}
public void unsetSrcDestMap() {
this.src_dest_map = null;
}
/** Returns true if field src_dest_map is set (has been assigned a value) and false otherwise */
public boolean isSetSrcDestMap() {
return this.src_dest_map != null;
}
public void setSrcDestMapIsSet(boolean value) {
if (!value) {
this.src_dest_map = null;
}
}
@org.apache.thrift.annotation.Nullable
public org.apache.doris.thrift.TNetworkAddress getBrokerAddr() {
return this.broker_addr;
}
public TDownloadReq setBrokerAddr(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNetworkAddress broker_addr) {
this.broker_addr = broker_addr;
return this;
}
public void unsetBrokerAddr() {
this.broker_addr = null;
}
/** Returns true if field broker_addr is set (has been assigned a value) and false otherwise */
public boolean isSetBrokerAddr() {
return this.broker_addr != null;
}
public void setBrokerAddrIsSet(boolean value) {
if (!value) {
this.broker_addr = null;
}
}
public int getBrokerPropSize() {
return (this.broker_prop == null) ? 0 : this.broker_prop.size();
}
public void putToBrokerProp(java.lang.String key, java.lang.String val) {
if (this.broker_prop == null) {
this.broker_prop = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.broker_prop.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.lang.String,java.lang.String> getBrokerProp() {
return this.broker_prop;
}
public TDownloadReq setBrokerProp(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> broker_prop) {
this.broker_prop = broker_prop;
return this;
}
public void unsetBrokerProp() {
this.broker_prop = null;
}
/** Returns true if field broker_prop is set (has been assigned a value) and false otherwise */
public boolean isSetBrokerProp() {
return this.broker_prop != null;
}
public void setBrokerPropIsSet(boolean value) {
if (!value) {
this.broker_prop = null;
}
}
/**
*
* @see org.apache.doris.thrift.TStorageBackendType
*/
@org.apache.thrift.annotation.Nullable
public org.apache.doris.thrift.TStorageBackendType getStorageBackend() {
return this.storage_backend;
}
/**
*
* @see org.apache.doris.thrift.TStorageBackendType
*/
public TDownloadReq setStorageBackend(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStorageBackendType storage_backend) {
this.storage_backend = storage_backend;
return this;
}
public void unsetStorageBackend() {
this.storage_backend = null;
}
/** Returns true if field storage_backend is set (has been assigned a value) and false otherwise */
public boolean isSetStorageBackend() {
return this.storage_backend != null;
}
public void setStorageBackendIsSet(boolean value) {
if (!value) {
this.storage_backend = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getLocation() {
return this.location;
}
public TDownloadReq setLocation(@org.apache.thrift.annotation.Nullable java.lang.String location) {
this.location = location;
return this;
}
public void unsetLocation() {
this.location = null;
}
/** Returns true if field location is set (has been assigned a value) and false otherwise */
public boolean isSetLocation() {
return this.location != null;
}
public void setLocationIsSet(boolean value) {
if (!value) {
this.location = null;
}
}
public int getRemoteTabletSnapshotsSize() {
return (this.remote_tablet_snapshots == null) ? 0 : this.remote_tablet_snapshots.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TRemoteTabletSnapshot> getRemoteTabletSnapshotsIterator() {
return (this.remote_tablet_snapshots == null) ? null : this.remote_tablet_snapshots.iterator();
}
public void addToRemoteTabletSnapshots(TRemoteTabletSnapshot elem) {
if (this.remote_tablet_snapshots == null) {
this.remote_tablet_snapshots = new java.util.ArrayList<TRemoteTabletSnapshot>();
}
this.remote_tablet_snapshots.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TRemoteTabletSnapshot> getRemoteTabletSnapshots() {
return this.remote_tablet_snapshots;
}
public TDownloadReq setRemoteTabletSnapshots(@org.apache.thrift.annotation.Nullable java.util.List<TRemoteTabletSnapshot> remote_tablet_snapshots) {
this.remote_tablet_snapshots = remote_tablet_snapshots;
return this;
}
public void unsetRemoteTabletSnapshots() {
this.remote_tablet_snapshots = null;
}
/** Returns true if field remote_tablet_snapshots is set (has been assigned a value) and false otherwise */
public boolean isSetRemoteTabletSnapshots() {
return this.remote_tablet_snapshots != null;
}
public void setRemoteTabletSnapshotsIsSet(boolean value) {
if (!value) {
this.remote_tablet_snapshots = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getVaultId() {
return this.vault_id;
}
public TDownloadReq setVaultId(@org.apache.thrift.annotation.Nullable java.lang.String vault_id) {
this.vault_id = vault_id;
return this;
}
public void unsetVaultId() {
this.vault_id = null;
}
/** Returns true if field vault_id is set (has been assigned a value) and false otherwise */
public boolean isSetVaultId() {
return this.vault_id != null;
}
public void setVaultIdIsSet(boolean value) {
if (!value) {
this.vault_id = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case JOB_ID:
if (value == null) {
unsetJobId();
} else {
setJobId((java.lang.Long)value);
}
break;
case SRC_DEST_MAP:
if (value == null) {
unsetSrcDestMap();
} else {
setSrcDestMap((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
case BROKER_ADDR:
if (value == null) {
unsetBrokerAddr();
} else {
setBrokerAddr((org.apache.doris.thrift.TNetworkAddress)value);
}
break;
case BROKER_PROP:
if (value == null) {
unsetBrokerProp();
} else {
setBrokerProp((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
case STORAGE_BACKEND:
if (value == null) {
unsetStorageBackend();
} else {
setStorageBackend((org.apache.doris.thrift.TStorageBackendType)value);
}
break;
case LOCATION:
if (value == null) {
unsetLocation();
} else {
setLocation((java.lang.String)value);
}
break;
case REMOTE_TABLET_SNAPSHOTS:
if (value == null) {
unsetRemoteTabletSnapshots();
} else {
setRemoteTabletSnapshots((java.util.List<TRemoteTabletSnapshot>)value);
}
break;
case VAULT_ID:
if (value == null) {
unsetVaultId();
} else {
setVaultId((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case JOB_ID:
return getJobId();
case SRC_DEST_MAP:
return getSrcDestMap();
case BROKER_ADDR:
return getBrokerAddr();
case BROKER_PROP:
return getBrokerProp();
case STORAGE_BACKEND:
return getStorageBackend();
case LOCATION:
return getLocation();
case REMOTE_TABLET_SNAPSHOTS:
return getRemoteTabletSnapshots();
case VAULT_ID:
return getVaultId();
}
throw new java.lang.IllegalStateException();
}
/** 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 java.lang.IllegalArgumentException();
}
switch (field) {
case JOB_ID:
return isSetJobId();
case SRC_DEST_MAP:
return isSetSrcDestMap();
case BROKER_ADDR:
return isSetBrokerAddr();
case BROKER_PROP:
return isSetBrokerProp();
case STORAGE_BACKEND:
return isSetStorageBackend();
case LOCATION:
return isSetLocation();
case REMOTE_TABLET_SNAPSHOTS:
return isSetRemoteTabletSnapshots();
case VAULT_ID:
return isSetVaultId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TDownloadReq)
return this.equals((TDownloadReq)that);
return false;
}
public boolean equals(TDownloadReq that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_job_id = true;
boolean that_present_job_id = true;
if (this_present_job_id || that_present_job_id) {
if (!(this_present_job_id && that_present_job_id))
return false;
if (this.job_id != that.job_id)
return false;
}
boolean this_present_src_dest_map = true && this.isSetSrcDestMap();
boolean that_present_src_dest_map = true && that.isSetSrcDestMap();
if (this_present_src_dest_map || that_present_src_dest_map) {
if (!(this_present_src_dest_map && that_present_src_dest_map))
return false;
if (!this.src_dest_map.equals(that.src_dest_map))
return false;
}
boolean this_present_broker_addr = true && this.isSetBrokerAddr();
boolean that_present_broker_addr = true && that.isSetBrokerAddr();
if (this_present_broker_addr || that_present_broker_addr) {
if (!(this_present_broker_addr && that_present_broker_addr))
return false;
if (!this.broker_addr.equals(that.broker_addr))
return false;
}
boolean this_present_broker_prop = true && this.isSetBrokerProp();
boolean that_present_broker_prop = true && that.isSetBrokerProp();
if (this_present_broker_prop || that_present_broker_prop) {
if (!(this_present_broker_prop && that_present_broker_prop))
return false;
if (!this.broker_prop.equals(that.broker_prop))
return false;
}
boolean this_present_storage_backend = true && this.isSetStorageBackend();
boolean that_present_storage_backend = true && that.isSetStorageBackend();
if (this_present_storage_backend || that_present_storage_backend) {
if (!(this_present_storage_backend && that_present_storage_backend))
return false;
if (!this.storage_backend.equals(that.storage_backend))
return false;
}
boolean this_present_location = true && this.isSetLocation();
boolean that_present_location = true && that.isSetLocation();
if (this_present_location || that_present_location) {
if (!(this_present_location && that_present_location))
return false;
if (!this.location.equals(that.location))
return false;
}
boolean this_present_remote_tablet_snapshots = true && this.isSetRemoteTabletSnapshots();
boolean that_present_remote_tablet_snapshots = true && that.isSetRemoteTabletSnapshots();
if (this_present_remote_tablet_snapshots || that_present_remote_tablet_snapshots) {
if (!(this_present_remote_tablet_snapshots && that_present_remote_tablet_snapshots))
return false;
if (!this.remote_tablet_snapshots.equals(that.remote_tablet_snapshots))
return false;
}
boolean this_present_vault_id = true && this.isSetVaultId();
boolean that_present_vault_id = true && that.isSetVaultId();
if (this_present_vault_id || that_present_vault_id) {
if (!(this_present_vault_id && that_present_vault_id))
return false;
if (!this.vault_id.equals(that.vault_id))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(job_id);
hashCode = hashCode * 8191 + ((isSetSrcDestMap()) ? 131071 : 524287);
if (isSetSrcDestMap())
hashCode = hashCode * 8191 + src_dest_map.hashCode();
hashCode = hashCode * 8191 + ((isSetBrokerAddr()) ? 131071 : 524287);
if (isSetBrokerAddr())
hashCode = hashCode * 8191 + broker_addr.hashCode();
hashCode = hashCode * 8191 + ((isSetBrokerProp()) ? 131071 : 524287);
if (isSetBrokerProp())
hashCode = hashCode * 8191 + broker_prop.hashCode();
hashCode = hashCode * 8191 + ((isSetStorageBackend()) ? 131071 : 524287);
if (isSetStorageBackend())
hashCode = hashCode * 8191 + storage_backend.getValue();
hashCode = hashCode * 8191 + ((isSetLocation()) ? 131071 : 524287);
if (isSetLocation())
hashCode = hashCode * 8191 + location.hashCode();
hashCode = hashCode * 8191 + ((isSetRemoteTabletSnapshots()) ? 131071 : 524287);
if (isSetRemoteTabletSnapshots())
hashCode = hashCode * 8191 + remote_tablet_snapshots.hashCode();
hashCode = hashCode * 8191 + ((isSetVaultId()) ? 131071 : 524287);
if (isSetVaultId())
hashCode = hashCode * 8191 + vault_id.hashCode();
return hashCode;
}
@Override
public int compareTo(TDownloadReq other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetJobId(), other.isSetJobId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetJobId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.job_id, other.job_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSrcDestMap(), other.isSetSrcDestMap());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSrcDestMap()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.src_dest_map, other.src_dest_map);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBrokerAddr(), other.isSetBrokerAddr());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBrokerAddr()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.broker_addr, other.broker_addr);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBrokerProp(), other.isSetBrokerProp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBrokerProp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.broker_prop, other.broker_prop);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStorageBackend(), other.isSetStorageBackend());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStorageBackend()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storage_backend, other.storage_backend);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetLocation(), other.isSetLocation());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLocation()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.location, other.location);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRemoteTabletSnapshots(), other.isSetRemoteTabletSnapshots());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRemoteTabletSnapshots()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remote_tablet_snapshots, other.remote_tablet_snapshots);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetVaultId(), other.isSetVaultId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetVaultId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vault_id, other.vault_id);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TDownloadReq(");
boolean first = true;
sb.append("job_id:");
sb.append(this.job_id);
first = false;
if (!first) sb.append(", ");
sb.append("src_dest_map:");
if (this.src_dest_map == null) {
sb.append("null");
} else {
sb.append(this.src_dest_map);
}
first = false;
if (!first) sb.append(", ");
sb.append("broker_addr:");
if (this.broker_addr == null) {
sb.append("null");
} else {
sb.append(this.broker_addr);
}
first = false;
if (isSetBrokerProp()) {
if (!first) sb.append(", ");
sb.append("broker_prop:");
if (this.broker_prop == null) {
sb.append("null");
} else {
sb.append(this.broker_prop);
}
first = false;
}
if (isSetStorageBackend()) {
if (!first) sb.append(", ");
sb.append("storage_backend:");
if (this.storage_backend == null) {
sb.append("null");
} else {
sb.append(this.storage_backend);
}
first = false;
}
if (isSetLocation()) {
if (!first) sb.append(", ");
sb.append("location:");
if (this.location == null) {
sb.append("null");
} else {
sb.append(this.location);
}
first = false;
}
if (isSetRemoteTabletSnapshots()) {
if (!first) sb.append(", ");
sb.append("remote_tablet_snapshots:");
if (this.remote_tablet_snapshots == null) {
sb.append("null");
} else {
sb.append(this.remote_tablet_snapshots);
}
first = false;
}
if (isSetVaultId()) {
if (!first) sb.append(", ");
sb.append("vault_id:");
if (this.vault_id == null) {
sb.append("null");
} else {
sb.append(this.vault_id);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'job_id' because it's a primitive and you chose the non-beans generator.
if (src_dest_map == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'src_dest_map' was not present! Struct: " + toString());
}
if (broker_addr == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'broker_addr' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (broker_addr != null) {
broker_addr.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class TDownloadReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDownloadReqStandardScheme getScheme() {
return new TDownloadReqStandardScheme();
}
}
private static class TDownloadReqStandardScheme extends org.apache.thrift.scheme.StandardScheme<TDownloadReq> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TDownloadReq 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: // JOB_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.job_id = iprot.readI64();
struct.setJobIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SRC_DEST_MAP
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map182 = iprot.readMapBegin();
struct.src_dest_map = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map182.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key183;
@org.apache.thrift.annotation.Nullable java.lang.String _val184;
for (int _i185 = 0; _i185 < _map182.size; ++_i185)
{
_key183 = iprot.readString();
_val184 = iprot.readString();
struct.src_dest_map.put(_key183, _val184);
}
iprot.readMapEnd();
}
struct.setSrcDestMapIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // BROKER_ADDR
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.broker_addr = new org.apache.doris.thrift.TNetworkAddress();
struct.broker_addr.read(iprot);
struct.setBrokerAddrIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // BROKER_PROP
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map186 = iprot.readMapBegin();
struct.broker_prop = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map186.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key187;
@org.apache.thrift.annotation.Nullable java.lang.String _val188;
for (int _i189 = 0; _i189 < _map186.size; ++_i189)
{
_key187 = iprot.readString();
_val188 = iprot.readString();
struct.broker_prop.put(_key187, _val188);
}
iprot.readMapEnd();
}
struct.setBrokerPropIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // STORAGE_BACKEND
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.storage_backend = org.apache.doris.thrift.TStorageBackendType.findByValue(iprot.readI32());
struct.setStorageBackendIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // LOCATION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.location = iprot.readString();
struct.setLocationIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // REMOTE_TABLET_SNAPSHOTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list190 = iprot.readListBegin();
struct.remote_tablet_snapshots = new java.util.ArrayList<TRemoteTabletSnapshot>(_list190.size);
@org.apache.thrift.annotation.Nullable TRemoteTabletSnapshot _elem191;
for (int _i192 = 0; _i192 < _list190.size; ++_i192)
{
_elem191 = new TRemoteTabletSnapshot();
_elem191.read(iprot);
struct.remote_tablet_snapshots.add(_elem191);
}
iprot.readListEnd();
}
struct.setRemoteTabletSnapshotsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // VAULT_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.vault_id = iprot.readString();
struct.setVaultIdIsSet(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
if (!struct.isSetJobId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'job_id' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TDownloadReq struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(JOB_ID_FIELD_DESC);
oprot.writeI64(struct.job_id);
oprot.writeFieldEnd();
if (struct.src_dest_map != null) {
oprot.writeFieldBegin(SRC_DEST_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.src_dest_map.size()));
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter193 : struct.src_dest_map.entrySet())
{
oprot.writeString(_iter193.getKey());
oprot.writeString(_iter193.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
if (struct.broker_addr != null) {
oprot.writeFieldBegin(BROKER_ADDR_FIELD_DESC);
struct.broker_addr.write(oprot);
oprot.writeFieldEnd();
}
if (struct.broker_prop != null) {
if (struct.isSetBrokerProp()) {
oprot.writeFieldBegin(BROKER_PROP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.broker_prop.size()));
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter194 : struct.broker_prop.entrySet())
{
oprot.writeString(_iter194.getKey());
oprot.writeString(_iter194.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.storage_backend != null) {
if (struct.isSetStorageBackend()) {
oprot.writeFieldBegin(STORAGE_BACKEND_FIELD_DESC);
oprot.writeI32(struct.storage_backend.getValue());
oprot.writeFieldEnd();
}
}
if (struct.location != null) {
if (struct.isSetLocation()) {
oprot.writeFieldBegin(LOCATION_FIELD_DESC);
oprot.writeString(struct.location);
oprot.writeFieldEnd();
}
}
if (struct.remote_tablet_snapshots != null) {
if (struct.isSetRemoteTabletSnapshots()) {
oprot.writeFieldBegin(REMOTE_TABLET_SNAPSHOTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.remote_tablet_snapshots.size()));
for (TRemoteTabletSnapshot _iter195 : struct.remote_tablet_snapshots)
{
_iter195.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.vault_id != null) {
if (struct.isSetVaultId()) {
oprot.writeFieldBegin(VAULT_ID_FIELD_DESC);
oprot.writeString(struct.vault_id);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TDownloadReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDownloadReqTupleScheme getScheme() {
return new TDownloadReqTupleScheme();
}
}
private static class TDownloadReqTupleScheme extends org.apache.thrift.scheme.TupleScheme<TDownloadReq> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TDownloadReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.job_id);
{
oprot.writeI32(struct.src_dest_map.size());
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter196 : struct.src_dest_map.entrySet())
{
oprot.writeString(_iter196.getKey());
oprot.writeString(_iter196.getValue());
}
}
struct.broker_addr.write(oprot);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetBrokerProp()) {
optionals.set(0);
}
if (struct.isSetStorageBackend()) {
optionals.set(1);
}
if (struct.isSetLocation()) {
optionals.set(2);
}
if (struct.isSetRemoteTabletSnapshots()) {
optionals.set(3);
}
if (struct.isSetVaultId()) {
optionals.set(4);
}
oprot.writeBitSet(optionals, 5);
if (struct.isSetBrokerProp()) {
{
oprot.writeI32(struct.broker_prop.size());
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter197 : struct.broker_prop.entrySet())
{
oprot.writeString(_iter197.getKey());
oprot.writeString(_iter197.getValue());
}
}
}
if (struct.isSetStorageBackend()) {
oprot.writeI32(struct.storage_backend.getValue());
}
if (struct.isSetLocation()) {
oprot.writeString(struct.location);
}
if (struct.isSetRemoteTabletSnapshots()) {
{
oprot.writeI32(struct.remote_tablet_snapshots.size());
for (TRemoteTabletSnapshot _iter198 : struct.remote_tablet_snapshots)
{
_iter198.write(oprot);
}
}
}
if (struct.isSetVaultId()) {
oprot.writeString(struct.vault_id);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TDownloadReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.job_id = iprot.readI64();
struct.setJobIdIsSet(true);
{
org.apache.thrift.protocol.TMap _map199 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
struct.src_dest_map = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map199.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key200;
@org.apache.thrift.annotation.Nullable java.lang.String _val201;
for (int _i202 = 0; _i202 < _map199.size; ++_i202)
{
_key200 = iprot.readString();
_val201 = iprot.readString();
struct.src_dest_map.put(_key200, _val201);
}
}
struct.setSrcDestMapIsSet(true);
struct.broker_addr = new org.apache.doris.thrift.TNetworkAddress();
struct.broker_addr.read(iprot);
struct.setBrokerAddrIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map203 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
struct.broker_prop = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map203.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key204;
@org.apache.thrift.annotation.Nullable java.lang.String _val205;
for (int _i206 = 0; _i206 < _map203.size; ++_i206)
{
_key204 = iprot.readString();
_val205 = iprot.readString();
struct.broker_prop.put(_key204, _val205);
}
}
struct.setBrokerPropIsSet(true);
}
if (incoming.get(1)) {
struct.storage_backend = org.apache.doris.thrift.TStorageBackendType.findByValue(iprot.readI32());
struct.setStorageBackendIsSet(true);
}
if (incoming.get(2)) {
struct.location = iprot.readString();
struct.setLocationIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list207 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.remote_tablet_snapshots = new java.util.ArrayList<TRemoteTabletSnapshot>(_list207.size);
@org.apache.thrift.annotation.Nullable TRemoteTabletSnapshot _elem208;
for (int _i209 = 0; _i209 < _list207.size; ++_i209)
{
_elem208 = new TRemoteTabletSnapshot();
_elem208.read(iprot);
struct.remote_tablet_snapshots.add(_elem208);
}
}
struct.setRemoteTabletSnapshotsIsSet(true);
}
if (incoming.get(4)) {
struct.vault_id = iprot.readString();
struct.setVaultIdIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}