Package org.apache.hadoop.hbase.master
Class MasterAnnotationReadingPriorityFunction
java.lang.Object
org.apache.hadoop.hbase.regionserver.AnnotationReadingPriorityFunction
org.apache.hadoop.hbase.master.MasterAnnotationReadingPriorityFunction
- All Implemented Interfaces:
PriorityFunction
@Private
public class MasterAnnotationReadingPriorityFunction
extends AnnotationReadingPriorityFunction
Priority function specifically for the master. This doesn't make the super users always priority
since that would make everything to the master into high priority. Specifically when reporting
that a region is in transition master will try and edit the meta table. That edit will block the
thread until successful. However if at the same time meta is also moving then we need to ensure
that the regular region that's moving isn't blocking processing of the request to online meta. To
accomplish this this priority function makes sure that all requests to transition meta are
handled in different threads from other report region in transition calls. After HBASE-21754,
ReportRegionStateTransitionRequest for meta region will be assigned a META_QOS , a separate
executor called metaTransitionExecutor will execute it. Other transition request will be executed
in priorityExecutor to prevent being mixed with normal requests
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.regionserver.AnnotationReadingPriorityFunction
annotatedQos, SCAN_VTIME_WEIGHT_CONF_KEY
-
Constructor Summary
ConstructorDescriptionMasterAnnotationReadingPriorityFunction
(RSRpcServices rpcServices) MasterAnnotationReadingPriorityFunction
(RSRpcServices rpcServices, Class<? extends RSRpcServices> clz) -
Method Summary
Modifier and TypeMethodDescriptionint
getPriority
(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param, User user) Returns a 'priority' based on the request type.Methods inherited from class org.apache.hadoop.hbase.regionserver.AnnotationReadingPriorityFunction
getAnnotatedPriority, getBasePriority, getDeadline
-
Field Details
-
META_TRANSITION_QOS
- See Also:
-
-
Constructor Details
-
MasterAnnotationReadingPriorityFunction
-
MasterAnnotationReadingPriorityFunction
public MasterAnnotationReadingPriorityFunction(RSRpcServices rpcServices, Class<? extends RSRpcServices> clz)
-
-
Method Details
-
getPriority
public int getPriority(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param, User user) Description copied from class:AnnotationReadingPriorityFunction
Returns a 'priority' based on the request type. Currently the returned priority is used for queue selection. See the SimpleRpcScheduler as example. It maintains a queue per 'priory type' HIGH_QOS (meta requests), REPLICATION_QOS (replication requests), NORMAL_QOS (user requests).- Specified by:
getPriority
in interfacePriorityFunction
- Overrides:
getPriority
in classAnnotationReadingPriorityFunction
- Returns:
- Priority of this request.
-