Class UnsortedBaseReducer
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.h2.twostep.AbstractReducer
-
- org.apache.ignite.internal.processors.query.h2.twostep.UnsortedBaseReducer
-
- All Implemented Interfaces:
Reducer
- Direct Known Subclasses:
UnsortedOneWayReducer,UnsortedReducer
public abstract class UnsortedBaseReducer extends AbstractReducer
Base unsorted merge index.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.ignite.internal.processors.query.h2.twostep.Reducer
Reducer.RowComparator
-
-
Field Summary
Fields Modifier and Type Field Description protected AtomicIntegeractiveSourcesCntprotected Iterator<org.h2.value.Value[]>iterprotected org.apache.ignite.internal.processors.query.h2.twostep.UnsortedBaseReducer.PollableQueue<ReduceResultPage>queue-
Fields inherited from class org.apache.ignite.internal.processors.query.h2.twostep.AbstractReducer
colCnt, fetched, srcNodes
-
-
Constructor Summary
Constructors Constructor Description UnsortedBaseReducer(GridKernalContext ctx)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddPage0(ReduceResultPage page)booleanfetchedAll()Check if all rows has been fetched from all sources.protected org.h2.index.CursorfindAllFetched(List<org.h2.result.Row> fetched, @Nullable org.h2.result.SearchRow first, @Nullable org.h2.result.SearchRow last)voidsetSources(Map<ClusterNode,BitSet> nodesToSegmentsCnt)Set source nodes.-
Methods inherited from class org.apache.ignite.internal.processors.query.h2.twostep.AbstractReducer
addPage, checkBounds, createDummyLastPage, fail, find, findInStream, hasSource, onBlockEvict, onFailure, pollNextIterator, setPageSize, sources
-
-
-
-
Field Detail
-
activeSourcesCnt
protected final AtomicInteger activeSourcesCnt
-
queue
protected final org.apache.ignite.internal.processors.query.h2.twostep.UnsortedBaseReducer.PollableQueue<ReduceResultPage> queue
-
iter
protected Iterator<org.h2.value.Value[]> iter
-
-
Constructor Detail
-
UnsortedBaseReducer
public UnsortedBaseReducer(GridKernalContext ctx)
Constructor.- Parameters:
ctx- Context.
-
-
Method Detail
-
setSources
public void setSources(Map<ClusterNode,BitSet> nodesToSegmentsCnt)
Set source nodes.- Specified by:
setSourcesin interfaceReducer- Overrides:
setSourcesin classAbstractReducer- Parameters:
nodesToSegmentsCnt- Mapping of nodes to expected count of segments to scan.
-
fetchedAll
public boolean fetchedAll()
Check if all rows has been fetched from all sources.- Returns:
trueIf all rows has been fetched,falseotherwise.
-
addPage0
protected void addPage0(ReduceResultPage page)
- Specified by:
addPage0in classAbstractReducer- Parameters:
page- Page.
-
findAllFetched
protected org.h2.index.Cursor findAllFetched(List<org.h2.result.Row> fetched, @Nullable @Nullable org.h2.result.SearchRow first, @Nullable @Nullable org.h2.result.SearchRow last)
- Specified by:
findAllFetchedin classAbstractReducer- Parameters:
fetched- Fetched data.first- Row.last- Row.- Returns:
- Cursor over fetched data.
-
-