static class SimpleRequestController.TaskCountChecker extends Object implements SimpleRequestController.RowChecker
| Modifier and Type | Field and Description | 
|---|---|
| private Set<byte[]> | busyRegions | 
| private static long | MAX_WAITING_TIME | 
| private int | maxConcurrentTasksPerRegion | 
| private int | maxConcurrentTasksPerServer | 
| private int | maxTotalConcurrentTasks | 
| private Set<HRegionInfo> | regionsIncluded | 
| private Set<ServerName> | serversIncluded | 
| private Map<byte[],AtomicInteger> | taskCounterPerRegion | 
| private Map<ServerName,AtomicInteger> | taskCounterPerServer | 
| private AtomicLong | tasksInProgress | 
| Constructor and Description | 
|---|
| TaskCountChecker(int maxTotalConcurrentTasks,
                int maxConcurrentTasksPerServer,
                int maxConcurrentTasksPerRegion,
                AtomicLong tasksInProgress,
                Map<ServerName,AtomicInteger> taskCounterPerServer,
                Map<byte[],AtomicInteger> taskCounterPerRegion) | 
| Modifier and Type | Method and Description | 
|---|---|
| RequestController.ReturnCode | canTakeOperation(HRegionLocation loc,
                long heapSizeOfRow)1) check the regions is allowed. | 
| void | notifyFinal(RequestController.ReturnCode code,
           HRegionLocation loc,
           long heapSizeOfRow)Add the final ReturnCode to the checker. | 
| void | reset()Reset the inner state. | 
| private void | waitForRegion() | 
private static final long MAX_WAITING_TIME
private final Set<HRegionInfo> regionsIncluded
private final Set<ServerName> serversIncluded
private final int maxConcurrentTasksPerRegion
private final int maxTotalConcurrentTasks
private final int maxConcurrentTasksPerServer
private final Map<byte[],AtomicInteger> taskCounterPerRegion
private final Map<ServerName,AtomicInteger> taskCounterPerServer
private final Set<byte[]> busyRegions
private final AtomicLong tasksInProgress
TaskCountChecker(int maxTotalConcurrentTasks, int maxConcurrentTasksPerServer, int maxConcurrentTasksPerRegion, AtomicLong tasksInProgress, Map<ServerName,AtomicInteger> taskCounterPerServer, Map<byte[],AtomicInteger> taskCounterPerRegion)
public void reset() throws InterruptedIOException
SimpleRequestController.RowCheckerreset in interface SimpleRequestController.RowCheckerInterruptedIOExceptionprivate void waitForRegion() throws InterruptedIOException
InterruptedIOExceptionpublic RequestController.ReturnCode canTakeOperation(HRegionLocation loc, long heapSizeOfRow)
canTakeOperation in interface SimpleRequestController.RowCheckerloc - the destination of dataheapSizeOfRow - the data sizeRequestController.ReturnCode or skip
         RequestController.ReturnCodepublic void notifyFinal(RequestController.ReturnCode code, HRegionLocation loc, long heapSizeOfRow)
SimpleRequestController.RowCheckernotifyFinal in interface SimpleRequestController.RowCheckercode - The final decisionloc - the destination of dataheapSizeOfRow - the data sizeCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.