SlideShare a Scribd company logo
1 of 23
Download to read offline
HAWK : Performance Monitoring Hive
                            Introduction



                                                      JunHo Cho
                                            Data Analysis Platform Team




Friday, November 11, 11
Reasons related to Hive performance



                •         Inefficient hive query

                •         Not suitable configuration of hadoop, hive and system

                •         Bad distributed strategy of data

                •         System problems




Friday, November 11, 11
How to find out the reason?


                            •   Hive

                                •   Hive plan

                                •   Hive log

                            •   Hadoop

                                •   MapReduce monitoring

                                •   Hadoop job log

                            •   System



Friday, November 11, 11
How to find out the reason ?
          ABSTRACT SYNTAX TREE:
            (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF emp e) (TOK_TABREF dept d) (= (. (TOK_TABLE_OR_COL e) deptno) (. (TOK_TABLE_OR_COL d) deptno)))) (TOK_INSERT
          (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL e) empno)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL e) ename)) (TOK_SELEXPR
          (. (TOK_TABLE_OR_COL d) dname))) (TOK_WHERE (= (. (TOK_TABLE_OR_COL d) deptno) 30))))

          STAGE DEPENDENCIES:
            Stage-1 is a root stage




                                                                                                                                                                        •
            Stage-0 is a root stage




                                                                                                                                                                            Hive
          STAGE PLANS:
            Stage: Stage-1

              Map Reduce
               Alias -> Map Operator Tree:
                  d

                      TableScan




                                                                                                                                                                            •
                       alias: d

                        Filter Operator


                                                                                                                                                                                Hive plan
                         predicate:
                             expr: (deptno = 30)
                             type: boolean
                         Reduce Output Operator
                           key expressions:
                                  expr: deptno
                                  type: int
                           sort order: +




                                                                     # of MapReduce Job
                                                                                                                                                                            •
                           Map-reduce partition columns:
                                  expr: deptno
                                  type: int




                                                                                                                                                                                Hive log
                           tag: 1
                           value expressions:
                                  expr: deptno




                                                                     Data Source/Target
                                  type: int
                                  expr: dname
                                  type: string
                  e

                      TableScan




                                                                                                                                                                        •
                       alias: e




                                                                     Operators
                       Reduce Output Operator




                                                                                                                                                                            Hadoop
                         key expressions:
                                expr: deptno
                                type: int
                         sort order: +
                         Map-reduce partition columns:
                                expr: deptno
                                type: int
                         tag: 0




                                                                                                                                                                            •
                         value expressions:
                                expr: empno
                                type: int




                                                                                                                                                                                MapReduce monitoring
                                expr: ename
                                type: string

                Reduce Operator Tree:
                  Join Operator
                    condition map:
                         Inner Join 0 to 1
                    condition expressions:




                                                                                                                                                                            •
                      0 {VALUE._col0} {VALUE._col1}
                      1 {VALUE._col0} {VALUE._col1}
                    handleSkewJoin: false




                                                                                                                                                                                Hadoop job log
                    outputColumnNames: _col0, _col1, _col4, _col5

                      Filter Operator
                       predicate:
                           expr: (_col4 = 30)
                           type: boolean
                       Select Operator
                         expressions:




                                                                                                                                                                        •
                               expr: _col0
                               type: int
                               expr: _col1




                                                                                                                                                                            System
                               type: string
                               expr: _col5
                               type: string
                         outputColumnNames: _col0, _col1, _col2
                         File Output Operator
                           compressed: false
                           GlobalTableId: 0
                           table:
                               input format: org.apache.hadoop.mapred.TextInputFormat
                               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

            Stage: Stage-0

              Fetch Operator
                limit: -1




