|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.RegionHistorian
public class RegionHistorian
The Region Historian task is to keep track of every modification a region
has to go through. Public methods are used to update the information in the
.META.
table and to retrieve it. This is a Singleton. By
default, the Historian is offline; it will not log. Its enabled in the
regionserver and master down in their guts after there's some certainty the
.META. has been deployed.
Nested Class Summary | |
---|---|
static class |
RegionHistorian.HistorianColumnKey
|
class |
RegionHistorian.RegionHistoryInformation
Inner class that only contains information about an event. |
Field Summary |
---|
Method Summary | |
---|---|
void |
addRegionAssignment(HRegionInfo info,
String serverName)
Method to add a creation event to the row in the .META table |
void |
addRegionCompaction(HRegionInfo info,
String timeTaken)
Method to add a compaction event to the row in the .META table |
void |
addRegionCreation(HRegionInfo info)
Method to add a creation event to the row in the .META table |
void |
addRegionFlush(HRegionInfo info,
String timeTaken)
Method to add a flush event to the row in the .META table |
void |
addRegionOpen(HRegionInfo info,
HServerAddress address)
Method to add a opening event to the row in the .META table |
void |
addRegionSplit(HRegionInfo oldInfo,
HRegionInfo newInfo1,
HRegionInfo newInfo2)
Method to add a split event to the rows in the .META table with information from oldInfo. |
static RegionHistorian |
getInstance()
Get the RegionHistorian Singleton instance. |
List<RegionHistorian.RegionHistoryInformation> |
getRegionHistory(String regionName)
Returns, for a given region name, an ordered list by timestamp of all values in the historian column of the .META. |
boolean |
isOnline()
|
void |
offline()
Offlines the historian. |
void |
online(HBaseConfiguration c)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static RegionHistorian getInstance()
public List<RegionHistorian.RegionHistoryInformation> getRegionHistory(String regionName)
regionName
- Region name as a string
public void addRegionAssignment(HRegionInfo info, String serverName)
info
- public void addRegionCreation(HRegionInfo info)
info
- public void addRegionOpen(HRegionInfo info, HServerAddress address)
info
- address
- public void addRegionSplit(HRegionInfo oldInfo, HRegionInfo newInfo1, HRegionInfo newInfo2)
oldInfo
- newInfo1
- newInfo2
- public void addRegionCompaction(HRegionInfo info, String timeTaken)
info
- public void addRegionFlush(HRegionInfo info, String timeTaken)
info
- public boolean isOnline()
public void online(HBaseConfiguration c)
c
- Online the historian. Invoke after cluster has spun up.public void offline()
online(HBaseConfiguration)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |