public class PackedArrayIndexFieldData.PackedArrayEstimator extends Object implements AbstractIndexFieldData.PerValueEstimator
| Constructor and Description |
|---|
PackedArrayIndexFieldData.PackedArrayEstimator(CircuitBreaker breaker,
IndexNumericFieldData.NumericType type,
String fieldName) |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustForNoTerms(long actualUsed)
Adjust the breaker when no terms were actually loaded, but the field
data takes up space regardless.
|
void |
afterLoad(org.apache.lucene.index.TermsEnum termsEnum,
long actualUsed)
Adjusts the breaker based on the aggregated value from the RamAccountingTermsEnum
|
org.apache.lucene.index.TermsEnum |
beforeLoad(org.apache.lucene.index.Terms terms)
Execute any pre-loading estimations for the terms.
|
long |
bytesPerValue(org.apache.lucene.util.BytesRef term) |
public PackedArrayIndexFieldData.PackedArrayEstimator(CircuitBreaker breaker, IndexNumericFieldData.NumericType type, String fieldName)
public long bytesPerValue(org.apache.lucene.util.BytesRef term)
bytesPerValue in interface AbstractIndexFieldData.PerValueEstimatorpublic org.apache.lucene.index.TermsEnum beforeLoad(org.apache.lucene.index.Terms terms)
throws IOException
AbstractIndexFieldData.PerValueEstimatorTermsEnum in a
RamAccountingTermsEnum
which will estimate the memory on a per-term basis.beforeLoad in interface AbstractIndexFieldData.PerValueEstimatorterms - terms to be estimatedIOExceptionpublic void afterLoad(org.apache.lucene.index.TermsEnum termsEnum,
long actualUsed)
afterLoad in interface AbstractIndexFieldData.PerValueEstimatortermsEnum - terms that were wrapped and loadedactualUsed - actual field data memory usagepublic void adjustForNoTerms(long actualUsed)
actualUsed - bytes actually usedCopyright © 2009–2017. All rights reserved.