Quanlong Huang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/23810
Change subject: IMPALA-14647: Fix truncate for replicated txn tables always delete data ...................................................................... IMPALA-14647: Fix truncate for replicated txn tables always delete data If a transactional table is being replicated by Hive replication, Impala uses the truncateTable HMS API to truncate it. However, the last parameter (boolean deleteData) is not set, which causing HMS always delete the data. In HiveServer, there is a configuration, "hive.acid.truncate.usebase", to control whether to create a new base_* dir (so keep the data files) for truncate operation. This patch fixes the API invocation to respect this configuration. Tests: - Added test to verify the data files exist after truncate. - Added util method to fetch effective hadoop and hive configs from the /hadoop-varz endpoint. Change-Id: Ia31991baeb2ef8717c387b841b65cff562dbcae0 --- M fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java M fe/src/main/java/org/apache/impala/service/JniCatalog.java M tests/common/impala_service.py M tests/common/impala_test_suite.py M tests/metadata/test_event_processing_base.py 5 files changed, 53 insertions(+), 6 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/10/23810/1 -- To view, visit http://gerrit.cloudera.org:8080/23810 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia31991baeb2ef8717c387b841b65cff562dbcae0 Gerrit-Change-Number: 23810 Gerrit-PatchSet: 1 Gerrit-Owner: Quanlong Huang <[email protected]>
