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>
76 lines
2.5 KiB
Plaintext
76 lines
2.5 KiB
Plaintext
====
|
|
---- QUERY
|
|
# If the cache directive was deleted outside of Impala, the metadata
|
|
# will not reflect this change until the table is reloaded.
|
|
show table stats cachedb.cached_tbl_reload
|
|
---- RESULTS
|
|
-1,0,'0B','0B','8','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
---- TYPES
|
|
BIGINT, BIGINT, STRING, STRING, STRING, STRING, STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
show table stats cachedb.cached_tbl_reload_part
|
|
---- RESULTS
|
|
'1',-1,0,'0B','0B','8','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'2',-1,0,'0B','0B','8','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'Total',-1,0,'0B',regex:.+B,'','','','',''
|
|
---- TYPES
|
|
STRING, BIGINT, BIGINT, STRING, STRING, STRING, STRING, STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
# Inserting into now uncached partition will not fail, IMPALA-1632
|
|
insert into cachedb.cached_tbl_reload_part partition (j) values (1, 1)
|
|
====
|
|
---- QUERY
|
|
select * from cachedb.cached_tbl_reload_part
|
|
---- RESULTS
|
|
1,1
|
|
---- TYPES
|
|
INT, INT
|
|
====
|
|
---- QUERY
|
|
invalidate metadata cachedb.cached_tbl_reload
|
|
====
|
|
---- QUERY
|
|
invalidate metadata cachedb.cached_tbl_reload_part
|
|
====
|
|
---- QUERY
|
|
invalidate metadata cachedb.no_replication_factor
|
|
====
|
|
---- QUERY
|
|
# Once the metadata is updated, the table no longer appears as cached
|
|
show table stats cachedb.cached_tbl_reload
|
|
---- RESULTS
|
|
-1,0,'0B','NOT CACHED','NOT CACHED','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
---- TYPES
|
|
BIGINT, BIGINT, STRING, STRING, STRING, STRING, STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
# The parent test method modified the cached partitioned table so that
|
|
# the cache directive information for the overall table and partition j=1
|
|
# was deleted after reloading the table. Adding a new partition (j=3)
|
|
# will result in adding an uncached partition.
|
|
alter table cachedb.cached_tbl_reload_part add partition (j=3)
|
|
====
|
|
---- QUERY
|
|
# Validate that new partition is uncached.
|
|
show table stats cachedb.cached_tbl_reload_part
|
|
---- RESULTS
|
|
'1',-1,1,regex:.+B,'NOT CACHED','NOT CACHED','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'2',-1,0,'0B','0B','3','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'3',-1,0,'0B','NOT CACHED','NOT CACHED','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'Total',-1,1,regex:.+B,regex:.+B,'','','','',''
|
|
---- TYPES
|
|
STRING, BIGINT, BIGINT, STRING, STRING, STRING, STRING, STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
# Insert into table without replication factor set in Hive MS, IMPALA-1750
|
|
insert into cachedb.no_replication_factor values (1)
|
|
====
|
|
---- QUERY
|
|
select * from cachedb.no_replication_factor
|
|
---- RESULTS
|
|
1
|
|
---- TYPES
|
|
INT
|
|
==== |