Hive is a standout among-st the most essential segment of Hadoop. In past post, we examined about Hive Introduction.Now we need to think about Hadoop Hive Architecture.
The above graph demonstrates the essential Hadoop Hive architecture planning. Essentially, the graph speaks to CLI (Command Line Interface), JDBC/ODBC and Web GUI (Web Graphical User Interface ).This speaks to when client accompanies CLI (Hive Terminal) it straightforwardly joined with Hive Drivers, When User accompanies JDBC/ODBC(JDBC Program) around then by utilizing API(Thrift Server) it associated with Hive driver and when the client accompanies Web GUI(Ambari server) it specifically associated with Hive Driver.
The hive driver gets the tasks(Queries) from user and send to Hadoop architecture.The Hadoop building design uses name node, data node, job tracker and assignment tracker to receive and divide the work what Hive sends to Hadoop (Mapreduce Architecture) .
The underneath chart shows clear inner Hadoop Hive Architecture
The above chart indicates how an average inquiry flows through the system
Step 1 :- The UI calls the execute interface to the Driver
Step 2 :- The Driver makes a session handle for the inquiry and take the query to the compiler to create an execution plan.
Step 3&4 :-The compiler needs the metadata so send a solicitation to get MetaData and gets the send MetaData ask for from MetaStore.
Step 5 :- This metadata is utilized to type check the outflows in the inquiry tree and also to prune allotments taking into account question predicates. Plan created by the compiler is a DAG of stages with every stage being either a guide/diminish work, a metadata operation or an operation on HDFS. For guide/decrease organizes, the plan contains map operator trees (operator trees that are executed on the mappers) and a diminish operator tree (for operations that need reducers).
Step 6 :- The execution engine presents these stages to fit segments (steps 6, 6.1, 6.2 and 6.3). In every undertaking (mapper/reducer) the deserializer connected with the table or initial output is utilized to peruse the columns from HDFS records and these are gone through the related administrator (operator) tree.Once the output produce, it is composed to an impermanent HDFS record however the serializer. The provisional or temporary documents (files) are utilized to give the to resulting guide/decrease phases of the plan.For DML operations the last temporary document is moved to the table's area.
Step 7,8, 9 :- To query, the substance of the temporary file are perused by the execution engine specifically from HDFS as a feature of the bring call from the Driver.
Major Components of Hive
UI :-UI implies User Interface, The client interface for clients to submit questions and different operations to the framework or system.
Driver :-The Driver is utilized to get the quires from UI .This segment actualizes the idea of session handles and gives execute and bring APIs demonstrated on JDBC/ODBC interfaces.
Compiler :- The segment that parses the inquiry, does semantic examination on the distinctive question pieces and question outflows and inevitably creates a plan of an execution with the assistance of the table and part metadata turned upward from the metastore.
MetaStore :- The segment that stores all the structure data of the different tables and partitions in the stockroom including section and section sort data, the serializers and de-serializers important to peruse, compose information and the comparing HDFS documents where the information is put away.
Execution Engine :- The part which executes the execution plan made by the compiler. The plan is DAG of stages. Execution engine deals with the conditions between these distinctive phases of the plan and executes these stages on the proper framework parts.
This is the basic and important theme of hadoop hive architecture