Copilot commented on code in PR #16635:
URL: https://github.com/apache/pinot/pull/16635#discussion_r2292368458


##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/utils/SegmentMetadataUtils.java:
##########
@@ -67,4 +70,24 @@ public static SegmentMetadata 
updateMetadataProperties(SegmentDirectory segmentD
     segmentDirectory.reloadMetadata();
     return segmentDirectory.getSegmentMetadata();
   }
+
+  @Nullable
+  public static File findMetadataFile(List<File> files) {
+    for (File file : files) {
+      if (V1Constants.MetadataKeys.METADATA_FILE_NAME.equals(file.getName())) {
+        return file;
+      }
+    }
+    return null;
+  }
+
+  @Nullable
+  public static File findCreationMetaFile(List<File> files) {

Review Comment:
   This public utility method lacks Javadoc documentation. It should document 
the purpose, parameters, return value, and behavior when the creation meta file 
is not found.



##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/metadata/SegmentMetadataImpl.java:
##########
@@ -143,6 +143,29 @@ public SegmentMetadataImpl(File indexDir)
     }
   }
 
+  public SegmentMetadataImpl(List<File> files) throws ConfigurationException, 
IOException {

Review Comment:
   This new constructor lacks Javadoc documentation. Since this is a public 
constructor that handles a different initialization pattern for segment 
metadata, it should include documentation explaining when to use this 
constructor versus the directory-based constructor.



##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/utils/SegmentMetadataUtils.java:
##########
@@ -67,4 +70,24 @@ public static SegmentMetadata 
updateMetadataProperties(SegmentDirectory segmentD
     segmentDirectory.reloadMetadata();
     return segmentDirectory.getSegmentMetadata();
   }
+
+  @Nullable
+  public static File findMetadataFile(List<File> files) {

Review Comment:
   This public utility method lacks Javadoc documentation. It should document 
the purpose, parameters, return value, and behavior when the metadata file is 
not found.



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