mcvsubbu commented on a change in pull request #4078: Reduce logging in 
controller
URL: https://github.com/apache/incubator-pinot/pull/4078#discussion_r272658403
 
 

 ##########
 File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/validation/OfflineSegmentIntervalChecker.java
 ##########
 @@ -81,18 +81,19 @@ private void validateOfflineSegmentPush(TableConfig 
tableConfig) {
     SegmentsValidationAndRetentionConfig validationConfig = 
tableConfig.getValidationConfig();
     if (numSegments >= 2 && 
StringUtils.isNotEmpty(validationConfig.getTimeColumnName())) {
       List<Interval> segmentIntervals = new ArrayList<>(numSegments);
-      List<String> segmentsWithInvalidInterval = new ArrayList<>();
+      int numSegmentsWithInvalidIntervals = 0;
       for (OfflineSegmentZKMetadata offlineSegmentZKMetadata : 
offlineSegmentZKMetadataList) {
         Interval timeInterval = offlineSegmentZKMetadata.getTimeInterval();
         if (timeInterval != null && 
TimeUtils.timeValueInValidRange(timeInterval.getStartMillis()) && TimeUtils
             .timeValueInValidRange(timeInterval.getEndMillis())) {
           segmentIntervals.add(timeInterval);
         } else {
-          
segmentsWithInvalidInterval.add(offlineSegmentZKMetadata.getSegmentName());
+          numSegmentsWithInvalidIntervals ++;
         }
       }
-      if (!segmentsWithInvalidInterval.isEmpty()) {
-        LOGGER.warn("Table: {} has segments with invalid interval: {}", 
offlineTableName, segmentsWithInvalidInterval);
+      if (numSegmentsWithInvalidIntervals > 0) {
 
 Review comment:
   I would suggest to log the list here if the list is small, otherwise just 
the number of segments that have invalid intervals. A pinot-admin utility to 
list segments with invalid intervals will be a useful debug tool in case pinot 
admins  get questions from table owners.

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