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 QueryQueue
public long defaultQueryMemoryPerNode(double cost)
QueryQueue
defaultQueryMemoryPerNode
in interface QueryQueue
public long minimumOperatorMemory()
QueryQueue
minimumOperatorMemory
in interface QueryQueue
public QueryQueue.QueueLease enqueue(UserBitShared.QueryId queryId, double cost) throws QueryQueue.QueryQueueException, QueryQueue.QueueTimeoutException
enqueue
in interface QueryQueue
queryId
- 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.QueryQueueException
QueryQueue.QueueTimeoutException
public boolean enabled()
QueryQueue
enabled
in interface QueryQueue
public DistributedQueryQueue.ZKQueueInfo getInfo()
public void close()
close
in interface QueryQueue
Copyright © 1970 The Apache Software Foundation. All rights reserved.