public static int getEffectiveIndexIntervalAfterIndex ( int index , int samplingLevel , int minIndexInterval ) { assert index >= 0 ; index %= samplingLevel ; List < Integer > originalIndexes = getOriginalIndexes ( samplingLevel ) ; int nextEntryOriginalIndex = ( index == originalIndexes . size ( ) - 1 ) ? BASE_SAMPLING_LEVEL : originalIndexes . get ( index + 1 ) ; return ( nextEntryOriginalIndex - originalIndexes . get ( index ) ) * minIndexInterval ; }
Calculates the effective index interval after the entry at index in an IndexSummary . In other words this returns the number of partitions in the primary on - disk index before the next partition that has an entry in the index summary . If samplingLevel == BASE_SAMPLING_LEVEL this will be equal to the index interval .