Hive Architecture consists of a –
User Interface –
UI component of the Hive architecture calls the execute interface to the driver.
Driver create a session handle to the query and sends the query to the compiler to generate an execution plan for it.
Metastore - Sends the metadata to the compiler for the execution of the query on receiving the sendMetaData request.
Compiler generates the execution plan which is a DAG (Directed Acyclic Graph)of stages where each stage is either a metadata operation, a map or reduce job or an operation on HDFS.
Execution engine is responsible for submitting each of these stages to the relevant components by managing the dependencies between the various stages in the execution plan generated by the compiler.
Directed Acyclic Graph-
Directed Acyclic Graph (DAG) is a tool that depicts the structure of basic blocks, helps to see the flow of values flowing among the basic blocks, and offers optimization too. DAG provides easy transformation on basic blocks. DAG can be understood here:
Leaf nodes represent identifiers, names or constants.
Interior nodes represent operators.
Interior nodes also represent the results of expressions or the identifiers/name where the values are to be stored or assigned.