dengzhhu653 commented on code in PR #5950:
URL: https://github.com/apache/hive/pull/5950#discussion_r2370992296
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/Msck.java:
##########
@@ -239,6 +244,57 @@ public int repair(MsckInfo msckInfo) throws TException,
MetastoreException, IOEx
throw new MetastoreException(e);
}
}
+ // Generate small files warnings only for partsNotInMs
+ try {
+ long threshold = HiveConf.getLongVar(getConf(),
HiveConf.ConfVars.HIVE_MERGE_MAP_FILES_AVG_SIZE);
+ Map<String, String> smallFilesStats = new TreeMap<>();
+
+ for (CheckResult.PartitionResult pr : partsNotInMs) {
+ List<String> statsVals;
+ try {
+ // parse the partition name into a few partition values
+ statsVals = Warehouse.makeValsFromName(pr.getPartitionName(),
null);
+ } catch (MetaException me) {
+ // skip this partition if this somehow failed
+ continue;
+ }
+
+ Partition p;
+ try {
+ // the newly added partition should exist in metastore
+ p = getMsc().getPartition(table.getCatName(), table.getDbName(),
table.getTableName(), statsVals);
+ } catch (NoSuchObjectException nsoe) {
+ // the partition is not actually added in metastore
+ continue;
+ }
+
+ Path loc = new Path(p.getSd().getLocation());
Review Comment:
we have the partition location in `pr`
--
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]