krishan1390 commented on code in PR #17191:
URL: https://github.com/apache/pinot/pull/17191#discussion_r2588566420


##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/SegmentCreator.java:
##########
@@ -106,4 +107,17 @@ default void indexColumn(String columnName, @Nullable 
int[] sortedDocIds, IndexS
    */
   void seal()
       throws ConfigurationException, IOException;
+
+  String getSegmentName();
+
+  /**
+   * Finalize the segment with all post-creation operations including sealing,
+   * format conversion, index building, and metadata persistence.
+   *
+   * @param instanceType Instance type for metrics tracking (nullable)
+   * @return Final segment directory
+   * @throws Exception If finalization fails
+   */
+  File finalizeSegment(@Nullable InstanceType instanceType)

Review Comment:
   thats a good idea. removed seal() and setSegmentName() from the public 
interface so now we have a single method called createSegment(). 
   
   Removing instanceType too is a good idea but requires many changes and in 
realtime code path too. Added a TODO and will create a seperate PR for that.



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