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