@InterfaceAudience.Private public final class ErasureCodingUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
enablePolicy(org.apache.hadoop.fs.FileSystem fs,
String policy) |
static String |
getPolicyNameForPath(org.apache.hadoop.hdfs.DistributedFileSystem dfs,
org.apache.hadoop.fs.Path path) |
static boolean |
needsSync(TableDescriptor oldDescriptor,
TableDescriptor newDescriptor)
Check if EC policy is different between two descriptors
|
static void |
setPolicy(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
String policy)
Sets the EC policy on the path
|
static void |
setPolicy(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootDir,
TableName tableName,
String policy)
Sets the EC policy on the table directory for the specified table
|
static void |
sync(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootDir,
TableDescriptor newDescriptor)
Sync the EC policy state from the newDescriptor onto the FS for the table dir of the provided
table descriptor.
|
static void |
unsetPolicy(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootDir,
TableName tableName)
Unsets any EC policy specified on the path.
|
static void |
verifySupport(org.apache.hadoop.conf.Configuration conf,
String policy)
Runs checks against the FileSystem, verifying that HDFS is supported and the policy is
available, enabled, and works with a simple write.
|
public static void verifySupport(org.apache.hadoop.conf.Configuration conf,
String policy)
throws HBaseIOException
HBaseIOExceptionpublic static boolean needsSync(TableDescriptor oldDescriptor, TableDescriptor newDescriptor)
public static void sync(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootDir,
TableDescriptor newDescriptor)
throws IOException
newDescriptor - descriptor containing the policy and table nameIOExceptionpublic static void setPolicy(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootDir,
TableName tableName,
String policy)
throws IOException
IOExceptionpublic static void setPolicy(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
String policy)
throws IOException
IOExceptionpublic static void unsetPolicy(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootDir,
TableName tableName)
throws IOException
IOExceptionpublic static void enablePolicy(org.apache.hadoop.fs.FileSystem fs,
String policy)
throws IOException
IOExceptionpublic static String getPolicyNameForPath(org.apache.hadoop.hdfs.DistributedFileSystem dfs, org.apache.hadoop.fs.Path path) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.