public abstract class HoodieAsyncService extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
hasError |
| Modifier | Constructor and Description |
|---|---|
protected |
HoodieAsyncService() |
protected |
HoodieAsyncService(boolean runInDaemonMode) |
| Modifier and Type | Method and Description |
|---|---|
void |
enqueuePendingAsyncServiceInstant(HoodieInstant instant)
Enqueues new pending table service instant.
|
boolean |
hasError() |
boolean |
isRunInDaemonMode() |
boolean |
isShutdown() |
boolean |
isShutdownRequested() |
boolean |
isStarted() |
void |
shutdown(boolean force)
Request shutdown either forcefully or gracefully.
|
void |
start(Function<Boolean,Boolean> onShutdownCallback)
Start the service.
|
protected abstract Pair<CompletableFuture,ExecutorService> |
startService()
Service implementation.
|
void |
waitForShutdown()
Wait till the service shutdown.
|
void |
waitTillPendingAsyncServiceInstantsReducesTo(int numPending)
Wait till outstanding pending compaction/clustering reduces to the passed in value.
|
protected HoodieAsyncService()
protected HoodieAsyncService(boolean runInDaemonMode)
public boolean isStarted()
public boolean isShutdownRequested()
public boolean isShutdown()
public boolean hasError()
public void waitForShutdown()
throws ExecutionException,
InterruptedException
public void shutdown(boolean force)
force - Forcefully shutdownpublic void start(Function<Boolean,Boolean> onShutdownCallback)
onShutdownCallback - protected abstract Pair<CompletableFuture,ExecutorService> startService()
public boolean isRunInDaemonMode()
public void waitTillPendingAsyncServiceInstantsReducesTo(int numPending)
throws InterruptedException
numPending - Maximum pending compactions/clustering allowedInterruptedExceptionpublic void enqueuePendingAsyncServiceInstant(HoodieInstant instant)
instant - HoodieInstant to enqueue.Copyright © 2023 The Apache Software Foundation. All rights reserved.