Package org.apache.hadoop.hbase.quotas
Class RpcThrottlingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.hadoop.hbase.HBaseIOException
org.apache.hadoop.hbase.quotas.RpcThrottlingException
- All Implemented Interfaces:
Serializable
Describe the throttling result. TODO: At some point this will be handled on the client side to
prevent operation to go on the server if the waitInterval is greater than the one got as result
of this exception.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]private static final Stringprivate RpcThrottlingException.Typeprivate long -
Constructor Summary
ConstructorsConstructorDescriptionRpcThrottlingException(RpcThrottlingException.Type type, long waitInterval, String msg) -
Method Summary
Modifier and TypeMethodDescriptionThere is little value in an RpcThrottlingException having a stack trace, since its cause is well understood without one.getType()longprotected static StringstringFromMillis(long millis) static voidthrowAtomicReadSizeExceeded(long waitInterval) static voidthrowAtomicRequestNumberExceeded(long waitInterval) static voidthrowAtomicWriteSizeExceeded(long waitInterval) static voidthrowNumReadRequestsExceeded(long waitInterval) static voidthrowNumRequestsExceeded(long waitInterval) static voidthrowNumWriteRequestsExceeded(long waitInterval) static voidthrowReadCapacityUnitExceeded(long waitInterval) static voidthrowReadSizeExceeded(long waitInterval) static voidthrowRequestCapacityUnitExceeded(long waitInterval) static voidthrowRequestHandlerUsageTimeExceeded(long waitInterval) static voidthrowRequestSizeExceeded(long waitInterval) private static voidthrowThrottlingException(RpcThrottlingException.Type type, long waitInterval) static voidthrowWriteCapacityUnitExceeded(long waitInterval) static voidthrowWriteSizeExceeded(long waitInterval) protected static longtimeFromString(String timeDiff) Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
MSG_TYPE
-
MSG_WAIT
- See Also:
-
waitInterval
-
type
-
-
Constructor Details
-
RpcThrottlingException
-
RpcThrottlingException
-
-
Method Details
-
getType
-
getWaitInterval
-
throwNumRequestsExceeded
- Throws:
RpcThrottlingException
-
throwRequestSizeExceeded
- Throws:
RpcThrottlingException
-
throwNumReadRequestsExceeded
- Throws:
RpcThrottlingException
-
throwNumWriteRequestsExceeded
- Throws:
RpcThrottlingException
-
throwWriteSizeExceeded
- Throws:
RpcThrottlingException
-
throwReadSizeExceeded
- Throws:
RpcThrottlingException
-
throwRequestCapacityUnitExceeded
public static void throwRequestCapacityUnitExceeded(long waitInterval) throws RpcThrottlingException - Throws:
RpcThrottlingException
-
throwReadCapacityUnitExceeded
- Throws:
RpcThrottlingException
-
throwWriteCapacityUnitExceeded
- Throws:
RpcThrottlingException
-
throwAtomicRequestNumberExceeded
public static void throwAtomicRequestNumberExceeded(long waitInterval) throws RpcThrottlingException - Throws:
RpcThrottlingException
-
throwAtomicReadSizeExceeded
- Throws:
RpcThrottlingException
-
throwAtomicWriteSizeExceeded
- Throws:
RpcThrottlingException
-
throwRequestHandlerUsageTimeExceeded
public static void throwRequestHandlerUsageTimeExceeded(long waitInterval) throws RpcThrottlingException - Throws:
RpcThrottlingException
-
throwThrottlingException
private static void throwThrottlingException(RpcThrottlingException.Type type, long waitInterval) throws RpcThrottlingException - Throws:
RpcThrottlingException
-
stringFromMillis
-
timeFromString
-
fillInStackTrace
There is little value in an RpcThrottlingException having a stack trace, since its cause is well understood without one. When a RegionServer is under heavy load and needs to serve many RpcThrottlingExceptions, skipping fillInStackTrace() will save CPU time and allocations, both here and later when the exception must be serialized over the wire.- Overrides:
fillInStackTracein classThrowable
-