org.apache.hadoop.hive.ql.plan.api.Query 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.ql.plan.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 Query 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("Query");
private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField QUERY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("queryType", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField QUERY_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("queryAttributes", org.apache.thrift.protocol.TType.MAP, (short)3);
private static final org.apache.thrift.protocol.TField QUERY_COUNTERS_FIELD_DESC = new org.apache.thrift.protocol.TField("queryCounters", org.apache.thrift.protocol.TType.MAP, (short)4);
private static final org.apache.thrift.protocol.TField STAGE_GRAPH_FIELD_DESC = new org.apache.thrift.protocol.TField("stageGraph", org.apache.thrift.protocol.TType.STRUCT, (short)5);
private static final org.apache.thrift.protocol.TField STAGE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("stageList", org.apache.thrift.protocol.TType.LIST, (short)6);
private static final org.apache.thrift.protocol.TField DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("done", org.apache.thrift.protocol.TType.BOOL, (short)7);
private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.BOOL, (short)8);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new QueryStandardSchemeFactory());
schemes.put(TupleScheme.class, new QueryTupleSchemeFactory());
}
private String queryId; // required
private String queryType; // required
private Map queryAttributes; // required
private Map queryCounters; // required
private Graph stageGraph; // required
private List stageList; // required
private boolean done; // required
private boolean started; // 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 {
QUERY_ID((short)1, "queryId"),
QUERY_TYPE((short)2, "queryType"),
QUERY_ATTRIBUTES((short)3, "queryAttributes"),
QUERY_COUNTERS((short)4, "queryCounters"),
STAGE_GRAPH((short)5, "stageGraph"),
STAGE_LIST((short)6, "stageList"),
DONE((short)7, "done"),
STARTED((short)8, "started");
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: // QUERY_ID
return QUERY_ID;
case 2: // QUERY_TYPE
return QUERY_TYPE;
case 3: // QUERY_ATTRIBUTES
return QUERY_ATTRIBUTES;
case 4: // QUERY_COUNTERS
return QUERY_COUNTERS;
case 5: // STAGE_GRAPH
return STAGE_GRAPH;
case 6: // STAGE_LIST
return STAGE_LIST;
case 7: // DONE
return DONE;
case 8: // STARTED
return STARTED;
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 __DONE_ISSET_ID = 0;
private static final int __STARTED_ISSET_ID = 1;
private byte __isset_bitfield = 0;
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.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.QUERY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("queryType", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.QUERY_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("queryAttributes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
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))));
tmpMap.put(_Fields.QUERY_COUNTERS, new org.apache.thrift.meta_data.FieldMetaData("queryCounters", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
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.I64))));
tmpMap.put(_Fields.STAGE_GRAPH, new org.apache.thrift.meta_data.FieldMetaData("stageGraph", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Graph.class)));
tmpMap.put(_Fields.STAGE_LIST, new org.apache.thrift.meta_data.FieldMetaData("stageList", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Stage.class))));
tmpMap.put(_Fields.DONE, new org.apache.thrift.meta_data.FieldMetaData("done", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.STARTED, new org.apache.thrift.meta_data.FieldMetaData("started", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Query.class, metaDataMap);
}
public Query() {
}
public Query(
String queryId,
String queryType,
Map queryAttributes,
Map queryCounters,
Graph stageGraph,
List stageList,
boolean done,
boolean started)
{
this();
this.queryId = queryId;
this.queryType = queryType;
this.queryAttributes = queryAttributes;
this.queryCounters = queryCounters;
this.stageGraph = stageGraph;
this.stageList = stageList;
this.done = done;
setDoneIsSet(true);
this.started = started;
setStartedIsSet(true);
}
/**
* Performs a deep copy on other.
*/
public Query(Query other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetQueryId()) {
this.queryId = other.queryId;
}
if (other.isSetQueryType()) {
this.queryType = other.queryType;
}
if (other.isSetQueryAttributes()) {
Map __this__queryAttributes = new HashMap(other.queryAttributes);
this.queryAttributes = __this__queryAttributes;
}
if (other.isSetQueryCounters()) {
Map __this__queryCounters = new HashMap(other.queryCounters);
this.queryCounters = __this__queryCounters;
}
if (other.isSetStageGraph()) {
this.stageGraph = new Graph(other.stageGraph);
}
if (other.isSetStageList()) {
List __this__stageList = new ArrayList(other.stageList.size());
for (Stage other_element : other.stageList) {
__this__stageList.add(new Stage(other_element));
}
this.stageList = __this__stageList;
}
this.done = other.done;
this.started = other.started;
}
public Query deepCopy() {
return new Query(this);
}
@Override
public void clear() {
this.queryId = null;
this.queryType = null;
this.queryAttributes = null;
this.queryCounters = null;
this.stageGraph = null;
this.stageList = null;
setDoneIsSet(false);
this.done = false;
setStartedIsSet(false);
this.started = false;
}
public String getQueryId() {
return this.queryId;
}
public void setQueryId(String queryId) {
this.queryId = queryId;
}
public void unsetQueryId() {
this.queryId = null;
}
/** Returns true if field queryId is set (has been assigned a value) and false otherwise */
public boolean isSetQueryId() {
return this.queryId != null;
}
public void setQueryIdIsSet(boolean value) {
if (!value) {
this.queryId = null;
}
}
public String getQueryType() {
return this.queryType;
}
public void setQueryType(String queryType) {
this.queryType = queryType;
}
public void unsetQueryType() {
this.queryType = null;
}
/** Returns true if field queryType is set (has been assigned a value) and false otherwise */
public boolean isSetQueryType() {
return this.queryType != null;
}
public void setQueryTypeIsSet(boolean value) {
if (!value) {
this.queryType = null;
}
}
public int getQueryAttributesSize() {
return (this.queryAttributes == null) ? 0 : this.queryAttributes.size();
}
public void putToQueryAttributes(String key, String val) {
if (this.queryAttributes == null) {
this.queryAttributes = new HashMap();
}
this.queryAttributes.put(key, val);
}
public Map getQueryAttributes() {
return this.queryAttributes;
}
public void setQueryAttributes(Map queryAttributes) {
this.queryAttributes = queryAttributes;
}
public void unsetQueryAttributes() {
this.queryAttributes = null;
}
/** Returns true if field queryAttributes is set (has been assigned a value) and false otherwise */
public boolean isSetQueryAttributes() {
return this.queryAttributes != null;
}
public void setQueryAttributesIsSet(boolean value) {
if (!value) {
this.queryAttributes = null;
}
}
public int getQueryCountersSize() {
return (this.queryCounters == null) ? 0 : this.queryCounters.size();
}
public void putToQueryCounters(String key, long val) {
if (this.queryCounters == null) {
this.queryCounters = new HashMap();
}
this.queryCounters.put(key, val);
}
public Map getQueryCounters() {
return this.queryCounters;
}
public void setQueryCounters(Map queryCounters) {
this.queryCounters = queryCounters;
}
public void unsetQueryCounters() {
this.queryCounters = null;
}
/** Returns true if field queryCounters is set (has been assigned a value) and false otherwise */
public boolean isSetQueryCounters() {
return this.queryCounters != null;
}
public void setQueryCountersIsSet(boolean value) {
if (!value) {
this.queryCounters = null;
}
}
public Graph getStageGraph() {
return this.stageGraph;
}
public void setStageGraph(Graph stageGraph) {
this.stageGraph = stageGraph;
}
public void unsetStageGraph() {
this.stageGraph = null;
}
/** Returns true if field stageGraph is set (has been assigned a value) and false otherwise */
public boolean isSetStageGraph() {
return this.stageGraph != null;
}
public void setStageGraphIsSet(boolean value) {
if (!value) {
this.stageGraph = null;
}
}
public int getStageListSize() {
return (this.stageList == null) ? 0 : this.stageList.size();
}
public java.util.Iterator getStageListIterator() {
return (this.stageList == null) ? null : this.stageList.iterator();
}
public void addToStageList(Stage elem) {
if (this.stageList == null) {
this.stageList = new ArrayList();
}
this.stageList.add(elem);
}
public List getStageList() {
return this.stageList;
}
public void setStageList(List stageList) {
this.stageList = stageList;
}
public void unsetStageList() {
this.stageList = null;
}
/** Returns true if field stageList is set (has been assigned a value) and false otherwise */
public boolean isSetStageList() {
return this.stageList != null;
}
public void setStageListIsSet(boolean value) {
if (!value) {
this.stageList = null;
}
}
public boolean isDone() {
return this.done;
}
public void setDone(boolean done) {
this.done = done;
setDoneIsSet(true);
}
public void unsetDone() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DONE_ISSET_ID);
}
/** Returns true if field done is set (has been assigned a value) and false otherwise */
public boolean isSetDone() {
return EncodingUtils.testBit(__isset_bitfield, __DONE_ISSET_ID);
}
public void setDoneIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DONE_ISSET_ID, value);
}
public boolean isStarted() {
return this.started;
}
public void setStarted(boolean started) {
this.started = started;
setStartedIsSet(true);
}
public void unsetStarted() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID);
}
/** Returns true if field started is set (has been assigned a value) and false otherwise */
public boolean isSetStarted() {
return EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID);
}
public void setStartedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case QUERY_ID:
if (value == null) {
unsetQueryId();
} else {
setQueryId((String)value);
}
break;
case QUERY_TYPE:
if (value == null) {
unsetQueryType();
} else {
setQueryType((String)value);
}
break;
case QUERY_ATTRIBUTES:
if (value == null) {
unsetQueryAttributes();
} else {
setQueryAttributes((Map)value);
}
break;
case QUERY_COUNTERS:
if (value == null) {
unsetQueryCounters();
} else {
setQueryCounters((Map)value);
}
break;
case STAGE_GRAPH:
if (value == null) {
unsetStageGraph();
} else {
setStageGraph((Graph)value);
}
break;
case STAGE_LIST:
if (value == null) {
unsetStageList();
} else {
setStageList((List)value);
}
break;
case DONE:
if (value == null) {
unsetDone();
} else {
setDone((Boolean)value);
}
break;
case STARTED:
if (value == null) {
unsetStarted();
} else {
setStarted((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case QUERY_ID:
return getQueryId();
case QUERY_TYPE:
return getQueryType();
case QUERY_ATTRIBUTES:
return getQueryAttributes();
case QUERY_COUNTERS:
return getQueryCounters();
case STAGE_GRAPH:
return getStageGraph();
case STAGE_LIST:
return getStageList();
case DONE:
return isDone();
case STARTED:
return isStarted();
}
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 QUERY_ID:
return isSetQueryId();
case QUERY_TYPE:
return isSetQueryType();
case QUERY_ATTRIBUTES:
return isSetQueryAttributes();
case QUERY_COUNTERS:
return isSetQueryCounters();
case STAGE_GRAPH:
return isSetStageGraph();
case STAGE_LIST:
return isSetStageList();
case DONE:
return isSetDone();
case STARTED:
return isSetStarted();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof Query)
return this.equals((Query)that);
return false;
}
public boolean equals(Query that) {
if (that == null)
return false;
boolean this_present_queryId = true && this.isSetQueryId();
boolean that_present_queryId = true && that.isSetQueryId();
if (this_present_queryId || that_present_queryId) {
if (!(this_present_queryId && that_present_queryId))
return false;
if (!this.queryId.equals(that.queryId))
return false;
}
boolean this_present_queryType = true && this.isSetQueryType();
boolean that_present_queryType = true && that.isSetQueryType();
if (this_present_queryType || that_present_queryType) {
if (!(this_present_queryType && that_present_queryType))
return false;
if (!this.queryType.equals(that.queryType))
return false;
}
boolean this_present_queryAttributes = true && this.isSetQueryAttributes();
boolean that_present_queryAttributes = true && that.isSetQueryAttributes();
if (this_present_queryAttributes || that_present_queryAttributes) {
if (!(this_present_queryAttributes && that_present_queryAttributes))
return false;
if (!this.queryAttributes.equals(that.queryAttributes))
return false;
}
boolean this_present_queryCounters = true && this.isSetQueryCounters();
boolean that_present_queryCounters = true && that.isSetQueryCounters();
if (this_present_queryCounters || that_present_queryCounters) {
if (!(this_present_queryCounters && that_present_queryCounters))
return false;
if (!this.queryCounters.equals(that.queryCounters))
return false;
}
boolean this_present_stageGraph = true && this.isSetStageGraph();
boolean that_present_stageGraph = true && that.isSetStageGraph();
if (this_present_stageGraph || that_present_stageGraph) {
if (!(this_present_stageGraph && that_present_stageGraph))
return false;
if (!this.stageGraph.equals(that.stageGraph))
return false;
}
boolean this_present_stageList = true && this.isSetStageList();
boolean that_present_stageList = true && that.isSetStageList();
if (this_present_stageList || that_present_stageList) {
if (!(this_present_stageList && that_present_stageList))
return false;
if (!this.stageList.equals(that.stageList))
return false;
}
boolean this_present_done = true;
boolean that_present_done = true;
if (this_present_done || that_present_done) {
if (!(this_present_done && that_present_done))
return false;
if (this.done != that.done)
return false;
}
boolean this_present_started = true;
boolean that_present_started = true;
if (this_present_started || that_present_started) {
if (!(this_present_started && that_present_started))
return false;
if (this.started != that.started)
return false;
}
return true;
}
@Override
public int hashCode() {
List © 2015 - 2025 Weber Informatics LLC | Privacy Policy