public class EmbeddedQueryQueue extends Object implements QueryQueue
Configuration is via config parameters (not via system options as for the distributed queue.)
| Modifier and Type | Class and Description |
|---|---|
class |
EmbeddedQueryQueue.EmbeddedQueueLease |
QueryQueue.QueryQueueException, QueryQueue.QueueLease, QueryQueue.QueueTimeoutException| Modifier and Type | Field and Description |
|---|---|
static String |
EMBEDDED_QUEUE |
static String |
ENABLED |
static String |
QUEUE_SIZE |
static String |
TIMEOUT_MS |
| Constructor and Description |
|---|
EmbeddedQueryQueue(DrillbitContext context) |
| 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) |
public static String EMBEDDED_QUEUE
public static String ENABLED
public static String QUEUE_SIZE
public static String TIMEOUT_MS
public EmbeddedQueryQueue(DrillbitContext context)
public boolean enabled()
QueryQueueenabled in interface QueryQueuepublic void setMemoryPerNode(long memoryPerNode)
setMemoryPerNode in interface QueryQueuepublic long defaultQueryMemoryPerNode(double cost)
QueryQueuedefaultQueryMemoryPerNode in interface QueryQueuepublic QueryQueue.QueueLease enqueue(UserBitShared.QueryId queryId, double cost) throws QueryQueue.QueueTimeoutException, QueryQueue.QueryQueueException
QueryQueueenqueue in interface QueryQueuequeryId - 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.public void close()
close in interface QueryQueuepublic long minimumOperatorMemory()
QueryQueueminimumOperatorMemory in interface QueryQueueCopyright © 2021 The Apache Software Foundation. All rights reserved.