Package org.apache.hadoop.hbase.util
Class MoveWithAck
java.lang.Object
org.apache.hadoop.hbase.util.MoveWithAck
Move Regions and make sure that they are up on the target server.If a region movement fails we
 exit as failure
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Adminprivate final Connectionprivate static final org.slf4j.Loggerprivate final List<RegionInfo>private final RegionInfoprivate final ServerNameprivate final ServerName
- 
Constructor SummaryConstructorsConstructorDescriptionMoveWithAck(Connection conn, RegionInfo regionInfo, ServerName sourceServer, ServerName targetServer, List<RegionInfo> movedRegions) 
- 
Method SummaryModifier and TypeMethodDescriptioncall()(package private) static ServerNamegetServerNameForRegion(RegionInfo region, Admin admin, Connection conn) Get servername that is up in hbase:meta hosting the given region.private static StringgetTimeDiffInSec(long startTime) private booleanisSameServer(RegionInfo region, ServerName serverName) Returns true if passed region is still on serverName when we look at hbase:meta.private voidisSuccessfulScan(RegionInfo region) Tries to scan a row from passed region
- 
Field Details- 
LOG
- 
region
- 
targetServer
- 
movedRegions
- 
sourceServer
- 
conn
- 
admin
 
- 
- 
Constructor Details- 
MoveWithAckMoveWithAck(Connection conn, RegionInfo regionInfo, ServerName sourceServer, ServerName targetServer, List<RegionInfo> movedRegions) throws IOException - Throws:
- IOException
 
 
- 
- 
Method Details- 
call- Specified by:
- callin interface- Callable<Boolean>
- Throws:
- IOException
- InterruptedException
 
- 
getTimeDiffInSec
- 
isSuccessfulScanTries to scan a row from passed region- Throws:
- IOException
 
- 
isSameServerReturns true if passed region is still on serverName when we look at hbase:meta.- Returns:
- true if region is hosted on serverName otherwise false
- Throws:
- IOException
 
- 
getServerNameForRegionstatic ServerName getServerNameForRegion(RegionInfo region, Admin admin, Connection conn) throws IOException Get servername that is up in hbase:meta hosting the given region. this is hostname + port + startcode comma-delimited. Can return null- Returns:
- regionServer hosting the given region
- Throws:
- IOException
 
 
-