Class PhysicalFile
java.lang.Object
org.apache.flink.runtime.checkpoint.filemerging.PhysicalFile
An abstraction of physical files in file-merging checkpoints.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFunctional interface to create the physical file.static interfaceFunctional interface to delete the physical file. -
Constructor Summary
ConstructorsConstructorDescriptionPhysicalFile(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
Modifier and TypeMethodDescriptionvoidclose()booleanclosed()voidDelete 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).booleanorg.apache.flink.core.fs.Pathorg.apache.flink.core.fs.FSDataOutputStreamgetScope()booleanbooleanisOpen()booleanisOwned()toString()
-
Constructor Details
-
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 Details
-
getOutputStream
@Nullable public org.apache.flink.core.fs.FSDataOutputStream getOutputStream() -
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).- Throws:
IOException- if anything goes wrong with file system.
-
closed
public boolean closed() -
close
- 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
-
isOwned
public boolean isOwned() -
equals
-
toString
-