Class PhysicalFile
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.filemerging.PhysicalFile
-
public class PhysicalFile extends Object
An abstraction of physical files in file-merging checkpoints.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePhysicalFile.PhysicalFileDeleterFunctional interface to delete the physical file.
-
Constructor Summary
Constructors Constructor Description PhysicalFile(org.apache.flink.core.fs.FSDataOutputStream outputStream, org.apache.flink.core.fs.Path filePath, PhysicalFile.PhysicalFileDeleter deleter, CheckpointedStateScope scope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voiddeleteIfNecessary()Delete this physical file if there is no reference count from logical files (all discarded), and this physical file is closed (no further writing on it).booleanequals(Object o)org.apache.flink.core.fs.PathgetFilePath()org.apache.flink.core.fs.FSDataOutputStreamgetOutputStream()CheckpointedStateScopegetScope()booleanisDeleted()booleanisOpen()StringtoString()
-
-
-
Constructor Detail
-
PhysicalFile
public PhysicalFile(@Nullable org.apache.flink.core.fs.FSDataOutputStream outputStream, org.apache.flink.core.fs.Path filePath, @Nullable PhysicalFile.PhysicalFileDeleter deleter, CheckpointedStateScope scope)
-
-
Method Detail
-
getOutputStream
@Nullable public org.apache.flink.core.fs.FSDataOutputStream getOutputStream()
-
deleteIfNecessary
public void deleteIfNecessary() throws IOExceptionDelete this physical file if there is no reference count from logical files (all discarded), and this physical file is closed (no further writing on it).- Throws:
IOException- if anything goes wrong with file system.
-
close
public void close() throws IOException- Throws:
IOException
-
isOpen
public boolean isOpen()
- Returns:
- whether this physical file is still open for writing.
-
isDeleted
public boolean isDeleted()
-
getFilePath
public org.apache.flink.core.fs.Path getFilePath()
-
getScope
public CheckpointedStateScope getScope()
-
-