public abstract class AbstractReducer extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Reducer.RowComparator
Rows comparator.
|
| Modifier and Type | Field and Description |
|---|---|
protected ReduceBlockList<org.gridgain.internal.h2.result.Row> |
fetched
Will be r/w from query execution thread only, does not need to be threadsafe.
|
protected org.apache.ignite.internal.processors.query.h2.H2MemoryTracker |
memTracker |
protected Set<UUID> |
srcNodes
Row source nodes.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPage(ReduceResultPage page)
Offer result page for reduce.
|
protected abstract void |
addPage0(ReduceResultPage page) |
protected void |
checkBounds(org.gridgain.internal.h2.result.Row lastEvictedRow,
org.gridgain.internal.h2.result.SearchRow first,
org.gridgain.internal.h2.result.SearchRow last) |
protected ReduceResultPage |
createDummyLastPage(ReduceResultPage lastPage) |
void |
fail(javax.cache.CacheException e) |
boolean |
fetchedAll()
Check if all rows has been fetched from all sources.
|
org.gridgain.internal.h2.index.Cursor |
find(@Nullable org.gridgain.internal.h2.result.SearchRow first,
@Nullable org.gridgain.internal.h2.result.SearchRow last)
Find a rows and create a cursor to iterate over the result.
|
protected abstract org.gridgain.internal.h2.index.Cursor |
findAllFetched(List<org.gridgain.internal.h2.result.Row> fetched,
@Nullable org.gridgain.internal.h2.result.SearchRow first,
@Nullable org.gridgain.internal.h2.result.SearchRow last) |
protected abstract org.gridgain.internal.h2.index.Cursor |
findInStream(@Nullable org.gridgain.internal.h2.result.SearchRow first,
@Nullable org.gridgain.internal.h2.result.SearchRow last) |
boolean |
hasSource(UUID nodeId)
Check if node with given nodeId is data source node for the index.
|
org.apache.ignite.internal.processors.query.h2.H2MemoryTracker |
memoryTracker() |
void |
memoryTracker(org.apache.ignite.internal.processors.query.h2.H2MemoryTracker memTracker)
Set memory tracker for reducer.
|
protected void |
onBlockEvict(@NotNull List<org.gridgain.internal.h2.result.Row> evictedBlock) |
void |
onFailure(UUID nodeId,
javax.cache.CacheException e)
Fail cursor callback.
|
protected Iterator<org.gridgain.internal.h2.value.Value[]> |
pollNextIterator(org.apache.ignite.internal.processors.query.h2.twostep.AbstractReducer.Pollable<ReduceResultPage> queue,
Iterator<org.gridgain.internal.h2.value.Value[]> iter) |
void |
setPageSize(int pageSize) |
void |
setSources(Map<ClusterNode,BitSet> nodesToSegmentsCnt)
Set source nodes.
|
Set<UUID> |
sources() |
protected final ReduceBlockList<org.gridgain.internal.h2.result.Row> fetched
protected org.apache.ignite.internal.processors.query.h2.H2MemoryTracker memTracker
public void setSources(Map<ClusterNode,BitSet> nodesToSegmentsCnt)
nodesToSegmentsCnt - Mapping of nodes to expected count of segments to scan.public boolean hasSource(UUID nodeId)
nodeId - Node ID.true If this index needs data from the given source node, false otherwise.public void setPageSize(int pageSize)
pageSize - Page size.public void onFailure(UUID nodeId, javax.cache.CacheException e)
nodeId - Node ID.e - Exception.public final org.gridgain.internal.h2.index.Cursor find(@Nullable
@Nullable org.gridgain.internal.h2.result.SearchRow first,
@Nullable
@Nullable org.gridgain.internal.h2.result.SearchRow last)
first - Lower bound.last - Upper bound.protected abstract org.gridgain.internal.h2.index.Cursor findInStream(@Nullable
@Nullable org.gridgain.internal.h2.result.SearchRow first,
@Nullable
@Nullable org.gridgain.internal.h2.result.SearchRow last)
first - Row.last - Row.protected abstract org.gridgain.internal.h2.index.Cursor findAllFetched(List<org.gridgain.internal.h2.result.Row> fetched, @Nullable @Nullable org.gridgain.internal.h2.result.SearchRow first, @Nullable @Nullable org.gridgain.internal.h2.result.SearchRow last)
fetched - Fetched data.first - Row.last - Row.protected void checkBounds(org.gridgain.internal.h2.result.Row lastEvictedRow,
org.gridgain.internal.h2.result.SearchRow first,
org.gridgain.internal.h2.result.SearchRow last)
lastEvictedRow - Last evicted fetched row.first - Lower bound.last - Upper bound.protected void onBlockEvict(@NotNull
@NotNull List<org.gridgain.internal.h2.result.Row> evictedBlock)
evictedBlock - Evicted block.public void addPage(ReduceResultPage page)
page - Page.protected abstract void addPage0(ReduceResultPage page)
page - Page.public void fail(javax.cache.CacheException e)
e - Error.protected final ReduceResultPage createDummyLastPage(ReduceResultPage lastPage)
lastPage - Real last page.public void memoryTracker(org.apache.ignite.internal.processors.query.h2.H2MemoryTracker memTracker)
public org.apache.ignite.internal.processors.query.h2.H2MemoryTracker memoryTracker()
protected final Iterator<org.gridgain.internal.h2.value.Value[]> pollNextIterator(org.apache.ignite.internal.processors.query.h2.twostep.AbstractReducer.Pollable<ReduceResultPage> queue, Iterator<org.gridgain.internal.h2.value.Value[]> iter)
queue - Queue to poll.iter - Current iterator.public boolean fetchedAll()
true If all rows has been fetched, false otherwise.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 8.9.23-p1 Release Date : November 19 2025