Class EmbeddedQueryQueue
java.lang.Object
org.apache.drill.exec.work.foreman.rm.EmbeddedQueryQueue
- All Implemented Interfaces:
QueryQueue
Query queue to be used in an embedded Drillbit. This queue has scope of only
the one Drillbit (not even multiple Drillbits in the same process.) Primarily
intended for testing, but may possibly be useful for other embedded
applications.
Configuration is via config parameters (not via system options as for the distributed queue.)
- drill.queue.embedded.enabled
- Set to true to enable the embedded queue. But, this setting has effect only if the Drillbit is, in fact, embedded.
- drill.queue.embedded.size
- The number of active queries, all others queue. There is no upper limit on the number of queued entries.
- drill.queue.embedded.timeout_ms
- The maximum time a query will wait in the queue before failing.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.exec.work.foreman.rm.QueryQueue
QueryQueue.QueryQueueException, QueryQueue.QueueLease, QueryQueue.QueueTimeoutException
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.enqueue
(UserBitShared.QueryId queryId, double cost) Queue a query.long
Optional floor on the amount of memory assigned per operator.void
setMemoryPerNode
(long memoryPerNode)
-
Field Details
-
EMBEDDED_QUEUE
-
ENABLED
-
QUEUE_SIZE
-
TIMEOUT_MS
-
-
Constructor Details
-
EmbeddedQueryQueue
-
-
Method Details
-
enabled
public boolean enabled()Description copied from interface:QueryQueue
Determine if the queue is enabled.- Specified by:
enabled
in interfaceQueryQueue
- Returns:
- true if the query is enabled, false otherwise.
-
setMemoryPerNode
public void setMemoryPerNode(long memoryPerNode) - Specified by:
setMemoryPerNode
in interfaceQueryQueue
-
defaultQueryMemoryPerNode
public long defaultQueryMemoryPerNode(double cost) Description copied from interface:QueryQueue
Return the amount of memory per node when creating a EXPLAIN query plan. Plans to be executed should get the query memory from the lease, as the lease may adjust the default amount on a per-query basis. This means that the memory used to execute the query may differ from the amount shown in an EXPLAIN plan.- Specified by:
defaultQueryMemoryPerNode
in interfaceQueryQueue
- Returns:
- assumed memory per node, in bytes, to use when creating an EXPLAIN plan
-
close
public void close()- Specified by:
close
in interfaceQueryQueue
-
minimumOperatorMemory
public long minimumOperatorMemory()Description copied from interface:QueryQueue
Optional floor on the amount of memory assigned per operator. This ensures that operators receive a certain amount, separate from any memory slicing. This can oversubscribe node memory if used incorrectly.- Specified by:
minimumOperatorMemory
in interfaceQueryQueue
- Returns:
- minimum per-operator memory, in bytes
-