Package org.apache.hadoop.hbase.quotas
Class TestFileSystemUtilizationChore
java.lang.Object
org.apache.hadoop.hbase.quotas.TestFileSystemUtilizationChore
Test class for
FileSystemUtilizationChore.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classAn Answer implementation which verifies the sum of the Region sizes to report is as expected. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hadoop.conf.ConfigurationCreates an HBase Configuration object for the default values.private org.apache.hadoop.hbase.regionserver.RegionmockRegionReplicaWithSize(Collection<Long> storeSizes) Creates a region who has a replicaId of1.private org.apache.hadoop.hbase.regionserver.HRegionServermockRegionServer(org.apache.hadoop.conf.Configuration conf) Creates an HRegionServer using the given Configuration.private org.apache.hadoop.hbase.regionserver.RegionmockRegionWithHFileLinks(Collection<Long> storeSizes, Collection<Long> hfileSizes) private org.apache.hadoop.hbase.regionserver.RegionmockRegionWithSize(Collection<Long> storeSizes) Creates a region with a number of Stores equal to the length ofstoreSizes.private org.apache.hadoop.hbase.regionserver.RegionmockSplitParentRegionWithSize(Collection<Long> storeSizes) Creates a region which is the parent of a split.private longsum(Collection<Long> values) Sums the collection of non-null numbers.voidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
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. EachStorewill 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.
-