Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Tools
    • Labels:
      None

      Description

      We need query admin utility to list running queries, get a query detail, or kill a specified running query. The utility may have the following form:

      query list
      $ bin/tajo admin -list
      query id                  start time                 query
      q_xxx_xxx running  2014-01-02T13:45:00 select a,b,c ... ...
      q_xxx_xxx running  2014-01-02T13:47:00 select count(distinct ...
      
      query kill
      $ bin/tajo admin -kill q_xxx_xxxx
      q_xxx_xxxx has been killed.
      
      query detail
      $ bin/tajo admin -desc q_xxx_xxxx
      query id: q_xxx_xxxx
      submit user: hyunsik
      start time: 2014-01-01T13:46:50
      running time: 36 sec
      query statement: 
      
      SELECT a,b,c
      FROM ...
      
      query logical plan:
      ...
      
      distributed execution plan:
      ...
      
      1. TAJO-474.patch
        24 kB
        DaeMyung Kang

        Activity

        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-trunk-postcommit #670 (See https://builds.apache.org/job/Tajo-trunk-postcommit/670/)
        TAJO-474: Add query admin utility. (DaeMyung Kang via hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=285c4a485c68e8d0e57145971b13676446010196)

        • CHANGES.txt
        • tajo-client/src/main/java/org/apache/tajo/client/TajoAdmin.java
        • tajo-dist/src/main/bin/tajo
        • tajo-client/src/main/proto/ClientProtos.proto
        • tajo-client/src/main/java/org/apache/tajo/client/TajoClient.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMasterClientService.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-trunk-postcommit #670 (See https://builds.apache.org/job/Tajo-trunk-postcommit/670/ ) TAJO-474 : Add query admin utility. (DaeMyung Kang via hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=285c4a485c68e8d0e57145971b13676446010196 ) CHANGES.txt tajo-client/src/main/java/org/apache/tajo/client/TajoAdmin.java tajo-dist/src/main/bin/tajo tajo-client/src/main/proto/ClientProtos.proto tajo-client/src/main/java/org/apache/tajo/client/TajoClient.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMasterClientService.java
        Hide
        hyunsik Hyunsik Choi added a comment -

        +1
        I reviewed this patch in RB. committed it to master branch.

        Show
        hyunsik Hyunsik Choi added a comment - +1 I reviewed this patch in RB. committed it to master branch.
        Hide
        charsyam DaeMyung Kang added a comment -

        I add patch to reviewboard(https://reviews.apache.org/r/16676/)

        Thank you.

        Show
        charsyam DaeMyung Kang added a comment - I add patch to reviewboard( https://reviews.apache.org/r/16676/ ) Thank you.
        Hide
        hyunsik Hyunsik Choi added a comment -

        The patch is not trivial. As we discussed new review process (http://markmail.org/message/4wekh3dbg7wybyn4), could you upload the patch to reviewboard?

        Show
        hyunsik Hyunsik Choi added a comment - The patch is not trivial. As we discussed new review process ( http://markmail.org/message/4wekh3dbg7wybyn4 ), could you upload the patch to reviewboard?
        Hide
        charsyam DaeMyung Kang added a comment -

        you can use admin tools like below:

        tajo admin -list
        tajo admin -desc
        tajo admin -cluster

        Show
        charsyam DaeMyung Kang added a comment - you can use admin tools like below: tajo admin -list tajo admin -desc tajo admin -cluster
        Hide
        charsyam DaeMyung Kang added a comment -

        Hi, guys. I add TajoAdmin Tool.

        it supports only 3 options now.(I hope it will be better.) and I think this is first step to make good admin tools)

        -list : show current running queries.
        -desc : show current running queries detail(this option is somewhat different hyunsik suggested)
        -cluster: show cluster info

        There are some examples.
        -list

        QueryId State StartTime Query
        -------------------- ------- -------------------- ------------------------------
        q-1388906477541-0008 RUNNING 2014-01-07 00:22:59 select * from table1 where ...

        -desc

        Id: 1
        Query Id: q-1388906477541-0009
        Started Time: 2014-01-07 00:23:14
        Query State: SUCCEED
        Finished Time: 2014-01-07 00:23:16
        Execution Time: 1.0 sec
        Query Progress: 1.0
        Query Statement:
        select * from table1 where id > 3

        -cluster
        Query Master
        ============

        Live Dead Tasks
        ----- ----- -----
        1 0 0

        Live QueryMasters
        =================

        QueryMaster Port Query Heap Status
        ------------------------- ----- ----- ---------- ----------
        charsyam-vm-main:28093 28092 0 889 MB LIVE

        Worker
        ======

        Live Dead
        ----- -----
        1 0

        Live Workers
        ============

        Worker Port Tasks Mem Disk Heap Status
        ------------------------- ----- ----- ---------- ---------- ------------ ----------
        charsyam-vm-main:28091 59690 0 0/1024 0.00/1.00 208/889 MB LIVE

        Dead Workers
        ============

        No Dead Workers

        Show
        charsyam DaeMyung Kang added a comment - Hi, guys. I add TajoAdmin Tool. it supports only 3 options now.(I hope it will be better.) and I think this is first step to make good admin tools) -list : show current running queries. -desc : show current running queries detail(this option is somewhat different hyunsik suggested) -cluster: show cluster info There are some examples. -list QueryId State StartTime Query -------------------- ------- -------------------- ------------------------------ q-1388906477541-0008 RUNNING 2014-01-07 00:22:59 select * from table1 where ... -desc Id: 1 Query Id: q-1388906477541-0009 Started Time: 2014-01-07 00:23:14 Query State: SUCCEED Finished Time: 2014-01-07 00:23:16 Execution Time: 1.0 sec Query Progress: 1.0 Query Statement: select * from table1 where id > 3 -cluster Query Master ============ Live Dead Tasks ----- ----- ----- 1 0 0 Live QueryMasters ================= QueryMaster Port Query Heap Status ------------------------- ----- ----- ---------- ---------- charsyam-vm-main:28093 28092 0 889 MB LIVE Worker ====== Live Dead ----- ----- 1 0 Live Workers ============ Worker Port Tasks Mem Disk Heap Status ------------------------- ----- ----- ---------- ---------- ------------ ---------- charsyam-vm-main:28091 59690 0 0/1024 0.00/1.00 208/889 MB LIVE Dead Workers ============ No Dead Workers

          People

          • Assignee:
            charsyam DaeMyung Kang
            Reporter:
            hyunsik Hyunsik Choi
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development