public class DirectWriteMarkers extends WriteMarkers
basePath, instantTime, markerDirPath| Constructor and Description |
|---|
DirectWriteMarkers(org.apache.hadoop.fs.FileSystem fs,
String basePath,
String markerFolderPath,
String instantTime) |
DirectWriteMarkers(HoodieTable table,
String instantTime) |
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
allMarkerFilePaths() |
Option<org.apache.hadoop.fs.Path> |
create(String markerName)
Creates a marker file based on the full marker name excluding the base path and instant.
|
protected Option<org.apache.hadoop.fs.Path> |
create(String partitionPath,
String dataFileName,
IOType type,
boolean checkIfExists)
Creates a marker.
|
Set<String> |
createdAndMergedDataPaths(HoodieEngineContext context,
int parallelism) |
Option<org.apache.hadoop.fs.Path> |
createWithEarlyConflictDetection(String partitionPath,
String dataFileName,
IOType type,
boolean checkIfExists,
HoodieWriteConfig config,
String fileId,
HoodieActiveTimeline activeTimeline)
Creates a marker with early conflict detection for multi-writers.
|
boolean |
deleteMarkerDir(HoodieEngineContext context,
int parallelism)
Deletes Marker directory corresponding to an instant.
|
boolean |
doesMarkerDirExist() |
create, create, createIfNotExists, createIfNotExists, getMarkerFileName, getMarkerPath, quietDeleteMarkerDir, stripMarkerSuffixpublic DirectWriteMarkers(org.apache.hadoop.fs.FileSystem fs,
String basePath,
String markerFolderPath,
String instantTime)
public DirectWriteMarkers(HoodieTable table, String instantTime)
public boolean deleteMarkerDir(HoodieEngineContext context, int parallelism)
deleteMarkerDir in class WriteMarkerscontext - HoodieEngineContext.parallelism - parallelism for deletion.public boolean doesMarkerDirExist()
throws IOException
doesMarkerDirExist in class WriteMarkerstrue if marker directory exists; false otherwise.IOExceptionpublic Set<String> createdAndMergedDataPaths(HoodieEngineContext context, int parallelism) throws IOException
createdAndMergedDataPaths in class WriteMarkerscontext - HoodieEngineContext instance.parallelism - parallelism for reading the marker files in the directory.IOExceptionpublic Set<String> allMarkerFilePaths() throws IOException
allMarkerFilePaths in class WriteMarkersIOExceptionpublic Option<org.apache.hadoop.fs.Path> create(String markerName)
markerName - the full marker name, e.g., "2021/08/13/file1.marker.CREATE"protected Option<org.apache.hadoop.fs.Path> create(String partitionPath, String dataFileName, IOType type, boolean checkIfExists)
WriteMarkerspartitionPath - partition path in the tabledataFileName - data file nametype - write IO typecheckIfExists - whether to check if the marker already existscheckIfExists is truepublic Option<org.apache.hadoop.fs.Path> createWithEarlyConflictDetection(String partitionPath, String dataFileName, IOType type, boolean checkIfExists, HoodieWriteConfig config, String fileId, HoodieActiveTimeline activeTimeline)
WriteMarkerscreateWithEarlyConflictDetection in class WriteMarkerspartitionPath - partition path in the table.dataFileName - data file name.type - write IO type.checkIfExists - whether to check if the marker already exists.config - Hudi write configs.fileId - File ID.activeTimeline - Active timeline for the write operation.checkIfExists is true.Copyright © 2023 The Apache Software Foundation. All rights reserved.