Apache Drill Resource Management Overview
Agenda
Resource Management - Current State
Resource Management - Enhancements
Resource Management - High Level Workflow
Zookeeper
Drillbit_1 (Foreman)
1. Core Planning with Parallelization info and memory requirement
2. Select queue for the query
3. Check if query can be admitted in queue or has to wait.
4. If admitted then update global state in Zookeeper
5. Execute the query. Send minor fragments to assigned Drillbit
6. On query completion Foreman will update the global states.
Submit Minor Fragments
Submit Minor Fragments
Read/Update Global Cluster State
Submit Query
Drillbit_2
Drillbit_3
Drill Client
Query Response
Resource Management - Planner Changes
Resource Management - Planner Changes ...
Cluster Information.
Query Information.
�
UnionXg
Screen
HashAgg
Filter
Scan
3 2
3 2
3 2
1 0
1 0
19 4
Total Memory per node
Resource Management - Operators
*Assuming operators with batch-sizing and spilling support lives within the assigned memory.
Resource Management - Exchange
Resource Management - Queue Scheduler
Leader Election
Resource Management - Cluster State
Resource Management - New WorkFlow
Zookeeper
Non-Foreman Drillbit_3
Leader of queue Q2
Drillbit_2 (Foreman)
2. Core Planning with parallelization info and cost. Select queue Q1
5. If admit then contact zookeeper to update blobs
8. Query W1 is completed
Drillbit_1 - Leader of queue Q1
3.2 Insert W1 in Q1
10.2 Remove W1 from Q1
1. Submit Query W1
3.1 Ask leader if W1 can be admitted ?
4. Replies with admit /
wait / server busy
6. Update blob as transactions
7. Schedule minor fragments
7. Schedule minor fragments
9. Update blob as transactions
10.1 Query W1 completed
W1
11. Response to Client
Drill Client
Slot for Waiting Queries
Slot for Running Queries
Non-Foreman Drillbit_4
Q&A