HBASE-5809 Avoid move api to take the destination server same as the source server. Addendum to correct tet case. (Ted)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1328594 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
14f80913e5
commit
144b27d1a3
|
@ -655,13 +655,13 @@ public class TestMasterObserver {
|
|||
// Try to force a move
|
||||
Collection<ServerName> servers = master.getClusterStatus().getServers();
|
||||
String destName = null;
|
||||
String firstRegionHostnamePortStr = firstGoodPair.getValue().toString();
|
||||
LOG.info("firstRegionHostnamePortStr=" + firstRegionHostnamePortStr);
|
||||
String serverNameForFirstRegion = firstGoodPair.getValue().toString();
|
||||
LOG.info("serverNameForFirstRegion=" + serverNameForFirstRegion);
|
||||
boolean found = false;
|
||||
// Find server that is NOT carrying the first region
|
||||
for (ServerName info : servers) {
|
||||
LOG.info("ServerName=" + info);
|
||||
if (!firstRegionHostnamePortStr.equals(info.getHostAndPort())) {
|
||||
if (!serverNameForFirstRegion.equals(info.getServerName())) {
|
||||
destName = info.toString();
|
||||
found = true;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue