Package org.apache.hadoop.hbase.quotas
Class RpcThrottleStateStore
java.lang.Object
org.apache.hadoop.hbase.master.MasterStateStore
org.apache.hadoop.hbase.master.BooleanStateStore
org.apache.hadoop.hbase.quotas.RpcThrottleStateStore
Store whether rpc throttle is enabled.
Notice that, this is stored in master local region so only master can read it. For region
servers, we will publish the change through
SwitchRpcThrottleProcedure and region servers
can also query the flag through rpc request to master.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRpcThrottleStateStore(MasterRegion masterRegion, ZKWatcher watcher, String zkPath) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanparseFrom(byte[] bytes) protected byte[]toByteArray(boolean on) Methods inherited from class org.apache.hadoop.hbase.master.BooleanStateStore
get, setMethods inherited from class org.apache.hadoop.hbase.master.MasterStateStore
getState, setState
-
Field Details
-
RPC_THROTTLE_ZNODE
- See Also:
-
RPC_THROTTLE_ZNODE_DEFAULT
- See Also:
-
STATE_NAME
- See Also:
-
-
Constructor Details
-
RpcThrottleStateStore
public RpcThrottleStateStore(MasterRegion masterRegion, ZKWatcher watcher, String zkPath) throws IOException, org.apache.zookeeper.KeeperException, DeserializationException - Throws:
IOExceptionorg.apache.zookeeper.KeeperExceptionDeserializationException
-
-
Method Details
-
toByteArray
- Specified by:
toByteArrayin classBooleanStateStore
-
parseFrom
- Specified by:
parseFromin classBooleanStateStore- Throws:
DeserializationException
-