Package org.apache.hadoop.hbase.quotas
Class TestFileSystemUtilizationChore
java.lang.Object
org.apache.hadoop.hbase.quotas.TestFileSystemUtilizationChore
Test class for
FileSystemUtilizationChore
.-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
An Answer implementation which verifies the sum of the Region sizes to report is as expected. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hadoop.conf.Configuration
Creates an HBase Configuration object for the default values.private org.apache.hadoop.hbase.regionserver.Region
mockRegionReplicaWithSize
(Collection<Long> storeSizes) Creates a region who has a replicaId of1
.private org.apache.hadoop.hbase.regionserver.HRegionServer
mockRegionServer
(org.apache.hadoop.conf.Configuration conf) Creates an HRegionServer using the given Configuration.private org.apache.hadoop.hbase.regionserver.Region
mockRegionWithHFileLinks
(Collection<Long> storeSizes, Collection<Long> hfileSizes) private org.apache.hadoop.hbase.regionserver.Region
mockRegionWithSize
(Collection<Long> storeSizes) Creates a region with a number of Stores equal to the length ofstoreSizes
.private org.apache.hadoop.hbase.regionserver.Region
mockSplitParentRegionWithSize
(Collection<Long> storeSizes) Creates a region which is the parent of a split.private long
sum
(Collection<Long> values) Sums the collection of non-null numbers.void
void
void
void
void
void
void
void
void
void
-
Field Details
-
CLASS_RULE
-
-
Constructor Details
-
TestFileSystemUtilizationChore
public TestFileSystemUtilizationChore()
-
-
Method Details
-
testNoOnlineRegions
-
testRegionSizes
-
testMultipleRegionSizes
-
testDefaultConfigurationProperties
-
testNonDefaultConfigurationProperties
-
testProcessingLeftoverRegions
-
testProcessingNowOfflineLeftoversAreIgnored
-
testIgnoreSplitParents
-
testIgnoreRegionReplicas
-
testNonHFilesAreIgnored
-
getDefaultHBaseConfiguration
Creates an HBase Configuration object for the default values. -
mockRegionServer
private org.apache.hadoop.hbase.regionserver.HRegionServer mockRegionServer(org.apache.hadoop.conf.Configuration conf) Creates an HRegionServer using the given Configuration. -
sum
Sums the collection of non-null numbers. -
mockRegionWithSize
Creates a region with a number of Stores equal to the length ofstoreSizes
. EachStore
will have a reported size corresponding to the element instoreSizes
.- Parameters:
storeSizes
- A list of sizes for each Store.- Returns:
- A mocked Region.
-
mockRegionWithHFileLinks
private org.apache.hadoop.hbase.regionserver.Region mockRegionWithHFileLinks(Collection<Long> storeSizes, Collection<Long> hfileSizes) -
mockSplitParentRegionWithSize
private org.apache.hadoop.hbase.regionserver.Region mockSplitParentRegionWithSize(Collection<Long> storeSizes) Creates a region which is the parent of a split.- Parameters:
storeSizes
- A list of sizes for each Store.- Returns:
- A mocked Region.
-
mockRegionReplicaWithSize
private org.apache.hadoop.hbase.regionserver.Region mockRegionReplicaWithSize(Collection<Long> storeSizes) Creates a region who has a replicaId of1
.- Parameters:
storeSizes
- A list of sizes for each Store.- Returns:
- A mocked Region.
-