mirror of https://github.com/apache/cassandra
refactor: introduce variables
Plus a rename Co-Authored-By: Lada Kesseler <23501754+lexler@users.noreply.github.com>
This commit is contained in:
parent
9f5d99a77a
commit
8c592323f3
|
|
@ -3557,11 +3557,10 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
|
|||
{
|
||||
int minSamplesPerSplit = 4;
|
||||
int maxSplitCount = numberOfKeys / minSamplesPerSplit + 1;
|
||||
int splitCount = Math.max(1,
|
||||
Math.min(
|
||||
maxSplitCount,
|
||||
(int) (totalRowCountEstimate / keysPerSplit)));
|
||||
return splitCount;
|
||||
int calculatedSplitCount = (int) (totalRowCountEstimate / keysPerSplit);
|
||||
int splitCountMaxOrLess = Math.min(maxSplitCount, calculatedSplitCount);
|
||||
int splitCountOneOrHigher = Math.max(1, splitCountMaxOrLess);
|
||||
return splitCountOneOrHigher;
|
||||
}
|
||||
|
||||
private List<Pair<Range<Token>, Long>> getSplits(List<Token> tokens, int splitCount, ColumnFamilyStore cfs)
|
||||
|
|
|
|||
Loading…
Reference in New Issue