TUploadReq.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 TUploadReq implements org.apache.thrift.TBase<TUploadReq, TUploadReq._Fields>, java.io.Serializable, Cloneable, Comparable<TUploadReq> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TUploadReq");
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.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TUploadReqStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TUploadReqTupleSchemeFactory();
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
/** 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");
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;
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};
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)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TUploadReq.class, metaDataMap);
}
public TUploadReq() {
this.storage_backend = org.apache.doris.thrift.TStorageBackendType.BROKER;
}
public TUploadReq(
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 TUploadReq(TUploadReq 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;
}
}
public TUploadReq deepCopy() {
return new TUploadReq(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;
}
public long getJobId() {
return this.job_id;
}
public TUploadReq 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 TUploadReq 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 TUploadReq 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 TUploadReq 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 TUploadReq 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 TUploadReq 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 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;
}
}
@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();
}
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();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TUploadReq)
return this.equals((TUploadReq)that);
return false;
}
public boolean equals(TUploadReq 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;
}
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();
return hashCode;
}
@Override
public int compareTo(TUploadReq 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;
}
}
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("TUploadReq(");
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;
}
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 TUploadReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TUploadReqStandardScheme getScheme() {
return new TUploadReqStandardScheme();
}
}
private static class TUploadReqStandardScheme extends org.apache.thrift.scheme.StandardScheme<TUploadReq> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TUploadReq 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 _map162 = iprot.readMapBegin();
struct.src_dest_map = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map162.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key163;
@org.apache.thrift.annotation.Nullable java.lang.String _val164;
for (int _i165 = 0; _i165 < _map162.size; ++_i165)
{
_key163 = iprot.readString();
_val164 = iprot.readString();
struct.src_dest_map.put(_key163, _val164);
}
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 _map166 = iprot.readMapBegin();
struct.broker_prop = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map166.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key167;
@org.apache.thrift.annotation.Nullable java.lang.String _val168;
for (int _i169 = 0; _i169 < _map166.size; ++_i169)
{
_key167 = iprot.readString();
_val168 = iprot.readString();
struct.broker_prop.put(_key167, _val168);
}
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;
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, TUploadReq 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> _iter170 : struct.src_dest_map.entrySet())
{
oprot.writeString(_iter170.getKey());
oprot.writeString(_iter170.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> _iter171 : struct.broker_prop.entrySet())
{
oprot.writeString(_iter171.getKey());
oprot.writeString(_iter171.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();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TUploadReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TUploadReqTupleScheme getScheme() {
return new TUploadReqTupleScheme();
}
}
private static class TUploadReqTupleScheme extends org.apache.thrift.scheme.TupleScheme<TUploadReq> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TUploadReq 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> _iter172 : struct.src_dest_map.entrySet())
{
oprot.writeString(_iter172.getKey());
oprot.writeString(_iter172.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);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetBrokerProp()) {
{
oprot.writeI32(struct.broker_prop.size());
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter173 : struct.broker_prop.entrySet())
{
oprot.writeString(_iter173.getKey());
oprot.writeString(_iter173.getValue());
}
}
}
if (struct.isSetStorageBackend()) {
oprot.writeI32(struct.storage_backend.getValue());
}
if (struct.isSetLocation()) {
oprot.writeString(struct.location);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TUploadReq 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 _map174 = 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*_map174.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key175;
@org.apache.thrift.annotation.Nullable java.lang.String _val176;
for (int _i177 = 0; _i177 < _map174.size; ++_i177)
{
_key175 = iprot.readString();
_val176 = iprot.readString();
struct.src_dest_map.put(_key175, _val176);
}
}
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(3);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map178 = 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*_map178.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key179;
@org.apache.thrift.annotation.Nullable java.lang.String _val180;
for (int _i181 = 0; _i181 < _map178.size; ++_i181)
{
_key179 = iprot.readString();
_val180 = iprot.readString();
struct.broker_prop.put(_key179, _val180);
}
}
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);
}
}
}
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();
}
}