You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "DanielZhu58 (via GitHub)" <gi...@apache.org> on 2025/10/03 08:53:50 UTC

Re: [PR] HIVE-28813: MSCK/Analyze commands can show a warning in console for Small files. [hive]

DanielZhu58 commented on code in PR #5950:
URL: https://github.com/apache/hive/pull/5950#discussion_r2401263787


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/misc/msck/MsckOperation.java:
##########
@@ -75,7 +78,25 @@ public int execute() throws HiveException, IOException, TException, MetastoreExc
       MsckInfo msckInfo = new MsckInfo(SessionState.get().getCurrentCatalog(), tableName.getDb(), tableName.getTable(),
           desc.getFilterExp(), desc.getResFile(), desc.isRepairPartitions(),
           desc.isAddPartitions(), desc.isDropPartitions(), partitionExpirySeconds);
-      return msck.repair(msckInfo);
+      int result = msck.repair(msckInfo);
+      Map<String, String> smallFilesStats = msckInfo.getSmallFilesStats();
+      if (smallFilesStats != null && !smallFilesStats.isEmpty()) {
+        // keep the small files information in the logs
+        List<String> logInfo = smallFilesStats.entrySet().stream()
+                .map(entry -> String.format(
+                        "This table/partition average file size is less than Hive average file size.%n The partition name is %s. %s",

Review Comment:
   Acknowledged.



-- 
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