public class MarkerDirState extends Object implements Serializable
| Constructor and Description |
|---|
MarkerDirState(String markerDirPath,
int markerBatchNumThreads,
org.apache.hadoop.fs.FileSystem fileSystem,
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() |
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, org.apache.hadoop.fs.FileSystem fileSystem, 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 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 © 2023 The Apache Software Foundation. All rights reserved.