@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 RegionInfo |
hri |
private ServerName |
source |
Constructor and Description |
---|
RegionPlan(RegionInfo 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 |
---|---|
private static int |
compareServerName(ServerName left,
ServerName right) |
int |
compareTo(RegionPlan other)
Compare the region info.
|
private static int |
compareTo(RegionPlan left,
RegionPlan right) |
boolean |
equals(Object obj) |
ServerName |
getDestination()
Get the destination server for the plan for this region.
|
RegionInfo |
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 RegionInfo hri
private final ServerName source
private ServerName dest
public RegionPlan(RegionInfo 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 RegionInfo getRegionInfo()
public int compareTo(RegionPlan other)
compareTo
in interface Comparable<RegionPlan>
other
- region plan you are comparing againstprivate static int compareTo(RegionPlan left, RegionPlan right)
private static int compareServerName(ServerName left, ServerName right)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.