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
0406d06533
commit
44bd94721c
|
@ -1263,7 +1263,8 @@ public interface MasterObserver {
|
||||||
/**
|
/**
|
||||||
* Called after clear dead region servers.
|
* Called after clear dead region servers.
|
||||||
*/
|
*/
|
||||||
default void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx)
|
default void postClearDeadServers(ObserverContext<MasterCoprocessorEnvironment> ctx,
|
||||||
|
List<ServerName> servers, List<ServerName> notClearedServers)
|
||||||
throws IOException {}
|
throws IOException {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1596,11 +1596,12 @@ public class MasterCoprocessorHost
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void postClearDeadServers() throws IOException {
|
public void postClearDeadServers(List<ServerName> servers,
|
||||||
|
List<ServerName> notClearedServers) throws IOException {
|
||||||
execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {
|
execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {
|
||||||
@Override
|
@Override
|
||||||
public void call(MasterObserver observer) throws IOException {
|
public void call(MasterObserver observer) throws IOException {
|
||||||
observer.postClearDeadServers(this);
|
observer.postClearDeadServers(this, servers, notClearedServers);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -2163,7 +2163,9 @@ public class MasterRpcServices extends RSRpcServices
|
||||||
}
|
}
|
||||||
|
|
||||||
if (master.cpHost != null) {
|
if (master.cpHost != null) {
|
||||||
master.cpHost.postClearDeadServers();
|
master.cpHost.postClearDeadServers(
|
||||||
|
ProtobufUtil.toServerNameList(request.getServerNameList()),
|
||||||
|
ProtobufUtil.toServerNameList(response.getServerNameList()));
|
||||||
}
|
}
|
||||||
} catch (IOException io) {
|
} catch (IOException io) {
|
||||||
throw new ServiceException(io);
|
throw new ServiceException(io);
|
||||||
|
|
Loading…
Reference in New Issue