public abstract class WriteMarkers extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected String |
basePath |
protected String |
instantTime |
protected org.apache.hadoop.fs.Path |
markerDirPath |
| Constructor and Description |
|---|
WriteMarkers(String basePath,
String markerFolderPath,
String instantTime) |
| Modifier and Type | Method and Description |
|---|---|
abstract Set<String> |
allMarkerFilePaths() |
Option<org.apache.hadoop.fs.Path> |
create(String partitionPath,
String dataFileName,
IOType type)
Creates a marker without checking if the marker already exists.
|
abstract Set<String> |
createdAndMergedDataPaths(HoodieEngineContext context,
int parallelism) |
Option<org.apache.hadoop.fs.Path> |
createIfNotExists(String partitionPath,
String dataFileName,
IOType type)
Creates a marker if the marker does not exist.
|
abstract boolean |
deleteMarkerDir(HoodieEngineContext context,
int parallelism)
Deletes the marker directory.
|
abstract boolean |
doesMarkerDirExist() |
protected String |
getMarkerFileName(String dataFileName,
IOType type)
Gets the marker file name, in the format of "[data_file_name].marker.[IO_type]".
|
protected org.apache.hadoop.fs.Path |
getMarkerPath(String partitionPath,
String dataFileName,
IOType type)
Returns the marker path.
|
void |
quietDeleteMarkerDir(HoodieEngineContext context,
int parallelism)
Quietly deletes the marker directory.
|
static String |
stripMarkerSuffix(String path)
Strips the marker file suffix from the input path, i.e., ".marker.[IO_type]".
|
protected final String basePath
protected final transient org.apache.hadoop.fs.Path markerDirPath
protected final String instantTime
public Option<org.apache.hadoop.fs.Path> create(String partitionPath, String dataFileName, IOType type)
partitionPath - partition path in the tabledataFileName - data file nametype - write IO typepublic Option<org.apache.hadoop.fs.Path> createIfNotExists(String partitionPath, String dataFileName, IOType type)
partitionPath - partition path in the tabledataFileName - data file nametype - write IO typepublic void quietDeleteMarkerDir(HoodieEngineContext context, int parallelism)
context - HoodieEngineContext instance.parallelism - parallelism for deleting the marker files in the directory.public static String stripMarkerSuffix(String path)
path - file pathprotected String getMarkerFileName(String dataFileName, IOType type)
dataFileName - data file nametype - IO typeprotected org.apache.hadoop.fs.Path getMarkerPath(String partitionPath, String dataFileName, IOType type)
partitionPath - The partition pathdataFileName - The data file nametype - The IO typepublic abstract boolean deleteMarkerDir(HoodieEngineContext context, int parallelism)
context - HoodieEngineContext instance.parallelism - parallelism for deleting the marker files in the directory.public abstract boolean doesMarkerDirExist()
throws IOException
IOExceptionpublic abstract Set<String> createdAndMergedDataPaths(HoodieEngineContext context, int parallelism) throws IOException
context - HoodieEngineContext instance.parallelism - parallelism for reading the marker files in the directory.IOExceptionpublic abstract Set<String> allMarkerFilePaths() throws IOException
IOExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.