bharadwajrembar commented on issue #11140:
URL: https://github.com/apache/druid/issues/11140#issuecomment-824037502


   The main problem here is that, there is no easy way to get number of tasks 
by status. We can query the `druid_tasks` table in PostgreSQL but that only 
gives active tasks by the datasource level and not actually the status 
[`SUCCESS`, `RUNNING`, `PENDING`, `WAITING`, `FAILED`].
   
   ```
   \d druid_tasks
                           Table "public.druid_tasks"
        Column     |          Type          | Collation | Nullable | Default
   ----------------+------------------------+-----------+----------+---------
    id             | character varying(255) |           | not null |
    created_date   | character varying(255) |           | not null |
    datasource     | character varying(255) |           | not null |
    payload        | bytea                  |           | not null |
    status_payload | bytea                  |           | not null |
    active         | boolean                |           | not null | false
   Indexes:
       "druid_tasks_pkey" PRIMARY KEY, btree (id)
       "idx_druid_tasks_active_created_date" btree (active, created_date)
   ```
   
   
   ```
   select datasource, count(*) from druid_tasks where active=true group by 1;
   ```
   
   Is it possible to get the task status without having to parse the 
`status_payload` or `payload` field?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to