public class Driver extends Object implements IDriver
| Constructor and Description |
|---|
Driver(HiveConf conf) |
Driver(HiveConf conf,
Context ctx,
LineageState lineageState) |
Driver(QueryState queryState) |
Driver(QueryState queryState,
long analyzeTableWriteId) |
Driver(QueryState queryState,
QueryInfo queryInfo) |
Driver(QueryState queryState,
QueryInfo queryInfo,
HiveTxnManager txnManager) |
Driver(QueryState queryState,
ValidWriteIdList compactionWriteIds,
long compactorTxnId) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
compile(String command,
boolean resetTaskIds)
Compiles a new HQL command, but potentially resets taskID counter.
|
void |
compile(String command,
boolean resetTaskIds,
boolean deferClose)
Compiles an HQL command, creates an execution plan for it.
|
CommandProcessorResponse |
compileAndRespond(String command) |
CommandProcessorResponse |
compileAndRespond(String command,
boolean cleanupTxnList) |
void |
destroy() |
HiveConf |
getConf() |
Context |
getContext() |
FetchTask |
getFetchTask() |
HookRunner |
getHookRunner() |
QueryPlan |
getPlan() |
PlanMapper |
getPlanMapper() |
QueryDisplay |
getQueryDisplay() |
QueryState |
getQueryState() |
boolean |
getResults(List results) |
org.apache.hadoop.hive.metastore.api.Schema |
getSchema() |
StatsSource |
getStatsSource() |
boolean |
hasResultSet() |
boolean |
isFetchingTable() |
void |
lockAndRespond() |
void |
releaseLocksAndCommitOrRollback(boolean commit) |
void |
releaseLocksAndCommitOrRollback(boolean commit,
HiveTxnManager txnManager) |
void |
releaseResources()
Release some resources after a query is executed while keeping the result around.
|
void |
resetFetch() |
CommandProcessorResponse |
run()
Executes a previously compiled HQL command.
|
CommandProcessorResponse |
run(String command)
Compiles and executes an HQL command.
|
void |
setMaxRows(int maxRows)
Set the maximum number of rows returned by getResults.
|
void |
setOperationId(String operationId)
Set the HS2 operation handle's guid string.
|
void |
setStatsSource(StatsSource runtimeStatsSource) |
public Driver(HiveConf conf)
public Driver(HiveConf conf, Context ctx, LineageState lineageState)
public Driver(QueryState queryState)
public Driver(QueryState queryState, QueryInfo queryInfo)
public Driver(QueryState queryState, ValidWriteIdList compactionWriteIds, long compactorTxnId)
public Driver(QueryState queryState, long analyzeTableWriteId)
public Driver(QueryState queryState, QueryInfo queryInfo, HiveTxnManager txnManager)
public Context getContext()
getContext in interface IDriverpublic CommandProcessorResponse run(String command) throws CommandProcessorException
run in interface IDriverrun in interface CommandProcessorCommandProcessorExceptionpublic CommandProcessorResponse run() throws CommandProcessorException
run in interface IDriverCommandProcessorExceptionpublic void lockAndRespond()
throws CommandProcessorException
CommandProcessorExceptionpublic CommandProcessorResponse compileAndRespond(String command) throws CommandProcessorException
compileAndRespond in interface IDriverCommandProcessorExceptionpublic CommandProcessorResponse compileAndRespond(String command, boolean cleanupTxnList) throws CommandProcessorException
CommandProcessorExceptionpublic int compile(String command, boolean resetTaskIds)
command - The HiveQL query to compileresetTaskIds - Resets taskID counter if true.public void compile(String command, boolean resetTaskIds, boolean deferClose) throws CommandProcessorException
command - The HiveQL query to compileresetTaskIds - Resets taskID counter if true.deferClose - indicates if the close/destroy should be deferred when the process has been interrupted, it
should be set to true if the compile is called within another method like runInternal, which defers the
close to the called in that method.CommandProcessorExceptionpublic QueryPlan getPlan()
public FetchTask getFetchTask()
getFetchTask in interface IDriverpublic void releaseLocksAndCommitOrRollback(boolean commit)
throws LockException
LockExceptionpublic void releaseLocksAndCommitOrRollback(boolean commit,
HiveTxnManager txnManager)
throws LockException
commit - if there is an open transaction and if true, commit,
if false rollback. If there is no open transaction this parameter is ignored.txnManager - an optional existing transaction manager retrieved earlier from the sessionLockExceptionpublic void releaseResources()
public PlanMapper getPlanMapper()
public boolean isFetchingTable()
isFetchingTable in interface IDriverpublic org.apache.hadoop.hive.metastore.api.Schema getSchema()
public boolean hasResultSet()
hasResultSet in interface IDriverpublic void resetFetch()
throws IOException
resetFetch in interface IDriverIOExceptionpublic void setMaxRows(int maxRows)
setMaxRows in interface IDriverpublic boolean getResults(List results) throws IOException
getResults in interface IDriverIOExceptionpublic void close()
close in interface AutoCloseableclose in interface IDriverpublic QueryDisplay getQueryDisplay()
getQueryDisplay in interface IDriverpublic void setOperationId(String operationId)
setOperationId in interface IDriveroperationId - base64 encoded guid stringpublic QueryState getQueryState()
getQueryState in interface IDriverpublic HookRunner getHookRunner()
public void setStatsSource(StatsSource runtimeStatsSource)
public StatsSource getStatsSource()
Copyright © 2024 The Apache Software Foundation. All rights reserved.