yihua commented on code in PR #11130:
URL: https://github.com/apache/hudi/pull/11130#discussion_r1586996341


##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/ValidateMetadataTableFilesProcedure.scala:
##########
@@ -115,10 +115,10 @@ class ValidateMetadataTableFilesProcedure() extends 
BaseProcedure with Procedure
           rows.add(Row(partition, file, doesFsFileExists, 
doesMetadataFileExists, fsFileLength, metadataFileLength))
         }
       }
-      if (metadataPathInfoList.length != pathInfoList.length) {
-        logError(" FS and metadata files count not matching for " + partition 
+ ". FS files count " + pathInfoList.length + ", metadata base files count " + 
metadataPathInfoList.length)
+      if (metadataPathInfoList.size() != pathInfoList.size()) {

Review Comment:
   Previously, it is equivalent to `metadataPathInfoList.asScala.length`, which 
returns the number of elements in the collection (`metadataPathInfoList` is a 
Java List).  That is equivalent to `metadataPathInfoList.size()`.



##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestCOWDataSource.scala:
##########
@@ -226,7 +226,7 @@ class TestCOWDataSource extends HoodieSparkClientTestBase 
with ScalaAssertionSup
       .save(basePath)
 
     partitionPaths = FSUtils.getAllPartitionPaths(new 
HoodieSparkEngineContext(jsc), HoodieMetadataConfig.newBuilder().build(), 
basePath)
-    assertEquals(partitionPaths.length, 1)
+    assertEquals(partitionPaths.size(), 1)

Review Comment:
   same here.



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to