mirror of
https://github.com/apache/impala.git
synced 2026-02-01 12:00:22 -05:00
Adds erasure coding policy to introspection commands SHOW FILES, SHOW PARTITIONS, SHOW TABLE STATS, and DESCRIBE EXTENDED. Remove `throws IOException` for methods that don't throw. Removes null check for getSd because getStorageDescriptorInfo - which is called right after getTableMetaDataInformation - uses it without checking for null. Adds '$ERASURECODE_POLICY' for runtime test substitution. The test suite replaces this with the current erasure code policy - from HDFS_ERASURECODE_POLICY - or NONE to match expected output. Testing: - ran backend, end-to-end, and custom cluster tests with erasure coding - ran backend, end-to-end, and custom cluster tests with exhaustive strategy Change-Id: Idd95f2d18b3980581788c92993b6d2f53504b5e0 Reviewed-on: http://gerrit.cloudera.org:8080/19268 Reviewed-by: Michael Smith <michael.smith@cloudera.com> Tested-by: Michael Smith <michael.smith@cloudera.com>
109 lines
2.1 KiB
Plaintext
109 lines
2.1 KiB
Plaintext
====
|
|
---- HIVE_QUERY
|
|
use $DATABASE;
|
|
create table tt (x int) tblproperties (
|
|
'transactional'='true',
|
|
'transactional_properties'='insert_only');
|
|
|
|
insert into tt values (1);
|
|
insert into tt values (2);
|
|
insert into tt values (3);
|
|
====
|
|
---- QUERY
|
|
invalidate metadata tt;
|
|
select * from tt;
|
|
---- RESULTS
|
|
1
|
|
2
|
|
3
|
|
====
|
|
---- HIVE_QUERY
|
|
use $DATABASE;
|
|
alter table tt compact 'major' and wait;
|
|
====
|
|
---- QUERY
|
|
refresh tt;
|
|
select * from tt
|
|
---- RESULTS
|
|
1
|
|
2
|
|
3
|
|
====
|
|
---- QUERY
|
|
show files in tt;
|
|
---- LABELS
|
|
Path,Size,Partition,EC Policy
|
|
---- RESULTS
|
|
row_regex:'$NAMENODE/$MANAGED_WAREHOUSE_DIR/$DATABASE.db/tt/base_0000003_v\d+/000000_0','\d+B','','$ERASURECODE_POLICY'
|
|
---- TYPES
|
|
STRING,STRING,STRING,STRING
|
|
====
|
|
---- HIVE_QUERY
|
|
use $DATABASE;
|
|
create table upgraded_table (x int);
|
|
insert into upgraded_table values (1);
|
|
# Upgrade to the table to insert only acid when there are already values in it.
|
|
alter table upgraded_table set tblproperties
|
|
('transactional' = 'true', 'transactional_properties' = 'insert_only',
|
|
'EXTERNAL'='FALSE');
|
|
insert into upgraded_table values (2);
|
|
insert into upgraded_table values (3);
|
|
====
|
|
---- QUERY
|
|
invalidate metadata upgraded_table;
|
|
select * from upgraded_table;
|
|
---- RESULTS
|
|
1
|
|
2
|
|
3
|
|
====
|
|
---- HIVE_QUERY
|
|
use $DATABASE;
|
|
alter table upgraded_table compact 'major' and wait;
|
|
====
|
|
---- QUERY
|
|
refresh upgraded_table;
|
|
select * from upgraded_table;
|
|
---- RESULTS
|
|
1
|
|
2
|
|
3
|
|
====
|
|
---- HIVE_QUERY
|
|
use $DATABASE;
|
|
create table full_acid (x int) stored as orc tblproperties('transactional'='true');
|
|
|
|
insert into full_acid values (1);
|
|
insert into full_acid values (2);
|
|
insert into full_acid values (3);
|
|
====
|
|
---- QUERY
|
|
invalidate metadata full_acid;
|
|
select * from full_acid;
|
|
---- RESULTS
|
|
1
|
|
2
|
|
3
|
|
====
|
|
---- HIVE_QUERY
|
|
use $DATABASE;
|
|
alter table full_acid compact 'major' and wait;
|
|
====
|
|
---- QUERY
|
|
refresh full_acid;
|
|
select * from full_acid
|
|
---- RESULTS
|
|
1
|
|
2
|
|
3
|
|
====
|
|
---- QUERY
|
|
show files in full_acid;
|
|
---- LABELS
|
|
Path,Size,Partition,EC Policy
|
|
---- RESULTS
|
|
row_regex:'$NAMENODE/$MANAGED_WAREHOUSE_DIR/$DATABASE.db/full_acid/base_0000003_v\d+/.*','\d+B','','$ERASURECODE_POLICY'
|
|
---- TYPES
|
|
STRING,STRING,STRING,STRING
|
|
====
|