[ 
https://issues.apache.org/jira/browse/HIVE-21443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16804180#comment-16804180
 ] 

Peter Vary commented on HIVE-21443:
-----------------------------------

Sample output:
{code:java}
0: jdbc:hive2://localhost:10003> select * from compactions;
[..]
+-------------------+------------------------+-------------------------+----------------------+--------------------------+---------------------+----------------------+-------------------------+--------------------------+----------------------+-------------------------+------------------------------+-----------------------+---------------------------------+
| compactions.c_id | compactions.c_catalog | compactions.c_database | 
compactions.c_table | compactions.c_partition | compactions.c_type | 
compactions.c_state | compactions.c_hostname | compactions.c_worker_id | 
compactions.c_start | compactions.c_duration | compactions.c_hadoop_job_id | 
compactions.c_run_as | compactions.c_highest_write_id |
+-------------------+------------------------+-------------------------+----------------------+--------------------------+---------------------+----------------------+-------------------------+--------------------------+----------------------+-------------------------+------------------------------+-----------------------+---------------------------------+
| 1 | default | default | acid | NULL | minor | failed | PeterVary | 
MBP15.local | 1551275865000 | 11000 | NULL | petervary | 5 |
| 10 | default | default | acid | NULL | major | failed | PeterVary | 
MBP15.local | 1551355199000 | 30000 | NULL | petervary | 5 |
| 15 | default | default | acid | NULL | major | failed | PeterVary | 
MBP15.local | 1552074769000 | 22000 | NULL | petervary | 5 |
| 16 | default | default | acid | NULL | major | working | PeterVary | 
MBP15.local | 1553716252000 | NULL | NULL | petervary | 5 |
| 17 | default | default | acid2 | NULL | major | working | PeterVary | 
MBP15.local | 1553785387000 | NULL | NULL | petervary | 5 |
| 18 | default | default | acid3 | NULL | major | initiated | NULL | NULL | 
NULL | NULL | NULL | NULL | NULL |
| 19 | default | default | acid_buck | NULL | major | initiated | NULL | NULL | 
NULL | NULL | NULL | NULL | NULL |
+-------------------+------------------------+-------------------------+----------------------+--------------------------+---------------------+----------------------+-------------------------+--------------------------+----------------------+-------------------------+------------------------------+-----------------------+---------------------------------+
7 rows selected (18.503 seconds)
0: jdbc:hive2://localhost:10003>{code}

> Better usability for SHOW COMPACTIONS
> -------------------------------------
>
>                 Key: HIVE-21443
>                 URL: https://issues.apache.org/jira/browse/HIVE-21443
>             Project: Hive
>          Issue Type: Improvement
>          Components: Transactions
>            Reporter: Todd Lipcon
>            Assignee: Peter Vary
>            Priority: Major
>         Attachments: HIVE-21443.patch
>
>
> Currently on a test cluster the output of 'SHOW COMPACTIONS' has 117k rows. 
> This makes it basically useless to work with.
> For better usability, we should support syntax like 'SHOW COMPACTIONS IN 
> <database>' or maybe 'SHOW COMPACTIONS ON <table>' (particular syntax to be 
> chosen for consistency with other operations I suppose).
> Alternatively (or maybe in addition) it seems like it would be nice to expose 
> the same data in a queryable table (eg in information_schema or a system 
> namespace) so that I could do things like: SELECT dbname, state, count(*) 
> from compactions group by 1,2;



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to