SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
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 nd out the reason?


                            •   Hive

                                •   Hive plan

                                •   Hive log

                            •   Hadoop

                                •   MapReduce monitoring

                                •   Hadoop job log

                            •   System



Friday, November 11, 11
How to nd 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 nd 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 nd 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 nd 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 nd 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 nd out bottleneck using Hawk
                                                                  Hive Conguration
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                             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.lesize
                                                                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 nd 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

Weitere ähnliche Inhalte

Andere mochten auch

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
 
분석7기 5조
분석7기 5조분석7기 5조
분석7기 5조Kangwook Lee
 
빅데이터 아카데미 연말평가발표자료 분석5기 우수팀(최종)
빅데이터 아카데미 연말평가발표자료 분석5기 우수팀(최종)빅데이터 아카데미 연말평가발표자료 분석5기 우수팀(최종)
빅데이터 아카데미 연말평가발표자료 분석5기 우수팀(최종)성호(Kevin) 나
 
기술6기 3쥰
기술6기 3쥰기술6기 3쥰
기술6기 3쥰Kangwook Lee
 
기술8기 2쥰
기술8기 2쥰기술8기 2쥰
기술8기 2쥰Kangwook Lee
 
분석6기 4조
분석6기 4조분석6기 4조
분석6기 4조Kangwook Lee
 
기술5기 1쥰
기술5기 1쥰기술5기 1쥰
기술5기 1쥰Kangwook Lee
 
분석8기 4조
분석8기 4조분석8기 4조
분석8기 4조Kangwook Lee
 
기술7기 2쥰
기술7기 2쥰기술7기 2쥰
기술7기 2쥰Kangwook Lee
 
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.
 

Andere mochten auch (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
 

KĂźrzlich hochgeladen

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vĂĄzquez
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 

KĂźrzlich hochgeladen (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

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 • Inefcient hive query • Not suitable conguration of hadoop, hive and system • Bad distributed strategy of data • System problems Friday, November 11, 11
  • 3. How to nd out the reason? • Hive • Hive plan • Hive log • Hadoop • MapReduce monitoring • Hadoop job log • System Friday, November 11, 11
  • 4. How to nd 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 nd 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 nd 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 nd 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 nd 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 nd out bottleneck using Hawk Hive Conguration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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.lesize 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 nd 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