public class SimpleExecutor<I,O,E> extends Object implements HoodieExecutor<E>
HoodieExecutor interface assuming single-writer/single-reader
mode allowing it to consume from the input Iterator directly avoiding the need for
any internal materialization (ie queueing).
Such executor is aimed primarily at allowing the production-consumption chain to run w/ as little overhead as possible, at the expense of limited parallelism and therefore throughput, which is not an issue for execution environments such as Spark, where it's used primarily in a parallelism constraint environment (on executors)
| Constructor and Description |
|---|
SimpleExecutor(Iterator<I> inputItr,
HoodieConsumer<O,E> consumer,
Function<I,O> transformFunction) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination()
Allows to gracefully await the termination of the executor
|
E |
execute()
Consuming records from input iterator directly without any producers and inner message queue.
|
void |
shutdownNow()
Shuts executor down immediately, cleaning up any allocated resources
|
public E execute()
execute in interface HoodieExecutor<E>public void shutdownNow()
HoodieExecutorshutdownNow in interface HoodieExecutor<E>public boolean awaitTermination()
HoodieExecutorawaitTermination in interface HoodieExecutor<E>Copyright © 2024 The Apache Software Foundation. All rights reserved.