@InterfaceAudience.Private public class MetaReader extends Object
hbase:meta.| Modifier and Type | Class and Description |
|---|---|
static interface |
MetaReader.Visitor
Implementations 'visit' a catalog table row.
|
| Constructor and Description |
|---|
MetaReader() |
| Modifier and Type | Method and Description |
|---|---|
static List<Result> |
fullScan(CatalogTracker catalogTracker)
Performs a full scan of
hbase:meta. |
static void |
fullScan(CatalogTracker catalogTracker,
MetaReader.Visitor visitor)
Performs a full scan of
hbase: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
hbase: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
hbase: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
hbase: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
hbase:meta for passed table. |
static Result |
getRegionResult(CatalogTracker catalogTracker,
byte[] regionName)
Gets the result in hbase: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.
|
public static Map<HRegionInfo,ServerName> fullScan(CatalogTracker catalogTracker, Set<TableName> disabledTables) throws IOException
hbase:meta, skipping regions from any
tables in the specified set of disabled tables.catalogTracker - disabledTables - set of disabled tables that will not be returnedIOExceptionpublic static Map<HRegionInfo,ServerName> fullScan(CatalogTracker catalogTracker, Set<TableName> disabledTables, boolean excludeOfflinedSplitParents) throws IOException
hbase: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.IOExceptionpublic static List<Result> fullScan(CatalogTracker catalogTracker) throws IOException
hbase:meta.ResultIOExceptionpublic static List<Result> fullScanOfMeta(CatalogTracker catalogTracker) throws IOException
hbase:meta table.ResultIOExceptionpublic static void fullScan(CatalogTracker catalogTracker, MetaReader.Visitor visitor) throws IOException
hbase:meta.catalogTracker - visitor - Visitor invoked against each row.IOExceptionpublic static Pair<HRegionInfo,ServerName> getRegion(CatalogTracker catalogTracker, byte[] regionName) throws IOException
catalogTracker - regionName - Region to lookup.regionNameIOExceptionpublic static Result getRegionResult(CatalogTracker catalogTracker, byte[] regionName) throws IOException
catalogTracker - regionName - IOExceptionpublic static Pair<HRegionInfo,HRegionInfo> getRegionsFromMergeQualifier(CatalogTracker catalogTracker, byte[] regionName) throws IOException
IOExceptionpublic static boolean tableExists(CatalogTracker catalogTracker, TableName tableName) throws IOException
catalogTracker - tableName - table to checkIOExceptionpublic static List<HRegionInfo> getTableRegions(CatalogTracker catalogTracker, TableName tableName) throws IOException
catalogTracker - tableName - HRegionInfo.IOExceptionpublic 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 namepublic static List<Pair<HRegionInfo,ServerName>> getTableRegionsAndLocations(CatalogTracker catalogTracker, TableName tableName) throws IOException, InterruptedException
catalogTracker - tableName - IOExceptionInterruptedExceptionpublic static List<Pair<HRegionInfo,ServerName>> getTableRegionsAndLocations(CatalogTracker catalogTracker, TableName tableName, boolean excludeOfflinedSplitParents) throws IOException, InterruptedException
catalogTracker - tableName - IOExceptionInterruptedExceptionpublic static NavigableMap<HRegionInfo,Result> getServerUserRegions(CatalogTracker catalogTracker, ServerName serverName) throws IOException
catalogTracker - serverName - IOExceptionpublic static void fullScanMetaAndPrint(CatalogTracker catalogTracker) throws IOException
IOExceptionpublic 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.
hbase:meta, the default (pass false to scan hbase:meta)IOExceptionpublic static int getRegionCount(org.apache.hadoop.conf.Configuration c,
String tableName)
throws IOException
hbase:meta for passed table.c - tableName - tableNameIOExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.