Class ExternalSourceDrainUtils
java.lang.Object
org.elasticsearch.xpack.esql.datasources.ExternalSourceDrainUtils
Utility for draining pages from a
CloseableIterator into an AsyncExternalSourceBuffer
with backpressure. Uses blocking wait instead of spin-wait, relying on the buffer's
notifyNotFull() in finish() to wake producers when no more input is needed.-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddrainPages(CloseableIterator<Page> pages, AsyncExternalSourceBuffer buffer) static voiddrainPages(CloseableIterator<Page> pages, AsyncExternalSourceBuffer buffer, org.elasticsearch.core.TimeValue timeout) static intdrainPagesWithBudget(CloseableIterator<Page> pages, AsyncExternalSourceBuffer buffer) static intdrainPagesWithBudget(CloseableIterator<Page> pages, AsyncExternalSourceBuffer buffer, int rowLimit) static intdrainPagesWithBudget(CloseableIterator<Page> pages, AsyncExternalSourceBuffer buffer, int rowLimit, org.elasticsearch.core.TimeValue timeout)
-
Method Details
-
drainPages
-
drainPages
public static void drainPages(CloseableIterator<Page> pages, AsyncExternalSourceBuffer buffer, org.elasticsearch.core.TimeValue timeout) -
drainPagesWithBudget
public static int drainPagesWithBudget(CloseableIterator<Page> pages, AsyncExternalSourceBuffer buffer) -
drainPagesWithBudget
public static int drainPagesWithBudget(CloseableIterator<Page> pages, AsyncExternalSourceBuffer buffer, int rowLimit) -
drainPagesWithBudget
public static int drainPagesWithBudget(CloseableIterator<Page> pages, AsyncExternalSourceBuffer buffer, int rowLimit, org.elasticsearch.core.TimeValue timeout)
-