org.apache.hadoop.hive.ql.plan.api
Class Query

java.lang.Object
  extended by org.apache.hadoop.hive.ql.plan.api.Query
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Query>, org.apache.thrift.TBase<Query,Query._Fields>

public class Query
extends Object
implements org.apache.thrift.TBase<Query,Query._Fields>, Serializable, Cloneable

See Also:
Serialized Form

Nested Class Summary
static class Query._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
static Map<Query._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
           
 
Constructor Summary
Query()
           
Query(Query other)
          Performs a deep copy on other.
Query(String queryId, String queryType, Map<String,String> queryAttributes, Map<String,Long> queryCounters, Graph stageGraph, List<Stage> stageList, boolean done, boolean started)
           
 
Method Summary
 void addToStageList(Stage elem)
           
 void clear()
           
 int compareTo(Query other)
           
 Query deepCopy()
           
 boolean equals(Object that)
           
 boolean equals(Query that)
           
 Query._Fields fieldForId(int fieldId)
           
 Object getFieldValue(Query._Fields field)
           
 Map<String,String> getQueryAttributes()
           
 int getQueryAttributesSize()
           
 Map<String,Long> getQueryCounters()
           
 int getQueryCountersSize()
           
 String getQueryId()
           
 String getQueryType()
           
 Graph getStageGraph()
           
 List<Stage> getStageList()
           
 Iterator<Stage> getStageListIterator()
           
 int getStageListSize()
           
 int hashCode()
           
 boolean isDone()
           
 boolean isSet(Query._Fields field)
          Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
 boolean isSetDone()
          Returns true if field done is set (has been asigned a value) and false otherwise
 boolean isSetQueryAttributes()
          Returns true if field queryAttributes is set (has been asigned a value) and false otherwise
 boolean isSetQueryCounters()
          Returns true if field queryCounters is set (has been asigned a value) and false otherwise
 boolean isSetQueryId()
          Returns true if field queryId is set (has been asigned a value) and false otherwise
 boolean isSetQueryType()
          Returns true if field queryType is set (has been asigned a value) and false otherwise
 boolean isSetStageGraph()
          Returns true if field stageGraph is set (has been asigned a value) and false otherwise
 boolean isSetStageList()
          Returns true if field stageList is set (has been asigned a value) and false otherwise
 boolean isSetStarted()
          Returns true if field started is set (has been asigned a value) and false otherwise
 boolean isStarted()
           
 void putToQueryAttributes(String key, String val)
           
 void putToQueryCounters(String key, long val)
           
 void read(org.apache.thrift.protocol.TProtocol iprot)
           
 void setDone(boolean done)
           
 void setDoneIsSet(boolean value)
           
 void setFieldValue(Query._Fields field, Object value)
           
 void setQueryAttributes(Map<String,String> queryAttributes)
           
 void setQueryAttributesIsSet(boolean value)
           
 void setQueryCounters(Map<String,Long> queryCounters)
           
 void setQueryCountersIsSet(boolean value)
           
 void setQueryId(String queryId)
           
 void setQueryIdIsSet(boolean value)
           
 void setQueryType(String queryType)
           
 void setQueryTypeIsSet(boolean value)
           
 void setStageGraph(Graph stageGraph)
           
 void setStageGraphIsSet(boolean value)
           
 void setStageList(List<Stage> stageList)
           
 void setStageListIsSet(boolean value)
           
 void setStarted(boolean started)
           
 void setStartedIsSet(boolean value)
           
 String toString()
           
 void unsetDone()
           
 void unsetQueryAttributes()
           
 void unsetQueryCounters()
           
 void unsetQueryId()
           
 void unsetQueryType()
           
 void unsetStageGraph()
           
 void unsetStageList()
           
 void unsetStarted()
           
 void validate()
           
 void write(org.apache.thrift.protocol.TProtocol oprot)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

metaDataMap

public static final Map<Query._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
Constructor Detail

Query

public Query()

Query

public Query(String queryId,
             String queryType,
             Map<String,String> queryAttributes,
             Map<String,Long> queryCounters,
             Graph stageGraph,
             List<Stage> stageList,
             boolean done,
             boolean started)

Query

public Query(Query other)
Performs a deep copy on other.

Method Detail

deepCopy

public Query deepCopy()
Specified by:
deepCopy in interface org.apache.thrift.TBase<Query,Query._Fields>

clear

public void clear()
Specified by:
clear in interface org.apache.thrift.TBase<Query,Query._Fields>

getQueryId

public String getQueryId()

setQueryId

public void setQueryId(String queryId)

unsetQueryId

public void unsetQueryId()

