Created on 08-31-2018 03:37 PM - edited 08-17-2019 06:32 AM
Thanks to Christoph Gutsfeld, Matthias von Görbitz and Rene Pajta for all their valuable pointers for writing this article. The article provides a indetailed and thorugh understanding of Hive LLAP.
Understanding YARN
YARN is essentially a system for managing distributed applications. Itconsists of a central Resource manager, which arbitrates all available cluster resources, and a per-node Node Manager, which takes direction from the Resource manager. Resource Manager and node Manager follow a master slave relationship. The Node manager is responsible for managing available resources on a single node. Yarn defines a unit of work in terms of container.. It is available in each node. Application Master negotiates container with the scheduler(one of the component of Resource Manager). Containers are launched by Node Manager
Understanding YARN Memory configuration
Understanding CPU
Memory configuration
Hive LLAP Architecture
https://cwiki.apache.org/confluence/display/Hive/LLAP
known as Live Long
and Process, LLAP provides a hybrid execution model. It consists of a
long-lived daemon which replaces direct interactions with the HDFS Data Node,
and a tightly integrated DAG-based framework.
Functionality such as caching, pre-fetching, some query processing and access
control are moved into the daemon. Small/short queries are largely
processed by this daemon directly, while any heavy lifting will be performed in
standard YARN containers.
Similar to the Data Node, LLAP daemons can be used by other applications as well, especially if a relational view on the data is preferred over file-centric processing. The daemon is also open through optional APIs (e.g., Input Format) that can be leveraged by other data processing frameworks as a building block.
Hive LLAP consists of the following component
LLAP configuration in details
Component | Parameter | Conf Section of Hive | Rule and comments |
SliderSize | slider_am_container_mb | hive-interactive-env | =yarn.scheduler.minimum-allocation-mb |
Tez AM coordinator Size | tez.am.resource.memory.mb | tez-interactive-site | =yarn.scheduler.minimum-allocation-mb |
Number of Cordinators | hive.server2.tez.sessions.per.default.queue | Settings | Number of Concurrent Queries LLAP support. This will result in spawning equal number of TEZ AM. |
LLAP DaemonSize |
hive.llap.daemon.yarn.container.mb | hive-interactive-site | yarn.scheduler.minimum-allocation-mb <= Daemon Size <= yarn.scheduler.maximu-allocation-mb. Rule of thumb always set it to yarn.scheduler.maximu-allocation-mb. |
Number of Daemon |
num_llap_nodes_for_llap_daemons | hive-interactive-env | Number of LLAP Daemons running |
Number of Daemons | num_llap_nodes_for_llap_daemons | hive-interactive-env | Number of LLAP Daemons running. This will determine total Cache and executors available to run any query on LLAP |
ExecutorSize | hive.tez.container.size | hive-interactive-site | 4 – 6 GB is the recommended value. For each executor you need to allocate one VCPU |
Number of Executor | hive.llap.daemon.num.executors | Determined by number of “Maximum VCore in YARN” |
LLAP Daemon configuration in details
Component | PARAMETER NAME | SECTION | Rule and comments |
Maximum YARN container Size | yarn.scheduler.maximu-allocation-mb. | YARN settings | This is the maximum amount of memory a Conatiner can be allocated with. Its Recommended to RUN LLAP daemon as a big Container on a node |
DaemonSize | hive.llap.daemon.yarn.container.mb | hive-interactive-site | yarn.scheduler.minimum-allocation-mb <= Daemon Size <= yarn.scheduler.maximu-allocation-mb. Rule of thumb always set it to yarn.scheduler.maximu-allocation-mb. |
Headroom |
llap_headroom_space | hive-interactive-env | MIN (5% of DaemonSize or 6 GB). Its off heap But part of LLAP Daemon |
HeapSize | llap_heap_size | hive-interactive-env | Number of Executor \* hive.tez.container.size |
Cache Size | hive.llap.io.memory.size | hive-interactive-site | DaemonSize - HeapSize – Headroom. Its off heap but part of LLAP daemon |
LLAP Queue Size | Slider Am Size + Number of Tez Conatiners \* hive.tez.container.size + Size of LLAP Daemon \* Number of LLAP Daemons |
LLAP on YARN
LLAP Interactive Query Configuration.
LLAP YARN Queue
Configuration
Key configurations
to set
LLAP Daemon in Detail
Sizing Rule of Thumb
Parameter Tuning
CACHE
Managing LLAP through Command line Utility (Flex)
Trouble Shooting :
Finding Which Hosts the LLAP daemons are running
Ambari -> Hive -> HiveServer2 Interactive UI -> Running Instances
Behavior
1. In
HDP 2.6.4 preemption of queries is not supported.
2. If multiple concurrent queries have
exhausted the queue then any incoming
query will bin waiting state.
3. All Queries running on Hive LLAP can be seen in the TEZ UI.
Created on 09-17-2018 12:12 PM
Hi Kgautam,
Amazing summarized article for Llap beginners and explorers. I have few questions on this article:
1) "In HDP 2.6.4 preemption of queries is not supported" - We have same HDP version but in grafana it shows tasks' pre-emption time and attempt ?
2) How to enable SSD caching ?(I didn't find any doc online related to enablement for HDP 2.6.4 version)
3) "Run job outside of Llap if possible" - We are facing lot of daemon failure issues while writing large tables(>1TB) in ORC partitioned tables, what is your point of view for running ORC write out of Llap ?