public class DistributedQueryQueue extends Object implements QueryQueue
This queue is configured using system options:
The above values are refreshed every five seconds. This aids performance a bit in systems with very high query arrival rates.
| Modifier and Type | Class and Description |
|---|---|
static interface |
DistributedQueryQueue.StatusAdapter |
static class |
DistributedQueryQueue.ZKQueueInfo
Exposes a snapshot of internal state information for use in status
reporting, such as in the UI.
|
QueryQueue.QueryQueueException, QueryQueue.QueueLease, QueryQueue.QueueTimeoutException| Constructor and Description |
|---|
DistributedQueryQueue(DrillbitContext context,
DistributedQueryQueue.StatusAdapter adapter) |
| 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)
This limits the number of "small" and "large" queries that a Drill cluster will run
simultaneously, if queuing is enabled.
|
DistributedQueryQueue.ZKQueueInfo |
getInfo() |
long |
minimumOperatorMemory()
Optional floor on the amount of memory assigned per operator.
|
void |
setMemoryPerNode(long memoryPerNode) |
public DistributedQueryQueue(DrillbitContext context, DistributedQueryQueue.StatusAdapter adapter)
public void setMemoryPerNode(long memoryPerNode)
setMemoryPerNode in interface QueryQueuepublic long defaultQueryMemoryPerNode(double cost)
QueryQueuedefaultQueryMemoryPerNode in interface QueryQueuepublic long minimumOperatorMemory()
QueryQueueminimumOperatorMemory in interface QueryQueuepublic QueryQueue.QueueLease enqueue(UserBitShared.QueryId queryId, double cost) throws QueryQueue.QueryQueueException, QueryQueue.QueueTimeoutException
enqueue in interface QueryQueuequeryId - query identifiercost - the query plan#release(QueueLease)
upon query completionQueryQueueException - if the underlying ZK queuing mechanism failsQueueTimeoutException - if the query waits too long in the
queueQueryQueue.QueryQueueExceptionQueryQueue.QueueTimeoutExceptionpublic boolean enabled()
QueryQueueenabled in interface QueryQueuepublic DistributedQueryQueue.ZKQueueInfo getInfo()
public void close()
close in interface QueryQueueCopyright © 2021 The Apache Software Foundation. All rights reserved.