|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.catalog.MetaReader
public class MetaReader
Reads region and assignment information from .META..
Uses the CatalogTracker to obtain locations and connections to
catalogs.
| Nested Class Summary | |
|---|---|
static interface |
MetaReader.Visitor
Implementations 'visit' a catalog table row. |
| Field Summary | |
|---|---|
static byte[] |
META_REGION_PREFIX
|
| Constructor Summary | |
|---|---|
MetaReader()
|
|
| Method Summary | |
|---|---|
static java.util.Map<HRegionInfo,HServerAddress> |
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 .META.. |
static java.util.Map<HRegionInfo,HServerAddress> |
fullScan(CatalogTracker catalogTracker,
java.util.Set<java.lang.String> disabledTables)
Performs a full scan of .META., skipping regions from any
tables in the specified set of disabled tables. |
static java.util.Map<HRegionInfo,HServerAddress> |
fullScan(CatalogTracker catalogTracker,
java.util.Set<java.lang.String> disabledTables,
boolean excludeOfflinedSplitParents)
Performs a full scan of .META., skipping regions from any
tables in the specified set of disabled tables. |
static java.util.List<Result> |
fullScanOfResults(CatalogTracker catalogTracker)
Performs a full scan of .META.. |
static Pair<HRegionInfo,HServerAddress> |
getRegion(CatalogTracker catalogTracker,
byte[] regionName)
Gets the region info and assignment for the specified region from META. |
static java.util.NavigableMap<HRegionInfo,Result> |
getServerUserRegions(CatalogTracker catalogTracker,
HServerInfo hsi)
|
static java.util.List<HRegionInfo> |
getTableRegions(CatalogTracker catalogTracker,
byte[] tableName)
Gets all of the regions of the specified table. |
static java.util.List<HRegionInfo> |
getTableRegions(CatalogTracker catalogTracker,
byte[] tableName,
boolean excludeOfflinedSplitParents)
Gets all of the regions of the specified table. |
static java.util.List<Pair<HRegionInfo,HServerAddress>> |
getTableRegionsAndLocations(CatalogTracker catalogTracker,
java.lang.String tableName)
|
static Pair<HRegionInfo,HServerAddress> |
metaRowToRegionPair(Result data)
|
static Pair<HRegionInfo,HServerInfo> |
metaRowToRegionPairWithInfo(Result data)
|
static HServerAddress |
readMetaLocation(HRegionInterface metaServer)
Reads the location of META from ROOT. |
static HServerAddress |
readRegionLocation(CatalogTracker catalogTracker,
byte[] regionName)
Reads the location of the specified region from META. |
static boolean |
tableExists(CatalogTracker catalogTracker,
java.lang.String 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 |
| Field Detail |
|---|
public static final byte[] META_REGION_PREFIX
| Constructor Detail |
|---|
public MetaReader()
| Method Detail |
|---|
public static java.util.Map<HRegionInfo,HServerAddress> fullScan(CatalogTracker catalogTracker)
throws java.io.IOException
.META..
Returns a map of every region to it's currently assigned server, according to META. If the region does not have an assignment it will have a null value in the map.
java.io.IOException
public static java.util.Map<HRegionInfo,HServerAddress> fullScan(CatalogTracker catalogTracker,
java.util.Set<java.lang.String> disabledTables)
throws java.io.IOException
.META., skipping regions from any
tables in the specified set of disabled tables.
Returns a map of every region to it's currently assigned server, according to META. If the region does not have an assignment it will have a null value in the map.
catalogTracker - disabledTables - set of disabled tables that will not be returned
java.io.IOException
public static java.util.Map<HRegionInfo,HServerAddress> fullScan(CatalogTracker catalogTracker,
java.util.Set<java.lang.String> disabledTables,
boolean excludeOfflinedSplitParents)
throws java.io.IOException
.META., skipping regions from any
tables in the specified set of disabled tables.
Returns a map of every region to it's currently assigned server, according to META. If the region does not have an assignment it will have a null value in the map.
catalogTracker - disabledTables - set of disabled tables that will not be returnedexcludeOfflinedSplitParents - If true, do not include offlined split
parents in the return.
java.io.IOException
public static java.util.List<Result> fullScanOfResults(CatalogTracker catalogTracker)
throws java.io.IOException
.META..
Returns a map of every region to it's currently assigned server, according to META. If the region does not have an assignment it will have a null value in the map.
Returns HServerInfo which includes server startcode.
java.io.IOException
public static void fullScan(CatalogTracker catalogTracker,
MetaReader.Visitor visitor)
throws java.io.IOException
.META..
Returns a map of every region to it's currently assigned server, according to META. If the region does not have an assignment it will have a null value in the map.
catalogTracker - visitor -
java.io.IOException
public static void fullScan(CatalogTracker catalogTracker,
MetaReader.Visitor visitor,
byte[] startrow)
throws java.io.IOException
.META..
Returns a map of every region to it's currently assigned server, according to META. If the region does not have an assignment it will have a null value in the map.
catalogTracker - visitor - startrow - Where to start the scan. Pass null if want to begin scan
at first row.
java.io.IOException
public static HServerAddress readMetaLocation(HRegionInterface metaServer)
throws java.io.IOException
metaServer - connection to server hosting ROOT
java.io.IOException
public static HServerAddress readRegionLocation(CatalogTracker catalogTracker,
byte[] regionName)
throws java.io.IOException
catalogTracker - regionName - region to read location of
java.io.IOException
public static Pair<HRegionInfo,HServerAddress> getRegion(CatalogTracker catalogTracker,
byte[] regionName)
throws java.io.IOException
catalogTracker - regionName -
java.io.IOException
public static Pair<HRegionInfo,HServerAddress> metaRowToRegionPair(Result data)
throws java.io.IOException
data - A .META. table row.
data
or null for server address if no address set in .META. or null for a result
if no HRegionInfo found.
java.io.IOException
public static Pair<HRegionInfo,HServerInfo> metaRowToRegionPairWithInfo(Result data)
throws java.io.IOException
data - A .META. table row.
data
(or null for server address if no address set in .META.).
java.io.IOException
public static boolean tableExists(CatalogTracker catalogTracker,
java.lang.String tableName)
throws java.io.IOException
catalogTracker - tableName - table to check
java.io.IOException
public static java.util.List<HRegionInfo> getTableRegions(CatalogTracker catalogTracker,
byte[] tableName)
throws java.io.IOException
catalogTracker - tableName -
HRegionInfo.
java.io.IOException
public static java.util.List<HRegionInfo> getTableRegions(CatalogTracker catalogTracker,
byte[] tableName,
boolean excludeOfflinedSplitParents)
throws java.io.IOException
catalogTracker - tableName - excludeOfflinedSplitParents - If true, do not include offlined split
parents in the return.
HRegionInfo.
java.io.IOException
public static java.util.List<Pair<HRegionInfo,HServerAddress>> getTableRegionsAndLocations(CatalogTracker catalogTracker,
java.lang.String tableName)
throws java.io.IOException,
java.lang.InterruptedException
catalogTracker - tableName -
java.io.IOException
java.lang.InterruptedException
public static java.util.NavigableMap<HRegionInfo,Result> getServerUserRegions(CatalogTracker catalogTracker,
HServerInfo hsi)
throws java.io.IOException
catalogTracker - hsi - Server specification
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||