public class TestHBaseFsck
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TestHBaseFsck.MasterSyncObserver |
| Modifier and Type | Field and Description |
|---|---|
TestName |
name |
| Constructor and Description |
|---|
TestHBaseFsck() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createTable(HBaseTestingUtility testUtil,
HTableDescriptor htd,
byte[][] splitKeys) |
static void |
deleteTable(HBaseTestingUtility testUtil,
TableName tableName) |
void |
deleteTableDir(TableName table) |
void |
setUp() |
static void |
setUpBeforeClass() |
static void |
tearDownAfterClass() |
void |
testCheckTableLocks() |
void |
testCleanUpDaughtersNotInMetaAfterFailedSplit() |
void |
testContainedRegionOverlap()
This creates and fixes a bad table where a region is completely contained
by another region.
|
void |
testCorruptLinkDirectory() |
void |
testCoveredStartKey()
This creates and fixes a bad table where a region overlaps two regions --
a start key contained in another region and its end key is contained in
yet another region.
|
void |
testDegenerateRegions()
This creates and fixes a bad table with regions that has startkey == endkey
|
void |
testDupeRegion()
This create and fixes a bad table with regions that have a duplicate
start key
|
void |
testDupeStartKey()
This create and fixes a bad table with regions that have a duplicate
start key
|
void |
testErrorReporter()
Test pluggable error reporter.
|
void |
testFixAssignmentsAndNoHdfsChecking()
Test -noHdfsChecking option can detect and fix assignments issue.
|
void |
testFixAssignmentsWhenMETAinTransition() |
void |
testFixByTable()
This creates two tables and mess both of them and fix them one by one
|
void |
testFixHdfsHolesNotWorkingWithNoHdfsChecking()
Test -fixHdfsHoles doesn't work with -noHdfsChecking option,
and -noHdfsChecking can't detect orphan Hdfs region.
|
void |
testFixMetaNotWorkingWithNoHdfsChecking()
Test -noHdfsChecking option can detect region is not in meta but deployed.
|
void |
testHBaseFsck() |
void |
testHBaseFsckClean()
This creates a clean table and confirms that the table is clean.
|
void |
testHbckAfterRegionMerge() |
void |
testHbckFixOrphanTable() |
void |
testHbckThreadpooling()
Test thread pooling in the case where there are more regions than threads
|
void |
testHbckWithExcessReplica() |
void |
testHbckWithFewerReplica() |
void |
testHbckWithRegionReplica() |
void |
testHDFSRegioninfoMissing()
This creates and fixes a bad table with a missing region -- hole in meta
and data present but .regioinfino missing (an orphan hdfs region)in the fs.
|
void |
testHDFSRegioninfoMissingAndCheckRegionBoundary()
This creates and fixes a bad table with a missing region -- hole in meta and data present but
.regioninfo missing (an orphan hdfs region)in the fs.
|
void |
testLingeringHFileLinks()
Test fixing lingering HFileLinks.
|
void |
testLingeringReferenceFile()
Test fixing lingering reference file.
|
void |
testLingeringSplitParent()
A split parent in meta, in hdfs, and not deployed
|
void |
testMetaOffline() |
void |
testMissingFirstRegion()
This creates and fixes a bad table with a missing region which is the 1st region -- hole in
meta and data missing in the fs.
|
void |
testMissingLastRegion()
This creates and fixes a bad table with missing last region -- hole in meta and data missing in
the fs.
|
void |
testMissingRegionInfoQualifier()
Test mission REGIONINFO_QUALIFIER in hbase:meta
|
void |
testNoHdfsTable()
This creates entries in hbase:meta with no hdfs data.
|
void |
testNotInHdfs()
This creates and fixes a bad table with a region that is in meta but has
no deployment or data hdfs
|
void |
testNotInHdfsWithReplicas()
This creates and fixes a bad table with a region that is in meta but has
no deployment or data hdfs.
|
void |
testNotInMetaHole()
This creates fixes a bad table with a hole in meta.
|
void |
testNotInMetaOrDeployedHole()
This creates and fixes a bad table with a region that is missing meta and
not assigned to a region server.
|
void |
testNoVersionFile()
when the hbase.version file missing, It is fix the fault.
|
void |
testOrphanedTableZNode()
Test orphaned table ZNode (for table states)
|
void |
testOverlapAndOrphan()
This creates and fixes a bad table where a region is completely contained
by another region, and there is a hole (sort of like a bad split)
|
void |
testParallelHbck()
This test makes sure that parallel instances of Hbck is disabled.
|
void |
testParallelWithRetriesHbck()
This test makes sure that with enough retries both parallel instances
of hbck will be completed successfully.
|
void |
testQuarantineCorruptHFile()
This creates a table and then corrupts an hfile.
|
void |
testQuarantineCorruptMobFile()
This creates a table and then corrupts a mob file.
|
void |
testQuarantineMissingFamdir()
This creates a table and simulates the race situation where a concurrent compaction or split
has removed an colfam dir before the corruption checker got to it.
|
void |
testQuarantineMissingHFile()
This creates a table and simulates the race situation where a concurrent compaction or split
has removed an hfile after the corruption checker learned about it.
|
void |
testQuarantineMissingRegionDir()
This creates a table and simulates the race situation where a concurrent compaction or split
has removed a region dir before the corruption checker got to it.
|
void |
testReadOnlyProperty() |
void |
testRegionBoundariesCheck() |
void |
testRegionDeployedNotInHdfs()
This creates and fixes a bad table with a missing region which is the 1st region -- hole in
meta and data missing in the fs.
|
void |
testRegionHole()
This creates and fixes a bad table with a missing region -- hole in meta
and data missing in the fs.
|
void |
testRegionShouldNotBeDeployed()
The region is not deployed when the table is disabled.
|
void |
testSidelineOverlapRegion()
This creates and fixes a bad table where an overlap group of
3 regions.
|
void |
testSplitDaughtersNotInMeta()
Split crashed after write to hbase:meta finished for the parent region, but
failed to write daughters (pre HBASE-7721 codebase)
|
void |
testTableWithNoRegions() |
void |
testValidLingeringSplitParent()
Tests that LINGERING_SPLIT_PARENT is not erroneously reported for
valid cases where the daughters are there.
|
public static void setUpBeforeClass()
throws java.lang.Exception
java.lang.Exceptionpublic static void tearDownAfterClass()
throws java.lang.Exception
java.lang.Exceptionpublic void setUp()
public void testHBaseFsck()
throws java.lang.Exception
java.lang.Exceptionpublic void testFixAssignmentsWhenMETAinTransition()
throws java.lang.Exception
java.lang.Exceptionpublic void testHBaseFsckClean()
throws java.lang.Exception
java.lang.Exceptionpublic void testHbckThreadpooling()
throws java.lang.Exception
java.lang.Exceptionpublic void testHbckFixOrphanTable()
throws java.lang.Exception
java.lang.Exceptionpublic void testParallelHbck()
throws java.lang.Exception
java.lang.Exceptionpublic void testParallelWithRetriesHbck()
throws java.lang.Exception
java.lang.Exceptionpublic void testDupeStartKey()
throws java.lang.Exception
java.lang.Exceptionpublic void testHbckWithRegionReplica()
throws java.lang.Exception
java.lang.Exceptionpublic void testHbckWithFewerReplica()
throws java.lang.Exception
java.lang.Exceptionpublic void testHbckWithExcessReplica()
throws java.lang.Exception
java.lang.Exceptionpublic void testDupeRegion()
throws java.lang.Exception
java.lang.Exceptionpublic void testDegenerateRegions()
throws java.lang.Exception
java.lang.Exceptionpublic void testContainedRegionOverlap()
throws java.lang.Exception
java.lang.Exceptionpublic void testSidelineOverlapRegion()
throws java.lang.Exception
java.lang.Exceptionpublic void testOverlapAndOrphan()
throws java.lang.Exception
java.lang.Exceptionpublic void testCoveredStartKey()
throws java.lang.Exception
java.lang.Exceptionpublic void testRegionHole()
throws java.lang.Exception
java.lang.Exceptionpublic void testHDFSRegioninfoMissing()
throws java.lang.Exception
java.lang.Exceptionpublic void testHDFSRegioninfoMissingAndCheckRegionBoundary()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotInMetaOrDeployedHole()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotInMetaHole()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotInHdfs()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotInHdfsWithReplicas()
throws java.lang.Exception
java.lang.Exceptionpublic void testNoHdfsTable()
throws java.lang.Exception
java.lang.Exceptionpublic void deleteTableDir(TableName table)
throws java.io.IOException
java.io.IOExceptionpublic void testNoVersionFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testRegionShouldNotBeDeployed()
throws java.lang.Exception
java.lang.Exceptionpublic void testFixByTable()
throws java.lang.Exception
java.lang.Exceptionpublic void testLingeringSplitParent()
throws java.lang.Exception
java.lang.Exceptionpublic void testValidLingeringSplitParent()
throws java.lang.Exception
java.lang.Exceptionpublic void testSplitDaughtersNotInMeta()
throws java.lang.Exception
java.lang.Exceptionpublic void testMissingFirstRegion()
throws java.lang.Exception
java.lang.Exceptionpublic void testRegionDeployedNotInHdfs()
throws java.lang.Exception
java.lang.Exceptionpublic void testMissingLastRegion()
throws java.lang.Exception
java.lang.Exceptionpublic void testFixAssignmentsAndNoHdfsChecking()
throws java.lang.Exception
java.lang.Exceptionpublic void testFixMetaNotWorkingWithNoHdfsChecking()
throws java.lang.Exception
java.lang.Exceptionpublic void testFixHdfsHolesNotWorkingWithNoHdfsChecking()
throws java.lang.Exception
java.lang.Exceptionpublic void testQuarantineCorruptHFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testQuarantineCorruptMobFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testQuarantineMissingHFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testQuarantineMissingFamdir()
throws java.lang.Exception
java.lang.Exceptionpublic void testQuarantineMissingRegionDir()
throws java.lang.Exception
java.lang.Exceptionpublic void testLingeringReferenceFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testLingeringHFileLinks()
throws java.lang.Exception
java.lang.Exceptionpublic void testCorruptLinkDirectory()
throws java.lang.Exception
java.lang.Exceptionpublic void testMissingRegionInfoQualifier()
throws java.lang.Exception
java.lang.Exceptionpublic void testErrorReporter()
throws java.lang.Exception
java.lang.Exceptionpublic void testCheckTableLocks()
throws java.lang.Exception
java.lang.Exceptionpublic void testOrphanedTableZNode()
throws java.lang.Exception
java.lang.Exceptionpublic void testMetaOffline()
throws java.lang.Exception
java.lang.Exceptionpublic void testTableWithNoRegions()
throws java.lang.Exception
java.lang.Exceptionpublic void testHbckAfterRegionMerge()
throws java.lang.Exception
java.lang.Exceptionpublic void testRegionBoundariesCheck()
throws java.lang.Exception
java.lang.Exceptionpublic void testReadOnlyProperty()
throws java.lang.Exception
java.lang.Exceptionpublic void testCleanUpDaughtersNotInMetaAfterFailedSplit()
throws java.lang.Exception
java.lang.Exceptionpublic static void createTable(HBaseTestingUtility testUtil,
HTableDescriptor htd,
byte[][] splitKeys)
throws java.lang.Exception
java.lang.Exceptionpublic static void deleteTable(HBaseTestingUtility testUtil,
TableName tableName)
throws java.lang.Exception
java.lang.Exception