Class RemoteProcedureException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.hadoop.hbase.exceptions.HBaseException
org.apache.hadoop.hbase.procedure2.ProcedureException
org.apache.hadoop.hbase.procedure2.RemoteProcedureException
- All Implemented Interfaces:
Serializable
A RemoteProcedureException is an exception from another thread or process.
RemoteProcedureExceptions are sent to 'remote' peers to signal an abort in the face of failures. When serialized for transmission we encode using Protobufs to ensure version compatibility.
RemoteProcedureException exceptions contain a Throwable as its cause. This can be a "regular" exception generated locally or a ProxyThrowable that is a representation of the original exception created on original 'remote' source. These ProxyThrowables have their their stacks traces and messages overridden to reflect the original 'remote' exception.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRemoteProcedureException
(String source, Throwable cause) Create a new RemoteProcedureException that can be serialized. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hbase.shaded.protobuf.generated.ErrorHandlingProtos.ForeignExceptionMessage
convert()
static RemoteProcedureException
deserialize
(byte[] bytes) Takes a series of bytes and tries to generate an RemoteProcedureException instance for it.static RemoteProcedureException
fromProto
(org.apache.hadoop.hbase.shaded.protobuf.generated.ErrorHandlingProtos.ForeignExceptionMessage eem) static byte[]
Converts a RemoteProcedureException to an array of bytes.static org.apache.hadoop.hbase.shaded.protobuf.generated.ErrorHandlingProtos.ForeignExceptionMessage
toString()
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
source
Name of the throwable's source such as a host or thread name. Must be non-null.
-
-
Constructor Details
-
RemoteProcedureException
Create a new RemoteProcedureException that can be serialized. It is assumed that this came form a local source.- Parameters:
source
- the host or thread name of the sourcecause
- the actual cause of the exception
-
-
Method Details
-
getSource
-
unwrapRemoteException
-
unwrapRemoteIOException
-
toString
-
serialize
Converts a RemoteProcedureException to an array of bytes.- Parameters:
source
- the name of the external exception sourcet
- the "local" external exception (local)- Returns:
- protobuf serialized version of RemoteProcedureException
-
deserialize
Takes a series of bytes and tries to generate an RemoteProcedureException instance for it.- Parameters:
bytes
- the bytes to generate theRemoteProcedureException
from- Returns:
- the ForeignExcpetion instance
- Throws:
IOException
- if there was deserialization problem this is thrown.
-
convert
public org.apache.hadoop.hbase.shaded.protobuf.generated.ErrorHandlingProtos.ForeignExceptionMessage convert() -
toProto
-
fromProto
public static RemoteProcedureException fromProto(org.apache.hadoop.hbase.shaded.protobuf.generated.ErrorHandlingProtos.ForeignExceptionMessage eem)
-