snleee commented on a change in pull request #3821: Refactor 
SegmentNameGenerators and integrate them into Hadoop
URL: https://github.com/apache/incubator-pinot/pull/3821#discussion_r256641994
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/segment/name/SegmentNameGenerator.java
 ##########
 @@ -18,13 +18,23 @@
  */
 package org.apache.pinot.core.segment.name;
 
-import org.apache.pinot.core.segment.creator.ColumnStatistics;
+import com.google.common.base.Joiner;
+import javax.annotation.Nullable;
 
 
 /**
- * An interface that allows generates names for segments depending on the 
naming scheme.
+ * Interface for segment name generator based on the segment sequence id and 
time range.
  */
 public interface SegmentNameGenerator {
-  String generateSegmentName(ColumnStatistics timeColStatsCollector)
-      throws Exception;
+  Joiner JOINER = Joiner.on('_').skipNulls();
+
+  /**
+   * Generates the segment name.
+   *
+   * @param sequenceId Segment sequence id (negative value means INVALID)
+   * @param minTimeValue Minimum time value
+   * @param maxTimeValue Maximum time value
+   * @return Segment name generated
+   */
+  String generateSegmentName(int sequenceId, @Nullable Object minTimeValue, 
@Nullable Object maxTimeValue);
 
 Review comment:
   +1 on moving `sequenceId` to `generateSegmentName` instead of passing it via 
constructor...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to