@Private
public class LeaseManager
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static org.slf4j.Logger |
LOG |
| Modifier and Type | Method | Description |
|---|---|---|
int |
countLease() |
|
java.util.Set<INodesInPath> |
getINodeWithLeases(INodeDirectory ancestorDir) |
Get
INodesInPath for all files under the ancestor directory which
has valid lease. |
org.apache.hadoop.hdfs.server.namenode.LeaseManager.Lease |
getLease(INodeFile src) |
|
org.apache.hadoop.fs.BatchedRemoteIterator.BatchedListEntries<org.apache.hadoop.hdfs.protocol.OpenFileEntry> |
getUnderConstructionFiles(long prevId) |
|
org.apache.hadoop.fs.BatchedRemoteIterator.BatchedListEntries<org.apache.hadoop.hdfs.protocol.OpenFileEntry> |
getUnderConstructionFiles(long prevId,
java.lang.String path) |
Get a batch of under construction files from the currently active leases.
|
void |
runLeaseChecks() |
|
void |
setLeasePeriod(long softLimit,
long hardLimit) |
|
java.lang.String |
toString() |
|
void |
triggerMonitorCheckNow() |
Trigger the currently-running Lease monitor to re-check
its leases immediately.
|
public java.util.Set<INodesInPath> getINodeWithLeases(INodeDirectory ancestorDir) throws java.io.IOException
INodesInPath for all files under the ancestor directory which
has valid lease. If the ancestor directory is null, then return all files
in the system with valid lease. Callers must hold FSNamesystem
read or write lock.ancestorDir - the ancestor INodeDirectorySet<INodesInPath>java.io.IOExceptionpublic org.apache.hadoop.fs.BatchedRemoteIterator.BatchedListEntries<org.apache.hadoop.hdfs.protocol.OpenFileEntry> getUnderConstructionFiles(long prevId)
throws java.io.IOException
java.io.IOExceptionpublic org.apache.hadoop.fs.BatchedRemoteIterator.BatchedListEntries<org.apache.hadoop.hdfs.protocol.OpenFileEntry> getUnderConstructionFiles(long prevId,
java.lang.String path)
throws java.io.IOException
prevId - the INodeID cursorjava.io.IOExceptionDFSConfigKeys.DFS_NAMENODE_LIST_OPENFILES_NUM_RESPONSESpublic org.apache.hadoop.hdfs.server.namenode.LeaseManager.Lease getLease(INodeFile src)
@VisibleForTesting public int countLease()
public void setLeasePeriod(long softLimit,
long hardLimit)
public java.lang.String toString()
toString in class java.lang.Object@VisibleForTesting public void triggerMonitorCheckNow()
@VisibleForTesting public void runLeaseChecks()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.