Jackie-Jiang commented on code in PR #9359:
URL: https://github.com/apache/pinot/pull/9359#discussion_r967435756


##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/name/SegmentNameGenerator.java:
##########
@@ -37,7 +37,7 @@ public interface SegmentNameGenerator extends Serializable {
    * @param segmentName provide segment name
    * @return true if segmentName is valid.
    */
-  default boolean isValidSegmentName(String segmentName) {
+  static boolean isValidSegmentName(String segmentName) {

Review Comment:
   Let's create a `SegmentNameUtils` class and move this method there



##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/name/SegmentNameGenerator.java:
##########
@@ -37,7 +37,7 @@ public interface SegmentNameGenerator extends Serializable {
    * @param segmentName provide segment name
    * @return true if segmentName is valid.
    */
-  default boolean isValidSegmentName(String segmentName) {
+  static boolean isValidSegmentName(String segmentName) {

Review Comment:
   Consider changing it to `void validateSegmentName(String segmentName)` and 
throw `IllegalArgumentException` to simplify the caller code.



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