You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/04/05 00:18:08 UTC

[GitHub] [incubator-pinot] sunithabeeram commented on a change in pull request #4078: Reduce logging in controller

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

 ##########
 File path: pinot-controller/src/main/java/org/apache/pinot/controller/validation/OfflineSegmentIntervalChecker.java
 ##########
 @@ -81,18 +83,23 @@ 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<>();
+      List<String> segmentsWithInvalidInterval = new ArrayList<>(MAX_SEGMENTS_WITH_INVALID_INTERVALS_TO_LOG);
+      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.size() < MAX_SEGMENTS_WITH_INVALID_INTERVALS_TO_LOG) {
+            segmentsWithInvalidInterval.add(offlineSegmentZKMetadata.getSegmentName());
+          }
         }
       }
       if (!segmentsWithInvalidInterval.isEmpty()) {
-        LOGGER.warn("Table: {} has segments with invalid interval: {}", offlineTableName, segmentsWithInvalidInterval);
+        LOGGER.warn("Table: {} has {} segments with invalid interval. Listing up to {}: {}", offlineTableName,
 
 Review comment:
   If there is an admin tool one can use to figure out the segments that have invalid interval, we can use that to find out the ones that are bad and just log the segment count here. (If one doesn't exist we can build one). 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org