org.apache.hadoop.hive.metastore.api.ReplTblWriteIdStateRequest 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 ReplTblWriteIdStateRequest 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("ReplTblWriteIdStateRequest");
private static final org.apache.thrift.protocol.TField VALID_WRITE_IDLIST_FIELD_DESC = new org.apache.thrift.protocol.TField("validWriteIdlist", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField HOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostName", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField PART_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partNames", org.apache.thrift.protocol.TType.LIST, (short)6);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new ReplTblWriteIdStateRequestStandardSchemeFactory());
schemes.put(TupleScheme.class, new ReplTblWriteIdStateRequestTupleSchemeFactory());
}
private String validWriteIdlist; // required
private String user; // required
private String hostName; // required
private String dbName; // required
private String tableName; // required
private List partNames; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
VALID_WRITE_IDLIST((short)1, "validWriteIdlist"),
USER((short)2, "user"),
HOST_NAME((short)3, "hostName"),
DB_NAME((short)4, "dbName"),
TABLE_NAME((short)5, "tableName"),
PART_NAMES((short)6, "partNames");
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: // VALID_WRITE_IDLIST
return VALID_WRITE_IDLIST;
case 2: // USER
return USER;
case 3: // HOST_NAME
return HOST_NAME;
case 4: // DB_NAME
return DB_NAME;
case 5: // TABLE_NAME
return TABLE_NAME;
case 6: // PART_NAMES
return PART_NAMES;
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 _Fields optionals[] = {_Fields.PART_NAMES};
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.VALID_WRITE_IDLIST, new org.apache.thrift.meta_data.FieldMetaData("validWriteIdlist", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.HOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("hostName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PART_NAMES, new org.apache.thrift.meta_data.FieldMetaData("partNames", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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.STRING))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ReplTblWriteIdStateRequest.class, metaDataMap);
}
public ReplTblWriteIdStateRequest() {
}
public ReplTblWriteIdStateRequest(
String validWriteIdlist,
String user,
String hostName,
String dbName,
String tableName)
{
this();
this.validWriteIdlist = validWriteIdlist;
this.user = user;
this.hostName = hostName;
this.dbName = dbName;
this.tableName = tableName;
}
/**
* Performs a deep copy on other.
*/
public ReplTblWriteIdStateRequest(ReplTblWriteIdStateRequest other) {
if (other.isSetValidWriteIdlist()) {
this.validWriteIdlist = other.validWriteIdlist;
}
if (other.isSetUser()) {
this.user = other.user;
}
if (other.isSetHostName()) {
this.hostName = other.hostName;
}
if (other.isSetDbName()) {
this.dbName = other.dbName;
}
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetPartNames()) {
List __this__partNames = new ArrayList(other.partNames);
this.partNames = __this__partNames;
}
}
public ReplTblWriteIdStateRequest deepCopy() {
return new ReplTblWriteIdStateRequest(this);
}
@Override
public void clear() {
this.validWriteIdlist = null;
this.user = null;
this.hostName = null;
this.dbName = null;
this.tableName = null;
this.partNames = null;
}
public String getValidWriteIdlist() {
return this.validWriteIdlist;
}
public void setValidWriteIdlist(String validWriteIdlist) {
this.validWriteIdlist = validWriteIdlist;
}
public void unsetValidWriteIdlist() {
this.validWriteIdlist = null;
}
/** Returns true if field validWriteIdlist is set (has been assigned a value) and false otherwise */
public boolean isSetValidWriteIdlist() {
return this.validWriteIdlist != null;
}
public void setValidWriteIdlistIsSet(boolean value) {
if (!value) {
this.validWriteIdlist = null;
}
}
public String getUser() {
return this.user;
}
public void setUser(String user) {
this.user = user;
}
public void unsetUser() {
this.user = null;
}
/** Returns true if field user is set (has been assigned a value) and false otherwise */
public boolean isSetUser() {
return this.user != null;
}
public void setUserIsSet(boolean value) {
if (!value) {
this.user = null;
}
}
public String getHostName() {
return this.hostName;
}
public void setHostName(String hostName) {
this.hostName = hostName;
}
public void unsetHostName() {
this.hostName = null;
}
/** Returns true if field hostName is set (has been assigned a value) and false otherwise */
public boolean isSetHostName() {
return this.hostName != null;
}
public void setHostNameIsSet(boolean value) {
if (!value) {
this.hostName = null;
}
}
public String getDbName() {
return this.dbName;
}
public void setDbName(String dbName) {
this.dbName = dbName;
}
public void unsetDbName() {
this.dbName = null;
}
/** Returns true if field dbName is set (has been assigned a value) and false otherwise */
public boolean isSetDbName() {
return this.dbName != null;
}
public void setDbNameIsSet(boolean value) {
if (!value) {
this.dbName = null;
}
}
public String getTableName() {
return this.tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public int getPartNamesSize() {
return (this.partNames == null) ? 0 : this.partNames.size();
}
public java.util.Iterator getPartNamesIterator() {
return (this.partNames == null) ? null : this.partNames.iterator();
}
public void addToPartNames(String elem) {
if (this.partNames == null) {
this.partNames = new ArrayList();
}
this.partNames.add(elem);
}
public List getPartNames() {
return this.partNames;
}
public void setPartNames(List partNames) {
this.partNames = partNames;
}
public void unsetPartNames() {
this.partNames = null;
}
/** Returns true if field partNames is set (has been assigned a value) and false otherwise */
public boolean isSetPartNames() {
return this.partNames != null;
}
public void setPartNamesIsSet(boolean value) {
if (!value) {
this.partNames = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case VALID_WRITE_IDLIST:
if (value == null) {
unsetValidWriteIdlist();
} else {
setValidWriteIdlist((String)value);
}
break;
case USER:
if (value == null) {
unsetUser();
} else {
setUser((String)value);
}
break;
case HOST_NAME:
if (value == null) {
unsetHostName();
} else {
setHostName((String)value);
}
break;
case DB_NAME:
if (value == null) {
unsetDbName();
} else {
setDbName((String)value);
}
break;
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((String)value);
}
break;
case PART_NAMES:
if (value == null) {
unsetPartNames();
} else {
setPartNames((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case VALID_WRITE_IDLIST:
return getValidWriteIdlist();
case USER:
return getUser();
case HOST_NAME:
return getHostName();
case DB_NAME:
return getDbName();
case TABLE_NAME:
return getTableName();
case PART_NAMES:
return getPartNames();
}
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 VALID_WRITE_IDLIST:
return isSetValidWriteIdlist();
case USER:
return isSetUser();
case HOST_NAME:
return isSetHostName();
case DB_NAME:
return isSetDbName();
case TABLE_NAME:
return isSetTableName();
case PART_NAMES:
return isSetPartNames();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof ReplTblWriteIdStateRequest)
return this.equals((ReplTblWriteIdStateRequest)that);
return false;
}
public boolean equals(ReplTblWriteIdStateRequest that) {
if (that == null)
return false;
boolean this_present_validWriteIdlist = true && this.isSetValidWriteIdlist();
boolean that_present_validWriteIdlist = true && that.isSetValidWriteIdlist();
if (this_present_validWriteIdlist || that_present_validWriteIdlist) {
if (!(this_present_validWriteIdlist && that_present_validWriteIdlist))
return false;
if (!this.validWriteIdlist.equals(that.validWriteIdlist))
return false;
}
boolean this_present_user = true && this.isSetUser();
boolean that_present_user = true && that.isSetUser();
if (this_present_user || that_present_user) {
if (!(this_present_user && that_present_user))
return false;
if (!this.user.equals(that.user))
return false;
}
boolean this_present_hostName = true && this.isSetHostName();
boolean that_present_hostName = true && that.isSetHostName();
if (this_present_hostName || that_present_hostName) {
if (!(this_present_hostName && that_present_hostName))
return false;
if (!this.hostName.equals(that.hostName))
return false;
}
boolean this_present_dbName = true && this.isSetDbName();
boolean that_present_dbName = true && that.isSetDbName();
if (this_present_dbName || that_present_dbName) {
if (!(this_present_dbName && that_present_dbName))
return false;
if (!this.dbName.equals(that.dbName))
return false;
}
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_partNames = true && this.isSetPartNames();
boolean that_present_partNames = true && that.isSetPartNames();
if (this_present_partNames || that_present_partNames) {
if (!(this_present_partNames && that_present_partNames))
return false;
if (!this.partNames.equals(that.partNames))
return false;
}
return true;
}
@Override
public int hashCode() {
List © 2015 - 2025 Weber Informatics LLC | Privacy Policy