walterddr commented on a change in pull request #7085: URL: https://github.com/apache/pinot/pull/7085#discussion_r706296954
########## File path: pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/name/SimpleSegmentNameGenerator.java ########## @@ -39,12 +40,20 @@ private final String _segmentNamePostfix; public SimpleSegmentNameGenerator(String segmentNamePrefix, @Nullable String segmentNamePostfix) { + Preconditions.checkArgument( + segmentNamePrefix != null && !segmentNamePrefix.matches(INVALID_SEGMENT_NAME_REGEX)); + Preconditions.checkArgument( + segmentNamePostfix == null || !segmentNamePostfix.matches(INVALID_SEGMENT_NAME_REGEX)); _segmentNamePrefix = segmentNamePrefix; _segmentNamePostfix = segmentNamePostfix; } @Override public String generateSegmentName(int sequenceId, @Nullable Object minTimeValue, @Nullable Object maxTimeValue) { + Preconditions.checkArgument( + minTimeValue == null || !minTimeValue.toString().matches(INVALID_SEGMENT_NAME_REGEX)); Review comment: dont think there's a rule for checking this. will update checkstyle.xml in separate PR -- 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...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org