You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/03/17 07:28:53 UTC
[GitHub] [hive] shameersss1 commented on a change in pull request #3053: HIVE-25980: Reduce fs calls in HiveMetaStoreChecker.checkTable
shameersss1 commented on a change in pull request #3053:
URL: https://github.com/apache/hive/pull/3053#discussion_r828821293
##########
File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreChecker.java
##########
@@ -468,6 +459,25 @@ void findUnknownPartitions(Table table, Set<Path> partPaths, byte[] filterExp,
}
}
}
+
+ Set<Path> partPathsInMS = partPaths;
+ // don't want the table dir
+ partPathsInMS.remove(tablePath);
+ // remove partition paths in partPathsInMS, to getPartitionsNotOnFs
+ partPathsInMS.removeAll(allPartDirs);
Review comment:
allPartDirs here contains all partition path which are there in FileSystem but not in metastore. Removing it from partPathsInMS doesn't make sense.
I think this operation should be done before allPartDirs.removeAll(partPaths);
##########
File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreChecker.java
##########
@@ -468,6 +459,25 @@ void findUnknownPartitions(Table table, Set<Path> partPaths, byte[] filterExp,
}
}
}
+
+ Set<Path> partPathsInMS = partPaths;
+ // don't want the table dir
+ partPathsInMS.remove(tablePath);
+ // remove partition paths in partPathsInMS, to getPartitionsNotOnFs
+ partPathsInMS.removeAll(allPartDirs);
+ // There can be edge case where user can define partition directory outside of table directory
+ // to avoid eviction of such partitions
+ // we check for partition path not exists and add to result for getPartitionsNotOnFs.
+ for (Path partPath : partPathsInMS) {
+ FileSystem fs = partPath.getFileSystem(conf);
Review comment:
As you pointed out, Having multi-threaded check of partition files will be useful.
##########
File path: ql/src/test/queries/clientpositive/msck_repair_multi_thread.q
##########
@@ -0,0 +1,33 @@
+DROP TABLE IF EXISTS repairtable_hive_25980;
Review comment:
file name doesn't match the optimization we are doing.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org