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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]