public class QueryContext extends AbstractQueryContext implements Comparable<QueryContext>
AbstractQueryContext.DriverEstimateRunnable
LOG
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 |
---|---|
int |
compareTo(QueryContext other) |
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.
|
String |
getClusterUser() |
boolean |
getCompressOutput() |
org.apache.hadoop.fs.Path |
getHDFSResultDir() |
String |
getLogHandle()
Get query handle string
|
long |
getMaxResultSplitRows() |
String |
getOuptutFileExtn() |
String |
getQueryHandleString() |
String |
getResultEncoding() |
String |
getResultFooter() |
String |
getResultHeader() |
String |
getResultSetParentDir() |
boolean |
isResultAvailableInDriver() |
void |
setStatus(QueryStatus newStatus) |
boolean |
splitResultIntoMultipleFiles()
Split result into multiple files.
|
LensQuery |
toLensQuery()
To lens query.
|
void |
unSetDriverPersistent()
Set whether result is persisted on driver to false.
|
void |
updateConf(Map<String,String> confoverlay)
Update conf.
|
clearTransientStateAfterCompleted, clearTransientStateAfterLaunch, estimateCostForDrivers, getDatabase, getDriverConf, getDriverEstimateRunnables, getDriverQuery, getDriverQueryCost, getDriverRewriteError, getFinalDriverQuery, getHiveConf, getSelectedDriver, getSelectedDriverConf, getSelectedDriverQuery, getSelectedDriverQueryCost, getSelectedDriverQueryPlan, initTransientState, setDriverQueries, setDriverQuery, setDriverRewriteError, setFinalDriverQuery, setSelectedDriver, setSelectedDriverQuery
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 int compareTo(QueryContext other)
compareTo
in interface Comparable<QueryContext>
public 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 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()
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.