HBASE-19325 Pass a list of server name to postClearDeadServers
Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
20d811121f
commit
de16690b7a
|
@ -970,8 +970,8 @@ public class RSGroupAdminEndpoint extends RSGroupAdminService
|
|||
}
|
||||
|
||||
@Override
|
||||
public void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx)
|
||||
throws IOException {
|
||||
public void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx,
|
||||
List<ServerName> servers, List<ServerName> notClearedServers) throws IOException {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -84,8 +84,8 @@ public class BaseMasterAndRegionObserver extends BaseRegionObserver
|
|||
}
|
||||
|
||||
@Override
|
||||
public void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx)
|
||||
throws IOException {
|
||||
public void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx,
|
||||
List<ServerName> servers, List<ServerName> notClearedServers) throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -95,8 +95,8 @@ public class BaseMasterObserver implements MasterObserver {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx)
|
||||
throws IOException {
|
||||
public void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx,
|
||||
List<ServerName> servers, List<ServerName> notClearedServers) throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1067,7 +1067,8 @@ public interface MasterObserver extends Coprocessor {
|
|||
/**
|
||||
* Called after clear dead region servers.
|
||||
*/
|
||||
void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException;
|
||||
void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx,
|
||||
List<ServerName> servers, List<ServerName> notClearedServers) throws IOException;
|
||||
|
||||
/**
|
||||
* Called before servers are moved to target region server group
|
||||
|
|
|
@ -1208,12 +1208,13 @@ public class MasterCoprocessorHost
|
|||
});
|
||||
}
|
||||
|
||||
public void postClearDeadServers() throws IOException {
|
||||
public void postClearDeadServers(final List<ServerName> servers,
|
||||
final List<ServerName> notClearedServers) throws IOException {
|
||||
execOperation(coprocessors.isEmpty() ? null : new CoprocessorOperation() {
|
||||
@Override
|
||||
public void call(MasterObserver oserver, ObserverContext<MasterCoprocessorEnvironment> ctx)
|
||||
throws IOException {
|
||||
oserver.postClearDeadServers(ctx);
|
||||
oserver.postClearDeadServers(ctx, servers, notClearedServers);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1162,7 +1162,9 @@ public class MasterRpcServices extends RSRpcServices
|
|||
}
|
||||
|
||||
if (master.cpHost != null) {
|
||||
master.cpHost.postClearDeadServers();
|
||||
master.cpHost.postClearDeadServers(
|
||||
ProtobufUtil.toServerNameList(request.getServerNameList()),
|
||||
ProtobufUtil.toServerNameList(response.getServerNameList()));
|
||||
}
|
||||
} catch (IOException io) {
|
||||
throw new ServiceException(io);
|
||||
|
|
|
@ -2613,8 +2613,8 @@ public class AccessController extends BaseMasterAndRegionObserver
|
|||
}
|
||||
|
||||
@Override
|
||||
public void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx)
|
||||
throws IOException { }
|
||||
public void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx,
|
||||
List<ServerName> servers, List<ServerName> notClearedServers) throws IOException { }
|
||||
|
||||
@Override
|
||||
public void preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA,
|
||||
|
|
|
@ -288,8 +288,8 @@ public class TestMasterObserver {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx)
|
||||
throws IOException {
|
||||
public void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx,
|
||||
List<ServerName> servers, List<ServerName> notClearedServers) throws IOException {
|
||||
}
|
||||
|
||||
public boolean wasDispatchMergeCalled() {
|
||||
|
|
Loading…
Reference in New Issue