Tracking an Apache Hive query in YARN

You need to know how to monitor Apache Hive queries in YARN. Using information from the output of query execution in Beeline, you can accomplish this task.

  1. Run a query in Beeline.
    0: jdbc:hive2://ip-10-10-10-10.cloudera.site:> SELECT * from depts a JOIN EMPLOYEE b on a.ID=b.ID;
    INFO  : Compiling command(queryId=hive_1599978188515_5723b397-c375-48c2-ab38-7be298603de9): SELECT * from depts a JOIN EMPLOYEE b on a.ID=b.ID
    ...            
  2. Scroll down the output until you find the INFO containing the YARN App id.
    ...
    INFO : Status: Running (Executing on YARN cluster with App id application_1599978188515_0010)
    ----------------------------------------------------------------------------------------------
            VERTICES      MODE        STATUS  TOTAL  COMPLETED  RUNNING  PENDING  FAILED  KILLED  
    ----------------------------------------------------------------------------------------------
    ...                   
  3. In Cloudera Manager, click Clusters > Yarn > Instances > Web UI.
  4. Click Resource Web UI > Applications
  5. Find the match for the App id and gather information you want.