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


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreChecker.java:
##########
@@ -358,6 +361,28 @@ void checkTable(Table table, PartitionIterable parts, 
byte[] filterExp, CheckRes
       if (partPath == null) {
         continue;
       }
+
+      // check the table/partition if (totalSize / numFiles) is less than 
avgFileSize
+      Map<String, String> partitionParameters = partition.getParameters();
+      if (partitionParameters != null) {
+        long totalSize = 
Long.parseLong(partitionParameters.getOrDefault(StatsSetupConst.TOTAL_SIZE, 
"0"));

Review Comment:
   I think this part is 1 of 2 key-points of this PR. To provide end users 
verbal warnings when they do` msck` or `analyze`, about the existence of small 
files. 
   And the existence of small files will always be a case in the newly added 
partitions.



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

Reply via email to