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 interface
PhysicalFile.PhysicalFileCreator
Functional interface to create the physical file.static interface
PhysicalFile.PhysicalFileDeleter
Functional 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)
PhysicalFile(org.apache.flink.core.fs.FSDataOutputStream outputStream, org.apache.flink.core.fs.Path filePath, PhysicalFile.PhysicalFileDeleter deleter, CheckpointedStateScope scope, boolean owned)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
closed()
void
deleteIfNecessary()
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).boolean
equals(Object o)
org.apache.flink.core.fs.Path
getFilePath()
org.apache.flink.core.fs.FSDataOutputStream
getOutputStream()
CheckpointedStateScope
getScope()
boolean
isDeleted()
boolean
isOpen()
boolean
isOwned()
String
toString()
-
-
-
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)
-
PhysicalFile
public PhysicalFile(@Nullable org.apache.flink.core.fs.FSDataOutputStream outputStream, org.apache.flink.core.fs.Path filePath, @Nullable PhysicalFile.PhysicalFileDeleter deleter, CheckpointedStateScope scope, boolean owned)
-
-
Method Detail
-
getOutputStream
@Nullable public org.apache.flink.core.fs.FSDataOutputStream getOutputStream()
-
deleteIfNecessary
public void deleteIfNecessary() throws IOException
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).- Throws:
IOException
- if anything goes wrong with file system.
-
closed
public boolean closed()
-
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()
-
isOwned
public boolean isOwned()
-
-