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) |
boolean |
deleteMarkerDir(HoodieEngineContext context,
int parallelism)
Deletes Marker directory corresponding to an instant.
|
boolean |
doesMarkerDirExist() |
create, 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 trueCopyright © 2022 The Apache Software Foundation. All rights reserved.