public class InvalidListPruningDebugTool extends Object implements InvalidListPruningDebug
| Modifier and Type | Class and Description |
|---|---|
static class |
InvalidListPruningDebugTool.RegionPruneInfoPretty
Wrapper class around
RegionPruneInfo to print human readable dates for timestamps. |
| Constructor and Description |
|---|
InvalidListPruningDebugTool() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Called once at the end to clean up the resources.
|
SortedSet<InvalidListPruningDebugTool.RegionPruneInfoPretty> |
getIdleRegions(Integer numRegions,
String time)
Return a list of RegionPruneInfo.
|
InvalidListPruningDebugTool.RegionPruneInfoPretty |
getRegionPruneInfo(String regionId)
Return the prune upper bound value of a given region.
|
RegionsAtTime |
getRegionsOnOrBeforeTime(String timeString) |
Set<String> |
getRegionsToBeCompacted(Integer numRegions,
String time)
Returns a set of regions that are live but are not empty nor have a prune upper bound recorded.
|
void |
initialize(org.apache.hadoop.conf.Configuration conf)
Initialize the Invalid List Debug Tool.
|
static void |
main(String[] args) |
public void initialize(org.apache.hadoop.conf.Configuration conf)
throws IOException
initialize in interface InvalidListPruningDebugconf - ConfigurationIOException - when not able to create an HBase connectionpublic void destroy()
throws IOException
InvalidListPruningDebugdestroy in interface InvalidListPruningDebugIOException - when not able to clean up resources.public Set<String> getRegionsToBeCompacted(Integer numRegions, String time) throws IOException
getRegionsToBeCompacted in interface InvalidListPruningDebugnumRegions - number of regionstime - time in milliseconds or relative time, regions recorded before the given time are returnedSet of regions that needs to be compacted and flushedIOExceptionpublic SortedSet<InvalidListPruningDebugTool.RegionPruneInfoPretty> getIdleRegions(Integer numRegions, String time) throws IOException
getIdleRegions in interface InvalidListPruningDebugnumRegions - number of regionstime - time in milliseconds or relative time, regions recorded before the given time are returnedIOException@Nullable public InvalidListPruningDebugTool.RegionPruneInfoPretty getRegionPruneInfo(String regionId) throws IOException
getRegionPruneInfo in interface InvalidListPruningDebugregionId - region idRegionPruneInfo of the regionIOException - if there are any errors while trying to fetch the RegionPruneInfopublic RegionsAtTime getRegionsOnOrBeforeTime(String timeString) throws IOException
getRegionsOnOrBeforeTime in interface InvalidListPruningDebugtimeString - Given a time, provide the TimeRegions at or before that time.
Time can be in milliseconds or relative time.IOException - if there are any errors while trying to fetch the TimeRegionspublic static void main(String[] args)
Copyright © 2018 The Apache Software Foundation. All rights reserved.