De-serializes an exception from HBase 0.94 and before. @param buf The buffer to read from. @param request The RPC that caused this exception.
(final ChannelBuffer buf,
final HBaseRpc request)
| 1767 | * @param request The RPC that caused this exception. |
| 1768 | */ |
| 1769 | static HBaseException deserializeException(final ChannelBuffer buf, |
| 1770 | final HBaseRpc request) { |
| 1771 | // In case of failures, the rest of the response is just 2 |
| 1772 | // Hadoop-encoded strings. The first is the class name of the |
| 1773 | // exception, the 2nd is the message and stack trace. |
| 1774 | final String type = HBaseRpc.readHadoopString(buf); |
| 1775 | final String msg = HBaseRpc.readHadoopString(buf); |
| 1776 | return makeException(request, type, msg); |
| 1777 | } |
| 1778 | |
| 1779 | /** |
| 1780 | * Creates an appropriate {@link HBaseException} for the given type. |
no test coverage detected