Module org.elasticsearch.compute
Class BatchEncoder.BytesRefs
java.lang.Object
org.elasticsearch.compute.operator.mvdedupe.BatchEncoder
org.elasticsearch.compute.operator.mvdedupe.BatchEncoder.MVEncoder
org.elasticsearch.compute.operator.mvdedupe.BatchEncoder.BytesRefs
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.util.Accountable,org.elasticsearch.core.Releasable
- Enclosing class:
BatchEncoder
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.compute.operator.mvdedupe.BatchEncoder
BatchEncoder.Booleans, BatchEncoder.BytesRefs, BatchEncoder.Decoder, BatchEncoder.DirectBooleans, BatchEncoder.DirectBytesRefs, BatchEncoder.DirectDoubles, BatchEncoder.DirectEncoder, BatchEncoder.DirectInts, BatchEncoder.DirectLongs, BatchEncoder.DirectNulls, BatchEncoder.Doubles, BatchEncoder.Ints, BatchEncoder.IsNull, BatchEncoder.Longs, BatchEncoder.MVEncoder -
Field Summary
Fields inherited from class org.elasticsearch.compute.operator.mvdedupe.BatchEncoder.MVEncoder
bytesFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidencode(org.apache.lucene.util.BytesRef v) Encode aBytesRefand advance to the next position.protected final voidensureCapacity(int totalBytes, int count) Make sure there is capacity fortotalBytesand spread across#countBytesRefs? You could call this with something likeensureCapacity(Arrays.stream(bytes).mapToInt(b -> b.length).sum(), bytes.length).protected final booleanhasCapacity(int totalBytes, int count) Is there capacity fortotalBytesand spread across#countBytesRefs? You could call this with something likehasCapacity(Arrays.stream(bytes).mapToInt(b -> b.length).sum(), bytes.length).Methods inherited from class org.elasticsearch.compute.operator.mvdedupe.BatchEncoder.MVEncoder
addingValue, encodeNextBatch, encodeNull, endPosition, firstPosition, positionCount, ramBytesUsed, read, readNextBatch, startPosition, valueCountMethods inherited from class org.elasticsearch.compute.operator.mvdedupe.BatchEncoder
decoderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResourcesMethods inherited from interface org.elasticsearch.core.Releasable
close
-
Constructor Details
-
BytesRefs
protected BytesRefs(int batchSize)
-
-
Method Details
-
hasCapacity
protected final boolean hasCapacity(int totalBytes, int count) Is there capacity fortotalBytesand spread across#countBytesRefs? You could call this with something likehasCapacity(Arrays.stream(bytes).mapToInt(b -> b.length).sum(), bytes.length). -
ensureCapacity
protected final void ensureCapacity(int totalBytes, int count) Make sure there is capacity fortotalBytesand spread across#countBytesRefs? You could call this with something likeensureCapacity(Arrays.stream(bytes).mapToInt(b -> b.length).sum(), bytes.length). -
encode
protected final void encode(org.apache.lucene.util.BytesRef v) Encode aBytesRefand advance to the next position.
-