Package org.apache.hadoop.hbase.snapshot
Class RestoreSnapshotHelper.RestoreMetaChanges
java.lang.Object
org.apache.hadoop.hbase.snapshot.RestoreSnapshotHelper.RestoreMetaChanges
- Enclosing class:
- RestoreSnapshotHelper
Describe the set of operations needed to update hbase:meta after restore.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final TableDescriptor
private List<RegionInfo>
private List<RegionInfo>
private List<RegionInfo>
-
Constructor Summary
ConstructorDescriptionRestoreMetaChanges
(TableDescriptor htd, Map<String, Pair<String, String>> parentsMap) -
Method Summary
Modifier and TypeMethodDescription(package private) void
(package private) void
Returns the map of parent-children_pair.Returns the list of new regions added during the on-disk restore.Returns the list of regions removed during the on-disk restore.Returns the list of 'restored regions' during the on-disk restore.boolean
Returns true if there're new regionsboolean
Returns true if there're regions to removeboolean
Returns true if there're regions to restore(package private) void
setNewRegions
(RegionInfo[] hris) void
updateMetaParentRegions
(Connection connection, List<RegionInfo> regionInfos)
-
Field Details
-
parentsMap
-
htd
-
regionsToRestore
-
regionsToRemove
-
regionsToAdd
-
-
Constructor Details
-
RestoreMetaChanges
-
-
Method Details
-
getTableDescriptor
-
getParentToChildrenPairMap
Returns the map of parent-children_pair.- Returns:
- the map
-
hasRegionsToAdd
Returns true if there're new regions -
getRegionsToAdd
Returns the list of new regions added during the on-disk restore. The caller is responsible to add the regions to META. e.g MetaTableAccessor.addRegionsToMeta(...)- Returns:
- the list of regions to add to META
-
hasRegionsToRestore
Returns true if there're regions to restore -
getRegionsToRestore
Returns the list of 'restored regions' during the on-disk restore. The caller is responsible to add the regions to hbase:meta if not present.- Returns:
- the list of regions restored
-
hasRegionsToRemove
Returns true if there're regions to remove -
getRegionsToRemove
Returns the list of regions removed during the on-disk restore. The caller is responsible to remove the regions from META. e.g. MetaTableAccessor.deleteRegions(...)- Returns:
- the list of regions to remove from META
-
setNewRegions
-
addRegionToRemove
-
addRegionToRestore
-
updateMetaParentRegions
public void updateMetaParentRegions(Connection connection, List<RegionInfo> regionInfos) throws IOException - Throws:
IOException
-