Fix 'redundant cast to long' warning in TestTieredMergePolicy.

This commit is contained in:
Christine Poerschke 2018-07-31 18:55:34 +01:00
parent 8a4482805b
commit 1a870876c2
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ public class TestTieredMergePolicy extends BaseMergePolicyTestCase {
totalMaxDoc += sci.info.maxDoc(); totalMaxDoc += sci.info.maxDoc();
long byteSize = sci.sizeInBytes(); long byteSize = sci.sizeInBytes();
double liveRatio = 1 - (double) sci.getDelCount() / sci.info.maxDoc(); double liveRatio = 1 - (double) sci.getDelCount() / sci.info.maxDoc();
long weightedByteSize = (long) Math.round(liveRatio * byteSize); long weightedByteSize = Math.round(liveRatio * byteSize);
totalBytes += weightedByteSize; totalBytes += weightedByteSize;
minSegmentBytes = Math.min(minSegmentBytes, weightedByteSize); minSegmentBytes = Math.min(minSegmentBytes, weightedByteSize);
} }