public class QueryContext extends AbstractQueryContext
AbstractQueryContext.DriverEstimateRunnable
Constructor and Description |
---|
QueryContext(PreparedQueryContext prepared,
String user,
LensConf qconf,
org.apache.hadoop.conf.Configuration conf)
Creates context from PreparedQueryContext
|
QueryContext(String query,
String user,
LensConf qconf,
org.apache.hadoop.conf.Configuration conf,
Collection<LensDriver> drivers)
Creates context from query
|
Modifier and Type | Method and Description |
---|---|
static QueryContext |
createContextWithSingleDriver(String query,
String user,
LensConf qconf,
org.apache.hadoop.conf.Configuration conf,
LensDriver driver,
String lensSessionPublicId,
boolean mergeDriverConf)
Utility create method to create context with single driver.
|
Priority |
decidePriority(LensDriver driver,
QueryPriorityDecider queryPriorityDecider) |
boolean |
finished() |
long |
getClosedTime()
The closed time.
|
String |
getClusterUser() |
boolean |
getCompressOutput() |
String |
getDriverOpHandle()
The driver op handle.
|
String |
getDriverResultPath()
The hdfsout path.
|
DriverQueryStatus |
getDriverStatus()
The driver status.
|
long |
getEndTime()
The end time.
|
org.apache.hadoop.fs.Path |
getHDFSResultDir() |
long |
getLaunchTime()
The launch time.
|
String |
getLogHandle()
Get query handle string
|
long |
getMaxResultSplitRows() |
String |
getOuptutFileExtn() |
Priority |
getPriority()
The priority.
|
QueryHandle |
getQueryHandle()
The query handle.
|
String |
getQueryHandleString() |
String |
getQueryName()
The query name.
|
QueryOutputFormatter |
getQueryOutputFormatter()
The query output formatter.
|
String |
getResultEncoding() |
String |
getResultFooter() |
String |
getResultHeader() |
String |
getResultSetParentDir() |
String |
getResultSetPath()
The result set path.
|
com.google.common.collect.ImmutableSet<QueryLaunchingConstraint> |
getSelectedDriverQueryConstraints() |
com.google.common.collect.ImmutableSet<WaitingQueriesSelectionPolicy> |
getSelectedDriverSelectionPolicies() |
QueryStatus |
getStatus()
The status.
|
long |
getSubmissionTime()
The submission time.
|
boolean |
isDriverPersistent()
The is driver persistent.
|
boolean |
isFinishedQueryPersisted()
The finished query persisted.
|
boolean |
isPersistent()
The is persistent.
|
boolean |
isResultAvailableInDriver() |
boolean |
launched() |
boolean |
queued() |
boolean |
running() |
void |
setClosedTime(long closedTime)
The closed time.
|
void |
setDriverOpHandle(String driverOpHandle)
The driver op handle.
|
void |
setDriverResultPath(String driverResultPath)
The hdfsout path.
|
void |
setEndTime(long endTime)
The end time.
|
void |
setFinishedQueryPersisted(boolean finishedQueryPersisted)
The finished query persisted.
|
void |
setLaunchTime(long launchTime)
The launch time.
|
void |
setQueryHandle(QueryHandle queryHandle)
The query handle.
|
void |
setQueryName(String queryName)
The query name.
|
void |
setQueryOutputFormatter(QueryOutputFormatter queryOutputFormatter)
The query output formatter.
|
void |
setResultSetPath(String resultSetPath)
The result set path.
|
void |
setStatus(QueryStatus newStatus) |
void |
setStatusSkippingTransitionTest(QueryStatus newStatus) |
boolean |
splitResultIntoMultipleFiles()
Split result into multiple files.
|
LensQuery |
toLensQuery()
To lens query.
|
String |
toString() |
void |
unSetDriverPersistent()
Set whether result is persisted on driver to false.
|
void |
updateConf(Map<String,String> confoverlay)
Update conf.
|
void |
validateTransition(QueryStatus newStatus) |
clearTransientStateAfterCompleted, clearTransientStateAfterLaunch, estimateCostForDrivers, getConf, getDatabase, getDriverConf, getDriverContext, getDriverEstimateRunnables, getDriverQuery, getDriverQueryCost, getDriverRewriteError, getDriverRewriterPlan, getFinalDriverQuery, getHiveConf, getLensConf, getLensSessionIdentifier, getPhase1RewrittenQuery, getQueue, getSelectedDriver, getSelectedDriverConf, getSelectedDriverQuery, getSelectedDriverQueryCost, getSelectedDriverQueryPlan, getSubmittedUser, getTableWeights, getUserQuery, initTransientState, isDriverQueryExplicitlySet, isOlapQuery, setConf, setDriverContext, setDriverCost, setDriverQueries, setDriverQuery, setDriverRewriteError, setFinalDriverQuery, setLensSessionIdentifier, setOlapQuery, setPhase1RewrittenQuery, setSelectedDriver, setSelectedDriverQuery, setSelectedDriverQueryCost
public QueryContext(String query, String user, LensConf qconf, org.apache.hadoop.conf.Configuration conf, Collection<LensDriver> drivers)
query
- the queryuser
- the userqconf
- The query lensconfconf
- the confpublic QueryContext(PreparedQueryContext prepared, String user, LensConf qconf, org.apache.hadoop.conf.Configuration conf)
prepared
- the prepareduser
- the userqconf
- the qconfconf
- the confpublic static QueryContext createContextWithSingleDriver(String query, String user, LensConf qconf, org.apache.hadoop.conf.Configuration conf, LensDriver driver, String lensSessionPublicId, boolean mergeDriverConf)
query
- The user queryuser
- The submitted queryqconf
- The query lens confconf
- Query configuration object - merged with sessiondriver
- The driverlensSessionPublicId
- The session idpublic void updateConf(Map<String,String> confoverlay)
confoverlay
- the conf to setpublic String getResultSetParentDir()
public org.apache.hadoop.fs.Path getHDFSResultDir()
public LensQuery toLensQuery()
public boolean isResultAvailableInDriver()
public void unSetDriverPersistent()
public void setStatusSkippingTransitionTest(QueryStatus newStatus)
public void setStatus(QueryStatus newStatus) throws LensException
LensException
public String getResultHeader()
public String getResultFooter()
public String getResultEncoding()
public String getOuptutFileExtn()
public boolean getCompressOutput()
public long getMaxResultSplitRows()
public boolean splitResultIntoMultipleFiles()
public String getClusterUser()
public String getLogHandle()
getLogHandle
in class AbstractQueryContext
public String getQueryHandleString()
public void validateTransition(QueryStatus newStatus) throws LensException
LensException
public boolean finished()
public boolean launched()
public boolean running()
public boolean queued()
public com.google.common.collect.ImmutableSet<QueryLaunchingConstraint> getSelectedDriverQueryConstraints()
public com.google.common.collect.ImmutableSet<WaitingQueriesSelectionPolicy> getSelectedDriverSelectionPolicies()
public Priority decidePriority(LensDriver driver, QueryPriorityDecider queryPriorityDecider) throws LensException
LensException
@Generated(value="lombok") public String toString()
@Generated(value="lombok") public QueryHandle getQueryHandle()
@Generated(value="lombok") public void setQueryHandle(QueryHandle queryHandle)
@Generated(value="lombok") public Priority getPriority()
@Generated(value="lombok") public boolean isPersistent()
@Generated(value="lombok") public boolean isDriverPersistent()
@Generated(value="lombok") public QueryStatus getStatus()
@Generated(value="lombok") public String getResultSetPath()
@Generated(value="lombok") public void setResultSetPath(String resultSetPath)
@Generated(value="lombok") public String getDriverResultPath()
@Generated(value="lombok") public void setDriverResultPath(String driverResultPath)
@Generated(value="lombok") public long getSubmissionTime()
@Generated(value="lombok") public long getLaunchTime()
@Generated(value="lombok") public void setLaunchTime(long launchTime)
@Generated(value="lombok") public long getEndTime()
@Generated(value="lombok") public void setEndTime(long endTime)
@Generated(value="lombok") public long getClosedTime()
@Generated(value="lombok") public void setClosedTime(long closedTime)
@Generated(value="lombok") public String getDriverOpHandle()
@Generated(value="lombok") public void setDriverOpHandle(String driverOpHandle)
@Generated(value="lombok") public DriverQueryStatus getDriverStatus()
@Generated(value="lombok") public QueryOutputFormatter getQueryOutputFormatter()
@Generated(value="lombok") public void setQueryOutputFormatter(QueryOutputFormatter queryOutputFormatter)
@Generated(value="lombok") public boolean isFinishedQueryPersisted()
@Generated(value="lombok") public void setFinishedQueryPersisted(boolean finishedQueryPersisted)
@Generated(value="lombok") public String getQueryName()
@Generated(value="lombok") public void setQueryName(String queryName)
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.