|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.catalog.MetaEditor
public class MetaEditor
Writes region and assignment information to .META.
.
TODO: Put MetaReader and MetaEditor together; doesn't make sense having
them distinct.
Constructor Summary | |
---|---|
MetaEditor()
|
Method Summary | |
---|---|
static void |
addDaughter(CatalogTracker catalogTracker,
HRegionInfo regionInfo,
ServerName sn)
|
static void |
addRegionsToMeta(CatalogTracker catalogTracker,
List<HRegionInfo> regionInfos)
Adds a META row for each of the specified new regions. |
static void |
addRegionToMeta(CatalogTracker catalogTracker,
HRegionInfo regionInfo)
Adds a META row for the specified new region. |
static void |
deleteDaughtersReferencesInParent(CatalogTracker catalogTracker,
HRegionInfo parent)
Deletes daughters references in offlined split parent. |
static void |
deleteRegion(CatalogTracker catalogTracker,
HRegionInfo regionInfo)
Deletes the specified region from META. |
static HRegionInfo |
getHRegionInfo(Result data)
|
static void |
offlineParentInMeta(CatalogTracker catalogTracker,
HRegionInfo parent,
HRegionInfo a,
HRegionInfo b)
Offline parent in meta. |
static void |
updateMetaLocation(CatalogTracker catalogTracker,
HRegionInfo regionInfo,
ServerName sn)
Updates the location of the specified META region in ROOT to be the specified server hostname and startcode. |
static void |
updateRegionLocation(CatalogTracker catalogTracker,
HRegionInfo regionInfo,
ServerName sn)
Updates the location of the specified region in META to be the specified server hostname and startcode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetaEditor()
Method Detail |
---|
public static void addRegionToMeta(CatalogTracker catalogTracker, HRegionInfo regionInfo) throws IOException
regionInfo
- region information
IOException
- if problem connecting or updating metapublic static void addRegionsToMeta(CatalogTracker catalogTracker, List<HRegionInfo> regionInfos) throws IOException
catalogTracker
- CatalogTrackerregionInfos
- region information list
IOException
- if problem connecting or updating metapublic static void offlineParentInMeta(CatalogTracker catalogTracker, HRegionInfo parent, HRegionInfo a, HRegionInfo b) throws NotAllMetaRegionsOnlineException, IOException
catalogTracker
- parent
- a
- Split daughter region Ab
- Split daughter region B
NotAllMetaRegionsOnlineException
IOException
public static void addDaughter(CatalogTracker catalogTracker, HRegionInfo regionInfo, ServerName sn) throws NotAllMetaRegionsOnlineException, IOException
NotAllMetaRegionsOnlineException
IOException
public static void updateMetaLocation(CatalogTracker catalogTracker, HRegionInfo regionInfo, ServerName sn) throws IOException, ConnectException
Uses passed catalog tracker to get a connection to the server hosting ROOT and makes edits to that region.
catalogTracker
- catalog trackerregionInfo
- region to update location ofsn
- Server name
IOException
ConnectException
- Usually because the regionserver carrying .META.
is down.
NullPointerException
- Because no -ROOT- server connectionpublic static void updateRegionLocation(CatalogTracker catalogTracker, HRegionInfo regionInfo, ServerName sn) throws IOException
Uses passed catalog tracker to get a connection to the server hosting META and makes edits to that region.
catalogTracker
- catalog trackerregionInfo
- region to update location ofsn
- Server name
IOException
public static void deleteRegion(CatalogTracker catalogTracker, HRegionInfo regionInfo) throws IOException
catalogTracker
- regionInfo
- region to be deleted from META
IOException
public static void deleteDaughtersReferencesInParent(CatalogTracker catalogTracker, HRegionInfo parent) throws NotAllMetaRegionsOnlineException, IOException
catalogTracker
- parent
- Parent row we're to remove daughter reference from
NotAllMetaRegionsOnlineException
IOException
public static HRegionInfo getHRegionInfo(Result data) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |