public class PhysicalFile extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
PhysicalFile.PhysicalFileDeleter
Functional interface to delete the physical file.
|
Constructor and Description |
---|
PhysicalFile(FSDataOutputStream outputStream,
Path filePath,
PhysicalFile.PhysicalFileDeleter deleter,
CheckpointedStateScope scope) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
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) |
Path |
getFilePath() |
FSDataOutputStream |
getOutputStream() |
CheckpointedStateScope |
getScope() |
boolean |
isDeleted() |
boolean |
isOpen() |
String |
toString() |
public PhysicalFile(@Nullable FSDataOutputStream outputStream, Path filePath, @Nullable PhysicalFile.PhysicalFileDeleter deleter, CheckpointedStateScope scope)
@Nullable public FSDataOutputStream getOutputStream()
public void deleteIfNecessary() throws IOException
IOException
- if anything goes wrong with file system.public void close() throws IOException
IOException
public boolean isOpen()
public boolean isDeleted()
public Path getFilePath()
public CheckpointedStateScope getScope()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.