zchovan commented on a change in pull request #2017:
URL: https://github.com/apache/hive/pull/2017#discussion_r582638123
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -4865,10 +4871,26 @@ private boolean drop_partition_common(RawStore ms,
String catName, String db_nam
if (isArchived) {
assert (archiveParentDir != null);
- wh.deleteDir(archiveParentDir, true, mustPurge, needsCm);
+ if (writeTruncatedBase) {
+ try {
+ addTruncateBaseFile(archiveParentDir, writeId,
archiveParentDir.getFileSystem(getConf()));
+ } catch (Exception e) {
+ throw newMetaException(e);
+ }
+ } else {
+ wh.deleteDir(archiveParentDir, true, mustPurge, needsCm);
+ }
} else {
assert (partPath != null);
- wh.deleteDir(partPath, true, mustPurge, needsCm);
+ if (writeTruncatedBase) {
+ try {
+ addTruncateBaseFile(partPath, writeId,
archiveParentDir.getFileSystem(getConf()));
Review comment:
good idea, will do
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]