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.PerValueEstimator
public org.apache.lucene.index.TermsEnum beforeLoad(org.apache.lucene.index.Terms terms) throws IOException
AbstractIndexFieldData.PerValueEstimator
TermsEnum
in a
RamAccountingTermsEnum
which will estimate the memory on a per-term basis.beforeLoad
in interface AbstractIndexFieldData.PerValueEstimator
terms
- terms to be estimatedIOException
public void afterLoad(org.apache.lucene.index.TermsEnum termsEnum, long actualUsed)
afterLoad
in interface AbstractIndexFieldData.PerValueEstimator
termsEnum
- terms that were wrapped and loadedactualUsed
- actual field data memory usagepublic void adjustForNoTerms(long actualUsed)
actualUsed
- bytes actually usedCopyright © 2009–2016. All rights reserved.