isSetQueryId

public boolean isSetQueryId()
Returns true if field queryId is set (has been asigned a value) and false otherwise


setQueryIdIsSet

public void setQueryIdIsSet(boolean value)

getQueryType

public String getQueryType()

setQueryType

public void setQueryType(String queryType)

unsetQueryType

public void unsetQueryType()

isSetQueryType

public boolean isSetQueryType()
Returns true if field queryType is set (has been asigned a value) and false otherwise


setQueryTypeIsSet

public void setQueryTypeIsSet(boolean value)

getQueryAttributesSize

public int getQueryAttributesSize()

putToQueryAttributes

public void putToQueryAttributes(String key,
                                 String val)

getQueryAttributes

public Map<String,String> getQueryAttributes()

setQueryAttributes

public void setQueryAttributes(Map<String,String> queryAttributes)

unsetQueryAttributes

public void unsetQueryAttributes()

isSetQueryAttributes

public boolean isSetQueryAttributes()
Returns true if field queryAttributes is set (has been asigned a value) and false otherwise


setQueryAttributesIsSet

public void setQueryAttributesIsSet(boolean value)

getQueryCountersSize

public int getQueryCountersSize()

putToQueryCounters

public void putToQueryCounters(String key,
                               long val)

getQueryCounters

public Map<String,Long> getQueryCounters()

setQueryCounters

public void setQueryCounters(Map<String,Long> queryCounters)

unsetQueryCounters

public void unsetQueryCounters()

isSetQueryCounters

public boolean isSetQueryCounters()
Returns true if field queryCounters is set (has been asigned a value) and false otherwise


setQueryCountersIsSet

public void setQueryCountersIsSet(boolean value)

getStageGraph

public Graph getStageGraph()

setStageGraph

public void setStageGraph(Graph stageGraph)

unsetStageGraph

public void unsetStageGraph()

isSetStageGraph

public boolean isSetStageGraph()
Returns true if field stageGraph is set (has been asigned a value) and false otherwise


setStageGraphIsSet

public void setStageGraphIsSet(boolean value)

getStageListSize

public int getStageListSize()

getStageListIterator

public Iterator<Stage> getStageListIterator()

addToStageList

public void addToStageList(Stage elem)

getStageList

public List<Stage> getStageList()

setStageList

public void setStageList(List<Stage> stageList)

unsetStageList

public void unsetStageList()

isSetStageList

public boolean isSetStageList()
Returns true if field stageList is set (has been asigned a value) and false otherwise


setStageListIsSet

public void setStageListIsSet(boolean value)

isDone

public boolean isDone()

setDone

public void setDone(boolean done)

unsetDone

public void unsetDone()

isSetDone

public boolean isSetDone()
Returns true if field done is set (has been asigned a value) and false otherwise


setDoneIsSet

public void setDoneIsSet(boolean value)

isStarted

public boolean isStarted()

setStarted

public void setStarted(boolean started)

unsetStarted

public void unsetStarted()

isSetStarted

public boolean isSetStarted()
Returns true if field started is set (has been asigned a value) and false otherwise


setStartedIsSet

public void setStartedIsSet(boolean value)

setFieldValue

public void setFieldValue(Query._Fields field,
                          Object value)
Specified by:
setFieldValue in interface org.apache.thrift.TBase<Query,Query._Fields>

getFieldValue

public Object getFieldValue(Query._Fields field)
Specified by:
getFieldValue in interface org.apache.thrift.TBase<Query,Query._Fields>

isSet

public boolean isSet(Query._Fields field)
Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise

Specified by:
isSet in interface org.apache.thrift.TBase<Query,Query._Fields>

equals

public boolean equals(Object that)
Overrides:
equals in class Object

equals

public boolean equals(Query that)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Query other)
Specified by:
compareTo in interface Comparable<Query>

fieldForId

public Query._Fields fieldForId(int fieldId)
Specified by:
fieldForId in interface org.apache.thrift.TBase<Query,Query._Fields>

read

public void read(org.apache.thrift.protocol.TProtocol iprot)
          throws org.apache.thrift.TException
Specified by:
read in interface org.apache.thrift.TBase<Query,Query._Fields>
Throws:
org.apache.thrift.TException

write

public void write(org.apache.thrift.protocol.TProtocol oprot)
           throws org.apache.thrift.TException
Specified by:
write in interface org.apache.thrift.TBase<Query,Query._Fields>
Throws:
org.apache.thrift.TException

toString

public String toString()
Overrides:
toString in class Object

validate

public void validate()
              throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException


Copyright © 2011 The Apache Software Foundation