org.apache.hadoop.hive.metastore.api.SkewedInfo 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 Trino
/**
* 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.trino.hive.$internal.org.slf4j.Logger;
import io.trino.hive.$internal.org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
public class SkewedInfo 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("SkewedInfo");
private static final org.apache.thrift.protocol.TField SKEWED_COL_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("skewedColNames", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField SKEWED_COL_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("skewedColValues", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField SKEWED_COL_VALUE_LOCATION_MAPS_FIELD_DESC = new org.apache.thrift.protocol.TField("skewedColValueLocationMaps", org.apache.thrift.protocol.TType.MAP, (short)3);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new SkewedInfoStandardSchemeFactory());
schemes.put(TupleScheme.class, new SkewedInfoTupleSchemeFactory());
}
private List skewedColNames; // required
private List> skewedColValues; // required
private Map,String> skewedColValueLocationMaps; // 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 {
SKEWED_COL_NAMES((short)1, "skewedColNames"),
SKEWED_COL_VALUES((short)2, "skewedColValues"),
SKEWED_COL_VALUE_LOCATION_MAPS((short)3, "skewedColValueLocationMaps");
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: // SKEWED_COL_NAMES
return SKEWED_COL_NAMES;
case 2: // SKEWED_COL_VALUES
return SKEWED_COL_VALUES;
case 3: // SKEWED_COL_VALUE_LOCATION_MAPS
return SKEWED_COL_VALUE_LOCATION_MAPS;
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
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.SKEWED_COL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("skewedColNames", org.apache.thrift.TFieldRequirementType.DEFAULT,
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.SKEWED_COL_VALUES, new org.apache.thrift.meta_data.FieldMetaData("skewedColValues", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
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.SKEWED_COL_VALUE_LOCATION_MAPS, new org.apache.thrift.meta_data.FieldMetaData("skewedColValueLocationMaps", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
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)),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SkewedInfo.class, metaDataMap);
}
public SkewedInfo() {
}
public SkewedInfo(
List skewedColNames,
List> skewedColValues,
Map,String> skewedColValueLocationMaps)
{
this();
this.skewedColNames = skewedColNames;
this.skewedColValues = skewedColValues;
this.skewedColValueLocationMaps = skewedColValueLocationMaps;
}
/**
* Performs a deep copy on other.
*/
public SkewedInfo(SkewedInfo other) {
if (other.isSetSkewedColNames()) {
List __this__skewedColNames = new ArrayList(other.skewedColNames);
this.skewedColNames = __this__skewedColNames;
}
if (other.isSetSkewedColValues()) {
List> __this__skewedColValues = new ArrayList>(other.skewedColValues.size());
for (List other_element : other.skewedColValues) {
List __this__skewedColValues_copy = new ArrayList(other_element);
__this__skewedColValues.add(__this__skewedColValues_copy);
}
this.skewedColValues = __this__skewedColValues;
}
if (other.isSetSkewedColValueLocationMaps()) {
Map,String> __this__skewedColValueLocationMaps = new HashMap,String>(other.skewedColValueLocationMaps.size());
for (Map.Entry, String> other_element : other.skewedColValueLocationMaps.entrySet()) {
List other_element_key = other_element.getKey();
String other_element_value = other_element.getValue();
List __this__skewedColValueLocationMaps_copy_key = new ArrayList(other_element_key);
String __this__skewedColValueLocationMaps_copy_value = other_element_value;
__this__skewedColValueLocationMaps.put(__this__skewedColValueLocationMaps_copy_key, __this__skewedColValueLocationMaps_copy_value);
}
this.skewedColValueLocationMaps = __this__skewedColValueLocationMaps;
}
}
public SkewedInfo deepCopy() {
return new SkewedInfo(this);
}
@Override
public void clear() {
this.skewedColNames = null;
this.skewedColValues = null;
this.skewedColValueLocationMaps = null;
}
public int getSkewedColNamesSize() {
return (this.skewedColNames == null) ? 0 : this.skewedColNames.size();
}
public java.util.Iterator getSkewedColNamesIterator() {
return (this.skewedColNames == null) ? null : this.skewedColNames.iterator();
}
public void addToSkewedColNames(String elem) {
if (this.skewedColNames == null) {
this.skewedColNames = new ArrayList();
}
this.skewedColNames.add(elem);
}
public List getSkewedColNames() {
return this.skewedColNames;
}
public void setSkewedColNames(List skewedColNames) {
this.skewedColNames = skewedColNames;
}
public void unsetSkewedColNames() {
this.skewedColNames = null;
}
/** Returns true if field skewedColNames is set (has been assigned a value) and false otherwise */
public boolean isSetSkewedColNames() {
return this.skewedColNames != null;
}
public void setSkewedColNamesIsSet(boolean value) {
if (!value) {
this.skewedColNames = null;
}
}
public int getSkewedColValuesSize() {
return (this.skewedColValues == null) ? 0 : this.skewedColValues.size();
}
public java.util.Iterator> getSkewedColValuesIterator() {
return (this.skewedColValues == null) ? null : this.skewedColValues.iterator();
}
public void addToSkewedColValues(List elem) {
if (this.skewedColValues == null) {
this.skewedColValues = new ArrayList>();
}
this.skewedColValues.add(elem);
}
public List> getSkewedColValues() {
return this.skewedColValues;
}
public void setSkewedColValues(List> skewedColValues) {
this.skewedColValues = skewedColValues;
}
public void unsetSkewedColValues() {
this.skewedColValues = null;
}
/** Returns true if field skewedColValues is set (has been assigned a value) and false otherwise */
public boolean isSetSkewedColValues() {
return this.skewedColValues != null;
}
public void setSkewedColValuesIsSet(boolean value) {
if (!value) {
this.skewedColValues = null;
}
}
public int getSkewedColValueLocationMapsSize() {
return (this.skewedColValueLocationMaps == null) ? 0 : this.skewedColValueLocationMaps.size();
}
public void putToSkewedColValueLocationMaps(List key, String val) {
if (this.skewedColValueLocationMaps == null) {
this.skewedColValueLocationMaps = new HashMap,String>();
}
this.skewedColValueLocationMaps.put(key, val);
}
public Map,String> getSkewedColValueLocationMaps() {
return this.skewedColValueLocationMaps;
}
public void setSkewedColValueLocationMaps(Map,String> skewedColValueLocationMaps) {
this.skewedColValueLocationMaps = skewedColValueLocationMaps;
}
public void unsetSkewedColValueLocationMaps() {
this.skewedColValueLocationMaps = null;
}
/** Returns true if field skewedColValueLocationMaps is set (has been assigned a value) and false otherwise */
public boolean isSetSkewedColValueLocationMaps() {
return this.skewedColValueLocationMaps != null;
}
public void setSkewedColValueLocationMapsIsSet(boolean value) {
if (!value) {
this.skewedColValueLocationMaps = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SKEWED_COL_NAMES:
if (value == null) {
unsetSkewedColNames();
} else {
setSkewedColNames((List)value);
}
break;
case SKEWED_COL_VALUES:
if (value == null) {
unsetSkewedColValues();
} else {
setSkewedColValues((List>)value);
}
break;
case SKEWED_COL_VALUE_LOCATION_MAPS:
if (value == null) {
unsetSkewedColValueLocationMaps();
} else {
setSkewedColValueLocationMaps((Map,String>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SKEWED_COL_NAMES:
return getSkewedColNames();
case SKEWED_COL_VALUES:
return getSkewedColValues();
case SKEWED_COL_VALUE_LOCATION_MAPS:
return getSkewedColValueLocationMaps();
}
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 SKEWED_COL_NAMES:
return isSetSkewedColNames();
case SKEWED_COL_VALUES:
return isSetSkewedColValues();
case SKEWED_COL_VALUE_LOCATION_MAPS:
return isSetSkewedColValueLocationMaps();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof SkewedInfo)
return this.equals((SkewedInfo)that);
return false;
}
public boolean equals(SkewedInfo that) {
if (that == null)
return false;
boolean this_present_skewedColNames = true && this.isSetSkewedColNames();
boolean that_present_skewedColNames = true && that.isSetSkewedColNames();
if (this_present_skewedColNames || that_present_skewedColNames) {
if (!(this_present_skewedColNames && that_present_skewedColNames))
return false;
if (!this.skewedColNames.equals(that.skewedColNames))
return false;
}
boolean this_present_skewedColValues = true && this.isSetSkewedColValues();
boolean that_present_skewedColValues = true && that.isSetSkewedColValues();
if (this_present_skewedColValues || that_present_skewedColValues) {
if (!(this_present_skewedColValues && that_present_skewedColValues))
return false;
if (!this.skewedColValues.equals(that.skewedColValues))
return false;
}
boolean this_present_skewedColValueLocationMaps = true && this.isSetSkewedColValueLocationMaps();
boolean that_present_skewedColValueLocationMaps = true && that.isSetSkewedColValueLocationMaps();
if (this_present_skewedColValueLocationMaps || that_present_skewedColValueLocationMaps) {
if (!(this_present_skewedColValueLocationMaps && that_present_skewedColValueLocationMaps))
return false;
if (!this.skewedColValueLocationMaps.equals(that.skewedColValueLocationMaps))
return false;
}
return true;
}
@Override
public int hashCode() {
List