public abstract class HBaseFileSystem extends Object
HLogFileSystem
, to make calls to the underlying filesystem.Modifier and Type | Field and Description |
---|---|
protected static int |
hdfsClientRetriesNumber
In order to handle NN connectivity hiccups, one need to retry non-idempotent operation at the
client level.
|
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
HBaseFileSystem() |
Modifier and Type | Method and Description |
---|---|
static boolean |
createNewFileOnFileSystem(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path file)
Creates the file.
|
static org.apache.hadoop.fs.FSDataOutputStream |
createPathOnFileSystem(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path dir,
boolean overwrite)
Creates a path on the file system.
|
static org.apache.hadoop.fs.FSDataOutputStream |
createPathWithPermsOnFileSystem(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission perm,
boolean overwrite)
Creates the specified file with the given permission.
|
static boolean |
deleteDirFromFileSystem(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path dir)
Deletes a directory.
|
static boolean |
deleteFileFromFileSystem(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path file)
Deletes a file.
|
static boolean |
makeDirOnFileSystem(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path dir)
Creates a directory for a filesystem and configuration object.
|
static boolean |
renameAndSetModifyTime(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dest)
rename the src path to dest path and set the dest path's modify time to current timestamp
|
static boolean |
renameDirForFileSystem(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
Renames a directory.
|
protected static void |
setRetryCounts(org.apache.hadoop.conf.Configuration conf) |
protected static void |
sleepBeforeRetry(String msg,
int sleepMultiplier)
sleeping logic for static methods; handles the interrupt exception.
|
public static final org.apache.commons.logging.Log LOG
protected static int hdfsClientRetriesNumber
public static boolean deleteFileFromFileSystem(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path file) throws IOException
fs
- file
- IOException
public static boolean deleteDirFromFileSystem(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir) throws IOException
fs
- dir
- IOException
protected static void setRetryCounts(org.apache.hadoop.conf.Configuration conf)
public static boolean makeDirOnFileSystem(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir) throws IOException
fs
- dir
- IOException
public static boolean renameDirForFileSystem(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
fs
- src
- dst
- IOException
public static org.apache.hadoop.fs.FSDataOutputStream createPathOnFileSystem(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path dir, boolean overwrite) throws IOException
fs
- dir
- overwrite
- IOException
public static org.apache.hadoop.fs.FSDataOutputStream createPathWithPermsOnFileSystem(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.permission.FsPermission perm, boolean overwrite) throws IOException
fs
- path
- perm
- overwrite
- IOException
public static boolean createNewFileOnFileSystem(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path file) throws IOException
fs
- dir
- IOException
protected static void sleepBeforeRetry(String msg, int sleepMultiplier)
public static boolean renameAndSetModifyTime(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dest) throws IOException
IOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.