@InterfaceAudience.Private public final class RecoverLeaseFSUtils extends Object
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
Modifier | Constructor and Description |
---|---|
private |
RecoverLeaseFSUtils() |
Modifier and Type | Method and Description |
---|---|
private static void |
checkIfCancelled(CancelableProgressable reporter) |
private static boolean |
checkIfTimedout(org.apache.hadoop.conf.Configuration conf,
long recoveryTimeout,
int nbAttempt,
org.apache.hadoop.fs.Path p,
long startWaiting) |
private static String |
getLogMessageDetail(int nbAttempt,
org.apache.hadoop.fs.Path p,
long startWaiting)
Returns Detail to append to any log message around lease recovering.
|
private static boolean |
isFileClosed(org.apache.hadoop.hdfs.DistributedFileSystem dfs,
Method m,
org.apache.hadoop.fs.Path p)
Call HDFS-4525 isFileClosed if it is available.
|
private static boolean |
recoverDFSFileLease(org.apache.hadoop.hdfs.DistributedFileSystem dfs,
org.apache.hadoop.fs.Path p,
org.apache.hadoop.conf.Configuration conf,
CancelableProgressable reporter) |
static void |
recoverFileLease(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
org.apache.hadoop.conf.Configuration conf) |
static void |
recoverFileLease(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
org.apache.hadoop.conf.Configuration conf,
CancelableProgressable reporter)
Recover the lease from HDFS, retrying multiple times.
|
private static boolean |
recoverLease(org.apache.hadoop.hdfs.DistributedFileSystem dfs,
int nbAttempt,
org.apache.hadoop.fs.Path p,
long startWaiting)
Try to recover the lease.
|
private static final org.slf4j.Logger LOG
private RecoverLeaseFSUtils()
public static void recoverFileLease(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static void recoverFileLease(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p, org.apache.hadoop.conf.Configuration conf, CancelableProgressable reporter) throws IOException
IOException
private static boolean recoverDFSFileLease(org.apache.hadoop.hdfs.DistributedFileSystem dfs, org.apache.hadoop.fs.Path p, org.apache.hadoop.conf.Configuration conf, CancelableProgressable reporter) throws IOException
IOException
private static boolean checkIfTimedout(org.apache.hadoop.conf.Configuration conf, long recoveryTimeout, int nbAttempt, org.apache.hadoop.fs.Path p, long startWaiting)
private static boolean recoverLease(org.apache.hadoop.hdfs.DistributedFileSystem dfs, int nbAttempt, org.apache.hadoop.fs.Path p, long startWaiting) throws FileNotFoundException
FileNotFoundException
private static String getLogMessageDetail(int nbAttempt, org.apache.hadoop.fs.Path p, long startWaiting)
private static boolean isFileClosed(org.apache.hadoop.hdfs.DistributedFileSystem dfs, Method m, org.apache.hadoop.fs.Path p)
private static void checkIfCancelled(CancelableProgressable reporter) throws InterruptedIOException
InterruptedIOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.