org.apache.hadoop.hive.metastore.api.FireEventRequest 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 FireEventRequest 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("FireEventRequest");
private static final org.apache.thrift.protocol.TField SUCCESSFUL_FIELD_DESC = new org.apache.thrift.protocol.TField("successful", org.apache.thrift.protocol.TType.BOOL, (short)1);
private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRUCT, (short)2);
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)3);
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)4);
private static final org.apache.thrift.protocol.TField PARTITION_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionVals", org.apache.thrift.protocol.TType.LIST, (short)5);
private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new FireEventRequestStandardSchemeFactory());
schemes.put(TupleScheme.class, new FireEventRequestTupleSchemeFactory());
}
private boolean successful; // required
private FireEventRequestData data; // required
private String dbName; // optional
private String tableName; // optional
private List partitionVals; // optional
private String catName; // 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 {
SUCCESSFUL((short)1, "successful"),
DATA((short)2, "data"),
DB_NAME((short)3, "dbName"),
TABLE_NAME((short)4, "tableName"),
PARTITION_VALS((short)5, "partitionVals"),
CAT_NAME((short)6, "catName");
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: // SUCCESSFUL
return SUCCESSFUL;
case 2: // DATA
return DATA;
case 3: // DB_NAME
return DB_NAME;
case 4: // TABLE_NAME
return TABLE_NAME;
case 5: // PARTITION_VALS
return PARTITION_VALS;
case 6: // CAT_NAME
return CAT_NAME;
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 __SUCCESSFUL_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.DB_NAME,_Fields.TABLE_NAME,_Fields.PARTITION_VALS,_Fields.CAT_NAME};
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.SUCCESSFUL, new org.apache.thrift.meta_data.FieldMetaData("successful", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FireEventRequestData.class)));
tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PARTITION_VALS, new org.apache.thrift.meta_data.FieldMetaData("partitionVals", 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))));
tmpMap.put(_Fields.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FireEventRequest.class, metaDataMap);
}
public FireEventRequest() {
}
public FireEventRequest(
boolean successful,
FireEventRequestData data)
{
this();
this.successful = successful;
setSuccessfulIsSet(true);
this.data = data;
}
/**
* Performs a deep copy on other.
*/
public FireEventRequest(FireEventRequest other) {
__isset_bitfield = other.__isset_bitfield;
this.successful = other.successful;
if (other.isSetData()) {
this.data = new FireEventRequestData(other.data);
}
if (other.isSetDbName()) {
this.dbName = other.dbName;
}
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetPartitionVals()) {
List __this__partitionVals = new ArrayList(other.partitionVals);
this.partitionVals = __this__partitionVals;
}
if (other.isSetCatName()) {
this.catName = other.catName;
}
}
public FireEventRequest deepCopy() {
return new FireEventRequest(this);
}
@Override
public void clear() {
setSuccessfulIsSet(false);
this.successful = false;
this.data = null;
this.dbName = null;
this.tableName = null;
this.partitionVals = null;
this.catName = null;
}
public boolean isSuccessful() {
return this.successful;
}
public void setSuccessful(boolean successful) {
this.successful = successful;
setSuccessfulIsSet(true);
}
public void unsetSuccessful() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESSFUL_ISSET_ID);
}
/** Returns true if field successful is set (has been assigned a value) and false otherwise */
public boolean isSetSuccessful() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESSFUL_ISSET_ID);
}
public void setSuccessfulIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESSFUL_ISSET_ID, value);
}
public FireEventRequestData getData() {
return this.data;
}
public void setData(FireEventRequestData data) {
this.data = data;
}
public void unsetData() {
this.data = null;
}
/** Returns true if field data is set (has been assigned a value) and false otherwise */
public boolean isSetData() {
return this.data != null;
}
public void setDataIsSet(boolean value) {
if (!value) {
this.data = 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 getPartitionValsSize() {
return (this.partitionVals == null) ? 0 : this.partitionVals.size();
}
public java.util.Iterator getPartitionValsIterator() {
return (this.partitionVals == null) ? null : this.partitionVals.iterator();
}
public void addToPartitionVals(String elem) {
if (this.partitionVals == null) {
this.partitionVals = new ArrayList();
}
this.partitionVals.add(elem);
}
public List getPartitionVals() {
return this.partitionVals;
}
public void setPartitionVals(List partitionVals) {
this.partitionVals = partitionVals;
}
public void unsetPartitionVals() {
this.partitionVals = null;
}
/** Returns true if field partitionVals is set (has been assigned a value) and false otherwise */
public boolean isSetPartitionVals() {
return this.partitionVals != null;
}
public void setPartitionValsIsSet(boolean value) {
if (!value) {
this.partitionVals = null;
}
}
public String getCatName() {
return this.catName;
}
public void setCatName(String catName) {
this.catName = catName;
}
public void unsetCatName() {
this.catName = null;
}
/** Returns true if field catName is set (has been assigned a value) and false otherwise */
public boolean isSetCatName() {
return this.catName != null;
}
public void setCatNameIsSet(boolean value) {
if (!value) {
this.catName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESSFUL:
if (value == null) {
unsetSuccessful();
} else {
setSuccessful((Boolean)value);
}
break;
case DATA:
if (value == null) {
unsetData();
} else {
setData((FireEventRequestData)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 PARTITION_VALS:
if (value == null) {
unsetPartitionVals();
} else {
setPartitionVals((List)value);
}
break;
case CAT_NAME:
if (value == null) {
unsetCatName();
} else {
setCatName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESSFUL:
return isSuccessful();
case DATA:
return getData();
case DB_NAME:
return getDbName();
case TABLE_NAME:
return getTableName();
case PARTITION_VALS:
return getPartitionVals();
case CAT_NAME:
return getCatName();
}
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 SUCCESSFUL:
return isSetSuccessful();
case DATA:
return isSetData();
case DB_NAME:
return isSetDbName();
case TABLE_NAME:
return isSetTableName();
case PARTITION_VALS:
return isSetPartitionVals();
case CAT_NAME:
return isSetCatName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof FireEventRequest)
return this.equals((FireEventRequest)that);
return false;
}
public boolean equals(FireEventRequest that) {
if (that == null)
return false;
boolean this_present_successful = true;
boolean that_present_successful = true;
if (this_present_successful || that_present_successful) {
if (!(this_present_successful && that_present_successful))
return false;
if (this.successful != that.successful)
return false;
}
boolean this_present_data = true && this.isSetData();
boolean that_present_data = true && that.isSetData();
if (this_present_data || that_present_data) {
if (!(this_present_data && that_present_data))
return false;
if (!this.data.equals(that.data))
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_partitionVals = true && this.isSetPartitionVals();
boolean that_present_partitionVals = true && that.isSetPartitionVals();
if (this_present_partitionVals || that_present_partitionVals) {
if (!(this_present_partitionVals && that_present_partitionVals))
return false;
if (!this.partitionVals.equals(that.partitionVals))
return false;
}
boolean this_present_catName = true && this.isSetCatName();
boolean that_present_catName = true && that.isSetCatName();
if (this_present_catName || that_present_catName) {
if (!(this_present_catName && that_present_catName))
return false;
if (!this.catName.equals(that.catName))
return false;
}
return true;
}
@Override
public int hashCode() {
List © 2015 - 2025 Weber Informatics LLC | Privacy Policy