[
https://issues.apache.org/jira/browse/HIVE-13201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15178435#comment-15178435
]
Wei Zheng commented on HIVE-13201:
----------------------------------
Create a non-ACID table
{code}
hive> create table nonacid (a int);
OK
Time taken: 0.939 seconds
hive> desc formatted nonacid;
OK
# col_name data_type comment
a int
# Detailed Table Information
Database: default
Owner: hive
CreateTime: Thu Mar 03 19:22:56 UTC 2016
LastAccessTime: UNKNOWN
Protect Mode: None
Retention: 0
Location:
hdfs://jvaria-hive-1-4.novalocal:8020/apps/hive/warehouse/nonacid
Table Type: MANAGED_TABLE
Table Parameters:
transient_lastDdlTime 1457032976
# Storage Information
SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
InputFormat: org.apache.hadoop.mapred.TextInputFormat
OutputFormat:
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
Compressed: No
Num Buckets: -1
Bucket Columns: []
Sort Columns: []
Storage Desc Params:
serialization.format 1
Time taken: 0.26 seconds, Fetched: 26 row(s)
hive> alter table nonacid compact 'major';
Compaction enqueued.
OK
Time taken: 0.098 seconds
{code}
On the metastore side, the compaction request is enqueued
{code}
mysql> select * from COMPACTION_QUEUE;
+-------+-------------+----------+--------------+----------+---------+--------------+---------------+-----------+-------------------+--------------+------------------+
| CQ_ID | CQ_DATABASE | CQ_TABLE | CQ_PARTITION | CQ_STATE | CQ_TYPE |
CQ_WORKER_ID | CQ_START | CQ_RUN_AS | CQ_HIGHEST_TXN_ID | CQ_META_INFO |
CQ_HADOOP_JOB_ID |
+-------+-------------+----------+--------------+----------+---------+--------------+---------------+-----------+-------------------+--------------+------------------+
| 5 | default | nonacid | NULL | r | a | NULL
| 1457033021000 | hive | NULL | NULL | NULL
|
+-------+-------------+----------+--------------+----------+---------+--------------+---------------+-----------+-------------------+--------------+------------------+
1 row in set (0.00 sec)
{code}
> Compaction shouldn't be allowed on non-ACID table
> -------------------------------------------------
>
> Key: HIVE-13201
> URL: https://issues.apache.org/jira/browse/HIVE-13201
> Project: Hive
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 2.0.0
> Reporter: Wei Zheng
> Assignee: Wei Zheng
>
> Looks like compaction is allowed on non-ACID table, although that's of no
> sense and does nothing. Moreover the compaction request will be enqueued into
> COMPACTION_QUEUE metastore table, which brings unnecessary overhead.
> We should prevent compaction commands being allowed on non-ACID tables.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)