Module org.apache.lucene.misc
Package org.apache.lucene.misc.index
Class BPIndexReorderer.IndexReorderingTask
java.lang.Object
java.util.concurrent.ForkJoinTask<Void>
java.util.concurrent.RecursiveAction
org.apache.lucene.misc.index.BPIndexReorderer.BaseRecursiveAction
org.apache.lucene.misc.index.BPIndexReorderer.IndexReorderingTask
- All Implemented Interfaces:
Serializable
,Future<Void>
- Enclosing class:
BPIndexReorderer
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final float[]
private final IntsRef
private final BitSet
private final CloseableThreadLocal
<BPIndexReorderer.PerThreadState> Fields inherited from class org.apache.lucene.misc.index.BPIndexReorderer.BaseRecursiveAction
depth
-
Constructor Summary
ConstructorsConstructorDescriptionIndexReorderingTask
(IntsRef docIDs, float[] biases, CloseableThreadLocal<BPIndexReorderer.PerThreadState> threadLocal, BitSet parents, int depth) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
protected void
compute()
private void
computeDocFreqs
(IntsRef docs, BPIndexReorderer.ForwardIndex forwardIndex, int[] docFreqs) private boolean
shuffle
(BPIndexReorderer.ForwardIndex forwardIndex, IntsRef docIDs, int midPoint, int[] leftDocFreqs, int[] rightDocFreqs, float[] biases, BitSet parents, int iter) Shuffle doc IDs across both partitions so that each partition has lower gaps between consecutive postings.private void
swapDocsAndFreqs
(int[] docs, int left, int right, BPIndexReorderer.ForwardIndex forwardIndex, int[] leftDocFreqs, int[] rightDocFreqs) Methods inherited from class org.apache.lucene.misc.index.BPIndexReorderer.BaseRecursiveAction
shouldFork
Methods inherited from class java.util.concurrent.RecursiveAction
exec, getRawResult, setRawResult
Methods inherited from class java.util.concurrent.ForkJoinTask
adapt, adapt, adapt, adaptInterruptible, cancel, compareAndSetForkJoinTaskTag, complete, completeExceptionally, exceptionNow, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollSubmission, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, quietlyJoin, quietlyJoinUninterruptibly, reinitialize, resultNow, setForkJoinTaskTag, state, tryUnfork
-
Field Details
-
docIDs
-
biases
private final float[] biases -
threadLocal
-
parents
-
-
Constructor Details
-
IndexReorderingTask
IndexReorderingTask(IntsRef docIDs, float[] biases, CloseableThreadLocal<BPIndexReorderer.PerThreadState> threadLocal, BitSet parents, int depth)
-
-
Method Details
-
computeDocFreqs
private void computeDocFreqs(IntsRef docs, BPIndexReorderer.ForwardIndex forwardIndex, int[] docFreqs) -
compute
protected void compute()- Specified by:
compute
in classRecursiveAction
-
assertParentStructure
private boolean assertParentStructure() -
shuffle
private boolean shuffle(BPIndexReorderer.ForwardIndex forwardIndex, IntsRef docIDs, int midPoint, int[] leftDocFreqs, int[] rightDocFreqs, float[] biases, BitSet parents, int iter) throws IOException Shuffle doc IDs across both partitions so that each partition has lower gaps between consecutive postings.- Throws:
IOException
-
swapDocsAndFreqs
private void swapDocsAndFreqs(int[] docs, int left, int right, BPIndexReorderer.ForwardIndex forwardIndex, int[] leftDocFreqs, int[] rightDocFreqs) throws IOException - Throws:
IOException
-