Signed-off-by: stack <stack@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
90db5e4f99
commit
a14f08876b
|
@ -2761,6 +2761,19 @@ public class HMaster extends HRegionServer implements MasterServices {
|
||||||
return initialized.isReady();
|
return initialized.isReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report whether this master is started
|
||||||
|
*
|
||||||
|
* This method is used for testing.
|
||||||
|
*
|
||||||
|
* @return true if master is ready to go, false if not.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOnline() {
|
||||||
|
return serviceStarted;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report whether this master is in maintenance mode.
|
* Report whether this master is in maintenance mode.
|
||||||
*
|
*
|
||||||
|
|
|
@ -2323,6 +2323,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
|
||||||
@QosPriority(priority=HConstants.ADMIN_QOS)
|
@QosPriority(priority=HConstants.ADMIN_QOS)
|
||||||
public StopServerResponse stopServer(final RpcController controller,
|
public StopServerResponse stopServer(final RpcController controller,
|
||||||
final StopServerRequest request) throws ServiceException {
|
final StopServerRequest request) throws ServiceException {
|
||||||
|
rpcPreCheck("stopServer");
|
||||||
requestCount.increment();
|
requestCount.increment();
|
||||||
String reason = request.getReason();
|
String reason = request.getReason();
|
||||||
regionServer.stop(reason);
|
regionServer.stop(reason);
|
||||||
|
@ -2332,6 +2333,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
|
||||||
@Override
|
@Override
|
||||||
public UpdateFavoredNodesResponse updateFavoredNodes(RpcController controller,
|
public UpdateFavoredNodesResponse updateFavoredNodes(RpcController controller,
|
||||||
UpdateFavoredNodesRequest request) throws ServiceException {
|
UpdateFavoredNodesRequest request) throws ServiceException {
|
||||||
|
rpcPreCheck("updateFavoredNodes");
|
||||||
List<UpdateFavoredNodesRequest.RegionUpdateInfo> openInfoList = request.getUpdateInfoList();
|
List<UpdateFavoredNodesRequest.RegionUpdateInfo> openInfoList = request.getUpdateInfoList();
|
||||||
UpdateFavoredNodesResponse.Builder respBuilder = UpdateFavoredNodesResponse.newBuilder();
|
UpdateFavoredNodesResponse.Builder respBuilder = UpdateFavoredNodesResponse.newBuilder();
|
||||||
for (UpdateFavoredNodesRequest.RegionUpdateInfo regionUpdateInfo : openInfoList) {
|
for (UpdateFavoredNodesRequest.RegionUpdateInfo regionUpdateInfo : openInfoList) {
|
||||||
|
@ -3693,6 +3695,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
|
||||||
RpcController controller, UpdateConfigurationRequest request)
|
RpcController controller, UpdateConfigurationRequest request)
|
||||||
throws ServiceException {
|
throws ServiceException {
|
||||||
try {
|
try {
|
||||||
|
requirePermission("updateConfiguration", Permission.Action.ADMIN);
|
||||||
this.regionServer.updateConfiguration();
|
this.regionServer.updateConfiguration();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
|
@ -3725,7 +3728,8 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ClearRegionBlockCacheResponse clearRegionBlockCache(RpcController controller,
|
public ClearRegionBlockCacheResponse clearRegionBlockCache(RpcController controller,
|
||||||
ClearRegionBlockCacheRequest request) {
|
ClearRegionBlockCacheRequest request) throws ServiceException {
|
||||||
|
rpcPreCheck("clearRegionBlockCache");
|
||||||
ClearRegionBlockCacheResponse.Builder builder =
|
ClearRegionBlockCacheResponse.Builder builder =
|
||||||
ClearRegionBlockCacheResponse.newBuilder();
|
ClearRegionBlockCacheResponse.newBuilder();
|
||||||
CacheEvictionStatsBuilder stats = CacheEvictionStats.builder();
|
CacheEvictionStatsBuilder stats = CacheEvictionStats.builder();
|
||||||
|
@ -3878,7 +3882,8 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
|
||||||
@Override
|
@Override
|
||||||
@QosPriority(priority = HConstants.ADMIN_QOS)
|
@QosPriority(priority = HConstants.ADMIN_QOS)
|
||||||
public ClearSlowLogResponses clearSlowLogsResponses(final RpcController controller,
|
public ClearSlowLogResponses clearSlowLogsResponses(final RpcController controller,
|
||||||
final ClearSlowLogResponseRequest request) {
|
final ClearSlowLogResponseRequest request) throws ServiceException {
|
||||||
|
rpcPreCheck("clearSlowLogsResponses");
|
||||||
final NamedQueueRecorder namedQueueRecorder =
|
final NamedQueueRecorder namedQueueRecorder =
|
||||||
this.regionServer.getNamedQueueRecorder();
|
this.regionServer.getNamedQueueRecorder();
|
||||||
boolean slowLogsCleaned = Optional.ofNullable(namedQueueRecorder)
|
boolean slowLogsCleaned = Optional.ofNullable(namedQueueRecorder)
|
||||||
|
|
Loading…
Reference in New Issue