dengzhhu653 commented on code in PR #5950:
URL: https://github.com/apache/hive/pull/5950#discussion_r2443659891
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/Msck.java:
##########
@@ -240,6 +248,74 @@ public int repair(MsckInfo msckInfo) throws TException,
MetastoreException, IOEx
}
}
+ // Generate small files warnings only for partsNotInMs
+ try {
+ // Threshold in bytes for average file size considered "small"
+ final long threshold =
+ MetastoreConf.getLongVar(getConf(),
MetastoreConf.ConfVars.MSCK_SMALLFILES_AVG_SIZE);
+
+ // Collect partition names
+ final List<String> names = partsNotInMs.stream()
+ .map(CheckResult.PartitionResult::getPartitionName)
+ .filter(Objects::nonNull)
+ .filter(s -> !s.isEmpty())
+ .collect(Collectors.toList());
+
+ // Batch over the names to limit single-RPC payload.
+ final int PART_FETCH_BATCH = 1000;
+ final Map<String, Partition> byName = new HashMap<>(names.size() *
2);
+ List<Partition> allParts = Batchable.runBatched(
+ PART_FETCH_BATCH,
Review Comment:
PART_FETCH_BATCH -> `MetastoreConf.getIntVar(conf,
MetastoreConf.ConfVars.BATCH_RETRIEVE_MAX)`
--
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]