Skip to content

Commit

Permalink
Print message in TableSizeReader only when num of errors > 0 (#2990)
Browse files Browse the repository at this point in the history
* Print message in TableSizeReader only when num of errors > 0

* Address PR comment
  • Loading branch information
jackjlli committed Jul 26, 2018
1 parent 532651f commit d5a4ad8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ pinot-dashboard/dist
pinot-dashboard/pinotui.egg-info
*.log
.doppelganger
*.ipr
*.iws
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,11 @@ public TableSubTypeSizeDetails getTableSubtypeSize(String tableNameWithType, int
}
// after iterating over all servers update summary reported and estimated size of the segment
if (errors != segmentSizes.serverInfo.size()) {
// atleast one server reported size for this segment
LOGGER.info("Could not get size for segment {} from {} servers. Using segmentLevelMax {} to estimate the size",
segmentEntry.getKey(), errors, segmentLevelMax);
// at least one server reported size for this segment
if (errors > 0) {
LOGGER.info("Could not get size for segment {} from {} servers. Using segmentLevelMax {} to estimate the size",
segmentEntry.getKey(), errors, segmentLevelMax);
}
segmentSizes.estimatedSizeInBytes = segmentSizes.reportedSizeInBytes + errors * segmentLevelMax;
tableLevelMax = Math.max(tableLevelMax, segmentLevelMax);
subTypeSizeDetails.reportedSizeInBytes += segmentSizes.reportedSizeInBytes;
Expand Down

0 comments on commit d5a4ad8

Please sign in to comment.