|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.catalog.MetaReader
@InterfaceAudience.Private public class MetaReader
Reads region and assignment information from .META..
| Nested Class Summary | |
|---|---|
static interface |
MetaReader.Visitor
Implementations 'visit' a catalog table row. |
| Constructor Summary | |
|---|---|
MetaReader()
|
|
| Method Summary | |
|---|---|
static List<Result> |
fullScan(CatalogTracker catalogTracker)
Performs a full scan of .META.. |
static void |
fullScan(CatalogTracker catalogTracker,
MetaReader.Visitor visitor)
Performs a full scan of .META.. |
static void |
fullScan(CatalogTracker catalogTracker,
MetaReader.Visitor visitor,
byte[] startrow)
Performs a full scan of a catalog table. |
static Map<HRegionInfo,ServerName> |
fullScan(CatalogTracker catalogTracker,
Set<TableName> disabledTables)
Performs a full scan of .META., skipping regions from any
tables in the specified set of disabled tables. |
static Map<HRegionInfo,ServerName> |
fullScan(CatalogTracker catalogTracker,
Set<TableName> disabledTables,
boolean excludeOfflinedSplitParents)
Performs a full scan of .META., skipping regions from any
tables in the specified set of disabled tables. |
static void |
fullScanMetaAndPrint(CatalogTracker catalogTracker)
|
static List<Result> |
fullScanOfMeta(CatalogTracker catalogTracker)
Performs a full scan of a .META. table. |
static Pair<HRegionInfo,ServerName> |
getRegion(CatalogTracker catalogTracker,
byte[] regionName)
Gets the region info and assignment for the specified region. |
static int |
getRegionCount(org.apache.hadoop.conf.Configuration c,
String tableName)
Count regions in .META. for passed table. |
static Result |
getRegionResult(CatalogTracker catalogTracker,
byte[] regionName)
Gets the result in META for the specified region. |
static Pair<HRegionInfo,HRegionInfo> |
getRegionsFromMergeQualifier(CatalogTracker catalogTracker,
byte[] regionName)
Get regions from the merge qualifier of the specified merged region |
static Scan |
getScanForTableName(TableName tableName)
This method creates a Scan object that will only scan catalog rows that belong to the specified table. |
static NavigableMap<HRegionInfo,Result> |
getServerUserRegions(CatalogTracker catalogTracker,
ServerName serverName)
|
static List<HRegionInfo> |
getTableRegions(CatalogTracker catalogTracker,
TableName tableName)
Gets all of the regions of the specified table. |
static List<HRegionInfo> |
getTableRegions(CatalogTracker catalogTracker,
TableName tableName,
boolean excludeOfflinedSplitParents)
Gets all of the regions of the specified table. |
static List<Pair<HRegionInfo,ServerName>> |
getTableRegionsAndLocations(CatalogTracker catalogTracker,
TableName tableName)
|
static List<Pair<HRegionInfo,ServerName>> |
getTableRegionsAndLocations(CatalogTracker catalogTracker,
TableName tableName,
boolean excludeOfflinedSplitParents)
|
static boolean |
tableExists(CatalogTracker catalogTracker,
TableName tableName)
Checks if the specified table exists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MetaReader()
| Method Detail |
|---|
public static Map<HRegionInfo,ServerName> fullScan(CatalogTracker catalogTracker,
Set<TableName> disabledTables)
throws IOException
.META., skipping regions from any
tables in the specified set of disabled tables.
catalogTracker - disabledTables - set of disabled tables that will not be returned
IOException
public static Map<HRegionInfo,ServerName> fullScan(CatalogTracker catalogTracker,
Set<TableName> disabledTables,
boolean excludeOfflinedSplitParents)
throws IOException
.META., skipping regions from any
tables in the specified set of disabled tables.
catalogTracker - disabledTables - set of disabled tables that will not be returnedexcludeOfflinedSplitParents - If true, do not include offlined split
parents in the return.
IOException
public static List<Result> fullScan(CatalogTracker catalogTracker)
throws IOException
.META..
Result
IOException
public static List<Result> fullScanOfMeta(CatalogTracker catalogTracker)
throws IOException
.META. table.
Result
IOException
public static void fullScan(CatalogTracker catalogTracker,
MetaReader.Visitor visitor)
throws IOException
.META..
catalogTracker - visitor - Visitor invoked against each row.
IOException
public static Pair<HRegionInfo,ServerName> getRegion(CatalogTracker catalogTracker,
byte[] regionName)
throws IOException
catalogTracker - regionName - Region to lookup.
regionName
IOException
public static Result getRegionResult(CatalogTracker catalogTracker,
byte[] regionName)
throws IOException
catalogTracker - regionName -
IOException
public static Pair<HRegionInfo,HRegionInfo> getRegionsFromMergeQualifier(CatalogTracker catalogTracker,
byte[] regionName)
throws IOException
IOException
public static boolean tableExists(CatalogTracker catalogTracker,
TableName tableName)
throws IOException
catalogTracker - tableName - table to check
IOException
public static List<HRegionInfo> getTableRegions(CatalogTracker catalogTracker,
TableName tableName)
throws IOException
catalogTracker - tableName -
HRegionInfo.
IOException
public static List<HRegionInfo> getTableRegions(CatalogTracker catalogTracker,
TableName tableName,
boolean excludeOfflinedSplitParents)
throws IOException
catalogTracker - tableName - excludeOfflinedSplitParents - If true, do not include offlined split
parents in the return.
HRegionInfo.
IOExceptionpublic static Scan getScanForTableName(TableName tableName)
tableName - bytes of table's name
public static List<Pair<HRegionInfo,ServerName>> getTableRegionsAndLocations(CatalogTracker catalogTracker,
TableName tableName)
throws IOException,
InterruptedException
catalogTracker - tableName -
IOException
InterruptedException
public static List<Pair<HRegionInfo,ServerName>> getTableRegionsAndLocations(CatalogTracker catalogTracker,
TableName tableName,
boolean excludeOfflinedSplitParents)
throws IOException,
InterruptedException
catalogTracker - tableName -
IOException
InterruptedException
public static NavigableMap<HRegionInfo,Result> getServerUserRegions(CatalogTracker catalogTracker,
ServerName serverName)
throws IOException
catalogTracker - serverName -
IOException
public static void fullScanMetaAndPrint(CatalogTracker catalogTracker)
throws IOException
IOException
public static void fullScan(CatalogTracker catalogTracker,
MetaReader.Visitor visitor,
byte[] startrow)
throws IOException
catalogTracker - visitor - Visitor invoked against each row.startrow - Where to start the scan. Pass null if want to begin scan
at first row.
.META., the default (pass false to scan .META.)
IOException
public static int getRegionCount(org.apache.hadoop.conf.Configuration c,
String tableName)
throws IOException
.META. for passed table.
c - tableName -
tableName
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||