Package org.apache.hadoop.fs
Interface LeaseRecoverable
public interface LeaseRecoverable
Whether the given Path of the FileSystem has the capability to perform lease recovery.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisFileClosed(Path file) Get the close status of a file.booleanrecoverLease(Path file) Start the lease recovery of a file.
-
Method Details
-
recoverLease
Start the lease recovery of a file.- Parameters:
file- path to a file.- Returns:
- true if the file is already closed, and it does not require lease recovery.
- Throws:
IOException- if an error occurs during lease recovery.UnsupportedOperationException- if lease recovery is not supported by this filesystem.
-
isFileClosed
Get the close status of a file.- Parameters:
file- The string representation of the path to the file- Returns:
- return true if file is closed
- Throws:
IOException- If an I/O error occurredUnsupportedOperationException- if isFileClosed is not supported by this filesystem.
-