public interface QueryQueue
A queue can report itself as enabled or disabled. When enabled, all queries must obtain a lease prior to starting execution. The lease must be released at the completion of execution.
Modifier and Type | Interface and Description |
---|---|
static class |
QueryQueue.QueryQueueException
Exception thrown for all non-timeout error conditions.
|
static interface |
QueryQueue.QueueLease
The opaque lease returned once a query is admitted
for execution.
|
static class |
QueryQueue.QueueTimeoutException
Exception thrown if a query exceeds the configured wait time
in the query queue.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
defaultQueryMemoryPerNode(double cost)
Return the amount of memory per node when creating a EXPLAIN
query plan.
|
boolean |
enabled()
Determine if the queue is enabled.
|
QueryQueue.QueueLease |
enqueue(UserBitShared.QueryId queryId,
double cost)
Queue a query.
|
long |
minimumOperatorMemory()
Optional floor on the amount of memory assigned per operator.
|
void |
setMemoryPerNode(long memoryPerNode) |
void setMemoryPerNode(long memoryPerNode)
long defaultQueryMemoryPerNode(double cost)
long minimumOperatorMemory()
boolean enabled()
QueryQueue.QueueLease enqueue(UserBitShared.QueryId queryId, double cost) throws QueryQueue.QueueTimeoutException, QueryQueue.QueryQueueException
queryId
- the query IDcost
- the cost of the query used for cost-based queueing#release(QueueLease)
upon query completionQueryQueue.QueueTimeoutException
- if the query times out waiting to be
admitted.QueryQueue.QueryQueueException
- for any other error condition.void close()
Copyright © 1970 The Apache Software Foundation. All rights reserved.