Class NonEstimatingEstimator
- java.lang.Object
-
- org.elasticsearch.index.fielddata.plain.NonEstimatingEstimator
-
- All Implemented Interfaces:
AbstractIndexFieldData.PerValueEstimator
public class NonEstimatingEstimator extends java.lang.Object implements AbstractIndexFieldData.PerValueEstimator
Estimator that does nothing except for adjust the breaker after the field data has been loaded. Useful for field data implementations that do not yet have pre-loading estimations.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterLoad(org.apache.lucene.index.TermsEnum termsEnum, long actualUsed)
Possibly adjust a circuit breaker after field data has been loaded, now that the actual amount of memory used by the field data is knownorg.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)
-
-
-
Method Detail
-
bytesPerValue
public long bytesPerValue(org.apache.lucene.util.BytesRef term)
- Specified by:
bytesPerValue
in interfaceAbstractIndexFieldData.PerValueEstimator
- Returns:
- the number of bytes for the given term
-
beforeLoad
public org.apache.lucene.index.TermsEnum beforeLoad(org.apache.lucene.index.Terms terms) throws java.io.IOException
Description copied from interface:AbstractIndexFieldData.PerValueEstimator
Execute any pre-loading estimations for the terms. May also optionally wrap aTermsEnum
in aRamAccountingTermsEnum
which will estimate the memory on a per-term basis.- Specified by:
beforeLoad
in interfaceAbstractIndexFieldData.PerValueEstimator
- Parameters:
terms
- terms to be estimated- Returns:
- A TermsEnum for the given terms
- Throws:
java.io.IOException
-
afterLoad
public void afterLoad(@Nullable org.apache.lucene.index.TermsEnum termsEnum, long actualUsed)
Description copied from interface:AbstractIndexFieldData.PerValueEstimator
Possibly adjust a circuit breaker after field data has been loaded, now that the actual amount of memory used by the field data is known- Specified by:
afterLoad
in interfaceAbstractIndexFieldData.PerValueEstimator
- Parameters:
termsEnum
- terms that were loadedactualUsed
- actual field data memory usage
-
-