TLanceIndexWorkerHandshake.java
/**
* Autogenerated by Thrift Compiler (0.24.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"})
public class TLanceIndexWorkerHandshake implements org.apache.thrift.TBase<TLanceIndexWorkerHandshake, TLanceIndexWorkerHandshake._Fields>, java.io.Serializable, Cloneable, Comparable<TLanceIndexWorkerHandshake> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TLanceIndexWorkerHandshake");
private static final org.apache.thrift.protocol.TField PROTOCOL_MAGIC_FIELD_DESC = new org.apache.thrift.protocol.TField("protocol_magic", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField PROTOCOL_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("protocol_version", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField CGROUP_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("cgroup_path", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField MEMORY_MAX_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("memory_max_bytes", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField PIDS_MAX_FIELD_DESC = new org.apache.thrift.protocol.TField("pids_max", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField RLIMIT_AS_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("rlimit_as_bytes", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.protocol.TField RLIMIT_CPU_SECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("rlimit_cpu_seconds", org.apache.thrift.protocol.TType.I64, (short)7);
private static final org.apache.thrift.protocol.TField RLIMIT_NOFILE_FIELD_DESC = new org.apache.thrift.protocol.TField("rlimit_nofile", org.apache.thrift.protocol.TType.I64, (short)8);
private static final org.apache.thrift.protocol.TField RLIMIT_CORE_FIELD_DESC = new org.apache.thrift.protocol.TField("rlimit_core", org.apache.thrift.protocol.TType.I64, (short)9);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TLanceIndexWorkerHandshakeStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TLanceIndexWorkerHandshakeTupleSchemeFactory();
public long protocol_magic; // required
public int protocol_version; // required
public @org.apache.thrift.annotation.Nullable java.lang.String cgroup_path; // required
public long memory_max_bytes; // required
public long pids_max; // required
public long rlimit_as_bytes; // required
public long rlimit_cpu_seconds; // required
public long rlimit_nofile; // required
public long rlimit_core; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
PROTOCOL_MAGIC((short)1, "protocol_magic"),
PROTOCOL_VERSION((short)2, "protocol_version"),
CGROUP_PATH((short)3, "cgroup_path"),
MEMORY_MAX_BYTES((short)4, "memory_max_bytes"),
PIDS_MAX((short)5, "pids_max"),
RLIMIT_AS_BYTES((short)6, "rlimit_as_bytes"),
RLIMIT_CPU_SECONDS((short)7, "rlimit_cpu_seconds"),
RLIMIT_NOFILE((short)8, "rlimit_nofile"),
RLIMIT_CORE((short)9, "rlimit_core");
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: // PROTOCOL_MAGIC
return PROTOCOL_MAGIC;
case 2: // PROTOCOL_VERSION
return PROTOCOL_VERSION;
case 3: // CGROUP_PATH
return CGROUP_PATH;
case 4: // MEMORY_MAX_BYTES
return MEMORY_MAX_BYTES;
case 5: // PIDS_MAX
return PIDS_MAX;
case 6: // RLIMIT_AS_BYTES
return RLIMIT_AS_BYTES;
case 7: // RLIMIT_CPU_SECONDS
return RLIMIT_CPU_SECONDS;
case 8: // RLIMIT_NOFILE
return RLIMIT_NOFILE;
case 9: // RLIMIT_CORE
return RLIMIT_CORE;
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;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __PROTOCOL_MAGIC_ISSET_ID = 0;
private static final int __PROTOCOL_VERSION_ISSET_ID = 1;
private static final int __MEMORY_MAX_BYTES_ISSET_ID = 2;
private static final int __PIDS_MAX_ISSET_ID = 3;
private static final int __RLIMIT_AS_BYTES_ISSET_ID = 4;
private static final int __RLIMIT_CPU_SECONDS_ISSET_ID = 5;
private static final int __RLIMIT_NOFILE_ISSET_ID = 6;
private static final int __RLIMIT_CORE_ISSET_ID = 7;
private byte __isset_bitfield = 0;
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.PROTOCOL_MAGIC, new org.apache.thrift.meta_data.FieldMetaData("protocol_magic", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.PROTOCOL_VERSION, new org.apache.thrift.meta_data.FieldMetaData("protocol_version", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.CGROUP_PATH, new org.apache.thrift.meta_data.FieldMetaData("cgroup_path", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.MEMORY_MAX_BYTES, new org.apache.thrift.meta_data.FieldMetaData("memory_max_bytes", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.PIDS_MAX, new org.apache.thrift.meta_data.FieldMetaData("pids_max", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.RLIMIT_AS_BYTES, new org.apache.thrift.meta_data.FieldMetaData("rlimit_as_bytes", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.RLIMIT_CPU_SECONDS, new org.apache.thrift.meta_data.FieldMetaData("rlimit_cpu_seconds", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.RLIMIT_NOFILE, new org.apache.thrift.meta_data.FieldMetaData("rlimit_nofile", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.RLIMIT_CORE, new org.apache.thrift.meta_data.FieldMetaData("rlimit_core", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TLanceIndexWorkerHandshake.class, metaDataMap);
}
public TLanceIndexWorkerHandshake() {
}
public TLanceIndexWorkerHandshake(
long protocol_magic,
int protocol_version,
java.lang.String cgroup_path,
long memory_max_bytes,
long pids_max,
long rlimit_as_bytes,
long rlimit_cpu_seconds,
long rlimit_nofile,
long rlimit_core)
{
this();
this.protocol_magic = protocol_magic;
setProtocolMagicIsSet(true);
this.protocol_version = protocol_version;
setProtocolVersionIsSet(true);
this.cgroup_path = cgroup_path;
this.memory_max_bytes = memory_max_bytes;
setMemoryMaxBytesIsSet(true);
this.pids_max = pids_max;
setPidsMaxIsSet(true);
this.rlimit_as_bytes = rlimit_as_bytes;
setRlimitAsBytesIsSet(true);
this.rlimit_cpu_seconds = rlimit_cpu_seconds;
setRlimitCpuSecondsIsSet(true);
this.rlimit_nofile = rlimit_nofile;
setRlimitNofileIsSet(true);
this.rlimit_core = rlimit_core;
setRlimitCoreIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TLanceIndexWorkerHandshake(TLanceIndexWorkerHandshake other) {
__isset_bitfield = other.__isset_bitfield;
this.protocol_magic = other.protocol_magic;
this.protocol_version = other.protocol_version;
if (other.isSetCgroupPath()) {
this.cgroup_path = other.cgroup_path;
}
this.memory_max_bytes = other.memory_max_bytes;
this.pids_max = other.pids_max;
this.rlimit_as_bytes = other.rlimit_as_bytes;
this.rlimit_cpu_seconds = other.rlimit_cpu_seconds;
this.rlimit_nofile = other.rlimit_nofile;
this.rlimit_core = other.rlimit_core;
}
@Override
public TLanceIndexWorkerHandshake deepCopy() {
return new TLanceIndexWorkerHandshake(this);
}
@Override
public void clear() {
setProtocolMagicIsSet(false);
this.protocol_magic = 0;
setProtocolVersionIsSet(false);
this.protocol_version = 0;
this.cgroup_path = null;
setMemoryMaxBytesIsSet(false);
this.memory_max_bytes = 0;
setPidsMaxIsSet(false);
this.pids_max = 0;
setRlimitAsBytesIsSet(false);
this.rlimit_as_bytes = 0;
setRlimitCpuSecondsIsSet(false);
this.rlimit_cpu_seconds = 0;
setRlimitNofileIsSet(false);
this.rlimit_nofile = 0;
setRlimitCoreIsSet(false);
this.rlimit_core = 0;
}
public long getProtocolMagic() {
return this.protocol_magic;
}
public TLanceIndexWorkerHandshake setProtocolMagic(long protocol_magic) {
this.protocol_magic = protocol_magic;
setProtocolMagicIsSet(true);
return this;
}
public void unsetProtocolMagic() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PROTOCOL_MAGIC_ISSET_ID);
}
/** Returns true if field protocol_magic is set (has been assigned a value) and false otherwise */
public boolean isSetProtocolMagic() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PROTOCOL_MAGIC_ISSET_ID);
}
public void setProtocolMagicIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PROTOCOL_MAGIC_ISSET_ID, value);
}
public int getProtocolVersion() {
return this.protocol_version;
}
public TLanceIndexWorkerHandshake setProtocolVersion(int protocol_version) {
this.protocol_version = protocol_version;
setProtocolVersionIsSet(true);
return this;
}
public void unsetProtocolVersion() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PROTOCOL_VERSION_ISSET_ID);
}
/** Returns true if field protocol_version is set (has been assigned a value) and false otherwise */
public boolean isSetProtocolVersion() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PROTOCOL_VERSION_ISSET_ID);
}
public void setProtocolVersionIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PROTOCOL_VERSION_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getCgroupPath() {
return this.cgroup_path;
}
public TLanceIndexWorkerHandshake setCgroupPath(@org.apache.thrift.annotation.Nullable java.lang.String cgroup_path) {
this.cgroup_path = cgroup_path;
return this;
}
public void unsetCgroupPath() {
this.cgroup_path = null;
}
/** Returns true if field cgroup_path is set (has been assigned a value) and false otherwise */
public boolean isSetCgroupPath() {
return this.cgroup_path != null;
}
public void setCgroupPathIsSet(boolean value) {
if (!value) {
this.cgroup_path = null;
}
}
public long getMemoryMaxBytes() {
return this.memory_max_bytes;
}
public TLanceIndexWorkerHandshake setMemoryMaxBytes(long memory_max_bytes) {
this.memory_max_bytes = memory_max_bytes;
setMemoryMaxBytesIsSet(true);
return this;
}
public void unsetMemoryMaxBytes() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MEMORY_MAX_BYTES_ISSET_ID);
}
/** Returns true if field memory_max_bytes is set (has been assigned a value) and false otherwise */
public boolean isSetMemoryMaxBytes() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MEMORY_MAX_BYTES_ISSET_ID);
}
public void setMemoryMaxBytesIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MEMORY_MAX_BYTES_ISSET_ID, value);
}
public long getPidsMax() {
return this.pids_max;
}
public TLanceIndexWorkerHandshake setPidsMax(long pids_max) {
this.pids_max = pids_max;
setPidsMaxIsSet(true);
return this;
}
public void unsetPidsMax() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PIDS_MAX_ISSET_ID);
}
/** Returns true if field pids_max is set (has been assigned a value) and false otherwise */
public boolean isSetPidsMax() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PIDS_MAX_ISSET_ID);
}
public void setPidsMaxIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PIDS_MAX_ISSET_ID, value);
}
public long getRlimitAsBytes() {
return this.rlimit_as_bytes;
}
public TLanceIndexWorkerHandshake setRlimitAsBytes(long rlimit_as_bytes) {
this.rlimit_as_bytes = rlimit_as_bytes;
setRlimitAsBytesIsSet(true);
return this;
}
public void unsetRlimitAsBytes() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RLIMIT_AS_BYTES_ISSET_ID);
}
/** Returns true if field rlimit_as_bytes is set (has been assigned a value) and false otherwise */
public boolean isSetRlimitAsBytes() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RLIMIT_AS_BYTES_ISSET_ID);
}
public void setRlimitAsBytesIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RLIMIT_AS_BYTES_ISSET_ID, value);
}
public long getRlimitCpuSeconds() {
return this.rlimit_cpu_seconds;
}
public TLanceIndexWorkerHandshake setRlimitCpuSeconds(long rlimit_cpu_seconds) {
this.rlimit_cpu_seconds = rlimit_cpu_seconds;
setRlimitCpuSecondsIsSet(true);
return this;
}
public void unsetRlimitCpuSeconds() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RLIMIT_CPU_SECONDS_ISSET_ID);
}
/** Returns true if field rlimit_cpu_seconds is set (has been assigned a value) and false otherwise */
public boolean isSetRlimitCpuSeconds() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RLIMIT_CPU_SECONDS_ISSET_ID);
}
public void setRlimitCpuSecondsIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RLIMIT_CPU_SECONDS_ISSET_ID, value);
}
public long getRlimitNofile() {
return this.rlimit_nofile;
}
public TLanceIndexWorkerHandshake setRlimitNofile(long rlimit_nofile) {
this.rlimit_nofile = rlimit_nofile;
setRlimitNofileIsSet(true);
return this;
}
public void unsetRlimitNofile() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RLIMIT_NOFILE_ISSET_ID);
}
/** Returns true if field rlimit_nofile is set (has been assigned a value) and false otherwise */
public boolean isSetRlimitNofile() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RLIMIT_NOFILE_ISSET_ID);
}
public void setRlimitNofileIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RLIMIT_NOFILE_ISSET_ID, value);
}
public long getRlimitCore() {
return this.rlimit_core;
}
public TLanceIndexWorkerHandshake setRlimitCore(long rlimit_core) {
this.rlimit_core = rlimit_core;
setRlimitCoreIsSet(true);
return this;
}
public void unsetRlimitCore() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RLIMIT_CORE_ISSET_ID);
}
/** Returns true if field rlimit_core is set (has been assigned a value) and false otherwise */
public boolean isSetRlimitCore() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RLIMIT_CORE_ISSET_ID);
}
public void setRlimitCoreIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RLIMIT_CORE_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case PROTOCOL_MAGIC:
if (value == null) {
unsetProtocolMagic();
} else {
setProtocolMagic((java.lang.Long)value);
}
break;
case PROTOCOL_VERSION:
if (value == null) {
unsetProtocolVersion();
} else {
setProtocolVersion((java.lang.Integer)value);
}
break;
case CGROUP_PATH:
if (value == null) {
unsetCgroupPath();
} else {
setCgroupPath((java.lang.String)value);
}
break;
case MEMORY_MAX_BYTES:
if (value == null) {
unsetMemoryMaxBytes();
} else {
setMemoryMaxBytes((java.lang.Long)value);
}
break;
case PIDS_MAX:
if (value == null) {
unsetPidsMax();
} else {
setPidsMax((java.lang.Long)value);
}
break;
case RLIMIT_AS_BYTES:
if (value == null) {
unsetRlimitAsBytes();
} else {
setRlimitAsBytes((java.lang.Long)value);
}
break;
case RLIMIT_CPU_SECONDS:
if (value == null) {
unsetRlimitCpuSeconds();
} else {
setRlimitCpuSeconds((java.lang.Long)value);
}
break;
case RLIMIT_NOFILE:
if (value == null) {
unsetRlimitNofile();
} else {
setRlimitNofile((java.lang.Long)value);
}
break;
case RLIMIT_CORE:
if (value == null) {
unsetRlimitCore();
} else {
setRlimitCore((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PROTOCOL_MAGIC:
return getProtocolMagic();
case PROTOCOL_VERSION:
return getProtocolVersion();
case CGROUP_PATH:
return getCgroupPath();
case MEMORY_MAX_BYTES:
return getMemoryMaxBytes();
case PIDS_MAX:
return getPidsMax();
case RLIMIT_AS_BYTES:
return getRlimitAsBytes();
case RLIMIT_CPU_SECONDS:
return getRlimitCpuSeconds();
case RLIMIT_NOFILE:
return getRlimitNofile();
case RLIMIT_CORE:
return getRlimitCore();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case PROTOCOL_MAGIC:
return isSetProtocolMagic();
case PROTOCOL_VERSION:
return isSetProtocolVersion();
case CGROUP_PATH:
return isSetCgroupPath();
case MEMORY_MAX_BYTES:
return isSetMemoryMaxBytes();
case PIDS_MAX:
return isSetPidsMax();
case RLIMIT_AS_BYTES:
return isSetRlimitAsBytes();
case RLIMIT_CPU_SECONDS:
return isSetRlimitCpuSeconds();
case RLIMIT_NOFILE:
return isSetRlimitNofile();
case RLIMIT_CORE:
return isSetRlimitCore();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TLanceIndexWorkerHandshake)
return this.equals((TLanceIndexWorkerHandshake)that);
return false;
}
public boolean equals(TLanceIndexWorkerHandshake that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_protocol_magic = true;
boolean that_present_protocol_magic = true;
if (this_present_protocol_magic || that_present_protocol_magic) {
if (!(this_present_protocol_magic && that_present_protocol_magic))
return false;
if (this.protocol_magic != that.protocol_magic)
return false;
}
boolean this_present_protocol_version = true;
boolean that_present_protocol_version = true;
if (this_present_protocol_version || that_present_protocol_version) {
if (!(this_present_protocol_version && that_present_protocol_version))
return false;
if (this.protocol_version != that.protocol_version)
return false;
}
boolean this_present_cgroup_path = true && this.isSetCgroupPath();
boolean that_present_cgroup_path = true && that.isSetCgroupPath();
if (this_present_cgroup_path || that_present_cgroup_path) {
if (!(this_present_cgroup_path && that_present_cgroup_path))
return false;
if (!this.cgroup_path.equals(that.cgroup_path))
return false;
}
boolean this_present_memory_max_bytes = true;
boolean that_present_memory_max_bytes = true;
if (this_present_memory_max_bytes || that_present_memory_max_bytes) {
if (!(this_present_memory_max_bytes && that_present_memory_max_bytes))
return false;
if (this.memory_max_bytes != that.memory_max_bytes)
return false;
}
boolean this_present_pids_max = true;
boolean that_present_pids_max = true;
if (this_present_pids_max || that_present_pids_max) {
if (!(this_present_pids_max && that_present_pids_max))
return false;
if (this.pids_max != that.pids_max)
return false;
}
boolean this_present_rlimit_as_bytes = true;
boolean that_present_rlimit_as_bytes = true;
if (this_present_rlimit_as_bytes || that_present_rlimit_as_bytes) {
if (!(this_present_rlimit_as_bytes && that_present_rlimit_as_bytes))
return false;
if (this.rlimit_as_bytes != that.rlimit_as_bytes)
return false;
}
boolean this_present_rlimit_cpu_seconds = true;
boolean that_present_rlimit_cpu_seconds = true;
if (this_present_rlimit_cpu_seconds || that_present_rlimit_cpu_seconds) {
if (!(this_present_rlimit_cpu_seconds && that_present_rlimit_cpu_seconds))
return false;
if (this.rlimit_cpu_seconds != that.rlimit_cpu_seconds)
return false;
}
boolean this_present_rlimit_nofile = true;
boolean that_present_rlimit_nofile = true;
if (this_present_rlimit_nofile || that_present_rlimit_nofile) {
if (!(this_present_rlimit_nofile && that_present_rlimit_nofile))
return false;
if (this.rlimit_nofile != that.rlimit_nofile)
return false;
}
boolean this_present_rlimit_core = true;
boolean that_present_rlimit_core = true;
if (this_present_rlimit_core || that_present_rlimit_core) {
if (!(this_present_rlimit_core && that_present_rlimit_core))
return false;
if (this.rlimit_core != that.rlimit_core)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(protocol_magic);
hashCode = hashCode * 8191 + protocol_version;
hashCode = hashCode * 8191 + ((isSetCgroupPath()) ? 131071 : 524287);
if (isSetCgroupPath())
hashCode = hashCode * 8191 + cgroup_path.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(memory_max_bytes);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(pids_max);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(rlimit_as_bytes);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(rlimit_cpu_seconds);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(rlimit_nofile);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(rlimit_core);
return hashCode;
}
@Override
public int compareTo(TLanceIndexWorkerHandshake other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetProtocolMagic(), other.isSetProtocolMagic());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetProtocolMagic()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.protocol_magic, other.protocol_magic);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetProtocolVersion(), other.isSetProtocolVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetProtocolVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.protocol_version, other.protocol_version);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCgroupPath(), other.isSetCgroupPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCgroupPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cgroup_path, other.cgroup_path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMemoryMaxBytes(), other.isSetMemoryMaxBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMemoryMaxBytes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memory_max_bytes, other.memory_max_bytes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPidsMax(), other.isSetPidsMax());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPidsMax()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pids_max, other.pids_max);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRlimitAsBytes(), other.isSetRlimitAsBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRlimitAsBytes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rlimit_as_bytes, other.rlimit_as_bytes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRlimitCpuSeconds(), other.isSetRlimitCpuSeconds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRlimitCpuSeconds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rlimit_cpu_seconds, other.rlimit_cpu_seconds);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRlimitNofile(), other.isSetRlimitNofile());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRlimitNofile()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rlimit_nofile, other.rlimit_nofile);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRlimitCore(), other.isSetRlimitCore());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRlimitCore()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rlimit_core, other.rlimit_core);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
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("TLanceIndexWorkerHandshake(");
boolean first = true;
sb.append("protocol_magic:");
sb.append(this.protocol_magic);
first = false;
if (!first) sb.append(", ");
sb.append("protocol_version:");
sb.append(this.protocol_version);
first = false;
if (!first) sb.append(", ");
sb.append("cgroup_path:");
if (this.cgroup_path == null) {
sb.append("null");
} else {
sb.append(this.cgroup_path);
}
first = false;
if (!first) sb.append(", ");
sb.append("memory_max_bytes:");
sb.append(this.memory_max_bytes);
first = false;
if (!first) sb.append(", ");
sb.append("pids_max:");
sb.append(this.pids_max);
first = false;
if (!first) sb.append(", ");
sb.append("rlimit_as_bytes:");
sb.append(this.rlimit_as_bytes);
first = false;
if (!first) sb.append(", ");
sb.append("rlimit_cpu_seconds:");
sb.append(this.rlimit_cpu_seconds);
first = false;
if (!first) sb.append(", ");
sb.append("rlimit_nofile:");
sb.append(this.rlimit_nofile);
first = false;
if (!first) sb.append(", ");
sb.append("rlimit_core:");
sb.append(this.rlimit_core);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'protocol_magic' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'protocol_version' because it's a primitive and you chose the non-beans generator.
if (cgroup_path == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'cgroup_path' was not present! Struct: " + toString());
}
// alas, we cannot check 'memory_max_bytes' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'pids_max' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'rlimit_as_bytes' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'rlimit_cpu_seconds' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'rlimit_nofile' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'rlimit_core' because it's a primitive and you chose the non-beans generator.
// check for sub-struct validity
}
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 TLanceIndexWorkerHandshakeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TLanceIndexWorkerHandshakeStandardScheme getScheme() {
return new TLanceIndexWorkerHandshakeStandardScheme();
}
}
private static class TLanceIndexWorkerHandshakeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TLanceIndexWorkerHandshake> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, TLanceIndexWorkerHandshake struct) throws org.apache.thrift.TException {
iprot.incrementRecursionDepth();
try {
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: // PROTOCOL_MAGIC
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.protocol_magic = iprot.readI64();
struct.setProtocolMagicIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PROTOCOL_VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.protocol_version = iprot.readI32();
struct.setProtocolVersionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // CGROUP_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.cgroup_path = iprot.readString();
struct.setCgroupPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // MEMORY_MAX_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.memory_max_bytes = iprot.readI64();
struct.setMemoryMaxBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // PIDS_MAX
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.pids_max = iprot.readI64();
struct.setPidsMaxIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // RLIMIT_AS_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.rlimit_as_bytes = iprot.readI64();
struct.setRlimitAsBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // RLIMIT_CPU_SECONDS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.rlimit_cpu_seconds = iprot.readI64();
struct.setRlimitCpuSecondsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // RLIMIT_NOFILE
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.rlimit_nofile = iprot.readI64();
struct.setRlimitNofileIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // RLIMIT_CORE
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.rlimit_core = iprot.readI64();
struct.setRlimitCoreIsSet(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.isSetProtocolMagic()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'protocol_magic' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetProtocolVersion()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'protocol_version' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetMemoryMaxBytes()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'memory_max_bytes' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetPidsMax()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'pids_max' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetRlimitAsBytes()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'rlimit_as_bytes' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetRlimitCpuSeconds()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'rlimit_cpu_seconds' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetRlimitNofile()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'rlimit_nofile' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetRlimitCore()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'rlimit_core' was not found in serialized data! Struct: " + toString());
}
struct.validate();
} finally {
iprot.decrementRecursionDepth();
}
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, TLanceIndexWorkerHandshake struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(PROTOCOL_MAGIC_FIELD_DESC);
oprot.writeI64(struct.protocol_magic);
oprot.writeFieldEnd();
oprot.writeFieldBegin(PROTOCOL_VERSION_FIELD_DESC);
oprot.writeI32(struct.protocol_version);
oprot.writeFieldEnd();
if (struct.cgroup_path != null) {
oprot.writeFieldBegin(CGROUP_PATH_FIELD_DESC);
oprot.writeString(struct.cgroup_path);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(MEMORY_MAX_BYTES_FIELD_DESC);
oprot.writeI64(struct.memory_max_bytes);
oprot.writeFieldEnd();
oprot.writeFieldBegin(PIDS_MAX_FIELD_DESC);
oprot.writeI64(struct.pids_max);
oprot.writeFieldEnd();
oprot.writeFieldBegin(RLIMIT_AS_BYTES_FIELD_DESC);
oprot.writeI64(struct.rlimit_as_bytes);
oprot.writeFieldEnd();
oprot.writeFieldBegin(RLIMIT_CPU_SECONDS_FIELD_DESC);
oprot.writeI64(struct.rlimit_cpu_seconds);
oprot.writeFieldEnd();
oprot.writeFieldBegin(RLIMIT_NOFILE_FIELD_DESC);
oprot.writeI64(struct.rlimit_nofile);
oprot.writeFieldEnd();
oprot.writeFieldBegin(RLIMIT_CORE_FIELD_DESC);
oprot.writeI64(struct.rlimit_core);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TLanceIndexWorkerHandshakeTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TLanceIndexWorkerHandshakeTupleScheme getScheme() {
return new TLanceIndexWorkerHandshakeTupleScheme();
}
}
private static class TLanceIndexWorkerHandshakeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TLanceIndexWorkerHandshake> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TLanceIndexWorkerHandshake struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.protocol_magic);
oprot.writeI32(struct.protocol_version);
oprot.writeString(struct.cgroup_path);
oprot.writeI64(struct.memory_max_bytes);
oprot.writeI64(struct.pids_max);
oprot.writeI64(struct.rlimit_as_bytes);
oprot.writeI64(struct.rlimit_cpu_seconds);
oprot.writeI64(struct.rlimit_nofile);
oprot.writeI64(struct.rlimit_core);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TLanceIndexWorkerHandshake struct) throws org.apache.thrift.TException {
prot.incrementRecursionDepth();
try {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.protocol_magic = iprot.readI64();
struct.setProtocolMagicIsSet(true);
struct.protocol_version = iprot.readI32();
struct.setProtocolVersionIsSet(true);
struct.cgroup_path = iprot.readString();
struct.setCgroupPathIsSet(true);
struct.memory_max_bytes = iprot.readI64();
struct.setMemoryMaxBytesIsSet(true);
struct.pids_max = iprot.readI64();
struct.setPidsMaxIsSet(true);
struct.rlimit_as_bytes = iprot.readI64();
struct.setRlimitAsBytesIsSet(true);
struct.rlimit_cpu_seconds = iprot.readI64();
struct.setRlimitCpuSecondsIsSet(true);
struct.rlimit_nofile = iprot.readI64();
struct.setRlimitNofileIsSet(true);
struct.rlimit_core = iprot.readI64();
struct.setRlimitCoreIsSet(true);
} finally {
prot.decrementRecursionDepth();
}
}
}
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();
}
}