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 InvalidListPruningDebug
conf
- Configuration
IOException
- when not able to create an HBase connectionpublic void destroy() throws IOException
InvalidListPruningDebug
destroy
in interface InvalidListPruningDebug
IOException
- when not able to clean up resources.public Set<String> getRegionsToBeCompacted(Integer numRegions, String time) throws IOException
getRegionsToBeCompacted
in interface InvalidListPruningDebug
numRegions
- 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 flushedIOException
public SortedSet<InvalidListPruningDebugTool.RegionPruneInfoPretty> getIdleRegions(Integer numRegions, String time) throws IOException
getIdleRegions
in interface InvalidListPruningDebug
numRegions
- 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 InvalidListPruningDebug
regionId
- region idRegionPruneInfo
of the regionIOException
- if there are any errors while trying to fetch the RegionPruneInfo
public RegionsAtTime getRegionsOnOrBeforeTime(String timeString) throws IOException
getRegionsOnOrBeforeTime
in interface InvalidListPruningDebug
timeString
- 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 TimeRegions
public static void main(String[] args)
Copyright © 2018 The Apache Software Foundation. All rights reserved.