
com.netease.arctic.ams.api.DataFile Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.13.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.netease.arctic.ams.api;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.13.0)", date = "2023-02-01")
public class DataFile implements com.netease.arctic.shade.org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final com.netease.arctic.shade.org.apache.thrift.protocol.TStruct STRUCT_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TStruct("DataFile");
private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField FILE_TYPE_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("fileType", com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING, (short)1);
private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField PATH_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("path", com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING, (short)2);
private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("fileSize", com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64, (short)3);
private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField MASK_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("mask", com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64, (short)4);
private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField INDEX_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("index", com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64, (short)5);
private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField SPEC_ID_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("specId", com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64, (short)6);
private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField PARTITION_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("partition", com.netease.arctic.shade.org.apache.thrift.protocol.TType.LIST, (short)7);
private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField RECORD_COUNT_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("recordCount", com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64, (short)8);
private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField UPPER_BOUNDS_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("upperBounds", com.netease.arctic.shade.org.apache.thrift.protocol.TType.MAP, (short)9);
private static final com.netease.arctic.shade.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DataFileStandardSchemeFactory();
private static final com.netease.arctic.shade.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DataFileTupleSchemeFactory();
public @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.lang.String fileType; // required
public @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.lang.String path; // required
public long fileSize; // required
public long mask; // required
public long index; // required
public long specId; // required
public @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.util.List partition; // required
public long recordCount; // required
public @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.util.Map upperBounds; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements com.netease.arctic.shade.org.apache.thrift.TFieldIdEnum {
FILE_TYPE((short)1, "fileType"),
PATH((short)2, "path"),
FILE_SIZE((short)3, "fileSize"),
MASK((short)4, "mask"),
INDEX((short)5, "index"),
SPEC_ID((short)6, "specId"),
PARTITION((short)7, "partition"),
RECORD_COUNT((short)8, "recordCount"),
UPPER_BOUNDS((short)9, "upperBounds");
private static final java.util.Map byName = new java.util.HashMap();
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.
*/
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // FILE_TYPE
return FILE_TYPE;
case 2: // PATH
return PATH;
case 3: // FILE_SIZE
return FILE_SIZE;
case 4: // MASK
return MASK;
case 5: // INDEX
return INDEX;
case 6: // SPEC_ID
return SPEC_ID;
case 7: // PARTITION
return PARTITION;
case 8: // RECORD_COUNT
return RECORD_COUNT;
case 9: // UPPER_BOUNDS
return UPPER_BOUNDS;
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.
*/
@com.netease.arctic.shade.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 __FILESIZE_ISSET_ID = 0;
private static final int __MASK_ISSET_ID = 1;
private static final int __INDEX_ISSET_ID = 2;
private static final int __SPECID_ISSET_ID = 3;
private static final int __RECORDCOUNT_ISSET_ID = 4;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.FILE_TYPE, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("fileType", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT,
new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PATH, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("path", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT,
new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.FILE_SIZE, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("fileSize", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT,
new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.MASK, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("mask", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT,
new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.INDEX, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("index", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT,
new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SPEC_ID, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("specId", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT,
new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.PARTITION, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("partition", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT,
new com.netease.arctic.shade.org.apache.thrift.meta_data.ListMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.LIST,
new com.netease.arctic.shade.org.apache.thrift.meta_data.StructMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT, PartitionFieldData.class))));
tmpMap.put(_Fields.RECORD_COUNT, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("recordCount", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT,
new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.UPPER_BOUNDS, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("upperBounds", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT,
new com.netease.arctic.shade.org.apache.thrift.meta_data.MapMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.MAP,
new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING),
new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING , true))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DataFile.class, metaDataMap);
}
public DataFile() {
}
public DataFile(
java.lang.String fileType,
java.lang.String path,
long fileSize,
long mask,
long index,
long specId,
java.util.List partition,
long recordCount,
java.util.Map upperBounds)
{
this();
this.fileType = fileType;
this.path = path;
this.fileSize = fileSize;
setFileSizeIsSet(true);
this.mask = mask;
setMaskIsSet(true);
this.index = index;
setIndexIsSet(true);
this.specId = specId;
setSpecIdIsSet(true);
this.partition = partition;
this.recordCount = recordCount;
setRecordCountIsSet(true);
this.upperBounds = upperBounds;
}
/**
* Performs a deep copy on other.
*/
public DataFile(DataFile other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetFileType()) {
this.fileType = other.fileType;
}
if (other.isSetPath()) {
this.path = other.path;
}
this.fileSize = other.fileSize;
this.mask = other.mask;
this.index = other.index;
this.specId = other.specId;
if (other.isSetPartition()) {
java.util.List __this__partition = new java.util.ArrayList(other.partition.size());
for (PartitionFieldData other_element : other.partition) {
__this__partition.add(new PartitionFieldData(other_element));
}
this.partition = __this__partition;
}
this.recordCount = other.recordCount;
if (other.isSetUpperBounds()) {
java.util.Map __this__upperBounds = new java.util.HashMap(other.upperBounds);
this.upperBounds = __this__upperBounds;
}
}
public DataFile deepCopy() {
return new DataFile(this);
}
@Override
public void clear() {
this.fileType = null;
this.path = null;
setFileSizeIsSet(false);
this.fileSize = 0;
setMaskIsSet(false);
this.mask = 0;
setIndexIsSet(false);
this.index = 0;
setSpecIdIsSet(false);
this.specId = 0;
this.partition = null;
setRecordCountIsSet(false);
this.recordCount = 0;
this.upperBounds = null;
}
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
public java.lang.String getFileType() {
return this.fileType;
}
public DataFile setFileType(@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.lang.String fileType) {
this.fileType = fileType;
return this;
}
public void unsetFileType() {
this.fileType = null;
}
/** Returns true if field fileType is set (has been assigned a value) and false otherwise */
public boolean isSetFileType() {
return this.fileType != null;
}
public void setFileTypeIsSet(boolean value) {
if (!value) {
this.fileType = null;
}
}
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
public java.lang.String getPath() {
return this.path;
}
public DataFile setPath(@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.lang.String path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public long getFileSize() {
return this.fileSize;
}
public DataFile setFileSize(long fileSize) {
this.fileSize = fileSize;
setFileSizeIsSet(true);
return this;
}
public void unsetFileSize() {
__isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
}
/** Returns true if field fileSize is set (has been assigned a value) and false otherwise */
public boolean isSetFileSize() {
return com.netease.arctic.shade.org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
}
public void setFileSizeIsSet(boolean value) {
__isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
}
public long getMask() {
return this.mask;
}
public DataFile setMask(long mask) {
this.mask = mask;
setMaskIsSet(true);
return this;
}
public void unsetMask() {
__isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MASK_ISSET_ID);
}
/** Returns true if field mask is set (has been assigned a value) and false otherwise */
public boolean isSetMask() {
return com.netease.arctic.shade.org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MASK_ISSET_ID);
}
public void setMaskIsSet(boolean value) {
__isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MASK_ISSET_ID, value);
}
public long getIndex() {
return this.index;
}
public DataFile setIndex(long index) {
this.index = index;
setIndexIsSet(true);
return this;
}
public void unsetIndex() {
__isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INDEX_ISSET_ID);
}
/** Returns true if field index is set (has been assigned a value) and false otherwise */
public boolean isSetIndex() {
return com.netease.arctic.shade.org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INDEX_ISSET_ID);
}
public void setIndexIsSet(boolean value) {
__isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INDEX_ISSET_ID, value);
}
public long getSpecId() {
return this.specId;
}
public DataFile setSpecId(long specId) {
this.specId = specId;
setSpecIdIsSet(true);
return this;
}
public void unsetSpecId() {
__isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SPECID_ISSET_ID);
}
/** Returns true if field specId is set (has been assigned a value) and false otherwise */
public boolean isSetSpecId() {
return com.netease.arctic.shade.org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SPECID_ISSET_ID);
}
public void setSpecIdIsSet(boolean value) {
__isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SPECID_ISSET_ID, value);
}
public int getPartitionSize() {
return (this.partition == null) ? 0 : this.partition.size();
}
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
public java.util.Iterator getPartitionIterator() {
return (this.partition == null) ? null : this.partition.iterator();
}
public void addToPartition(PartitionFieldData elem) {
if (this.partition == null) {
this.partition = new java.util.ArrayList();
}
this.partition.add(elem);
}
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
public java.util.List getPartition() {
return this.partition;
}
public DataFile setPartition(@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.util.List partition) {
this.partition = partition;
return this;
}
public void unsetPartition() {
this.partition = null;
}
/** Returns true if field partition is set (has been assigned a value) and false otherwise */
public boolean isSetPartition() {
return this.partition != null;
}
public void setPartitionIsSet(boolean value) {
if (!value) {
this.partition = null;
}
}
public long getRecordCount() {
return this.recordCount;
}
public DataFile setRecordCount(long recordCount) {
this.recordCount = recordCount;
setRecordCountIsSet(true);
return this;
}
public void unsetRecordCount() {
__isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RECORDCOUNT_ISSET_ID);
}
/** Returns true if field recordCount is set (has been assigned a value) and false otherwise */
public boolean isSetRecordCount() {
return com.netease.arctic.shade.org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RECORDCOUNT_ISSET_ID);
}
public void setRecordCountIsSet(boolean value) {
__isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RECORDCOUNT_ISSET_ID, value);
}
public int getUpperBoundsSize() {
return (this.upperBounds == null) ? 0 : this.upperBounds.size();
}
public void putToUpperBounds(java.lang.String key, java.nio.ByteBuffer val) {
if (this.upperBounds == null) {
this.upperBounds = new java.util.HashMap();
}
this.upperBounds.put(key, val);
}
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
public java.util.Map getUpperBounds() {
return this.upperBounds;
}
public DataFile setUpperBounds(@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.util.Map upperBounds) {
this.upperBounds = upperBounds;
return this;
}
public void unsetUpperBounds() {
this.upperBounds = null;
}
/** Returns true if field upperBounds is set (has been assigned a value) and false otherwise */
public boolean isSetUpperBounds() {
return this.upperBounds != null;
}
public void setUpperBoundsIsSet(boolean value) {
if (!value) {
this.upperBounds = null;
}
}
public void setFieldValue(_Fields field, @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case FILE_TYPE:
if (value == null) {
unsetFileType();
} else {
setFileType((java.lang.String)value);
}
break;
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((java.lang.String)value);
}
break;
case FILE_SIZE:
if (value == null) {
unsetFileSize();
} else {
setFileSize((java.lang.Long)value);
}
break;
case MASK:
if (value == null) {
unsetMask();
} else {
setMask((java.lang.Long)value);
}
break;
case INDEX:
if (value == null) {
unsetIndex();
} else {
setIndex((java.lang.Long)value);
}
break;
case SPEC_ID:
if (value == null) {
unsetSpecId();
} else {
setSpecId((java.lang.Long)value);
}
break;
case PARTITION:
if (value == null) {
unsetPartition();
} else {
setPartition((java.util.List)value);
}
break;
case RECORD_COUNT:
if (value == null) {
unsetRecordCount();
} else {
setRecordCount((java.lang.Long)value);
}
break;
case UPPER_BOUNDS:
if (value == null) {
unsetUpperBounds();
} else {
setUpperBounds((java.util.Map)value);
}
break;
}
}
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case FILE_TYPE:
return getFileType();
case PATH:
return getPath();
case FILE_SIZE:
return getFileSize();
case MASK:
return getMask();
case INDEX:
return getIndex();
case SPEC_ID:
return getSpecId();
case PARTITION:
return getPartition();
case RECORD_COUNT:
return getRecordCount();
case UPPER_BOUNDS:
return getUpperBounds();
}
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 FILE_TYPE:
return isSetFileType();
case PATH:
return isSetPath();
case FILE_SIZE:
return isSetFileSize();
case MASK:
return isSetMask();
case INDEX:
return isSetIndex();
case SPEC_ID:
return isSetSpecId();
case PARTITION:
return isSetPartition();
case RECORD_COUNT:
return isSetRecordCount();
case UPPER_BOUNDS:
return isSetUpperBounds();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof DataFile)
return this.equals((DataFile)that);
return false;
}
public boolean equals(DataFile that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_fileType = true && this.isSetFileType();
boolean that_present_fileType = true && that.isSetFileType();
if (this_present_fileType || that_present_fileType) {
if (!(this_present_fileType && that_present_fileType))
return false;
if (!this.fileType.equals(that.fileType))
return false;
}
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_fileSize = true;
boolean that_present_fileSize = true;
if (this_present_fileSize || that_present_fileSize) {
if (!(this_present_fileSize && that_present_fileSize))
return false;
if (this.fileSize != that.fileSize)
return false;
}
boolean this_present_mask = true;
boolean that_present_mask = true;
if (this_present_mask || that_present_mask) {
if (!(this_present_mask && that_present_mask))
return false;
if (this.mask != that.mask)
return false;
}
boolean this_present_index = true;
boolean that_present_index = true;
if (this_present_index || that_present_index) {
if (!(this_present_index && that_present_index))
return false;
if (this.index != that.index)
return false;
}
boolean this_present_specId = true;
boolean that_present_specId = true;
if (this_present_specId || that_present_specId) {
if (!(this_present_specId && that_present_specId))
return false;
if (this.specId != that.specId)
return false;
}
boolean this_present_partition = true && this.isSetPartition();
boolean that_present_partition = true && that.isSetPartition();
if (this_present_partition || that_present_partition) {
if (!(this_present_partition && that_present_partition))
return false;
if (!this.partition.equals(that.partition))
return false;
}
boolean this_present_recordCount = true;
boolean that_present_recordCount = true;
if (this_present_recordCount || that_present_recordCount) {
if (!(this_present_recordCount && that_present_recordCount))
return false;
if (this.recordCount != that.recordCount)
return false;
}
boolean this_present_upperBounds = true && this.isSetUpperBounds();
boolean that_present_upperBounds = true && that.isSetUpperBounds();
if (this_present_upperBounds || that_present_upperBounds) {
if (!(this_present_upperBounds && that_present_upperBounds))
return false;
if (!this.upperBounds.equals(that.upperBounds))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetFileType()) ? 131071 : 524287);
if (isSetFileType())
hashCode = hashCode * 8191 + fileType.hashCode();
hashCode = hashCode * 8191 + ((isSetPath()) ? 131071 : 524287);
if (isSetPath())
hashCode = hashCode * 8191 + path.hashCode();
hashCode = hashCode * 8191 + com.netease.arctic.shade.org.apache.thrift.TBaseHelper.hashCode(fileSize);
hashCode = hashCode * 8191 + com.netease.arctic.shade.org.apache.thrift.TBaseHelper.hashCode(mask);
hashCode = hashCode * 8191 + com.netease.arctic.shade.org.apache.thrift.TBaseHelper.hashCode(index);
hashCode = hashCode * 8191 + com.netease.arctic.shade.org.apache.thrift.TBaseHelper.hashCode(specId);
hashCode = hashCode * 8191 + ((isSetPartition()) ? 131071 : 524287);
if (isSetPartition())
hashCode = hashCode * 8191 + partition.hashCode();
hashCode = hashCode * 8191 + com.netease.arctic.shade.org.apache.thrift.TBaseHelper.hashCode(recordCount);
hashCode = hashCode * 8191 + ((isSetUpperBounds()) ? 131071 : 524287);
if (isSetUpperBounds())
hashCode = hashCode * 8191 + upperBounds.hashCode();
return hashCode;
}
@Override
public int compareTo(DataFile other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetFileType()).compareTo(other.isSetFileType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFileType()) {
lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.fileType, other.fileType);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFileSize()) {
lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetMask()).compareTo(other.isSetMask());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMask()) {
lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.mask, other.mask);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIndex()).compareTo(other.isSetIndex());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndex()) {
lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.index, other.index);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetSpecId()).compareTo(other.isSetSpecId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSpecId()) {
lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.specId, other.specId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetPartition()).compareTo(other.isSetPartition());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPartition()) {
lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.partition, other.partition);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetRecordCount()).compareTo(other.isSetRecordCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRecordCount()) {
lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.recordCount, other.recordCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUpperBounds()).compareTo(other.isSetUpperBounds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpperBounds()) {
lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.upperBounds, other.upperBounds);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol iprot) throws com.netease.arctic.shade.org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol oprot) throws com.netease.arctic.shade.org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("DataFile(");
boolean first = true;
sb.append("fileType:");
if (this.fileType == null) {
sb.append("null");
} else {
sb.append(this.fileType);
}
first = false;
if (!first) sb.append(", ");
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("fileSize:");
sb.append(this.fileSize);
first = false;
if (!first) sb.append(", ");
sb.append("mask:");
sb.append(this.mask);
first = false;
if (!first) sb.append(", ");
sb.append("index:");
sb.append(this.index);
first = false;
if (!first) sb.append(", ");
sb.append("specId:");
sb.append(this.specId);
first = false;
if (!first) sb.append(", ");
sb.append("partition:");
if (this.partition == null) {
sb.append("null");
} else {
sb.append(this.partition);
}
first = false;
if (!first) sb.append(", ");
sb.append("recordCount:");
sb.append(this.recordCount);
first = false;
if (!first) sb.append(", ");
sb.append("upperBounds:");
if (this.upperBounds == null) {
sb.append("null");
} else {
sb.append(this.upperBounds);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws com.netease.arctic.shade.org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new com.netease.arctic.shade.org.apache.thrift.protocol.TCompactProtocol(new com.netease.arctic.shade.org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (com.netease.arctic.shade.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 com.netease.arctic.shade.org.apache.thrift.protocol.TCompactProtocol(new com.netease.arctic.shade.org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (com.netease.arctic.shade.org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class DataFileStandardSchemeFactory implements com.netease.arctic.shade.org.apache.thrift.scheme.SchemeFactory {
public DataFileStandardScheme getScheme() {
return new DataFileStandardScheme();
}
}
private static class DataFileStandardScheme extends com.netease.arctic.shade.org.apache.thrift.scheme.StandardScheme {
public void read(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol iprot, DataFile struct) throws com.netease.arctic.shade.org.apache.thrift.TException {
com.netease.arctic.shade.org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // FILE_TYPE
if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING) {
struct.fileType = iprot.readString();
struct.setFileTypeIsSet(true);
} else {
com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PATH
if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // FILE_SIZE
if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64) {
struct.fileSize = iprot.readI64();
struct.setFileSizeIsSet(true);
} else {
com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // MASK
if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64) {
struct.mask = iprot.readI64();
struct.setMaskIsSet(true);
} else {
com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // INDEX
if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64) {
struct.index = iprot.readI64();
struct.setIndexIsSet(true);
} else {
com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // SPEC_ID
if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64) {
struct.specId = iprot.readI64();
struct.setSpecIdIsSet(true);
} else {
com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // PARTITION
if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.LIST) {
{
com.netease.arctic.shade.org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
struct.partition = new java.util.ArrayList(_list30.size);
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable PartitionFieldData _elem31;
for (int _i32 = 0; _i32 < _list30.size; ++_i32)
{
_elem31 = new PartitionFieldData();
_elem31.read(iprot);
struct.partition.add(_elem31);
}
iprot.readListEnd();
}
struct.setPartitionIsSet(true);
} else {
com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // RECORD_COUNT
if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64) {
struct.recordCount = iprot.readI64();
struct.setRecordCountIsSet(true);
} else {
com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // UPPER_BOUNDS
if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.MAP) {
{
com.netease.arctic.shade.org.apache.thrift.protocol.TMap _map33 = iprot.readMapBegin();
struct.upperBounds = new java.util.HashMap(2*_map33.size);
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.lang.String _key34;
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _val35;
for (int _i36 = 0; _i36 < _map33.size; ++_i36)
{
_key34 = iprot.readString();
_val35 = iprot.readBinary();
struct.upperBounds.put(_key34, _val35);
}
iprot.readMapEnd();
}
struct.setUpperBoundsIsSet(true);
} else {
com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
com.netease.arctic.shade.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
struct.validate();
}
public void write(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol oprot, DataFile struct) throws com.netease.arctic.shade.org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.fileType != null) {
oprot.writeFieldBegin(FILE_TYPE_FIELD_DESC);
oprot.writeString(struct.fileType);
oprot.writeFieldEnd();
}
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC);
oprot.writeI64(struct.fileSize);
oprot.writeFieldEnd();
oprot.writeFieldBegin(MASK_FIELD_DESC);
oprot.writeI64(struct.mask);
oprot.writeFieldEnd();
oprot.writeFieldBegin(INDEX_FIELD_DESC);
oprot.writeI64(struct.index);
oprot.writeFieldEnd();
oprot.writeFieldBegin(SPEC_ID_FIELD_DESC);
oprot.writeI64(struct.specId);
oprot.writeFieldEnd();
if (struct.partition != null) {
oprot.writeFieldBegin(PARTITION_FIELD_DESC);
{
oprot.writeListBegin(new com.netease.arctic.shade.org.apache.thrift.protocol.TList(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT, struct.partition.size()));
for (PartitionFieldData _iter37 : struct.partition)
{
_iter37.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(RECORD_COUNT_FIELD_DESC);
oprot.writeI64(struct.recordCount);
oprot.writeFieldEnd();
if (struct.upperBounds != null) {
oprot.writeFieldBegin(UPPER_BOUNDS_FIELD_DESC);
{
oprot.writeMapBegin(new com.netease.arctic.shade.org.apache.thrift.protocol.TMap(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING, com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING, struct.upperBounds.size()));
for (java.util.Map.Entry _iter38 : struct.upperBounds.entrySet())
{
oprot.writeString(_iter38.getKey());
oprot.writeBinary(_iter38.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class DataFileTupleSchemeFactory implements com.netease.arctic.shade.org.apache.thrift.scheme.SchemeFactory {
public DataFileTupleScheme getScheme() {
return new DataFileTupleScheme();
}
}
private static class DataFileTupleScheme extends com.netease.arctic.shade.org.apache.thrift.scheme.TupleScheme {
@Override
public void write(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol prot, DataFile struct) throws com.netease.arctic.shade.org.apache.thrift.TException {
com.netease.arctic.shade.org.apache.thrift.protocol.TTupleProtocol oprot = (com.netease.arctic.shade.org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetFileType()) {
optionals.set(0);
}
if (struct.isSetPath()) {
optionals.set(1);
}
if (struct.isSetFileSize()) {
optionals.set(2);
}
if (struct.isSetMask()) {
optionals.set(3);
}
if (struct.isSetIndex()) {
optionals.set(4);
}
if (struct.isSetSpecId()) {
optionals.set(5);
}
if (struct.isSetPartition()) {
optionals.set(6);
}
if (struct.isSetRecordCount()) {
optionals.set(7);
}
if (struct.isSetUpperBounds()) {
optionals.set(8);
}
oprot.writeBitSet(optionals, 9);
if (struct.isSetFileType()) {
oprot.writeString(struct.fileType);
}
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetFileSize()) {
oprot.writeI64(struct.fileSize);
}
if (struct.isSetMask()) {
oprot.writeI64(struct.mask);
}
if (struct.isSetIndex()) {
oprot.writeI64(struct.index);
}
if (struct.isSetSpecId()) {
oprot.writeI64(struct.specId);
}
if (struct.isSetPartition()) {
{
oprot.writeI32(struct.partition.size());
for (PartitionFieldData _iter39 : struct.partition)
{
_iter39.write(oprot);
}
}
}
if (struct.isSetRecordCount()) {
oprot.writeI64(struct.recordCount);
}
if (struct.isSetUpperBounds()) {
{
oprot.writeI32(struct.upperBounds.size());
for (java.util.Map.Entry _iter40 : struct.upperBounds.entrySet())
{
oprot.writeString(_iter40.getKey());
oprot.writeBinary(_iter40.getValue());
}
}
}
}
@Override
public void read(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol prot, DataFile struct) throws com.netease.arctic.shade.org.apache.thrift.TException {
com.netease.arctic.shade.org.apache.thrift.protocol.TTupleProtocol iprot = (com.netease.arctic.shade.org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
struct.fileType = iprot.readString();
struct.setFileTypeIsSet(true);
}
if (incoming.get(1)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(2)) {
struct.fileSize = iprot.readI64();
struct.setFileSizeIsSet(true);
}
if (incoming.get(3)) {
struct.mask = iprot.readI64();
struct.setMaskIsSet(true);
}
if (incoming.get(4)) {
struct.index = iprot.readI64();
struct.setIndexIsSet(true);
}
if (incoming.get(5)) {
struct.specId = iprot.readI64();
struct.setSpecIdIsSet(true);
}
if (incoming.get(6)) {
{
com.netease.arctic.shade.org.apache.thrift.protocol.TList _list41 = new com.netease.arctic.shade.org.apache.thrift.protocol.TList(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.partition = new java.util.ArrayList(_list41.size);
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable PartitionFieldData _elem42;
for (int _i43 = 0; _i43 < _list41.size; ++_i43)
{
_elem42 = new PartitionFieldData();
_elem42.read(iprot);
struct.partition.add(_elem42);
}
}
struct.setPartitionIsSet(true);
}
if (incoming.get(7)) {
struct.recordCount = iprot.readI64();
struct.setRecordCountIsSet(true);
}
if (incoming.get(8)) {
{
com.netease.arctic.shade.org.apache.thrift.protocol.TMap _map44 = new com.netease.arctic.shade.org.apache.thrift.protocol.TMap(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING, com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.upperBounds = new java.util.HashMap(2*_map44.size);
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.lang.String _key45;
@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _val46;
for (int _i47 = 0; _i47 < _map44.size; ++_i47)
{
_key45 = iprot.readString();
_val46 = iprot.readBinary();
struct.upperBounds.put(_key45, _val46);
}
}
struct.setUpperBoundsIsSet(true);
}
}
}
private static S scheme(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol proto) {
return (com.netease.arctic.shade.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy