Class TestManageTableErasureCodingPolicy
java.lang.Object
org.apache.hadoop.hbase.master.procedure.TestManageTableErasureCodingPolicy
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final org.apache.hadoop.hbase.TableName
private static final org.apache.hadoop.hbase.client.TableDescriptor
private static boolean
private static final byte[]
private static final org.slf4j.Logger
private static final org.apache.hadoop.hbase.TableName
private static final org.apache.hadoop.hbase.client.TableDescriptor
private static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
private void
assertPolicyValidationException
(String message, String expected) static void
private void
checkPolicy
(org.apache.hadoop.hdfs.DistributedFileSystem dfs, org.apache.hadoop.fs.Path path, String expectedPolicy) private void
checkRegionDirAndFilePolicies
(org.apache.hadoop.hdfs.DistributedFileSystem dfs, org.apache.hadoop.fs.Path rootDir, org.apache.hadoop.hbase.TableName testTable, String expectedDirPolicy, String expectedFilePolicy) private void
compactAwayOldFiles
(org.apache.hadoop.hbase.TableName tableName) private static boolean
enableErasureCoding
(org.apache.hadoop.hdfs.DistributedFileSystem fs) void
void
private void
recreateTable
(org.apache.hadoop.hbase.client.Admin admin, org.apache.hadoop.hbase.client.TableDescriptor desc) private void
runValidatePolicyNameTest
(Function<org.apache.hadoop.hbase.client.Admin, org.apache.hadoop.hbase.client.TableDescriptor> descriptorSupplier, TestManageTableErasureCodingPolicy.ThrowingTableDescriptorConsumer consumer) void
void
void
-
Field Details
-
CLASS_RULE
-
LOG
-
UTIL
-
FAMILY
-
NON_EC_TABLE
-
NON_EC_TABLE_DESC
-
EC_TABLE
-
EC_TABLE_DESC
-
erasureCodingSupported
-
-
Constructor Details
-
TestManageTableErasureCodingPolicy
public TestManageTableErasureCodingPolicy()
-
-
Method Details
-
beforeClass
- Throws:
Exception
-
enableErasureCoding
private static boolean enableErasureCoding(org.apache.hadoop.hdfs.DistributedFileSystem fs) throws IOException - Throws:
IOException
-
afterClass
- Throws:
Exception
-
itValidatesPolicyNameForCreate
-
itValidatesPolicyNameForAlter
-
runValidatePolicyNameTest
private void runValidatePolicyNameTest(Function<org.apache.hadoop.hbase.client.Admin, org.apache.hadoop.hbase.client.TableDescriptor> descriptorSupplier, TestManageTableErasureCodingPolicy.ThrowingTableDescriptorConsumer consumer) -
assertPolicyValidationException
-
testCreateTableErasureCodingSync
- Throws:
IOException
-
recreateTable
private void recreateTable(org.apache.hadoop.hbase.client.Admin admin, org.apache.hadoop.hbase.client.TableDescriptor desc) throws IOException - Throws:
IOException
-
testModifyTableErasureCodingSync
- Throws:
IOException
-
compactAwayOldFiles
- Throws:
IOException
-
testRestoreSnapshot
- Throws:
IOException
-
checkRegionDirAndFilePolicies
private void checkRegionDirAndFilePolicies(org.apache.hadoop.hdfs.DistributedFileSystem dfs, org.apache.hadoop.fs.Path rootDir, org.apache.hadoop.hbase.TableName testTable, String expectedDirPolicy, String expectedFilePolicy) throws IOException - Throws:
IOException
-
checkPolicy
private void checkPolicy(org.apache.hadoop.hdfs.DistributedFileSystem dfs, org.apache.hadoop.fs.Path path, String expectedPolicy) throws IOException - Throws:
IOException
-