org.apache.hadoop.hive.ql.plan.api.Graph 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 Graph 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("Graph");
private static final org.apache.thrift.protocol.TField NODE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeType", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField ROOTS_FIELD_DESC = new org.apache.thrift.protocol.TField("roots", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField ADJACENCY_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("adjacencyList", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new GraphStandardSchemeFactory());
schemes.put(TupleScheme.class, new GraphTupleSchemeFactory());
}
private NodeType nodeType; // required
private List roots; // required
private List adjacencyList; // 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 {
/**
*
* @see NodeType
*/
NODE_TYPE((short)1, "nodeType"),
ROOTS((short)2, "roots"),
ADJACENCY_LIST((short)3, "adjacencyList");
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: // NODE_TYPE
return NODE_TYPE;
case 2: // ROOTS
return ROOTS;
case 3: // ADJACENCY_LIST
return ADJACENCY_LIST;
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.NODE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("nodeType", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, NodeType.class)));
tmpMap.put(_Fields.ROOTS, new org.apache.thrift.meta_data.FieldMetaData("roots", 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.ADJACENCY_LIST, new org.apache.thrift.meta_data.FieldMetaData("adjacencyList", 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, Adjacency.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Graph.class, metaDataMap);
}
public Graph() {
}
public Graph(
NodeType nodeType,
List roots,
List adjacencyList)
{
this();
this.nodeType = nodeType;
this.roots = roots;
this.adjacencyList = adjacencyList;
}
/**
* Performs a deep copy on other.
*/
public Graph(Graph other) {
if (other.isSetNodeType()) {
this.nodeType = other.nodeType;
}
if (other.isSetRoots()) {
List __this__roots = new ArrayList(other.roots);
this.roots = __this__roots;
}
if (other.isSetAdjacencyList()) {
List __this__adjacencyList = new ArrayList(other.adjacencyList.size());
for (Adjacency other_element : other.adjacencyList) {
__this__adjacencyList.add(new Adjacency(other_element));
}
this.adjacencyList = __this__adjacencyList;
}
}
public Graph deepCopy() {
return new Graph(this);
}
@Override
public void clear() {
this.nodeType = null;
this.roots = null;
this.adjacencyList = null;
}
/**
*
* @see NodeType
*/
public NodeType getNodeType() {
return this.nodeType;
}
/**
*
* @see NodeType
*/
public void setNodeType(NodeType nodeType) {
this.nodeType = nodeType;
}
public void unsetNodeType() {
this.nodeType = null;
}
/** Returns true if field nodeType is set (has been assigned a value) and false otherwise */
public boolean isSetNodeType() {
return this.nodeType != null;
}
public void setNodeTypeIsSet(boolean value) {
if (!value) {
this.nodeType = null;
}
}
public int getRootsSize() {
return (this.roots == null) ? 0 : this.roots.size();
}
public java.util.Iterator getRootsIterator() {
return (this.roots == null) ? null : this.roots.iterator();
}
public void addToRoots(String elem) {
if (this.roots == null) {
this.roots = new ArrayList();
}
this.roots.add(elem);
}
public List getRoots() {
return this.roots;
}
public void setRoots(List roots) {
this.roots = roots;
}
public void unsetRoots() {
this.roots = null;
}
/** Returns true if field roots is set (has been assigned a value) and false otherwise */
public boolean isSetRoots() {
return this.roots != null;
}
public void setRootsIsSet(boolean value) {
if (!value) {
this.roots = null;
}
}
public int getAdjacencyListSize() {
return (this.adjacencyList == null) ? 0 : this.adjacencyList.size();
}
public java.util.Iterator getAdjacencyListIterator() {
return (this.adjacencyList == null) ? null : this.adjacencyList.iterator();
}
public void addToAdjacencyList(Adjacency elem) {
if (this.adjacencyList == null) {
this.adjacencyList = new ArrayList();
}
this.adjacencyList.add(elem);
}
public List getAdjacencyList() {
return this.adjacencyList;
}
public void setAdjacencyList(List adjacencyList) {
this.adjacencyList = adjacencyList;
}
public void unsetAdjacencyList() {
this.adjacencyList = null;
}
/** Returns true if field adjacencyList is set (has been assigned a value) and false otherwise */
public boolean isSetAdjacencyList() {
return this.adjacencyList != null;
}
public void setAdjacencyListIsSet(boolean value) {
if (!value) {
this.adjacencyList = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case NODE_TYPE:
if (value == null) {
unsetNodeType();
} else {
setNodeType((NodeType)value);
}
break;
case ROOTS:
if (value == null) {
unsetRoots();
} else {
setRoots((List)value);
}
break;
case ADJACENCY_LIST:
if (value == null) {
unsetAdjacencyList();
} else {
setAdjacencyList((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case NODE_TYPE:
return getNodeType();
case ROOTS:
return getRoots();
case ADJACENCY_LIST:
return getAdjacencyList();
}
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 NODE_TYPE:
return isSetNodeType();
case ROOTS:
return isSetRoots();
case ADJACENCY_LIST:
return isSetAdjacencyList();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof Graph)
return this.equals((Graph)that);
return false;
}
public boolean equals(Graph that) {
if (that == null)
return false;
boolean this_present_nodeType = true && this.isSetNodeType();
boolean that_present_nodeType = true && that.isSetNodeType();
if (this_present_nodeType || that_present_nodeType) {
if (!(this_present_nodeType && that_present_nodeType))
return false;
if (!this.nodeType.equals(that.nodeType))
return false;
}
boolean this_present_roots = true && this.isSetRoots();
boolean that_present_roots = true && that.isSetRoots();
if (this_present_roots || that_present_roots) {
if (!(this_present_roots && that_present_roots))
return false;
if (!this.roots.equals(that.roots))
return false;
}
boolean this_present_adjacencyList = true && this.isSetAdjacencyList();
boolean that_present_adjacencyList = true && that.isSetAdjacencyList();
if (this_present_adjacencyList || that_present_adjacencyList) {
if (!(this_present_adjacencyList && that_present_adjacencyList))
return false;
if (!this.adjacencyList.equals(that.adjacencyList))
return false;
}
return true;
}
@Override
public int hashCode() {
List © 2015 - 2025 Weber Informatics LLC | Privacy Policy