Class TestCatalogJanitorCluster
java.lang.Object
org.apache.hadoop.hbase.master.janitor.TestCatalogJanitorCluster
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final org.slf4j.Logger
final org.junit.rules.TestName
private static final org.apache.hadoop.hbase.TableName
private static final org.apache.hadoop.hbase.TableName
private static final org.apache.hadoop.hbase.TableName
private static final org.apache.hadoop.hbase.TableName
private static final org.apache.hadoop.hbase.TableName
private static final org.apache.hadoop.hbase.TableName
private static final org.apache.hadoop.hbase.TableName
private static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
after()
void
before()
private void
disableTable
(org.apache.hadoop.hbase.TableName tableName) private void
fixHoles
(org.apache.hadoop.hbase.master.janitor.CatalogJanitor janitor) private LinkedList<org.apache.hadoop.hbase.util.Pair<org.apache.hadoop.hbase.client.RegionInfo,
org.apache.hadoop.hbase.client.RegionInfo>> getHoles
(org.apache.hadoop.hbase.master.janitor.CatalogJanitor janitor, org.apache.hadoop.hbase.TableName tableName) private org.apache.hadoop.hbase.client.RegionInfo
getRegionInfo
(org.apache.hadoop.hbase.TableName tableName, byte[] row) private static byte[]
incrementRow
(byte[] row) Take last byte and add one to it.void
Fat method where we start with a fat hbase:meta and then gradually intro problems running catalogjanitor for each to ensure it triggers complaint.void
private void
verifyCornerHoles
(org.apache.hadoop.hbase.master.janitor.CatalogJanitor janitor, org.apache.hadoop.hbase.TableName tableName) private void
verifyMiddleHole
(org.apache.hadoop.hbase.master.janitor.CatalogJanitor janitor)
-
Field Details
-
LOG
-
CLASS_RULE
-
name
-
TEST_UTIL
-
T1
-
T2
-
T3
-
T4
-
T5
-
T6
-
T7
-
-
Constructor Details
-
TestCatalogJanitorCluster
public TestCatalogJanitorCluster()
-
-
Method Details
-
before
- Throws:
Exception
-
after
- Throws:
Exception
-
testConsistency
Fat method where we start with a fat hbase:meta and then gradually intro problems running catalogjanitor for each to ensure it triggers complaint. Do one big method because takes a while to build up the context we need. We create three tables and then make holes, overlaps, add unknown servers and empty out regioninfo columns. Each should up counts in the CatalogJanitor.Report produced.- Throws:
IOException
-
incrementRow
Take last byte and add one to it. -
testHoles
- Throws:
IOException
InterruptedException
-
fixHoles
private void fixHoles(org.apache.hadoop.hbase.master.janitor.CatalogJanitor janitor) throws IOException - Throws:
IOException
-
verifyMiddleHole
private void verifyMiddleHole(org.apache.hadoop.hbase.master.janitor.CatalogJanitor janitor) throws IOException - Throws:
IOException
-
verifyCornerHoles
private void verifyCornerHoles(org.apache.hadoop.hbase.master.janitor.CatalogJanitor janitor, org.apache.hadoop.hbase.TableName tableName) throws IOException - Throws:
IOException
-
getHoles
private LinkedList<org.apache.hadoop.hbase.util.Pair<org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.hbase.client.RegionInfo>> getHoles(org.apache.hadoop.hbase.master.janitor.CatalogJanitor janitor, org.apache.hadoop.hbase.TableName tableName) throws IOException - Throws:
IOException
-
getRegionInfo
private org.apache.hadoop.hbase.client.RegionInfo getRegionInfo(org.apache.hadoop.hbase.TableName tableName, byte[] row) throws IOException - Throws:
IOException
-
disableTable
private void disableTable(org.apache.hadoop.hbase.TableName tableName) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-