|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.FSUtils
public class FSUtils
Utility methods for interacting with the underlying file system.
Method Summary | |
---|---|
static void |
checkFileSystemAvailable(org.apache.hadoop.fs.FileSystem fs)
Checks to see if the specified file system is available |
static void |
checkVersion(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootdir,
boolean message)
Verifies current version of file system |
static void |
deleteColumnFamily(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path tabledir,
int encodedRegionName,
byte[] family)
Delete the directories used by the column family under the passed region. |
static String |
getPath(org.apache.hadoop.fs.Path p)
Return the 'path' component of a Path. |
static org.apache.hadoop.fs.Path |
getRootDir(HBaseConfiguration c)
|
static String |
getVersion(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootdir)
Verifies current version of file system |
static void |
setVersion(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootdir)
Sets version of file system |
static void |
validateRootPath(org.apache.hadoop.fs.Path root)
Verifies root directory path is a valid URI with a scheme |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void checkFileSystemAvailable(org.apache.hadoop.fs.FileSystem fs) throws IOException
fs
-
IOException
public static String getVersion(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootdir) throws IOException
fs
- rootdir
-
IOException
public static void checkVersion(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootdir, boolean message) throws IOException
fs
- file systemrootdir
- root directory of HBase installationmessage
- if true, issues a message on System.out
IOException
public static void setVersion(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootdir) throws IOException
fs
- rootdir
-
IOException
public static void validateRootPath(org.apache.hadoop.fs.Path root) throws IOException
root
- root directory path
IOException
- if not a valid URI with a schemepublic static String getPath(org.apache.hadoop.fs.Path p)
hdfs://example.org:9000/hbase_trunk/TestTable/compaction.dir
,
this method returns /hbase_trunk/TestTable/compaction.dir
.
This method is useful if you want to print out a Path without qualifying
Filesystem instance.
p
- Filesystem Path whose 'path' component we are to return.
public static void deleteColumnFamily(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path tabledir, int encodedRegionName, byte[] family) throws IOException
fs
- Filesystem to use.tabledir
- The directory under hbase.rootdir for this table.encodedRegionName
- The region name encoded.family
- Family to delete.
IOException
public static org.apache.hadoop.fs.Path getRootDir(HBaseConfiguration c) throws IOException
c
-
hbase.rootdir
as a
Path.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |