public class ModificationFile extends Object implements AutoCloseable
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
COMPACTION_FILE_SUFFIX |
static String |
FILE_SUFFIX |
| 构造器和说明 |
|---|
ModificationFile(String filePath)
Construct a ModificationFile using a file as its storage.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
abort() |
void |
close()
Release resources such as streams and caches.
|
ModificationFile |
createHardlink()
Create a hardlink for the modification file.
|
boolean |
exists() |
static ModificationFile |
getCompactionMods(TsFileResource tsFileResource) |
String |
getFilePath() |
Collection<Modification> |
getModifications()
Get all modifications stored in this file.
|
static ModificationFile |
getNormalMods(TsFileResource tsFileResource) |
void |
remove() |
void |
setFilePath(String filePath) |
void |
write(Modification mod)
Write a modification in this file.
|
public ModificationFile(String filePath)
filePath - the path of the storage file.public void close()
throws IOException
close 在接口中 AutoCloseableIOExceptionpublic void abort()
throws IOException
IOExceptionpublic void write(Modification mod) throws IOException
mod - the modification to be written.IOException - if IOException is thrown when writing the modification to the store.public Collection<Modification> getModifications()
public String getFilePath()
public void setFilePath(String filePath)
public void remove()
throws IOException
IOExceptionpublic boolean exists()
public ModificationFile createHardlink()
public static ModificationFile getNormalMods(TsFileResource tsFileResource)
public static ModificationFile getCompactionMods(TsFileResource tsFileResource)
Copyright © 2022 The Apache Software Foundation. All rights reserved.