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 voidafterLoad(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.TermsEnumbeforeLoad(org.apache.lucene.index.Terms terms)Execute any pre-loading estimations for the terms.longbytesPerValue(org.apache.lucene.util.BytesRef term)
-
-
-
Method Detail
-
bytesPerValue
public long bytesPerValue(org.apache.lucene.util.BytesRef term)
- Specified by:
bytesPerValuein 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.IOExceptionDescription copied from interface:AbstractIndexFieldData.PerValueEstimatorExecute any pre-loading estimations for the terms. May also optionally wrap aTermsEnumin aRamAccountingTermsEnumwhich will estimate the memory on a per-term basis.- Specified by:
beforeLoadin 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.PerValueEstimatorPossibly 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:
afterLoadin interfaceAbstractIndexFieldData.PerValueEstimator- Parameters:
termsEnum- terms that were loadedactualUsed- actual field data memory usage
-
-