Friday, November 11, 11
How to find out the reason ?
      essionStart SESSION_ID="nexr_201111060248" TIME="1320509893783"
      QueryStart QUERY_STRING="select ename from emp" QUERY_ID="nexr_20111106024848_36387a27-924a-4d03-9614-
      e9ab5a86898a" TIME="1320509912081"
      Counters plan="{"queryId":"nexr_20111106024848_36387a27-924a-4d03-9614-e9ab5a86898a","queryType":null,"queryAttributes":




                                                                                                                                                  •
      {"queryString":"select ename from emp"},"queryCounters":"null","stageGraph":
      {"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":
      [{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":
      [{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":
      {"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},
      {"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":
                                                                                                                                                      Hive
      [{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":




                                                                                                                                                      •
      {"alias":"emp"},"operatorCounters":"null","done":"false","started":"false"},


                                                                                                                                                          Hive plan
      {"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":
      {"expressions":"ename"},"operatorCounters":"null","done":"false","started":"false"},
      {"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"
      done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}" TIME="1320509912095"
      TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_ID="Stage-1"




                                                                                                                                                      •
      QUERY_ID="nexr_20111106024848_36387a27-924a-4d03-9614-e9ab5a86898a" TIME="1320509912099"
      TaskProgress TASK_HADOOP_PROGRESS="2011-11-06 02:48:38,867 Stage-1 map = 0%, reduce = 0%" TASK_NUM_REDUCERS="0"
      TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1"
                                                                                                                                                          Hive log
                      ry ID e
      TASK_COUNTERS="org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0,Job



                                         obID
      Counters .SLOTS_MILLIS_MAPS:3081,Job Counters .Launched map tasks:1,Job Counters .Data-local map tasks:1,Map-Reduce



                Qu  e                to J
      Framework.CPU_MILLISECONDS:0" TASK_ID="Stage-1" QUERY_ID="nexr_20111106024848_36387a27-924a-4d03-9614-


                             m
      e9ab5a86898a" TASK_HADOOP_ID="job_201111060121_0001" TIME="1320509918868"



                        d Ti   rator                                                                                                              •
      ...

                  lapse MROpe                                                                                                                         Hadoop
      TaskEnd TASK_RET_CODE="0" TASK_HADOOP_PROGRESS="2011-11-06 02:48:45,986 Stage-1 map = 100%, reduce = 100%"


                E
      TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1"
      TASK_COUNTERS="org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:1,Job



                     pping
      Counters .SLOTS_MILLIS_MAPS:8909,Job Counters .Total time spent by all reduces waiting after reserving slots (ms):0,Job
      Counters .Total time spent by all maps waiting after reserving slots (ms):0,Job Counters .Launched map tasks:1,Job Counters .Data-local


                 Ma                                                                                                                                   •
      map tasks:1,Job Counters .SLOTS_MILLIS_REDUCES:0,FileSystemCounters.HDFS_BYTES_READ:


                                                                                                                                                          MapReduce monitoring
      512,FileSystemCounters.FILE_BYTES_WRITTEN:81235,FileSystemCounters.HDFS_BYTES_WRITTEN:
      37,org.apache.hadoop.hive.ql.exec.MapOperator$Counter.DESERIALIZE_ERRORS:0,Map-Reduce Framework.Map input records:8,Map-
      Reduce Framework.Spilled Records:0,Map-Reduce Framework.CPU_MILLISECONDS:0,Map-Reduce Framework.Map input bytes:
      0,Map-Reduce Framework.Map output records:0,Map-Reduce Framework.SPLIT_RAW_BYTES:173" TASK_ID="Stage-1"
      QUERY_ID="nexr_20111106024848_36387a27-924a-4d03-9614-e9ab5a86898a" TASK_HADOOP_ID="job_201111060121_0001"




                                                                                                                                                      •
      TIME="1320509926006"
      QueryEnd QUERY_STRING="select ename from emp" QUERY_ID="nexr_20111106024848_36387a27-924a-4d03-9614-
      e9ab5a86898a" QUERY_RET_CODE="0" QUERY_NUM_TASKS="1" TIME="1320509926006"
      Counters plan="{"queryId":"nexr_20111106024848_36387a27-924a-4d03-9614-e9ab5a86898a","queryType":null,"queryAttributes":
      {"queryString":"select ename from emp"},"queryCounters":"null","stageGraph":
      {"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":
                                                                                                                                                          Hadoop job log
      [{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":




                                                                                                                                                  •
      {"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":


                                                                                                                                                      System
      [{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":
      {"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},
      {"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":
      [{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":
      {"alias":"emp"},"operatorCounters":"}","done":"true","started":"true"},
      {"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":
      {"expressions":"ename"},"operatorCounters":"null","done":"true","started":"true"},
      {"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"}],"
      done":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}" TIME="1320509926007"




Friday, November 11, 11
How to find out the reason ?


                                               •   Hive

                                                   •   Hive plan

                                                   •   Hive log

                     JobID ry MapReduc e Job   •   Hadoop

                      Su mma                       •   MapReduce monitoring

                                                   •   Hadoop job log

                                               •   System



Friday, November 11, 11
How to find out the reason ?
     Meta VERSION="1" .
     Job JOBID="job_201111060121_0001" JOBNAME="select ename from emp(Stage-1)" USER="nexr" SUBMIT_TIME="1320509913049"
     JOBCONF="hdfs://localhost:54310/tmp/hadoop-nexr/mapred/staging/nexr/.staging/job_201111060121_0001/job.xml" VIEW_JOB="*"
     MODIFY_JOB="*" JOB_QUEUE="default" .
     Job JOBID="job_201111060121_0001" JOB_PRIORITY="NORMAL" .
     Job JOBID="job_201111060121_0001" LAUNCH_TIME="1320509913647" TOTAL_MAPS="1" TOTAL_REDUCES="0"
     JOB_STATUS="PREP" .




                                                                                                                                      •
     Task TASKID="task_201111060121_0001_m_000002" TASK_TYPE="SETUP" START_TIME="1320509913881" SPLITS="" .


                                                                                                                                          Hive
     MapAttempt TASK_TYPE="SETUP" TASKID="task_201111060121_0001_m_000002"
     TASK_ATTEMPT_ID="attempt_201111060121_0001_m_000002_0" START_TIME="1320509915561"
     TRACKER_NAME="tracker_CentOS:CentOS/127.0.0.1:59707" HTTP_PORT="50060" .
     MapAttempt TASK_TYPE="SETUP" TASKID="task_201111060121_0001_m_000002"
     TASK_ATTEMPT_ID="attempt_201111060121_0001_m_000002_0" TASK_STATUS="SUCCESS" FINISH_TIME="1320509918642"




                                                                                                                                          •
     HOSTNAME="/default-rack/CentOS" STATE_STRING="setup" COUNTERS="{(FileSystemCounters)(FileSystemCounters)


                                                                                                                                              Hive plan
     [(FILE_BYTES_WRITTEN)(FILE_BYTES_WRITTEN)(81235)]}{(org.apache.hadoop.mapred.Task$Counter)(Map-Reduce
     Framework)[(SPILLED_RECORDS)(Spilled Records)(0)]}" .
     Task TASKID="task_201111060121_0001_m_000002" TASK_TYPE="SETUP" TASK_STATUS="SUCCESS"
     FINISH_TIME="1320509918715" COUNTERS="{(FileSystemCounters)(FileSystemCounters)[(FILE_BYTES_WRITTEN)
     (FILE_BYTES_WRITTEN)(81235)]}{(org.apache.hadoop.mapred.Task$Counter)(Map-Reduce Framework)[(SPILLED_RECORDS)




                                                                                                                                          •
     (Spilled Records)(0)]}" .
     Job JOBID="job_201111060121_0001" JOB_STATUS="RUNNING" .


                                                                                                                                              Hive log
     Task TASKID="task_201111060121_0001_m_000000" TASK_TYPE="MAP" START_TIME="1320509918718" SPLITS="/default-rack/



                                      pt ID
     CentOS" .
     MapAttempt TASK_TYPE="MAP" TASKID="task_201111060121_0001_m_000000"



                                  ttem
     TASK_ATTEMPT_ID="attempt_201111060121_0001_m_000000_0" START_TIME="1320509918725"




                            ask A
     TRACKER_NAME="tracker_CentOS:CentOS/127.0.0.1:59707" HTTP_PORT="50060" .




                                                                                                                                      •
     MapAttempt TASK_TYPE="MAP" TASKID="task_201111060121_0001_m_000000"



                        to T ers                                                                                                          Hadoop
     TASK_ATTEMPT_ID="attempt_201111060121_0001_m_000000_0" TASK_STATUS="SUCCESS" FINISH_TIME="1320509921984"


             ID
     HOSTNAME="/default-rack/CentOS" STATE_STRING="/rhive/data/emp.txt:0+339" COUNTERS="{(org.apache.hadoop.hive.ql.exec


         Job       JobID Count
     .Operator$ProgressCounter)(org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter)[(CREATED_FILES)(CREATED_FILES)(1)]}
     {(FileSystemCounters)(FileSystemCounters)[(HDFS_BYTES_READ)(HDFS_BYTES_READ)(512)][(FILE_BYTES_WRITTEN)



              pping stem
     (FILE_BYTES_WRITTEN)(81235)][(HDFS_BYTES_WRITTEN)(HDFS_BYTES_WRITTEN)(37)]}{(org.apache.hadoop.hive.ql.exec




                                                                                                                                          •
     .MapOperator$Counter)(org.apache.hadoop.hive.ql.exec.MapOperator$Counter)[(DESERIALIZE_ERRORS)(DESERIALIZE_ERRORS)


          Ma
     (0)]}{(org.apache.hadoop.mapred.Task$Counter)(Map-Reduce Framework)[(MAP_INPUT_RECORDS)(Map input records)(8)]




                er Sy                                                                                                                         MapReduce monitoring
     [(SPILLED_RECORDS)(Spilled Records)(0)][(MAP_INPUT_BYTES)(Map input bytes)(0)][(MAP_OUTPUT_RECORDS)(Map output
     records)(0)][(SPLIT_RAW_BYTES)(SPLIT_RAW_BYTES)(173)]}" .



           Gath
     Task TASKID="task_201111060121_0001_m_000000" TASK_TYPE="MAP" TASK_STATUS="SUCCESS" FINISH_TIME="1320509922187"
     COUNTERS="{(org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter)(org.apache.hadoop.hive.ql.exec.Operator
     $ProgressCounter)[(CREATED_FILES)(CREATED_FILES)(1)]}{(FileSystemCounters)(FileSystemCounters)[(HDFS_BYTES_READ)




                                                                                                                                          •
     (HDFS_BYTES_READ)(512)][(FILE_BYTES_WRITTEN)(FILE_BYTES_WRITTEN)(81235)][(HDFS_BYTES_WRITTEN)


                                                                                                                                              Hadoop job log
     (HDFS_BYTES_WRITTEN)(37)]}{(org.apache.hadoop.hive.ql.exec.MapOperator$Counter)(org.apache.hadoop.hive.ql.exec
     .MapOperator$Counter)[(DESERIALIZE_ERRORS)(DESERIALIZE_ERRORS)(0)]}{(org.apache.hadoop.mapred.Task$Counter)(Map-
     Reduce Framework)[(MAP_INPUT_RECORDS)(Map input records)(8)][(SPILLED_RECORDS)(Spilled Records)(0)]
     [(MAP_INPUT_BYTES)(Map input bytes)(0)][(MAP_OUTPUT_RECORDS)(Map output records)(0)][(SPLIT_RAW_BYTES)
     (SPLIT_RAW_BYTES)(173)]}" .




                                                                                                                                      •
     Task TASKID="task_201111060121_0001_m_000001" TASK_TYPE="CLEANUP" START_TIME="1320509922192" SPLITS="" .
     MapAttempt TASK_TYPE="CLEANUP" TASKID="task_201111060121_0001_m_000001"


                                                                                                                                          System
     TASK_ATTEMPT_ID="attempt_201111060121_0001_m_000001_0" START_TIME="1320509922195"
     TRACKER_NAME="tracker_CentOS:CentOS/127.0.0.1:59707" HTTP_PORT="50060" .
     MapAttempt TASK_TYPE="CLEANUP" TASKID="task_201111060121_0001_m_000001"
     TASK_ATTEMPT_ID="attempt_201111060121_0001_m_000001_0" TASK_STATUS="SUCCESS" FINISH_TIME="1320509924764"
     HOSTNAME="/default-rack/CentOS" STATE_STRING="cleanup" COUNTERS="{(FileSystemCounters)(FileSystemCounters)
     [(FILE_BYTES_WRITTEN)(FILE_BYTES_WRITTEN)(81235)]}{(org.apache.hadoop.mapred.Task$Counter)(Map-Reduce Framework)
     [(SPILLED_RECORDS)(Spilled Records)(0)]}" .
     Task TASKID="task_201111060121_0001_m_000001" TASK_TYPE="CLEANUP" TASK_STATUS="SUCCESS"
     FINISH_TIME="1320509925033" COUNTERS="{(FileSystemCounters)(FileSystemCounters)[(FILE_BYTES_WRITTEN)
     (FILE_BYTES_WRITTEN)(81235)]}{(org.apache.hadoop.mapred.Task$Counter)(Map-Reduce Framework)[(SPILLED_RECORDS)
     (Spilled Records)(0)]}" .




Friday, November 11, 11
How to find out the reason ?


                                            •   Hive

                                                •   Hive plan

                               isk u sage       •   Hive log
                         ory/D
                     /Mem JobID
                CPU with                    •   Hadoop
                    ated
                rel                             •   MapReduce monitoring

                                                •   Hadoop job log

                                            •   System



Friday, November 11, 11
Hawk Features
               •          Performance Data Collector
                     •      gathering hive / hadoop / sytem log

                     •      gathering hadoop / system metric

               •          Performance Report / Monitoring
                     •      Performance Report

                           •   hourly / daily / weekly / monthly report

                     •      Performance Analysis

                           •   Correlate related performance data (hive log, job log, mapreduce metric)

               •          Hive Plan Analyzer
                     •      Summarize hive system environment

                     •      Summarize hive query plan similar to Oracle plan

                     •      Correlate hive query plan to performance data

                     •      Query history management


Friday, November 11, 11
Architecture

                          Hawk Console

        PerfReport            Perf             Plan
                            Monitoring       Analyzer
                                                                                              execute query
                                                                                                              Monitoring
                                                                                                                Data
                                                                                                              hive.log
                                                                           LogMoinitor
                                                                                                              query-hostory.log
                                         monitoring datas
                                                            Aggregator




                                                                              log collector                   meta info



                                                                          ProcessMonitor
                                                                          meta collector                      hdfs metric
                  Hawk Repository                                         metric collector                    MR metric
                                                                                                              job.log


                                                                                                              system metric
                                                                                                              system log




Friday, November 11, 11
Hawk Plan Analyzer




Friday, November 11, 11
UseCase

         8 Nodes Hadoop Cluster
         # of Concurrent Reduce Task is 4


         Hive Query
          CREATE	
  TABLE	
  TMP_VOICE
          ROW	
  FORMAT	
  SERDE	
  'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe'	
  STORED	
  AS	
  RCFILE
          AS
          SELECT	
  yyyymmdd,	
  substr(yyyymmdd,1,6)	
  yyyymm,	
  weekly,	
  id,	
  bits,	
  call,	
  rank
          FROM	
  (
          	
  	
  	
  	
  SELECT	
  ((yyyymmdd,	
  weekly,	
  id,	
  bits,	
  call
          	
  	
  	
  	
  FROM	
  TMP_LOCAL_REAL_CUST	
  k1
          	
  	
  	
  	
  UNION	
  ALL
          	
  	
  	
  	
  SELECT	
  yyyymmdd,	
  weekly,	
  id,	
  bits,	
  call
          	
  	
  	
  	
  FROM	
  TMP_WORLD_REAL_CUST	
  k2
          	
  	
  	
  	
  )	
  X
          DISTRIBUTE	
  BY	
  HASH(X.yyyymmdd,X.id)
          SORT	
  BY	
  X.yyyymmdd,	
  X.id,	
  X.call	
  DESC	
  ,	
  X.bits	
  DESC
          )	
  t	
  )	
  k2	
  WHERE	
  	
  	
  rank	
  <=	
  10;




Friday, November 11, 11
How to find out bottleneck using Hawk
                                                                  Hive Configuration
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                             false = hive.auto.convert.join
                                                                                false = hive.exec.compress.intermediate
                                                                                       false = hive.exec.compress.output
                                                                                      false = hive.exec.dynamic.partition
                                                                                                   false = hive.exec.parallel
                                                                                    8 = hive.exec.parallel.thread.number
                          1000000000 = hive.exec.reducers.bytes.per.reducer
                                                                  1000000000 = hive.exec.reducers.bytes.per.reducer
                                                                                            999 = hive.exec.reducers.max
                                                  org.apache.hadoop.hive.ql.io.CombineHiveInputF... = hive.input.format
                                                                                           100000 = hive.mapjoin.maxsize
                                                                             25000000 = hive.mapjoin.smalltable.filesize
                                                                true = hive.mapred.reduce.tasks.speculative.execution
                                                                                                    true = hive.optimize.cp
                                                                                             true = hive.optimize.groupby
                                                                                                  true = hive.optimize.ppd
                                                                                               true = hive.optimize.pruner
                                                                                            false = hive.optimize.skewjoin
                                                                                                 -1 = mapred.reduce.tasks




                               TMP_LOCAL_REAL_CUST	
  (k1)
                               TMP_WORLD_REAL_CUST	
  (k2)




Friday, November 11, 11
How to find out bottleneck using Hawk

                           TMP_LOCAL_REAL_CUST	
  (k1)
                           TMP_WORLD_REAL_CUST	
  (k2)




        •      set ‘hive.exec.reducer.bytes.per.reducer=10000000’ (1GB -> 100MB)




                           TMP_LOCAL_REAL_CUST	
  (k1)
                           TMP_WORLD_REAL_CUST	
  (k2)




Friday, November 11, 11
Hawk Monitoring




Friday, November 11, 11
Hawk Report




    How many hive queries were launched last week ?




Friday, November 11, 11
Hawk Report




                 How many MapReduces ran last night ?




Friday, November 11, 11
Hawk Report




               How long did hive queries run 2 days ago ?




Friday, November 11, 11
Hawk Report




               Which hive queries ran longest yesterday ?




Friday, November 11, 11
DEMO

Friday, November 11, 11
Future Works



                    •     GUI based hawk tool

                    •     Integrate with meerkat for system monitoring

                    •     Monitoring hive lock manager

                    •     Performance Event alarm




Friday, November 11, 11
Data Analysis Platform Team

               •      JunHo Cho

               •      ByungMyon Chae

               •      Youngbae Ahn

               •      SeungWoo Ryu

               •      Seoeun Park

               •      Minwoo Kim

               •      Youngwoo Kim

               •      Seonghak Hong



Friday, November 11, 11
jun.cho@nexr.com




Friday, November 11, 11

More Related Content

Viewers also liked

Java one2013 con4540-keenan
Java one2013 con4540-keenanJava one2013 con4540-keenan
Java one2013 con4540-keenanddkeenan
 
Hadoop Hive Talk At IIT-Delhi
Hadoop Hive Talk At IIT-DelhiHadoop Hive Talk At IIT-Delhi
Hadoop Hive Talk At IIT-DelhiJoydeep Sen Sarma
 
5 Best Practices for Monitoring Hive and MapReduce Application Performance
5 Best Practices for Monitoring Hive and MapReduce Application Performance5 Best Practices for Monitoring Hive and MapReduce Application Performance
5 Best Practices for Monitoring Hive and MapReduce Application PerformanceDriven Inc.
 
트렌드분석사례 마인즈랩 축제페스티벌
트렌드분석사례 마인즈랩 축제페스티벌트렌드분석사례 마인즈랩 축제페스티벌
트렌드분석사례 마인즈랩 축제페스티벌Taejoon Yoo
 
빅데이터 아카데미 연말평가발표자료 분석5기 우수팀(최종)
빅데이터 아카데미 연말평가발표자료 분석5기 우수팀(최종)빅데이터 아카데미 연말평가발표자료 분석5기 우수팀(최종)
빅데이터 아카데미 연말평가발표자료 분석5기 우수팀(최종)성호(Kevin) 나
 
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...Lucidworks
 
Join Algorithms in MapReduce
Join Algorithms in MapReduceJoin Algorithms in MapReduce
Join Algorithms in MapReduceShrihari Rathod
 
Spark Summit EU talk by Sital Kedia
Spark Summit EU talk by Sital KediaSpark Summit EU talk by Sital Kedia
Spark Summit EU talk by Sital KediaSpark Summit
 
Nested Types in Impala
Nested Types in ImpalaNested Types in Impala
Nested Types in ImpalaCloudera, Inc.
 

Viewers also liked (20)

Java one2013 con4540-keenan
Java one2013 con4540-keenanJava one2013 con4540-keenan
Java one2013 con4540-keenan
 
Hadoop Hive Talk At IIT-Delhi
Hadoop Hive Talk At IIT-DelhiHadoop Hive Talk At IIT-Delhi
Hadoop Hive Talk At IIT-Delhi
 
5 Best Practices for Monitoring Hive and MapReduce Application Performance
5 Best Practices for Monitoring Hive and MapReduce Application Performance5 Best Practices for Monitoring Hive and MapReduce Application Performance
5 Best Practices for Monitoring Hive and MapReduce Application Performance
 
트렌드분석사례 마인즈랩 축제페스티벌
트렌드분석사례 마인즈랩 축제페스티벌트렌드분석사례 마인즈랩 축제페스티벌
트렌드분석사례 마인즈랩 축제페스티벌
 
분석7기 5조
분석7기 5조분석7기 5조
분석7기 5조
 
빅데이터 아카데미 연말평가발표자료 분석5기 우수팀(최종)
빅데이터 아카데미 연말평가발표자료 분석5기 우수팀(최종)빅데이터 아카데미 연말평가발표자료 분석5기 우수팀(최종)
빅데이터 아카데미 연말평가발표자료 분석5기 우수팀(최종)
 
기술6기 3조
기술6기 3조기술6기 3조
기술6기 3조
 
기술8기 2조
기술8기 2조기술8기 2조
기술8기 2조
 
분석6기 4조
분석6기 4조분석6기 4조
분석6기 4조
 
R_datamining
R_dataminingR_datamining
R_datamining
 
기술5기 1조
기술5기 1조기술5기 1조
기술5기 1조
 
October 2014 HUG : Hive On Spark
October 2014 HUG : Hive On SparkOctober 2014 HUG : Hive On Spark
October 2014 HUG : Hive On Spark
 
분석8기 4조
분석8기 4조분석8기 4조
분석8기 4조
 
기술7기 2조
기술7기 2조기술7기 2조
기술7기 2조
 
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
 
Join Algorithms in MapReduce
Join Algorithms in MapReduceJoin Algorithms in MapReduce
Join Algorithms in MapReduce
 
Spark Summit EU talk by Sital Kedia
Spark Summit EU talk by Sital KediaSpark Summit EU talk by Sital Kedia
Spark Summit EU talk by Sital Kedia
 
Nested Types in Impala
Nested Types in ImpalaNested Types in Impala
Nested Types in Impala
 
HiveServer2
HiveServer2HiveServer2
HiveServer2
 
El niño que tenía dos ojos
El niño que tenía dos ojosEl niño que tenía dos ojos
El niño que tenía dos ojos
 

Recently uploaded

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 

Recently uploaded (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

Hive Performance Monitoring Tool

  • 1. HAWK : Performance Monitoring Hive Introduction JunHo Cho Data Analysis Platform Team Friday, November 11, 11
  • 2. Reasons related to Hive performance • Inefficient hive query • Not suitable configuration of hadoop, hive and system • Bad distributed strategy of data • System problems Friday, November 11, 11
  • 3. How to find out the reason? • Hive • Hive plan • Hive log • Hadoop • MapReduce monitoring • Hadoop job log • System Friday, November 11, 11
  • 4. How to find out the reason ? ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF emp e) (TOK_TABREF dept d) (= (. (TOK_TABLE_OR_COL e) deptno) (. (TOK_TABLE_OR_COL d) deptno)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL e) empno)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL e) ename)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL d) dname))) (TOK_WHERE (= (. (TOK_TABLE_OR_COL d) deptno) 30)))) STAGE DEPENDENCIES: Stage-1 is a root stage • Stage-0 is a root stage Hive STAGE PLANS: Stage: Stage-1 Map Reduce Alias -> Map Operator Tree: d TableScan • alias: d Filter Operator Hive plan predicate: expr: (deptno = 30) type: boolean Reduce Output Operator key expressions: expr: deptno type: int sort order: + # of MapReduce Job • Map-reduce partition columns: expr: deptno type: int Hive log tag: 1 value expressions: expr: deptno Data Source/Target type: int expr: dname type: string e TableScan • alias: e Operators Reduce Output Operator Hadoop key expressions: expr: deptno type: int sort order: + Map-reduce partition columns: expr: deptno type: int tag: 0 • value expressions: expr: empno type: int MapReduce monitoring expr: ename type: string Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 condition expressions: • 0 {VALUE._col0} {VALUE._col1} 1 {VALUE._col0} {VALUE._col1} handleSkewJoin: false Hadoop job log outputColumnNames: _col0, _col1, _col4, _col5 Filter Operator predicate: expr: (_col4 = 30) type: boolean Select Operator expressions: • expr: _col0 type: int expr: _col1 System type: string expr: _col5 type: string outputColumnNames: _col0, _col1, _col2 File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Stage: Stage-0 Fetch Operator limit: -1 Friday, November 11, 11
  • 5. How to find out the reason ? essionStart SESSION_ID="nexr_201111060248" TIME="1320509893783" QueryStart QUERY_STRING="select ename from emp" QUERY_ID="nexr_20111106024848_36387a27-924a-4d03-9614- e9ab5a86898a" TIME="1320509912081" Counters plan="{"queryId":"nexr_20111106024848_36387a27-924a-4d03-9614-e9ab5a86898a","queryType":null,"queryAttributes": • {"queryString":"select ename from emp"},"queryCounters":"null","stageGraph": {"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList": [{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList": [{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph": {"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"}, {"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList": Hive [{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes": • {"alias":"emp"},"operatorCounters":"null","done":"false","started":"false"}, Hive plan {"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes": {"expressions":"ename"},"operatorCounters":"null","done":"false","started":"false"}, {"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}]," done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}" TIME="1320509912095" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_ID="Stage-1" • QUERY_ID="nexr_20111106024848_36387a27-924a-4d03-9614-e9ab5a86898a" TIME="1320509912099" TaskProgress TASK_HADOOP_PROGRESS="2011-11-06 02:48:38,867 Stage-1 map = 0%, reduce = 0%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" Hive log ry ID e TASK_COUNTERS="org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0,Job obID Counters .SLOTS_MILLIS_MAPS:3081,Job Counters .Launched map tasks:1,Job Counters .Data-local map tasks:1,Map-Reduce Qu e to J Framework.CPU_MILLISECONDS:0" TASK_ID="Stage-1" QUERY_ID="nexr_20111106024848_36387a27-924a-4d03-9614- m e9ab5a86898a" TASK_HADOOP_ID="job_201111060121_0001" TIME="1320509918868" d Ti rator • ... lapse MROpe Hadoop TaskEnd TASK_RET_CODE="0" TASK_HADOOP_PROGRESS="2011-11-06 02:48:45,986 Stage-1 map = 100%, reduce = 100%" E TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:1,Job pping Counters .SLOTS_MILLIS_MAPS:8909,Job Counters .Total time spent by all reduces waiting after reserving slots (ms):0,Job Counters .Total time spent by all maps waiting after reserving slots (ms):0,Job Counters .Launched map tasks:1,Job Counters .Data-local Ma • map tasks:1,Job Counters .SLOTS_MILLIS_REDUCES:0,FileSystemCounters.HDFS_BYTES_READ: MapReduce monitoring 512,FileSystemCounters.FILE_BYTES_WRITTEN:81235,FileSystemCounters.HDFS_BYTES_WRITTEN: 37,org.apache.hadoop.hive.ql.exec.MapOperator$Counter.DESERIALIZE_ERRORS:0,Map-Reduce Framework.Map input records:8,Map- Reduce Framework.Spilled Records:0,Map-Reduce Framework.CPU_MILLISECONDS:0,Map-Reduce Framework.Map input bytes: 0,Map-Reduce Framework.Map output records:0,Map-Reduce Framework.SPLIT_RAW_BYTES:173" TASK_ID="Stage-1" QUERY_ID="nexr_20111106024848_36387a27-924a-4d03-9614-e9ab5a86898a" TASK_HADOOP_ID="job_201111060121_0001" • TIME="1320509926006" QueryEnd QUERY_STRING="select ename from emp" QUERY_ID="nexr_20111106024848_36387a27-924a-4d03-9614- e9ab5a86898a" QUERY_RET_CODE="0" QUERY_NUM_TASKS="1" TIME="1320509926006" Counters plan="{"queryId":"nexr_20111106024848_36387a27-924a-4d03-9614-e9ab5a86898a","queryType":null,"queryAttributes": {"queryString":"select ename from emp"},"queryCounters":"null","stageGraph": {"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList": Hadoop job log [{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters": • {"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList": System [{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph": {"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"}, {"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList": [{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes": {"alias":"emp"},"operatorCounters":"}","done":"true","started":"true"}, {"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes": {"expressions":"ename"},"operatorCounters":"null","done":"true","started":"true"}, {"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"}]," done":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}" TIME="1320509926007" Friday, November 11, 11
  • 6. How to find out the reason ? • Hive • Hive plan • Hive log JobID ry MapReduc e Job • Hadoop Su mma • MapReduce monitoring • Hadoop job log • System Friday, November 11, 11
  • 7. How to find out the reason ? Meta VERSION="1" . Job JOBID="job_201111060121_0001" JOBNAME="select ename from emp(Stage-1)" USER="nexr" SUBMIT_TIME="1320509913049" JOBCONF="hdfs://localhost:54310/tmp/hadoop-nexr/mapred/staging/nexr/.staging/job_201111060121_0001/job.xml" VIEW_JOB="*" MODIFY_JOB="*" JOB_QUEUE="default" . Job JOBID="job_201111060121_0001" JOB_PRIORITY="NORMAL" . Job JOBID="job_201111060121_0001" LAUNCH_TIME="1320509913647" TOTAL_MAPS="1" TOTAL_REDUCES="0" JOB_STATUS="PREP" . • Task TASKID="task_201111060121_0001_m_000002" TASK_TYPE="SETUP" START_TIME="1320509913881" SPLITS="" . Hive MapAttempt TASK_TYPE="SETUP" TASKID="task_201111060121_0001_m_000002" TASK_ATTEMPT_ID="attempt_201111060121_0001_m_000002_0" START_TIME="1320509915561" TRACKER_NAME="tracker_CentOS:CentOS/127.0.0.1:59707" HTTP_PORT="50060" . MapAttempt TASK_TYPE="SETUP" TASKID="task_201111060121_0001_m_000002" TASK_ATTEMPT_ID="attempt_201111060121_0001_m_000002_0" TASK_STATUS="SUCCESS" FINISH_TIME="1320509918642" • HOSTNAME="/default-rack/CentOS" STATE_STRING="setup" COUNTERS="{(FileSystemCounters)(FileSystemCounters) Hive plan [(FILE_BYTES_WRITTEN)(FILE_BYTES_WRITTEN)(81235)]}{(org.apache.hadoop.mapred.Task$Counter)(Map-Reduce Framework)[(SPILLED_RECORDS)(Spilled Records)(0)]}" . Task TASKID="task_201111060121_0001_m_000002" TASK_TYPE="SETUP" TASK_STATUS="SUCCESS" FINISH_TIME="1320509918715" COUNTERS="{(FileSystemCounters)(FileSystemCounters)[(FILE_BYTES_WRITTEN) (FILE_BYTES_WRITTEN)(81235)]}{(org.apache.hadoop.mapred.Task$Counter)(Map-Reduce Framework)[(SPILLED_RECORDS) • (Spilled Records)(0)]}" . Job JOBID="job_201111060121_0001" JOB_STATUS="RUNNING" . Hive log Task TASKID="task_201111060121_0001_m_000000" TASK_TYPE="MAP" START_TIME="1320509918718" SPLITS="/default-rack/ pt ID CentOS" . MapAttempt TASK_TYPE="MAP" TASKID="task_201111060121_0001_m_000000" ttem TASK_ATTEMPT_ID="attempt_201111060121_0001_m_000000_0" START_TIME="1320509918725" ask A TRACKER_NAME="tracker_CentOS:CentOS/127.0.0.1:59707" HTTP_PORT="50060" . • MapAttempt TASK_TYPE="MAP" TASKID="task_201111060121_0001_m_000000" to T ers Hadoop TASK_ATTEMPT_ID="attempt_201111060121_0001_m_000000_0" TASK_STATUS="SUCCESS" FINISH_TIME="1320509921984" ID HOSTNAME="/default-rack/CentOS" STATE_STRING="/rhive/data/emp.txt:0+339" COUNTERS="{(org.apache.hadoop.hive.ql.exec Job JobID Count .Operator$ProgressCounter)(org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter)[(CREATED_FILES)(CREATED_FILES)(1)]} {(FileSystemCounters)(FileSystemCounters)[(HDFS_BYTES_READ)(HDFS_BYTES_READ)(512)][(FILE_BYTES_WRITTEN) pping stem (FILE_BYTES_WRITTEN)(81235)][(HDFS_BYTES_WRITTEN)(HDFS_BYTES_WRITTEN)(37)]}{(org.apache.hadoop.hive.ql.exec • .MapOperator$Counter)(org.apache.hadoop.hive.ql.exec.MapOperator$Counter)[(DESERIALIZE_ERRORS)(DESERIALIZE_ERRORS) Ma (0)]}{(org.apache.hadoop.mapred.Task$Counter)(Map-Reduce Framework)[(MAP_INPUT_RECORDS)(Map input records)(8)] er Sy MapReduce monitoring [(SPILLED_RECORDS)(Spilled Records)(0)][(MAP_INPUT_BYTES)(Map input bytes)(0)][(MAP_OUTPUT_RECORDS)(Map output records)(0)][(SPLIT_RAW_BYTES)(SPLIT_RAW_BYTES)(173)]}" . Gath Task TASKID="task_201111060121_0001_m_000000" TASK_TYPE="MAP" TASK_STATUS="SUCCESS" FINISH_TIME="1320509922187" COUNTERS="{(org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter)(org.apache.hadoop.hive.ql.exec.Operator $ProgressCounter)[(CREATED_FILES)(CREATED_FILES)(1)]}{(FileSystemCounters)(FileSystemCounters)[(HDFS_BYTES_READ) • (HDFS_BYTES_READ)(512)][(FILE_BYTES_WRITTEN)(FILE_BYTES_WRITTEN)(81235)][(HDFS_BYTES_WRITTEN) Hadoop job log (HDFS_BYTES_WRITTEN)(37)]}{(org.apache.hadoop.hive.ql.exec.MapOperator$Counter)(org.apache.hadoop.hive.ql.exec .MapOperator$Counter)[(DESERIALIZE_ERRORS)(DESERIALIZE_ERRORS)(0)]}{(org.apache.hadoop.mapred.Task$Counter)(Map- Reduce Framework)[(MAP_INPUT_RECORDS)(Map input records)(8)][(SPILLED_RECORDS)(Spilled Records)(0)] [(MAP_INPUT_BYTES)(Map input bytes)(0)][(MAP_OUTPUT_RECORDS)(Map output records)(0)][(SPLIT_RAW_BYTES) (SPLIT_RAW_BYTES)(173)]}" . • Task TASKID="task_201111060121_0001_m_000001" TASK_TYPE="CLEANUP" START_TIME="1320509922192" SPLITS="" . MapAttempt TASK_TYPE="CLEANUP" TASKID="task_201111060121_0001_m_000001" System TASK_ATTEMPT_ID="attempt_201111060121_0001_m_000001_0" START_TIME="1320509922195" TRACKER_NAME="tracker_CentOS:CentOS/127.0.0.1:59707" HTTP_PORT="50060" . MapAttempt TASK_TYPE="CLEANUP" TASKID="task_201111060121_0001_m_000001" TASK_ATTEMPT_ID="attempt_201111060121_0001_m_000001_0" TASK_STATUS="SUCCESS" FINISH_TIME="1320509924764" HOSTNAME="/default-rack/CentOS" STATE_STRING="cleanup" COUNTERS="{(FileSystemCounters)(FileSystemCounters) [(FILE_BYTES_WRITTEN)(FILE_BYTES_WRITTEN)(81235)]}{(org.apache.hadoop.mapred.Task$Counter)(Map-Reduce Framework) [(SPILLED_RECORDS)(Spilled Records)(0)]}" . Task TASKID="task_201111060121_0001_m_000001" TASK_TYPE="CLEANUP" TASK_STATUS="SUCCESS" FINISH_TIME="1320509925033" COUNTERS="{(FileSystemCounters)(FileSystemCounters)[(FILE_BYTES_WRITTEN) (FILE_BYTES_WRITTEN)(81235)]}{(org.apache.hadoop.mapred.Task$Counter)(Map-Reduce Framework)[(SPILLED_RECORDS) (Spilled Records)(0)]}" . Friday, November 11, 11
  • 8. How to find out the reason ? • Hive • Hive plan isk u sage • Hive log ory/D /Mem JobID CPU with • Hadoop ated rel • MapReduce monitoring • Hadoop job log • System Friday, November 11, 11
  • 9. Hawk Features • Performance Data Collector • gathering hive / hadoop / sytem log • gathering hadoop / system metric • Performance Report / Monitoring • Performance Report • hourly / daily / weekly / monthly report • Performance Analysis • Correlate related performance data (hive log, job log, mapreduce metric) • Hive Plan Analyzer • Summarize hive system environment • Summarize hive query plan similar to Oracle plan • Correlate hive query plan to performance data • Query history management Friday, November 11, 11
  • 10. Architecture Hawk Console PerfReport Perf Plan Monitoring Analyzer execute query Monitoring Data hive.log LogMoinitor query-hostory.log monitoring datas Aggregator log collector meta info ProcessMonitor meta collector hdfs metric Hawk Repository metric collector MR metric job.log system metric system log Friday, November 11, 11
  • 11. Hawk Plan Analyzer Friday, November 11, 11
  • 12. UseCase 8 Nodes Hadoop Cluster # of Concurrent Reduce Task is 4 Hive Query CREATE  TABLE  TMP_VOICE ROW  FORMAT  SERDE  'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe'  STORED  AS  RCFILE AS SELECT  yyyymmdd,  substr(yyyymmdd,1,6)  yyyymm,  weekly,  id,  bits,  call,  rank FROM  (        SELECT  ((yyyymmdd,  weekly,  id,  bits,  call        FROM  TMP_LOCAL_REAL_CUST  k1        UNION  ALL        SELECT  yyyymmdd,  weekly,  id,  bits,  call        FROM  TMP_WORLD_REAL_CUST  k2        )  X DISTRIBUTE  BY  HASH(X.yyyymmdd,X.id) SORT  BY  X.yyyymmdd,  X.id,  X.call  DESC  ,  X.bits  DESC )  t  )  k2  WHERE      rank  <=  10; Friday, November 11, 11
  • 13. How to find out bottleneck using Hawk Hive Configuration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ false = hive.auto.convert.join false = hive.exec.compress.intermediate false = hive.exec.compress.output false = hive.exec.dynamic.partition false = hive.exec.parallel 8 = hive.exec.parallel.thread.number 1000000000 = hive.exec.reducers.bytes.per.reducer 1000000000 = hive.exec.reducers.bytes.per.reducer 999 = hive.exec.reducers.max org.apache.hadoop.hive.ql.io.CombineHiveInputF... = hive.input.format 100000 = hive.mapjoin.maxsize 25000000 = hive.mapjoin.smalltable.filesize true = hive.mapred.reduce.tasks.speculative.execution true = hive.optimize.cp true = hive.optimize.groupby true = hive.optimize.ppd true = hive.optimize.pruner false = hive.optimize.skewjoin -1 = mapred.reduce.tasks TMP_LOCAL_REAL_CUST  (k1) TMP_WORLD_REAL_CUST  (k2) Friday, November 11, 11
  • 14. How to find out bottleneck using Hawk TMP_LOCAL_REAL_CUST  (k1) TMP_WORLD_REAL_CUST  (k2) • set ‘hive.exec.reducer.bytes.per.reducer=10000000’ (1GB -> 100MB) TMP_LOCAL_REAL_CUST  (k1) TMP_WORLD_REAL_CUST  (k2) Friday, November 11, 11
  • 16. Hawk Report How many hive queries were launched last week ? Friday, November 11, 11
  • 17. Hawk Report How many MapReduces ran last night ? Friday, November 11, 11
  • 18. Hawk Report How long did hive queries run 2 days ago ? Friday, November 11, 11
  • 19. Hawk Report Which hive queries ran longest yesterday ? Friday, November 11, 11
  • 21. Future Works • GUI based hawk tool • Integrate with meerkat for system monitoring • Monitoring hive lock manager • Performance Event alarm Friday, November 11, 11
  • 22. Data Analysis Platform Team • JunHo Cho • ByungMyon Chae • Youngbae Ahn • SeungWoo Ryu • Seoeun Park • Minwoo Kim • Youngwoo Kim • Seonghak Hong Friday, November 11, 11