com.cloudera.api.model
Class ApiImpalaQuery

java.lang.Object
  extended by com.cloudera.api.model.ApiImpalaQuery

public class ApiImpalaQuery
extends Object

Represents an Impala Query.


Constructor Summary
ApiImpalaQuery()
           
ApiImpalaQuery(String queryId, String statement, String queryType, String queryState, Date startTime, Date endTime, Long rowsProduced, Map<String,String> syntheticAttributes, String user, String frontEndHostId, boolean runtimeProfileAvailable, String defaultDatabase, org.joda.time.Duration duration)
           
 
Method Summary
 Map<String,String> getAttributes()
          A map of additional query attributes which is generated by Cloudera Manager.
 ApiHostRef getCoordinator()
          The host of the Impala Daemon coordinating the query
 String getDatabase()
          The database on which this query was issued.
 boolean getDetailsAvailable()
          Whether we have a detailed runtime profile available for the query.
 Long getDurationMillis()
          The duration of the query in milliseconds.
 Date getEndTime()
          The time the query finished.
 String getQueryId()
          The query id.
 String getQueryState()
          The query state.
 String getQueryType()
          The query type.
 Long getRowsProduced()
          The number of rows produced by the query.
 Date getStartTime()
          The time the query was issued.
 String getStatement()
          The SQL statement for the query.
 String getUser()
          The user who issued this query.
 void setAttributes(Map<String,String> attributes)
           
 void setCoordinator(ApiHostRef coordinator)
           
 void setDatabase(String database)
           
 void setDetailsAvailable(boolean detailsAvailable)
           
 void setDurationMillis(long durationMillis)
           
 void setEndTime(Date endTime)
           
 void setQueryId(String queryId)
           
 void setQueryState(String queryState)
           
 void setQueryType(String queryType)
           
 void setRowsProduced(Long rowsProduced)
           
 void setStartTime(Date startTime)
           
 void setStatement(String statement)
           
 void setUser(String user)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApiImpalaQuery

public ApiImpalaQuery()

ApiImpalaQuery

public ApiImpalaQuery(String queryId,
                      String statement,
                      String queryType,
                      String queryState,
                      Date startTime,
                      Date endTime,
                      Long rowsProduced,
                      Map<String,String> syntheticAttributes,
                      String user,
                      String frontEndHostId,
                      boolean runtimeProfileAvailable,
                      String defaultDatabase,
                      org.joda.time.Duration duration)
Method Detail

getQueryId

public String getQueryId()
The query id.


setQueryId

public void setQueryId(String queryId)

getStatement

public String getStatement()
The SQL statement for the query.


setStatement

public void setStatement(String statement)

getQueryType

public String getQueryType()
The query type. The possible values are: DML, DDL, QUERY and UNKNOWN. See the Impala documentation for more details.


setQueryType

public void setQueryType(String queryType)

getQueryState

public String getQueryState()
The query state. The possible values are: CREATED, INITIALIZED, COMPILED, RUNNING, FINISHED, EXCEPTION, and UNKNOWN. See the Impala documentation for more details.


setQueryState

public void setQueryState(String queryState)

getStartTime

public Date getStartTime()
The time the query was issued.


setStartTime

public void setStartTime(Date startTime)

getEndTime

public Date getEndTime()
The time the query finished. If the query hasn't finished then this will return null.


setEndTime

public void setEndTime(Date endTime)

getRowsProduced

public Long getRowsProduced()
The number of rows produced by the query. If the query hasn't completed this will return null.


setRowsProduced

public void setRowsProduced(Long rowsProduced)

getAttributes

public Map<String,String> getAttributes()
A map of additional query attributes which is generated by Cloudera Manager.


setAttributes

public void setAttributes(Map<String,String> attributes)

getUser

public String getUser()
The user who issued this query.


setUser

public void setUser(String user)

getCoordinator

public ApiHostRef getCoordinator()
The host of the Impala Daemon coordinating the query


setCoordinator

public void setCoordinator(ApiHostRef coordinator)

getDetailsAvailable

public boolean getDetailsAvailable()
Whether we have a detailed runtime profile available for the query. This profile is available at the endpoint /queries/{QUERY_ID}.


setDetailsAvailable

public void setDetailsAvailable(boolean detailsAvailable)

getDatabase

public String getDatabase()
The database on which this query was issued.


setDatabase

public void setDatabase(String database)

getDurationMillis

public Long getDurationMillis()
The duration of the query in milliseconds. If the query hasn't completed then this will return null.


setDurationMillis

public void setDurationMillis(long durationMillis)

toString

public String toString()
Overrides:
toString in class Object


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.