@InterfaceAudience.Private @InterfaceStability.Evolving public class FSHDFSUtils extends FSUtils
FSUtils.BlackListDirFilter, FSUtils.DirFilter, FSUtils.FamilyDirFilter, FSUtils.FileFilter, FSUtils.HFileFilter, FSUtils.ReferenceFileFilter, FSUtils.RegionDirFilter, FSUtils.UserTableDirFilter| Modifier and Type | Field and Description |
|---|---|
private static Class |
dfsUtilClazz |
private static Method |
getNNAddressesMethod |
private static org.apache.commons.logging.Log |
LOG |
FULL_RWX_PERMISSIONS, WINDOWS| Constructor and Description |
|---|
FSHDFSUtils() |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
checkIfCancelled(CancelableProgressable reporter) |
(package private) boolean |
checkIfTimedout(org.apache.hadoop.conf.Configuration conf,
long recoveryTimeout,
int nbAttempt,
org.apache.hadoop.fs.Path p,
long startWaiting) |
private String |
getLogMessageDetail(int nbAttempt,
org.apache.hadoop.fs.Path p,
long startWaiting) |
private static Set<InetSocketAddress> |
getNNAddresses(org.apache.hadoop.hdfs.DistributedFileSystem fs,
org.apache.hadoop.conf.Configuration conf) |
private boolean |
isFileClosed(org.apache.hadoop.hdfs.DistributedFileSystem dfs,
Method m,
org.apache.hadoop.fs.Path p)
Call HDFS-4525 isFileClosed if it is available.
|
static boolean |
isSameHdfs(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem srcFs,
org.apache.hadoop.fs.FileSystem desFs) |
(package private) boolean |
recoverDFSFileLease(org.apache.hadoop.hdfs.DistributedFileSystem dfs,
org.apache.hadoop.fs.Path p,
org.apache.hadoop.conf.Configuration conf,
CancelableProgressable reporter) |
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.
|
(package private) boolean |
recoverLease(org.apache.hadoop.hdfs.DistributedFileSystem dfs,
int nbAttempt,
org.apache.hadoop.fs.Path p,
long startWaiting)
Try to recover the lease.
|
checkAccess, checkClusterIdExists, checkDfsSafeMode, checkFileSystemAvailable, checkShortCircuitReadBufferSize, checkVersion, checkVersion, computeHDFSBlocksDistribution, create, create, delete, deleteDirectory, deleteRegionDir, getClusterId, getCurrentFileSystem, getDefaultBlockSize, getDefaultBufferSize, getDefaultReplication, getFamilyDirs, getFilePermissions, getInstance, getLocalTableDirs, getNamespaceDir, getPath, getReferenceFilePaths, getRegionDegreeLocalityMappingFromFS, getRegionDegreeLocalityMappingFromFS, getRegionDirs, getRegionReferenceFileCount, getRootDir, getTableDir, getTableDirs, getTableFragmentation, getTableFragmentation, getTableName, getTableStoreFilePathMap, getTableStoreFilePathMap, getTableStoreFilePathMap, getTableStoreFilePathMap, getTotalTableFragmentation, getVersion, isAppendSupported, isExists, isHDFS, isMajorCompacted, isMatchingTail, isMatchingTail, isRecoveredEdits, isStartingWithPath, listStatus, listStatus, logFileSystemState, metaRegionExists, parseVersionFrom, removeRootPath, renameAndSetModifyTime, setClusterId, setFsDefault, setRootDir, setStoragePolicy, setupShortCircuitRead, setVersion, setVersion, setVersion, toVersionByteArray, validateRootPath, waitOnSafeModeprivate static final org.apache.commons.logging.Log LOG
private static Class dfsUtilClazz
private static Method getNNAddressesMethod
private static Set<InetSocketAddress> getNNAddresses(org.apache.hadoop.hdfs.DistributedFileSystem fs, org.apache.hadoop.conf.Configuration conf)
fs - conf - public static boolean isSameHdfs(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem srcFs,
org.apache.hadoop.fs.FileSystem desFs)
conf - the Configuration of HBasesrcFs - desFs - public void recoverFileLease(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
org.apache.hadoop.conf.Configuration conf,
CancelableProgressable reporter)
throws IOException
recoverFileLease in class FSUtilsfs - FileSystem handlep - Path of file to recover leaseconf - Configuration handleIOExceptionboolean recoverDFSFileLease(org.apache.hadoop.hdfs.DistributedFileSystem dfs,
org.apache.hadoop.fs.Path p,
org.apache.hadoop.conf.Configuration conf,
CancelableProgressable reporter)
throws IOException
IOExceptionboolean checkIfTimedout(org.apache.hadoop.conf.Configuration conf,
long recoveryTimeout,
int nbAttempt,
org.apache.hadoop.fs.Path p,
long startWaiting)
boolean recoverLease(org.apache.hadoop.hdfs.DistributedFileSystem dfs,
int nbAttempt,
org.apache.hadoop.fs.Path p,
long startWaiting)
throws FileNotFoundException
dfs - nbAttempt - p - startWaiting - FileNotFoundExceptionprivate String getLogMessageDetail(int nbAttempt, org.apache.hadoop.fs.Path p, long startWaiting)
nbAttempt - p - startWaiting - private boolean isFileClosed(org.apache.hadoop.hdfs.DistributedFileSystem dfs,
Method m,
org.apache.hadoop.fs.Path p)
dfs - m - p - void checkIfCancelled(CancelableProgressable reporter) throws InterruptedIOException
InterruptedIOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.