org.apache.hadoop.hive.metastore.api.TableValidWriteIds Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hive-apache Show documentation
Show all versions of hive-apache Show documentation
Shaded version of Apache Hive for Presto
The newest version!
/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hive.metastore.api;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import io.prestosql.hive.$internal.org.slf4j.Logger;
import io.prestosql.hive.$internal.org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
public class TableValidWriteIds implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableValidWriteIds");
private static final org.apache.thrift.protocol.TField FULL_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fullTableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField WRITE_ID_HIGH_WATER_MARK_FIELD_DESC = new org.apache.thrift.protocol.TField("writeIdHighWaterMark", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField INVALID_WRITE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("invalidWriteIds", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField MIN_OPEN_WRITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("minOpenWriteId", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField ABORTED_BITS_FIELD_DESC = new org.apache.thrift.protocol.TField("abortedBits", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TableValidWriteIdsStandardSchemeFactory());
schemes.put(TupleScheme.class, new TableValidWriteIdsTupleSchemeFactory());
}
private String fullTableName; // required
private long writeIdHighWaterMark; // required
private List invalidWriteIds; // required
private long minOpenWriteId; // optional
private ByteBuffer abortedBits; // 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 {
FULL_TABLE_NAME((short)1, "fullTableName"),
WRITE_ID_HIGH_WATER_MARK((short)2, "writeIdHighWaterMark"),
INVALID_WRITE_IDS((short)3, "invalidWriteIds"),
MIN_OPEN_WRITE_ID((short)4, "minOpenWriteId"),
ABORTED_BITS((short)5, "abortedBits");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // FULL_TABLE_NAME
return FULL_TABLE_NAME;
case 2: // WRITE_ID_HIGH_WATER_MARK
return WRITE_ID_HIGH_WATER_MARK;
case 3: // INVALID_WRITE_IDS
return INVALID_WRITE_IDS;
case 4: // MIN_OPEN_WRITE_ID
return MIN_OPEN_WRITE_ID;
case 5: // ABORTED_BITS
return ABORTED_BITS;
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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __WRITEIDHIGHWATERMARK_ISSET_ID = 0;
private static final int __MINOPENWRITEID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.MIN_OPEN_WRITE_ID};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.FULL_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("fullTableName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.WRITE_ID_HIGH_WATER_MARK, new org.apache.thrift.meta_data.FieldMetaData("writeIdHighWaterMark", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.INVALID_WRITE_IDS, new org.apache.thrift.meta_data.FieldMetaData("invalidWriteIds", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
tmpMap.put(_Fields.MIN_OPEN_WRITE_ID, new org.apache.thrift.meta_data.FieldMetaData("minOpenWriteId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.ABORTED_BITS, new org.apache.thrift.meta_data.FieldMetaData("abortedBits", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableValidWriteIds.class, metaDataMap);
}
public TableValidWriteIds() {
}
public TableValidWriteIds(
String fullTableName,
long writeIdHighWaterMark,
List invalidWriteIds,
ByteBuffer abortedBits)
{
this();
this.fullTableName = fullTableName;
this.writeIdHighWaterMark = writeIdHighWaterMark;
setWriteIdHighWaterMarkIsSet(true);
this.invalidWriteIds = invalidWriteIds;
this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(abortedBits);
}
/**
* Performs a deep copy on other.
*/
public TableValidWriteIds(TableValidWriteIds other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetFullTableName()) {
this.fullTableName = other.fullTableName;
}
this.writeIdHighWaterMark = other.writeIdHighWaterMark;
if (other.isSetInvalidWriteIds()) {
List __this__invalidWriteIds = new ArrayList(other.invalidWriteIds);
this.invalidWriteIds = __this__invalidWriteIds;
}
this.minOpenWriteId = other.minOpenWriteId;
if (other.isSetAbortedBits()) {
this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(other.abortedBits);
}
}
public TableValidWriteIds deepCopy() {
return new TableValidWriteIds(this);
}
@Override
public void clear() {
this.fullTableName = null;
setWriteIdHighWaterMarkIsSet(false);
this.writeIdHighWaterMark = 0;
this.invalidWriteIds = null;
setMinOpenWriteIdIsSet(false);
this.minOpenWriteId = 0;
this.abortedBits = null;
}
public String getFullTableName() {
return this.fullTableName;
}
public void setFullTableName(String fullTableName) {
this.fullTableName = fullTableName;
}
public void unsetFullTableName() {
this.fullTableName = null;
}
/** Returns true if field fullTableName is set (has been assigned a value) and false otherwise */
public boolean isSetFullTableName() {
return this.fullTableName != null;
}
public void setFullTableNameIsSet(boolean value) {
if (!value) {
this.fullTableName = null;
}
}
public long getWriteIdHighWaterMark() {
return this.writeIdHighWaterMark;
}
public void setWriteIdHighWaterMark(long writeIdHighWaterMark) {
this.writeIdHighWaterMark = writeIdHighWaterMark;
setWriteIdHighWaterMarkIsSet(true);
}
public void unsetWriteIdHighWaterMark() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WRITEIDHIGHWATERMARK_ISSET_ID);
}
/** Returns true if field writeIdHighWaterMark is set (has been assigned a value) and false otherwise */
public boolean isSetWriteIdHighWaterMark() {
return EncodingUtils.testBit(__isset_bitfield, __WRITEIDHIGHWATERMARK_ISSET_ID);
}
public void setWriteIdHighWaterMarkIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITEIDHIGHWATERMARK_ISSET_ID, value);
}
public int getInvalidWriteIdsSize() {
return (this.invalidWriteIds == null) ? 0 : this.invalidWriteIds.size();
}
public java.util.Iterator getInvalidWriteIdsIterator() {
return (this.invalidWriteIds == null) ? null : this.invalidWriteIds.iterator();
}
public void addToInvalidWriteIds(long elem) {
if (this.invalidWriteIds == null) {
this.invalidWriteIds = new ArrayList();
}
this.invalidWriteIds.add(elem);
}
public List getInvalidWriteIds() {
return this.invalidWriteIds;
}
public void setInvalidWriteIds(List invalidWriteIds) {
this.invalidWriteIds = invalidWriteIds;
}
public void unsetInvalidWriteIds() {
this.invalidWriteIds = null;
}
/** Returns true if field invalidWriteIds is set (has been assigned a value) and false otherwise */
public boolean isSetInvalidWriteIds() {
return this.invalidWriteIds != null;
}
public void setInvalidWriteIdsIsSet(boolean value) {
if (!value) {
this.invalidWriteIds = null;
}
}
public long getMinOpenWriteId() {
return this.minOpenWriteId;
}
public void setMinOpenWriteId(long minOpenWriteId) {
this.minOpenWriteId = minOpenWriteId;
setMinOpenWriteIdIsSet(true);
}
public void unsetMinOpenWriteId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MINOPENWRITEID_ISSET_ID);
}
/** Returns true if field minOpenWriteId is set (has been assigned a value) and false otherwise */
public boolean isSetMinOpenWriteId() {
return EncodingUtils.testBit(__isset_bitfield, __MINOPENWRITEID_ISSET_ID);
}
public void setMinOpenWriteIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MINOPENWRITEID_ISSET_ID, value);
}
public byte[] getAbortedBits() {
setAbortedBits(org.apache.thrift.TBaseHelper.rightSize(abortedBits));
return abortedBits == null ? null : abortedBits.array();
}
public ByteBuffer bufferForAbortedBits() {
return org.apache.thrift.TBaseHelper.copyBinary(abortedBits);
}
public void setAbortedBits(byte[] abortedBits) {
this.abortedBits = abortedBits == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(abortedBits, abortedBits.length));
}
public void setAbortedBits(ByteBuffer abortedBits) {
this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(abortedBits);
}
public void unsetAbortedBits() {
this.abortedBits = null;
}
/** Returns true if field abortedBits is set (has been assigned a value) and false otherwise */
public boolean isSetAbortedBits() {
return this.abortedBits != null;
}
public void setAbortedBitsIsSet(boolean value) {
if (!value) {
this.abortedBits = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case FULL_TABLE_NAME:
if (value == null) {
unsetFullTableName();
} else {
setFullTableName((String)value);
}
break;
case WRITE_ID_HIGH_WATER_MARK:
if (value == null) {
unsetWriteIdHighWaterMark();
} else {
setWriteIdHighWaterMark((Long)value);
}
break;
case INVALID_WRITE_IDS:
if (value == null) {
unsetInvalidWriteIds();
} else {
setInvalidWriteIds((List)value);
}
break;
case MIN_OPEN_WRITE_ID:
if (value == null) {
unsetMinOpenWriteId();
} else {
setMinOpenWriteId((Long)value);
}
break;
case ABORTED_BITS:
if (value == null) {
unsetAbortedBits();
} else {
setAbortedBits((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case FULL_TABLE_NAME:
return getFullTableName();
case WRITE_ID_HIGH_WATER_MARK:
return getWriteIdHighWaterMark();
case INVALID_WRITE_IDS:
return getInvalidWriteIds();
case MIN_OPEN_WRITE_ID:
return getMinOpenWriteId();
case ABORTED_BITS:
return getAbortedBits();
}
throw new 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 IllegalArgumentException();
}
switch (field) {
case FULL_TABLE_NAME:
return isSetFullTableName();
case WRITE_ID_HIGH_WATER_MARK:
return isSetWriteIdHighWaterMark();
case INVALID_WRITE_IDS:
return isSetInvalidWriteIds();
case MIN_OPEN_WRITE_ID:
return isSetMinOpenWriteId();
case ABORTED_BITS:
return isSetAbortedBits();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof TableValidWriteIds)
return this.equals((TableValidWriteIds)that);
return false;
}
public boolean equals(TableValidWriteIds that) {
if (that == null)
return false;
boolean this_present_fullTableName = true && this.isSetFullTableName();
boolean that_present_fullTableName = true && that.isSetFullTableName();
if (this_present_fullTableName || that_present_fullTableName) {
if (!(this_present_fullTableName && that_present_fullTableName))
return false;
if (!this.fullTableName.equals(that.fullTableName))
return false;
}
boolean this_present_writeIdHighWaterMark = true;
boolean that_present_writeIdHighWaterMark = true;
if (this_present_writeIdHighWaterMark || that_present_writeIdHighWaterMark) {
if (!(this_present_writeIdHighWaterMark && that_present_writeIdHighWaterMark))
return false;
if (this.writeIdHighWaterMark != that.writeIdHighWaterMark)
return false;
}
boolean this_present_invalidWriteIds = true && this.isSetInvalidWriteIds();
boolean that_present_invalidWriteIds = true && that.isSetInvalidWriteIds();
if (this_present_invalidWriteIds || that_present_invalidWriteIds) {
if (!(this_present_invalidWriteIds && that_present_invalidWriteIds))
return false;
if (!this.invalidWriteIds.equals(that.invalidWriteIds))
return false;
}
boolean this_present_minOpenWriteId = true && this.isSetMinOpenWriteId();
boolean that_present_minOpenWriteId = true && that.isSetMinOpenWriteId();
if (this_present_minOpenWriteId || that_present_minOpenWriteId) {
if (!(this_present_minOpenWriteId && that_present_minOpenWriteId))
return false;
if (this.minOpenWriteId != that.minOpenWriteId)
return false;
}
boolean this_present_abortedBits = true && this.isSetAbortedBits();
boolean that_present_abortedBits = true && that.isSetAbortedBits();
if (this_present_abortedBits || that_present_abortedBits) {
if (!(this_present_abortedBits && that_present_abortedBits))
return false;
if (!this.abortedBits.equals(that.abortedBits))
return false;
}
return true;
}
@Override
public int hashCode() {
List © 2015 - 2025 Weber Informatics LLC | Privacy Policy