@InterfaceAudience.LimitedPrivate(value="Coprocessors") @InterfaceStability.Evolving public class RegionPlan extends Object implements Comparable<RegionPlan>
Modifier and Type | Class and Description |
---|---|
static class |
RegionPlan.RegionPlanComparator |
Modifier and Type | Field and Description |
---|---|
private ServerName |
dest |
private HRegionInfo |
hri |
private ServerName |
source |
Constructor and Description |
---|
RegionPlan(HRegionInfo hri,
ServerName source,
ServerName dest)
Instantiate a plan for a region move, moving the specified region from
the specified source server to the specified destination server.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(RegionPlan o)
Compare the region info.
|
boolean |
equals(Object obj) |
ServerName |
getDestination()
Get the destination server for the plan for this region.
|
HRegionInfo |
getRegionInfo() |
String |
getRegionName()
Get the encoded region name for the region this plan is for.
|
ServerName |
getSource()
Get the source server for the plan for this region.
|
int |
hashCode() |
void |
setDestination(ServerName dest)
Set the destination server for the plan for this region.
|
String |
toString() |
private final HRegionInfo hri
private final ServerName source
private ServerName dest
public RegionPlan(HRegionInfo hri, ServerName source, ServerName dest)
setDestination(ServerName)
.hri
- region to be movedsource
- regionserver region should be moved fromdest
- regionserver region should be moved topublic void setDestination(ServerName dest)
public ServerName getSource()
public ServerName getDestination()
public String getRegionName()
public HRegionInfo getRegionInfo()
public int compareTo(RegionPlan o)
compareTo
in interface Comparable<RegionPlan>
o
- region plan you are comparing againstCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.