Package org.apache.hadoop.hbase.backup
Class HFileArchiver.File
java.lang.Object
org.apache.hadoop.hbase.backup.HFileArchiver.File
- Direct Known Subclasses:
HFileArchiver.FileablePath
,HFileArchiver.FileableStoreFile
- Enclosing class:
- HFileArchiver
Wrapper to handle file operations uniformly
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) abstract void
close()
close any outside readers of the file(package private) abstract void
delete()
Delete the file(package private) abstract Collection<HFileArchiver.File>
org.apache.hadoop.fs.FileSystem
Returns theFileSystem
on which this file resides(package private) abstract String
getName()
Returns the name of the file (not the full fs path, just the individual file name)(package private) abstract org.apache.hadoop.fs.Path
getPath()
Returns the path to this file(package private) abstract boolean
isFile()
Check to see if this is a file or a directoryboolean
moveAndClose
(org.apache.hadoop.fs.Path dest) Move the file to the given destinationtoString()
-
Field Details
-
fs
-
-
Constructor Details
-
File
-
-
Method Details
-
delete
Delete the file- Throws:
IOException
- on failure
-
isFile
Check to see if this is a file or a directory- Returns:
- true if it is a file, false otherwise
- Throws:
IOException
- onFileSystem
connection error
-
getChildren
- Returns:
- if this is a directory, returns all the children in the directory, otherwise returns an empty list
- Throws:
IOException
-
close
close any outside readers of the file- Throws:
IOException
-
getName
Returns the name of the file (not the full fs path, just the individual file name) -
getPath
Returns the path to this file -
moveAndClose
Move the file to the given destination- Returns:
- true on success
- Throws:
IOException
-
getFileSystem
Returns theFileSystem
on which this file resides -
toString
-