public abstract class AbstractReducer extends Object implements Reducer
Reducer.RowComparator| Modifier and Type | Field and Description |
|---|---|
protected ReduceBlockList<org.h2.result.Row> |
fetched
Will be r/w from query execution thread only, does not need to be threadsafe.
|
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.h2.result.Row lastEvictedRow,
org.h2.result.SearchRow first,
org.h2.result.SearchRow last) |
protected ReduceResultPage |
createDummyLastPage(ReduceResultPage lastPage) |
void |
fail(javax.cache.CacheException e) |
org.h2.index.Cursor |
find(@Nullable org.h2.result.SearchRow first,
@Nullable org.h2.result.SearchRow last)
Find a rows and create a cursor to iterate over the result.
|
protected abstract org.h2.index.Cursor |
findAllFetched(List<org.h2.result.Row> fetched,
@Nullable org.h2.result.SearchRow first,
@Nullable org.h2.result.SearchRow last) |
protected abstract org.h2.index.Cursor |
findInStream(@Nullable org.h2.result.SearchRow first,
@Nullable org.h2.result.SearchRow last) |
boolean |
hasSource(UUID nodeId)
Check if node with given nodeId is data source node for the index.
|
protected void |
onBlockEvict(@NotNull List<org.h2.result.Row> evictedBlock) |
void |
onFailure(UUID nodeId,
javax.cache.CacheException e)
Fail cursor callback.
|
protected Iterator<org.h2.value.Value[]> |
pollNextIterator(org.apache.ignite.internal.processors.query.h2.twostep.AbstractReducer.Pollable<ReduceResultPage> queue,
Iterator<org.h2.value.Value[]> iter) |
void |
setPageSize(int pageSize) |
void |
setSources(Map<ClusterNode,BitSet> nodesToSegmentsCnt)
Set source nodes.
|
Set<UUID> |
sources() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfetchedAllprotected final ReduceBlockList<org.h2.result.Row> fetched
public void setSources(Map<ClusterNode,BitSet> nodesToSegmentsCnt)
setSources in interface ReducernodesToSegmentsCnt - Mapping of nodes to expected count of segments to scan.public boolean hasSource(UUID nodeId)
public void setPageSize(int pageSize)
setPageSize in interface ReducerpageSize - Page size.public void onFailure(UUID nodeId, javax.cache.CacheException e)
public final org.h2.index.Cursor find(@Nullable
@Nullable org.h2.result.SearchRow first,
@Nullable
@Nullable org.h2.result.SearchRow last)
protected abstract org.h2.index.Cursor findInStream(@Nullable
@Nullable org.h2.result.SearchRow first,
@Nullable
@Nullable org.h2.result.SearchRow last)
first - Row.last - Row.protected abstract 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)
fetched - Fetched data.first - Row.last - Row.protected void checkBounds(org.h2.result.Row lastEvictedRow,
org.h2.result.SearchRow first,
org.h2.result.SearchRow last)
lastEvictedRow - Last evicted fetched row.first - Lower bound.last - Upper bound.protected void onBlockEvict(@NotNull
@NotNull List<org.h2.result.Row> evictedBlock)
evictedBlock - Evicted block.public void addPage(ReduceResultPage 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.protected final Iterator<org.h2.value.Value[]> pollNextIterator(org.apache.ignite.internal.processors.query.h2.twostep.AbstractReducer.Pollable<ReduceResultPage> queue, Iterator<org.h2.value.Value[]> iter)
queue - Queue to poll.iter - Current iterator.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023