@InterfaceAudience.Private @InterfaceStability.Evolving public class FSHDFSUtils extends FSUtils
FSUtils.BlackListDirFilter, FSUtils.DirFilter, FSUtils.FamilyDirFilter, FSUtils.FileFilter, FSUtils.HFileFilter, FSUtils.HFileLinkFilter, FSUtils.ReferenceFileFilter, FSUtils.RegionDirFilter, FSUtils.UserTableDirFilter
CommonFSUtils.StreamLacksCapabilityException
Modifier and Type | Field and Description |
---|---|
private static Class |
dfsUtilClazz |
private static Method |
getNNAddressesMethod |
private static org.slf4j.Logger |
LOG |
FULL_RWX_PERMISSIONS, HBASE_WAL_DIR, UNSAFE_STREAM_CAPABILITY_ENFORCE
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.
|
addToHDFSBlocksDistribution, checkAccess, checkClusterIdExists, checkDfsSafeMode, checkFileSystemAvailable, checkShortCircuitReadBufferSize, checkVersion, checkVersion, computeHDFSBlocksDistribution, create, deleteRegionDir, filterFileStatuses, filterFileStatuses, getClusterId, getDFSHedgedReadMetrics, getFamilyDirs, getInstance, getLocalTableDirs, getReferenceFilePaths, getRegionDegreeLocalityMappingFromFS, getRegionDegreeLocalityMappingFromFS, getRegionDirFromRootDir, getRegionDirFromTableDir, getRegionDirs, getRegionReferenceFileCount, getTableDirs, getTableFragmentation, getTableFragmentation, getTableStoreFilePathMap, getTableStoreFilePathMap, getTableStoreFilePathMap, getTableStoreFilePathMap, getTotalTableFragmentation, getVersion, isDistributedFileSystem, isMatchingTail, listStatusWithStatusFilter, metaRegionExists, parseVersionFrom, setClusterId, setupShortCircuitRead, setVersion, setVersion, setVersion, toVersionByteArray, waitOnSafeMode
create, createForWal, createForWal, delete, deleteDirectory, getCurrentFileSystem, getDefaultBlockSize, getDefaultBufferSize, getDefaultReplication, getFilePermissions, getNamespaceDir, getPath, getRootDir, getRootDirFileSystem, getTableDir, getTableName, getWALFileSystem, getWALRegionDir, getWALRootDir, getWALTableDir, getWrongWALRegionDir, hasCapability, isExists, isHDFS, isMatchingTail, isRecoveredEdits, isStartingWithPath, listLocatedStatus, listStatus, listStatus, logFileSystemState, removeWALRootPath, renameAndSetModifyTime, setFsDefault, setRootDir, setStoragePolicy, setStoragePolicy, setWALRootDir, validateRootPath
private static final org.slf4j.Logger LOG
private static Class dfsUtilClazz
private static Method getNNAddressesMethod
public FSHDFSUtils()
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 FSUtils
fs
- FileSystem handlep
- Path of file to recover leaseconf
- Configuration handleIOException
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
boolean 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
- FileNotFoundException
private 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
InterruptedIOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.