public class MarkerDirState extends Object implements Serializable
| Constructor and Description |
|---|
MarkerDirState(String markerDirPath,
int markerBatchNumThreads,
Option<TimelineServerBasedDetectionStrategy> conflictDetectionStrategy,
HoodieStorage storage,
org.apache.hudi.common.metrics.Registry metricsRegistry,
HoodieEngineContext hoodieEngineContext,
int parallelism) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMarkerCreationFuture(MarkerCreationFuture future)
Adds a
MarkerCreationCompletableFuture instance from a marker
creation request to the queue. |
boolean |
deleteAllMarkers()
Deletes markers in the directory.
|
boolean |
exists() |
List<MarkerCreationFuture> |
fetchPendingMarkerCreationRequests() |
Set<String> |
getAllMarkers() |
Option<Integer> |
getNextFileIndexToUse() |
List<MarkerCreationFuture> |
getPendingMarkerCreationRequests(boolean shouldClear) |
void |
markFileAsAvailable(int fileIndex)
Marks the file as available to use again.
|
void |
processMarkerCreationRequests(List<MarkerCreationFuture> pendingMarkerCreationFutures,
int fileIndex)
Processes pending marker creation requests.
|
public MarkerDirState(String markerDirPath, int markerBatchNumThreads, Option<TimelineServerBasedDetectionStrategy> conflictDetectionStrategy, HoodieStorage storage, org.apache.hudi.common.metrics.Registry metricsRegistry, HoodieEngineContext hoodieEngineContext, int parallelism)
public boolean exists()
true if the marker directory exists in the system.public void addMarkerCreationFuture(MarkerCreationFuture future)
MarkerCreationCompletableFuture instance from a marker
creation request to the queue.future - MarkerCreationCompletableFuture instance.public Option<Integer> getNextFileIndexToUse()
public void markFileAsAvailable(int fileIndex)
fileIndex - file indexpublic List<MarkerCreationFuture> fetchPendingMarkerCreationRequests()
public List<MarkerCreationFuture> getPendingMarkerCreationRequests(boolean shouldClear)
shouldClear - Should clear the internal request list or not.public void processMarkerCreationRequests(List<MarkerCreationFuture> pendingMarkerCreationFutures, int fileIndex)
pendingMarkerCreationFutures - futures of pending marker creation requestsfileIndex - file index to use to write markerspublic boolean deleteAllMarkers()
true if successful; false otherwise.Copyright © 2024 The Apache Software Foundation. All rights reserved.