Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2275

need implementations of sys tables for drill memory and threads profiles

Details

    • Task
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 0.9.0
    • Metadata
    • None

    Description

      In order to check drill state information, the following tables are to be implemented:

      1. Memory: a query such as

      select * from sys.drillmemory;

      should return a result set like the following:

      +------------+------------+--------------+------------+------------+
      |    drillbit    | total_sys_memory   |heap_size | direct_alloc_memory |
      +------------+------------+--------------+------------+------------+
      | node1:port1       | 24596676k         | 15200420k         | 1012372k   |
      +------------+------------+--------------+------------+------------+
      | node2:port2       | 24596676k         | 15200420k         | 2012372k   |
      +------------+------------+--------------+------------+------------+
      

      2. Threads:
      For each node in a cluster, we need counts of threads of the drillbits. A query like this:

      select * from sys.drillbitthreads;

      should return a result set like the following:

      +------------+------------+--------------+------------+------------+
      |    drillbit    | pool_name   | total_threads | busy_threads |
      +------------+------------+--------------+------------+------------+
      | node1:port1       | pool1         | 8         | 2   |
      +------------+------------+--------------+------------+------------+
      | node2:port2       | pool2         | 10         | 5   |
      +------------+------------+--------------+------------+------------+
      

      Attachments

        1. DRILL-2275.1.patch.txt
          47 kB
          Sudheesh Katkam
        2. DRILL-2275.2.patch.txt
          54 kB
          Sudheesh Katkam
        3. DRILL-2275.3.patch.txt
          54 kB
          Sudheesh Katkam
        4. DRILL-2275.4.patch.txt
          55 kB
          Sudheesh Katkam
        5. DRILL-2275.5.patch.txt
          56 kB
          Sudheesh Katkam
        6. DRILL-2275.6.patch.txt
          58 kB
          Sudheesh Katkam
        7. DRILL-2275.7.patch.txt
          58 kB
          Sudheesh Katkam

        Issue Links

          Activity

            sudheeshkatkam Sudheesh Katkam added a comment - On review board: https://reviews.apache.org/r/31938/

            LGTM, +1.

            vkorukanti Venki Korukanti added a comment - LGTM, +1.

            Fixed in 8ab361b.

            vkorukanti Venki Korukanti added a comment - Fixed in 8ab361b .
            cchang@maprtech.com Chun Chang added a comment -

            reopen to verify fix.

            cchang@maprtech.com Chun Chang added a comment - reopen to verify fix.
            cchang@maprtech.com Chun Chang added a comment -
            0: jdbc:drill:schema=dfs.drillTestDirComplexJ> use sys;
            +-------+----------------------------------+
            |  ok   |             summary              |
            +-------+----------------------------------+
            | true  | Default schema changed to [sys]  |
            +-------+----------------------------------+
            1 row selected (0.123 seconds)
            0: jdbc:drill:schema=dfs.drillTestDirComplexJ> show tables;
            +---------------+-------------+
            | TABLE_SCHEMA  | TABLE_NAME  |
            +---------------+-------------+
            | sys           | boot        |
            | sys           | drillbits   |
            | sys           | memory      |
            | sys           | options     |
            | sys           | threads     |
            | sys           | version     |
            +---------------+-------------+
            6 rows selected (0.223 seconds)
            0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select * from memory;
            +---------------+------------+---------------+-------------+-----------------+---------------------+-------------+
            |   hostname    | user_port  | heap_current  |  heap_max   | direct_current  | jvm_direct_current  | direct_max  |
            +---------------+------------+---------------+-------------+-----------------+---------------------+-------------+
            | 10.10.30.169  | 31010      | 2067120568    | 4294967296  | 11798941        | 1417670208          | 8589934592  |
            | 10.10.30.167  | 31010      | 1558629904    | 4294967296  | 7750365         | 1391264033          | 8589934592  |
            | 10.10.30.168  | 31010      | 3260027472    | 4294967296  | 7750365         | 1430581626          | 8589934592  |
            | 10.10.30.166  | 31010      | 3613490912    | 4294967296  | 29560368        | 7257210806          | 8589934592  |
            +---------------+------------+---------------+-------------+-----------------+---------------------+-------------+
            4 rows selected (0.19 seconds)
            0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select * from threads;
            +---------------+------------+----------------+---------------+
            |   hostname    | user_port  | total_threads  | busy_threads  |
            +---------------+------------+----------------+---------------+
            | 10.10.30.168  | 31010      | 230            | 57            |
            | 10.10.30.169  | 31010      | 270            | 58            |
            | 10.10.30.167  | 31010      | 250            | 56            |
            | 10.10.30.166  | 31010      | 348            | 58            |
            +---------------+------------+----------------+---------------+
            4 rows selected (0.164 seconds)
            
            cchang@maprtech.com Chun Chang added a comment - 0: jdbc:drill:schema=dfs.drillTestDirComplexJ> use sys; +-------+----------------------------------+ | ok | summary | +-------+----------------------------------+ | true | Default schema changed to [sys] | +-------+----------------------------------+ 1 row selected (0.123 seconds) 0: jdbc:drill:schema=dfs.drillTestDirComplexJ> show tables; +---------------+-------------+ | TABLE_SCHEMA | TABLE_NAME | +---------------+-------------+ | sys | boot | | sys | drillbits | | sys | memory | | sys | options | | sys | threads | | sys | version | +---------------+-------------+ 6 rows selected (0.223 seconds) 0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select * from memory; +---------------+------------+---------------+-------------+-----------------+---------------------+-------------+ | hostname | user_port | heap_current | heap_max | direct_current | jvm_direct_current | direct_max | +---------------+------------+---------------+-------------+-----------------+---------------------+-------------+ | 10.10.30.169 | 31010 | 2067120568 | 4294967296 | 11798941 | 1417670208 | 8589934592 | | 10.10.30.167 | 31010 | 1558629904 | 4294967296 | 7750365 | 1391264033 | 8589934592 | | 10.10.30.168 | 31010 | 3260027472 | 4294967296 | 7750365 | 1430581626 | 8589934592 | | 10.10.30.166 | 31010 | 3613490912 | 4294967296 | 29560368 | 7257210806 | 8589934592 | +---------------+------------+---------------+-------------+-----------------+---------------------+-------------+ 4 rows selected (0.19 seconds) 0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select * from threads; +---------------+------------+----------------+---------------+ | hostname | user_port | total_threads | busy_threads | +---------------+------------+----------------+---------------+ | 10.10.30.168 | 31010 | 230 | 57 | | 10.10.30.169 | 31010 | 270 | 58 | | 10.10.30.167 | 31010 | 250 | 56 | | 10.10.30.166 | 31010 | 348 | 58 | +---------------+------------+----------------+---------------+ 4 rows selected (0.164 seconds)

            People

              cchang@maprtech.com Chun Chang
              zhiyongliu Zhiyong Liu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: