Search in sources :

Example 1 with IsRpcThrottleEnabledResponse

use of org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsRpcThrottleEnabledResponse in project hbase by apache.

the class MasterQuotaManager method isRpcThrottleEnabled.

public IsRpcThrottleEnabledResponse isRpcThrottleEnabled(IsRpcThrottleEnabledRequest request) throws IOException {
    if (initialized) {
        masterServices.getMasterCoprocessorHost().preIsRpcThrottleEnabled();
        boolean enabled = isRpcThrottleEnabled();
        IsRpcThrottleEnabledResponse response = IsRpcThrottleEnabledResponse.newBuilder().setRpcThrottleEnabled(enabled).build();
        masterServices.getMasterCoprocessorHost().postIsRpcThrottleEnabled(enabled);
        return response;
    } else {
        LOG.warn("Skip get rpc throttle because rpc quota is disabled");
        return IsRpcThrottleEnabledResponse.newBuilder().setRpcThrottleEnabled(false).build();
    }
}
Also used : IsRpcThrottleEnabledResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsRpcThrottleEnabledResponse)

Aggregations

IsRpcThrottleEnabledResponse (org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsRpcThrottleEnabledResponse)1