okumin commented on code in PR #6006:
URL: https://github.com/apache/hive/pull/6006#discussion_r2404969516
##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -5948,13 +5948,14 @@ public static boolean trashFiles(final FileSystem fs,
final FileStatus[] statuse
final SessionState parentSession = SessionState.get();
for (final FileStatus status : statuses) {
if (null == pool) {
- result &= FileUtils.moveToTrash(fs, status.getPath(), conf, purge);
+ org.apache.hadoop.hive.metastore.utils.FileUtils.deleteDir(fs,
status.getPath(), purge, conf);
} else {
futures.add(pool.submit(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
SessionState.setCurrentSessionState(parentSession);
- return FileUtils.moveToTrash(fs, status.getPath(), conf, purge);
+ org.apache.hadoop.hive.metastore.utils.FileUtils.deleteDir(fs,
status.getPath(), purge, conf);
+ return true;
Review Comment:
This probably changes the behavior; the following part checks the list of
booleans.
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -122,9 +122,8 @@ private List<Path> removeFiles(CleanupRequest cr)
if (needCmRecycle) {
replChangeManager.recycle(dead, ReplChangeManager.RecycleType.MOVE,
cr.isPurge());
}
- if (FileUtils.moveToTrash(fs, dead, conf, cr.isPurge())) {
- deleted.add(dead);
- }
+ FileUtils.deleteDir(fs, dead, cr.isPurge(), conf);
+ deleted.add(dead);
Review Comment:
This change might affect the result of compactions
##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java:
##########
@@ -2215,9 +2215,7 @@ private boolean deletePartitionLocation(Partition
partition, boolean purgeData)
Path path = getWh().getDnsPath(new Path(location));
try {
do {
- if (!getWh().deleteDir(path, true, purgeData, false)) {
- throw new MetaException("Unable to delete partition at " +
location);
Review Comment:
This changes the behavior. We may restore the behavior or validate the new
behavior
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]