pvargacl commented on a change in pull request #2017:
URL: https://github.com/apache/hive/pull/2017#discussion_r582604658
##########
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:
The metadata file has a type information, I think you should not use
truncate type, rather create a drop type.
That info might be useful when you do the cleanup and have to decide whether
to delete the whole partition directory or not
----------------------------------------------------------------
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]